Ticket #6982 (closed defect: fixed)

Opened 6 months ago

Last modified 7 weeks ago

Pie chart with single data element throws error

Reported by: guest Owned by: elazutkin
Priority: high Milestone: 1.2
Component: Charting Version: 1.1.1
Severity: normal Keywords: charting
Cc:

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

Pie.js.diff (0.6 kB) - added by nic 4 months ago.
[ccla] [patch] Pie.js.diff from nicola rizzo, nicola(at)exmachina.ch

Change History

  Changed 5 months ago by bill

  • milestone set to tbd

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

  Changed 5 months ago by elazutkin

  • status changed from new to assigned
  • milestone changed from tbd to 1.2

#7124 is the dup of this ticket.

  Changed 4 months ago by nic

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

Nicola

Changed 4 months ago by nic

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

  Changed 3 months ago by elazutkin

  • milestone changed from 1.2 to future

Moving all open ticketd to the future.

  Changed 3 months ago by elazutkin

  • priority changed from normal to high

Related to #7234.

  Changed 3 months ago by elazutkin

  • status changed from assigned to closed
  • resolution set to fixed

(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

follow-up: ↓ 8   Changed 3 months ago by elazutkin

  • milestone changed from future to 1.2

in reply to: ↑ 7   Changed 3 months 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

  Changed 7 weeks ago by elazutkin

(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.