ant-design-blazor / ant-design-blazor/ant-design-charts-blazor

Localize "Total" Label in Donut Chart

未关闭
#29 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C#
星标
186
派生
44
PR 合并指标
30 天内没有已合并 PR

描述

I have a donut chart defined with:
```

protected DonutConfig ConfigSpreading { get; private set; } = new DonutConfig
{
ForceFit = true,
Color = new[] { "#314A9B", "#9D4FA0", "#E45E8D", "#FF8671", "#FFBD5E", "#F9F871", "#6154A2", "#F1F1E6" },
Theme = "dark",
Radius = 0.8,
Padding = "auto",
AngleField = "effort",
ColorField = "customer"
};
```

Here I want to localize the "Total" label. I saw in the source code that I can set:

`Statistic = new DonutViewConfigStatistic { Visible = true },
`
and in the OnInitializedAsync Method:

`ConfigSpreading.Statistic.TotalLabel = Localizer["TotalLabel"];`

How is this option intended to use?

But as soon as I set the Statistic Property the chart is no longer rendered.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。