Skip to content

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

@cloudonshore

Description

@cloudonshore

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions