Radzen column series chart value format

Hi,

I would like to show value in different format. I have values that represent seconds and I would like to show it, if possible, as timespan. I tried saving value in timespan type and use it in chart but then I get the error "System.InvalidOperationException: No coercion operator is defined between types 'System.Nullable`1[System.TimeSpan]' and 'System.Double'". Can I do something like that?

You can check this demo which shows how to format values.

<RadzenValueAxis Formatter="@FormatAsUSD">

@code {
    string FormatAsUSD(object value)
    {
        return ((double)value).ToString("C0", CultureInfo.CreateSpecificCulture("en-US"));
    }
}
1 Like

Hi,

I implemented that now and it works. Thank you for your help.