Skip to content

HorizontalBarSeries y can't be string #1431

Open

Description

@NEsanya

In the documentation, the y field says: "Type: (Horizontal Bar Series): string | number". But in practice, the y field can only be a number.
Example:

<XYPlot width={300} height={300}>
  <HorizontalBarSeries
    data={[
      { y: "APPLE", x: 7 },
      { y: "BANANA", x: 10 }
    ]}
  />
</XYPlot>

That code throws many errors on the console. But if we put an int in the y field, then everything will work.

Activity

  1. kaustubhai commented on Sep 23, 2021

    @kaustubhai

    Same goes for VerticalBarSeries, x can't be a string

  2. Jefff-yang commented on Sep 29, 2021

    @Jefff-yang

    I think you just need to state xtype to be ordinal, something like this
    image

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