Opened 12 years ago

Closed 10 years ago

#11455 closed enhancement (wontfix)

Can't set theme on dojox.charting.DataChart

Reported by: dylan Owned by: Tom Trenka
Priority: high Milestone: future
Component: Charting Version: 1.5
Keywords: Cc: cjolif
Blocked By: Blocking:


Attempting to call setTheme on any DataChart? instance throws the following error with the 1.5 release:

(firefox 3.6) _a.clone is not a function (84 out of range 14)

(safari 5) TypeError?: Result of expression '_a.clone' [undefined] is not a function.

I tried several different themes (some that use gradients, some that do not).

Also noticed this "gem" that should be fixed, though it's not the issue:

FIXME: looks better with this, but it's custom this.chartTheme.plotarea.stroke = {color: "gray", width: 3}; this.setTheme(this.chartTheme);

Change History (9)

comment:1 Changed 12 years ago by Mike Wilcox

I just did a quick test and I didn't get the error.

The code for that function is in Chart2D and looks like this:

setTheme: function(theme){
	this.theme = theme.clone();

Which tells me there is something wrong with the object that you are using as a theme.

I agree the FIXME is ugly, but I commented it out and it didn't affect the theme. I would fear breaking back compat if I removed it. I can if you think it best though.

comment:2 Changed 12 years ago by Eugene Lazutkin

Owner: changed from Eugene Lazutkin to Mike Wilcox

comment:3 Changed 12 years ago by dylan

Ok, so the issue is that I was trying to pass in a string rather than a reference to the required theme. I think that should be changed as it's pretty inconsistent with the way most Dojo APIs work.

So that you could set a theme like this:


Thoughts on whether that's an improvement or not?

comment:4 Changed 12 years ago by Mike Wilcox

That is a Chart2D thing, so it's up to Eugene. I don't know if he's still watching this ticket or not.

comment:5 Changed 11 years ago by Mike Wilcox

Milestone: tbdfuture

comment:6 Changed 11 years ago by Tom Trenka

Owner: changed from Mike Wilcox to Tom Trenka

Actually stumbled across this ticket while looking for something else; this should have really been assigned to me, so changing.

comment:7 Changed 10 years ago by Patrick Ruzand

Component: DojoX GFXCharting
Type: defectenhancement

comment:8 Changed 10 years ago by cjolif

Cc: cjolif added

I'm not sure it makes sense to implement that now in light of the latest evolutions on the framework. Indeed with AMD we are trying to get rid of class names and here we would kind of re-introduce it in a setter method instead of passing the actual object. I would favor closing this? (and improve doc if it is not clear on what is expected to be passed).

comment:9 Changed 10 years ago by Tom Trenka

Resolution: wontfix
Status: newclosed

cjolif: I agree. Closing the ticket.

Note: See TracTickets for help on using tickets.