Opened 11 years ago

Closed 11 years ago

#11573 closed defect (fixed)

Vertical max calculations for stacked-plot axes not consistent with how values are populated

Reported by: mcchriste Owned by: Eugene Lazutkin
Priority: high Milestone: 1.6
Component: Charting Version: 1.5
Keywords: Charting 2D Max Stacked Cc:
Blocked By: Blocking:


In the dojox.charting.plot2d.common.js file, in the collectStackedStats function, the calculation uses only the value of the series?.data[i] to compute the max value instead of possibly getting the value of the series?.data[i].y value, like the stacked plots do. This leads to improper scaling on the vertical axes so that data is badly cut off when series are specified as [(y:1},{y:5}]


var v = series[0].data[i];
if(isNaN(v)){ v = 0; }


var t = series[j].data[i];
if(isNaN(t)){ t = 0; }

Both need to be changed by appending another line here like so:

var value = series[0].data[i];
var v = typeof value == "number" ? value : value.y;
if(isNaN(v)){ v = 0; }

Change History (3)

comment:1 Changed 11 years ago by Eugene Lazutkin

Milestone: tbd1.5.1
Status: newassigned

comment:2 Changed 11 years ago by Eugene Lazutkin


Bumping from non-existant 1.5.1 to 1.6.

comment:3 Changed 11 years ago by Eugene Lazutkin

Resolution: fixed
Status: assignedclosed

(In [23515]) Charting: corrected statistics for stacked charts, thx mcchriste!, !strict, fixes #11573.

Note: See TracTickets for help on using tickets.