You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
Thank you. But this is such a trivial thing that i am not going to do a pull request, specially since i have limited internet access at work and it would not be proper due to company procedures.
@gardiol commented on Mon Mar 05 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 commented on Mon Mar 05 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.
The text was updated successfully, but these errors were encountered: