Opened 12 years ago

Last modified 12 years ago

#5419 closed defect

Custom labels on chart fails to check for -ve index to array — at Version 1

Reported by: guest Owned by: Eugene Lazutkin
Priority: high Milestone: 1.1
Component: Charting Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Adam Peller)

_getLabel in /dojox/charting/axis2d/Default.js fails to check for a negative index when attempting to find a label:

290 	                                --lo;
291 	                                if(lo < l.length && eq(l[lo].value, number)){

fails where lo==0, changing to

291 	                                if(lo>=0 && lo < l.length && eq(l[lo].value, number)){

works. It may not be necessary to test for lo<l.length.

Tested on 1.0.1, but code seems unchanged in trunk.

Paul Barrass.

Change History (1)

comment:1 Changed 12 years ago by Adam Peller

Description: modified (diff)
Owner: changed from Tom Trenka to Eugene Lazutkin
Note: See TracTickets for help on using tickets.