33 lines
785 B
Plaintext
33 lines
785 B
Plaintext
![]() |
@using antblazorpro.Services
|
||
|
@namespace antblazorpro.Pages.Dashboard.Analysis
|
||
|
@inject IChartService ChartService
|
||
|
<AntDesign.Charts.Column @ref="_chart" Config="_chartConfig" />
|
||
|
|
||
|
@code
|
||
|
{
|
||
|
private IChartComponent _chart;
|
||
|
private ColumnConfig _chartConfig = new ColumnConfig
|
||
|
{
|
||
|
XField = "x",
|
||
|
YField = "y",
|
||
|
Height = 45,
|
||
|
Padding = new[] { 8, 8, 8, 8 },
|
||
|
AutoFit = true,
|
||
|
XAxis = new CatAxis
|
||
|
{
|
||
|
Visible = false
|
||
|
},
|
||
|
YAxis = new ValueAxis
|
||
|
{
|
||
|
Visible = false
|
||
|
}
|
||
|
};
|
||
|
|
||
|
protected override async Task OnInitializedAsync()
|
||
|
{
|
||
|
await base.OnInitializedAsync();
|
||
|
var data = await ChartService.GetVisitDataAsync();
|
||
|
await _chart.ChangeData(data);
|
||
|
}
|
||
|
}
|