Opened 11 years ago

Closed 11 years ago

#6531 closed enhancement (fixed)

Legend

Reported by: Eugene Lazutkin Owned by: Eugene Lazutkin
Priority: high Milestone: 1.2
Component: Charting Version: 1.1b1
Keywords: Cc:
Blocked By: Blocking:

Description

Submitted by Chris Mitchell (CLA on file).

Attachments (3)

Legend.js (3.6 KB) - added by Eugene Lazutkin 11 years ago.
test_pie2d.html (5.0 KB) - added by Eugene Lazutkin 11 years ago.
Legend.2.js (3.8 KB) - added by guest 11 years ago.

Download all attachments as: .zip

Change History (8)

Changed 11 years ago by Eugene Lazutkin

Attachment: Legend.js added

Changed 11 years ago by Eugene Lazutkin

Attachment: test_pie2d.html added

comment:1 Changed 11 years ago by Eugene Lazutkin

Status: newassigned

comment:2 Changed 11 years ago by Eugene Lazutkin

#6199 is closed in favor of this ticket.

Changed 11 years ago by guest

Attachment: Legend.2.js added

comment:3 Changed 11 years ago by guest

The serie doesn't have a name attribute. You can find the name of the serie in the runs hash of the chart.

I've modified the line 51 of Legend.js:

var label = s.name ? s.name : "Series"+i;

by:

var label = null;
for (name in s[i].chart.runs){
	if (s[i].chart.runs[name] == i){
		label = name;
		break;
	}
}
label = label ? label : "Series"+i;

Kilroy

comment:4 Changed 11 years ago by Eugene Lazutkin

(In [13939]) dojox.charting: adding legends, thx Chris Mitchell! Refs #6531. !strict The support is incomplete, still need polishing.

comment:5 Changed 11 years ago by Eugene Lazutkin

Resolution: fixed
Status: assignedclosed

(In [13955]) dojox.charting: finalizing the legend widget (simplification, browser-specific tweaks, better support from individual plots), legend examples, cleanup for actions. Fixes #6531. !strict

Note: See TracTickets for help on using tickets.