[Feature Request] RadzenSeriesDataLabels: Custom Formatter for Data Labels

Hello,

I would like to propose a small feature enhancement for RadzenSeriesDataLabels.

Added in "RadzenSeriesDataLabels.razor.cs"

[Parameter]
public Func<object, string>? Formatter { get; set; }

Replaced in "RadzenSeriesDataLabels.razor"

Value="@label.Text"

with

Value="@(Formatter != null ? Formatter(label.Text) : label.Text)"

Replaced in "DonutChartConfig.razor"

 <RadzenSeriesDataLabels Visible="@showDataLabels" />

with

<RadzenSeriesDataLabels Visible="@showDataLabels" Formatter="@(v => $"{Convert.ToDouble(v):N0} €")" />

Before

After

Motivation

This allows custom formatting of data labels, similar to other chart libraries, without breaking existing functionality.

What is your opinion about this feature request?

Best regards

Check 11 branch - there are a lot of chart improvements! You can submit also pull request against the same branch with your proposal.