Opened 9 years ago

Closed 9 years ago

#17298 closed defect (fixed)

On pie charts tooltip is not displayed if the series' sum is less or equal to zero.

Reported by: paulodgomes Owned by: cjolif
Priority: undecided Milestone: 1.10
Component: Charting Version: 1.7.0
Keywords: Cc:
Blocked By: Blocking:


Using a pie chart defined like:

pieChart = new dojox.charting.Chart2D("myPieChartDiv",{title: 'chart Title'});

pieChart.addPlot("default", {
            type: 'Pie',
            radius: 100,
            fontColor: "black",
            labelOffset: 0,
			animate: {duration: 1800}

dummydata = [{text: "Item1", y: 400}, {text: "Item2", y: 500}, {text: "Item3", y: 0}, {text: "Item3", y: -900}];

pieChart.addSeries("myseries", dummydata);

var tip2 = new dojox.charting.action2d.Tooltip(pieChart , "default", { text : function(o) { return "tooltip text"; }});


The pie chart is rendered, with only 2 slices (as expected) and with tooltips showing up. But if we define dummydata as:

dummydata = [{text: "Item1", y: 400}, {text: "Item2", y: 500}, {text: "Item3", y: 0}, {text: "Item3", y: -899}];

The tooltip will not show up.

Change History (4)

comment:1 Changed 9 years ago by paulodgomes

Obviously, and according to the issue, the values for Item3 are switched. The first one should be -899 and the second one -900 .

comment:2 Changed 9 years ago by cjolif

to be honest I think the best solution would be to normalize/sanitize the data before feeding the pie chart and in this case you should not have negative values. That said as we already partially support negative values I will commit a fix to be consistent.

comment:3 Changed 9 years ago by cjolif

Milestone: tbd1.10
Owner: set to cjolif
Status: newassigned

comment:4 Changed 9 years ago by Christophe Jolif <[email protected]…>

Resolution: fixed
Status: assignedclosed

In 7eb55384e4e6d80a64adc76f11a0abe1284337bc/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.