Skip to content

Prop validation for axis fails with ordinal scales #36

Description

@robatron

I'm getting the following prop validation failure when an xScale is ordinal:

Warning: Failed propType: Invalid prop `xScale` of value `band` supplied to `Grid`, expected one of ["linear","identity","sqrt","pow","log","quantize","quantile","ordinal","time"].

It looks like when a scale is set to ordinal, it actually is set to 'band' via axis.jsx: https://github.com/react-d3/react-d3-core/blob/master/src/axis/axis.jsx#L80

Would including 'band' in the allowed prop types fix this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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