ant-design-charts-blazor
ant-design-charts-blazor copied to clipboard
How to change data
如何动态改变数据 There are no examples 请求接口之后 怎么重新渲染,找了半天也不知道怎么做
I made a class for the data and initialized it first with 0.
private Pie[] data =
{
new Pie
{
Type = "Good",
Value = 0,
},
new Pie
{
Type = "Failed",
Value = 0,
},
new Pie
{
Type = "In Progress",
Value = 0,
},
};
After this i created a method on OnInitializedAsync() to fill in the value:
data.First(x => x.Type == "Good").Value = countOkChecks;
data.First(x => x.Type == "Failed").Value = countNotOkChecks;
data.First(x => x.Type == "In Progress").Value = countInProgressChecks;

同问,数据更新后图标不更新
终于,昨天找到了实例: https://ant-design-blazor.gitee.io/zh-CN/charts/generalconfigration#components-generalconfigration-demo-interop