Skip to content

Commit

Permalink
RadzenChart throws an exception when all series data is zero. Fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
akorchev committed Jan 6, 2025
1 parent 1125894 commit 4b88b18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Radzen.Blazor/LinearScale.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public override double Scale(double value, bool padding)

protected virtual double CalculateTickCount(int distance)
{
return Math.Ceiling(Math.Abs(Output.End - Output.Start) / distance);
return Math.Max(1, Math.Ceiling(Math.Abs(Output.End - Output.Start) / distance));
}

public override (double Start, double End, double Step) Ticks(int distance)
Expand Down

0 comments on commit 4b88b18

Please sign in to comment.