This commit is contained in:
Samuele Locatelli
2023-09-22 19:03:24 +02:00
10 changed files with 8 additions and 82 deletions
+1
View File
@@ -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" />
+2 -2
View File
@@ -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
View File
@@ -1 +1 @@
6.16.2306.915
6.16.2302.2309
+1 -1
View File
@@ -1 +1 @@
6.16.2304.0419
6.16.2306.0612
-1
View File
@@ -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);
}
}
}
+1 -1
View File
@@ -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>
+2 -1
View File
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Components;
using EgwCoreLib.Razor.Data;
using Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.SPEC.Data;
-16
View File
@@ -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