reactochart icon indicating copy to clipboard operation
reactochart copied to clipboard

Specifying only x or only y domain in XYPlot breaks resolveXYScales in some cases

Open cloudonshore opened this issue 8 years ago • 0 comments

This problem only occurs when either x or y is set in the domain prop of XYPlot, but not when both are set, nor when the domain prop is not specified.

The error occurs in /src/utils/resolveXYScales.js. I only see the error in the built code, but after trying to parse it out of the unbuilt code I believe it's line 360-361. It's possible to resolve this issue by explicitly specifying both x and y in the scaleType prop on XYPlot.

As a way to reproduce, the example on the following line will generate the error if the scaleType="linear" prop is removed: https://github.com/spotify/reactochart/blob/0.2.1/examples/src/Examples.jsx#L111

cloudonshore avatar Sep 08 '16 02:09 cloudonshore