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

dojox.charting: MouseIndicator error with empty data set #242

Closed
gardiol opened this issue Mar 5, 2018 · 2 comments
Closed

dojox.charting: MouseIndicator error with empty data set #242

gardiol opened this issue Mar 5, 2018 · 2 comments
Milestone

Comments

@gardiol
Copy link

gardiol commented Mar 5, 2018

Creating a MouseIndicator on an empty data set result in lots of undefined errors in the console log.
To fix this, it's a very very simple fix in dojox/charting/action2d/_IndicatorElement.js.uncompressed.js at row 305: add "else if ( r )":

if(typeof r == "number"){ x = i+1; y = r; if(i > 0){ px = i; py = data[i-1]; } }else if ( r ){ x = r.x; y = r.y; if(i > 0){ px = data[i-1].x; py = data[i-1].y; } }

Because if data is an empty list ([]) the above if will end up in the "else" statement and try to assign r.x to x. Changing the "else" to "else if ( r )" fix it without side-effects, at least i can see.

@dylans
Copy link
Member

dylans commented Mar 5, 2018

This repo is for general Dojo 2 issues... moving this issue to dojo/dojox. If you would like to raise a PR per the contribution guidelines, we'll review it and land it for a future version of Dojo 1.x.

@dylans
Copy link
Member

dylans commented Mar 5, 2018

Issue moved to dojo/dojox #279 via ZenHub

@dylans dylans added this to the 2018.03 milestone Mar 5, 2018
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