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

Crash with multiple categories and ordered bars #5

Closed
hnguye34 opened this issue Apr 15, 2021 · 1 comment
Closed

Crash with multiple categories and ordered bars #5

hnguye34 opened this issue Apr 15, 2021 · 1 comment

Comments

@hnguye34
Copy link

Hello,

When I am using ordered bars (to have multiple categories side by side), all label are "Nan".
Because the series.data[i][2] can be empty and so "b" variable is undefined.
var b = series.data[i].length > 2 ? series.data[i][2] : 0; (line 59)

Could you add a check to prevent this crash please ?
(Something like for example): var b = series.data[i].length > 2 && series.data[i][2] ? series.data[i][2] : 0; )

Thank you for your help !

@cleroux
Copy link
Owner

cleroux commented Apr 21, 2021

Thank you for reporting this and the suggested fix. I have pushed the commit to master.

@cleroux cleroux closed this as completed Apr 21, 2021
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