Merge branch 'develop' of https://gitlab.steamware.net/steamware/mapo-core into develop
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Blazored.LocalStorage" Version="4.3.0" />
|
||||
<PackageReference Include="EgwCoreLib.Razor" Version="1.4.2306-beta.2916" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.9" />
|
||||
|
||||
@@ -129,8 +129,8 @@ namespace MP.INVE.Pages
|
||||
mostra = true;
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
await Task.Delay(50);
|
||||
if (firstRender)
|
||||
{
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2306.915
|
||||
6.16.2302.2309
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2304.0419
|
||||
6.16.2306.0612
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
<canvas id="@Id"></canvas>
|
||||
@@ -1,59 +0,0 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using MP.Data;
|
||||
using MP.SPEC.Data;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace MP.SPEC.Components.Chart
|
||||
{
|
||||
public partial class Doughnut
|
||||
{
|
||||
[Inject]
|
||||
private IJSRuntime JSRuntime { get; set; } = null!;
|
||||
|
||||
|
||||
public enum ChartType
|
||||
{
|
||||
Pie,
|
||||
Bar,
|
||||
Doughnut
|
||||
}
|
||||
|
||||
//[Parameter]
|
||||
public string Id { get; set; } = "myChart";
|
||||
|
||||
[Parameter]
|
||||
public ChartType Type { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public double[] Data { get; set; } = null!;
|
||||
[Parameter]
|
||||
public List<DoughnutStyling> BackgroundColor { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public string[] Labels { get; set; } = null!;
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
var config = new
|
||||
{
|
||||
Type = Type.ToString().ToLower(),
|
||||
Options = new
|
||||
{
|
||||
Responsive = true,
|
||||
},
|
||||
Data = new
|
||||
{
|
||||
Datasets = new[]
|
||||
{
|
||||
new { Data = Data, BackgroundColor = BackgroundColor.Select(x=>x.color), borderColor = BackgroundColor.Select(x=>x.border), borderWidth= 0, offset= 1, borderRadius = 0
|
||||
}
|
||||
},
|
||||
Labels = Labels
|
||||
}
|
||||
};
|
||||
|
||||
await JSRuntime.InvokeVoidAsync("setup", Id, config);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
{
|
||||
@if (Data != null)
|
||||
{
|
||||
<MP.SPEC.Components.Chart.Doughnut Type="@Chart.Doughnut.ChartType.Doughnut" Data="@Data.ToArray()" BackgroundColor="@colors"></MP.SPEC.Components.Chart.Doughnut>
|
||||
<Doughnut Type="@Doughnut.ChartType.Doughnut" Data="@Data.ToArray()" BackgroundColor="@colors"></Doughnut>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using EgwCoreLib.Razor.Data;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.SPEC.Data;
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
using System.Drawing;
|
||||
|
||||
namespace MP.SPEC.Data
|
||||
{
|
||||
public class DoughnutStyling
|
||||
{
|
||||
public string color { get; set; }
|
||||
public string border { get; set; }
|
||||
|
||||
public DoughnutStyling(string color, string border)
|
||||
{
|
||||
this.color = color;
|
||||
this.border = border;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.0 KiB |
Reference in New Issue
Block a user