Radzen chart: I have zero problems... :-(

Hi,
I'm using RadzenChart. My RadzenLineSeries Data property takes a collection of a class that contains a string (alphabetically plotted names) and a decimal value.
The string values goes on the X axis, the decimal on the Y axis.

When the RadzenLineSeries decimal values are all zero (though has the X axis string values), the chart itself doesn't render correctly/no line series is drawn (i.e. where it should be - along the zero point on the Y axis).

If you add similar further RadzenLineSeries (decimal values all zero), nothing appears on the chart.

As soon as one RadzenLineSeries contains a single non-zero decimal value, all RadzenLineSeries are drawn correctly (including those that still are "all zero").

What can be done to plot a line series that has a range along one axis, but on the other axis values are all zero?

Thank you!
Matt

You can try setting the Min and Max attributes of RadzenValueAxis. When everything is zero they are probably zero as well.

1 Like

Thank you for the quick response - that does the trick: set min and max and the line magically appears.
This does mean I will have to set up dynamic min/max properties, and say "if all decimal values in all series are zero, then set min/max to (say) -5/5", otherwise... etc.

It would probably be worth having a useful default value for min/max on the chart for this sort of instance? Rather than having the line just not appear/chart not be rendered correctly for what is an entirely valid use case?

We would accept a pull request with such a default that better support this case.

1 Like