Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HorizontalBarSeries y can't be string #1431

Open
NEsanya opened this issue Sep 17, 2021 · 2 comments
Open

HorizontalBarSeries y can't be string #1431

NEsanya opened this issue Sep 17, 2021 · 2 comments

Comments

@NEsanya
Copy link

NEsanya commented Sep 17, 2021

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.

@kaustubhai
Copy link

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

@Jefff-yang
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants