For now, it throws because the getAxis() function returns NaN for min, max, and steps when calculating the corresponding props for the X-axis.
I checked what Excel does when it gets only one data point. It looks like Excel calculates the range based on an ”assumption“ that the chart should look nice. If I understand correctly, it uses 1 as the X coord (if not explicitly specified). I suggest that the one data point will never be outside the range.

We can probably do something similar (for the range of X).
For now, it throws because the
getAxis()function returnsNaNformin,max, andstepswhen calculating the corresponding props for the X-axis.I checked what Excel does when it gets only one data point. It looks like Excel calculates the range based on an ”assumption“ that the chart should look nice. If I understand correctly, it uses 1 as the X coord (if not explicitly specified). I suggest that the one data point will never be outside the range.
We can probably do something similar (for the range of X).