Is there any way to group the different category label ? For exampel if I have a multy year data set, could I somehow make it so that the Year number is displayed underneath all the months only 1 time, so to not have to repeat it and clutter up all the month names ?
Hi @iustin94,
There is no way to group the category labels. You can however format the category display the way you need via the Formatter callback.
<RadzenChart>
<RadzenCategoryAxis Formatter="@FormatCategory" />
</RadzenChart>
@code {
string FormatCategory(object value)
{
// return the desired string representation of "value"
}
}
HI thank's for the hint. I tried using that but the value object returns null from the chart even tough there is a string give,
Here you can see my chart definition:
And when the formatter gets called the value provided is null
Try adding a null check:
string CategoryLabelFormatter(object value)
{
if (value != null)
{
//
}
return null;
}
1 Like
This works, but it seems like a bug. I don't call this funciton anywhere else except for this chart, and in this chart all the data points have a coresponding category label, so I should not get a null value. This is more of a workaround