Skip to content

Commit

Permalink
fixes #1721
Browse files Browse the repository at this point in the history
  • Loading branch information
beto-rodriguez committed Dec 24, 2024
1 parent a847153 commit 11f0de4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/LiveChartsCore/CoreAxis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,16 @@ public AxisLimit GetLimits()
if (minDI < mind) mind = minDI;
}

if (double.IsInfinity(minZoomDelta))
{
// at this point the chart data is empty...
// force the limits to the known bounds

minZoomDelta = max - min;
mind = min;
maxd = max;
}

return new(min, max, minZoomDelta, mind, maxd);
}

Expand Down

0 comments on commit 11f0de4

Please sign in to comment.