Open MarvMartian opened 10 years ago
Simple, it is cognitive dissonance on the use of shapes.id = 0. Zero denotes a null value, but it's returned as the very first id from renderRegion (and since we work right to left on bars, the very first bar is the 0th and therefore it is forever "nullish" in nature and therefore won't highlight).
Here's a hack fix that I'm reluctant to commit (because it's a hack):
1328: shapes = this.renderRegion(i);
// ********* insert after 1328
if (shapes.id == 0) {
// hack to avoid using '0' for id's, because a 0 id is used
// for null values later
shapes = this.renderRegion(i); // better go get another shapes.id that isn't zero
}
// *********** end of insertion
Repro: Modify the "simple" demo from the docs to render only one bar chart, as follows (note the large data element as the last bar, so we can see it; it is the only '10'):
Only the very first bar chart has the issue. Subsequent identical bar charts added to the same demo file work as advertised. Same issue on Chrome 31, Safari 7, Firefox 26, IE11. Note: I'm using jquery-2.0.3.