Opened 14 years ago

Closed 14 years ago

#5988 closed defect (worksforme)

chart.render loops

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


Adding an axis to a chart without the includeZero option set to true and then adding an empty series causes the rendering of the chart to infinite loop.

Test: Remove the includeZero option from one of the charts in test_labels2d.html and supply the addSeries function with a empty list.

Change History (2)

comment:1 Changed 14 years ago by dylan

Milestone: 1.1

comment:2 Changed 14 years ago by Eugene Lazutkin

Resolution: worksforme
Status: newclosed

I cannot reproduce it.

I modified chart5 of test_chart2d.html like so:

var chart5 = new dojox.charting.Chart2D("test5");
chart5.addAxis("y", {vertical: true});
chart5.addSeries("Series 0", []);
chart5.addSeries("Series A", [1, 2, 1, 2, 1, 2, 1]);
chart5.addSeries("Series B", [2, 1, 2, 1, 2, 1, 2]);
chart5.addSeries("Series 1", []);

(The other charts were commented out.)

It satisfies all criteria outlined in your defect description, but it doesn't produce any infinite loops --- everything draws correctly. Just to be sure I modified chart1 as well trying to insert empty series in several places --- everything worked as expected.

You may have problems with inserting an empty series when no other valid series present. In this case axis does not know how to calculate its bounds when no data is available and may fail somehow. You should avoid inconsistent states. BTW, inserting an empty series is inconsistent --- do not insert it until you have some data in it. It is advisable to specify bounds directly on axes in order to avoid such situations.

Note: See TracTickets for help on using tickets.