Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#6982 closed defect (fixed)

Pie chart with single data element throws error

Reported by: guest Owned by: Eugene Lazutkin
Priority: high Milestone: 1.2
Component: Charting Version: 1.1.1
Keywords: charting Cc:
Blocked By: Blocking:

Description

A pie chart that is created with only a single data element throws the following error:

t.run has no properties - Pie.js (line 121)

Here is an example chart which produces this error (note the single data element in "Series A"):

var chart1 = new dojox.charting.Chart2D("test1");

chart1.setTheme(dojox.charting.themes.PlotKit?.blue);

chart1.addPlot("default", {type: "Pie"});

chart1.addSeries("Series A", [4]);

chart1.render();

Attachments (1)

Pie.js.diff (620 bytes) - added by nic 11 years ago.
[ccla] [patch] Pie.js.diff from nicola rizzo, nicola(at)exmachina.ch

Download all attachments as: .zip

Change History (10)

comment:1 Changed 11 years ago by bill

Milestone: tbd

mark all (open) tickets w/blank milestones to be "tbd"; their milestones need to be set to a version number or to "future"

comment:2 Changed 11 years ago by Eugene Lazutkin

Milestone: tbd1.2
Status: newassigned

#7124 is the dup of this ticket.

comment:3 Changed 11 years ago by nic

Solved looking at others .js in plot2d. Is it correct?

Nicola

Changed 11 years ago by nic

Attachment: Pie.js.diff added

[ccla] [patch] Pie.js.diff from nicola rizzo, nicola(at)exmachina.ch

comment:4 Changed 11 years ago by Eugene Lazutkin

Milestone: 1.2future

Moving all open ticketd to the future.

comment:5 Changed 11 years ago by Eugene Lazutkin

Priority: normalhigh

Related to #7234.

comment:6 Changed 11 years ago by Eugene Lazutkin

Resolution: fixed
Status: assignedclosed

(In [15168]) gfx: fixing degenerated pies (no series, empty series, all non-positive, only one value, only one positive value), a test case was added as well. Fixes #7234. Fixes #6982. !strict

comment:7 Changed 11 years ago by Eugene Lazutkin

Milestone: future1.2

comment:8 in reply to:  7 Changed 11 years ago by taras

Replying to elazutkin:

Thanks very much for your correction, is perfect !.

This case even if seems to be not important, see the following usage for example:

I have a tree, each node is a task, each task have a certain period of time, displayed as a pie.

I am displaying in the pie, the nodes in the same level (each node in level n is recursively the sum of its children), clicking inside a pie portion will bring the next level also displayed as a pie.

The following case is real:

node_A (50%)

node_AA (100%)

node_AAA (30%) node_AAB (40%) node_AAC (30%)

node_B (25%) node_C (25%)

clicking on node_A will give you a 100% node_AA, clicking on node_AA will display the pie-> node_AAA,node_AAB and node_AAC

thanks again, the 2D graphics is excellent, and is a very important addition to Dojo '''

Eduardo

comment:9 Changed 11 years ago by Eugene Lazutkin

(In [15486]) dojox.charting: adding dependent dynamic features to the legend and updating a test, !strict, refs #7234, refs #6982, refs #6714, fixes #7898.

Note: See TracTickets for help on using tickets.