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

ResponsiveBarCanvas is not plotting all data #2209

Closed
hafeezulkareem opened this issue Jan 4, 2023 · 2 comments
Closed

ResponsiveBarCanvas is not plotting all data #2209

hafeezulkareem opened this issue Jan 4, 2023 · 2 comments

Comments

@hafeezulkareem
Copy link

Describe/explain the bug
I am trying to plot a bar chart using ResponsiveBarCanvas with 1000 data points. It's not plotting all the data points in the chart. We are getting one TypeError as well (e.getBBox is not a function). I am stuck with it for a long time, can you please help me with it?

To Reproduce
You can refer to the code in this sandbox.

Expected behavior

  1. ResponsiveBarCanvas should plot the chart with all the data points.
  2. The TypeError should be resolved.

Screenshots
image

@tkonopka
Copy link
Contributor

tkonopka commented Jan 4, 2023

Hi @hafeezulkareem.

  1. The curious arrangement of bars in your screenshot comes about because your data points do not have unique identifiers. Give all your data points different "country" codes and the chart should work.

  2. That error with getBBox is a know issue and has been fixed in fix(canvas): fix getRelativeCursor for non SVG implementations #2125, but the fix is not yet available in a release. To avoid the error, either use ResponsiveBar instead of ResponsiveBarCanvas, or install the package from github.

@hafeezulkareem
Copy link
Author

Hey @tkonopka, got it. Thank you for the quick help.

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

2 participants