Opened 10 years ago

Closed 6 years ago

Last modified 6 years ago

#15359 closed defect (fixed)

Chart: Adding new series slides theme

Reported by: Mathevet julien Owned by: Eugene Lazutkin
Priority: undecided Milestone: tbd
Component: Charting Version: 1.7.2
Keywords: Cc: cjolif
Blocked By: Blocking:


If you add new series after creating your chart. All series are slide in theme. So Each serie get previous theme color.

It's due that chart render serie from last to first and getting theme with next.

Is there any reason to do that ? Why we iterate in reverse order to render them ?

Change History (7)

comment:1 Changed 10 years ago by cjolif

Yes asked myself the same question the first time I encountered that and I'm still wondering why series are drawn backward. Only Eugene can answer here. Eugene? On the other hand changing that order now would create an incompatibility. I think a valid wokaround for now is to use Chart.setSeriesOrder or Chart.moveSeriesToXXX after adding your series. Have tried that?

comment:2 Changed 10 years ago by cjolif

Cc: cjolif added

comment:3 Changed 9 years ago by cjolif

See also: #16355.

In fact this was the case for example on Columns plot but was not the case on ClusteredColumns?. The refactoring in 1.8 make it true even for plots for which it was not the case previously.

comment:4 Changed 9 years ago by cjolif

If that was just for the theming issue I would be tempted to fix that in 1.9 with a release note. However if we iterate the series the other way around (from start to end) this will also have the consequence of inverting the drawing order for the series. This is particularly annoying for line series because it will change which series are on top of each others so it might be harder to accept in term of incompatibility. Opinions?

comment:5 Changed 9 years ago by Mathevet julien

You could create a method in SimpleTheme? to getTheme(index)

comment:6 Changed 6 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

This was resolved in 1.11 under enhancement: To make all chart plot rendering order consistent.

comment:7 Changed 6 years ago by cjolif

As this will be "breaking" existing apps, I would suggest adding something here:

Note: See TracTickets for help on using tickets.