Opened 10 years ago

Closed 9 years ago

#8868 closed defect (fixed)

Bug in default assignment of colors to chart series

Reported by: petraRock Owned by: Eugene Lazutkin
Priority: high Milestone: 1.5
Component: Charting Version: 1.2.3
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Eugene Lazutkin)

Automatic assignment of colors from the theme to chart series works fine for addSeries( ) and updateSeries( ) except when a series contains an empty data array. If a series has an empty data array, then it seems to be skipped in the color allocation from the theme. Then if that series is later updated with data via an updateSeries( ), the colors are reassigned from the theme and to the user the colors switch on the graph from one series to the other.

(I use this technique of updateSeries(name, []) to simulate hiding a series on a line graph and then use updateSeries(name, [data]) to show the series again. To work around this problem, I have to leave a single data point in the "empty" data array in order to have the colors not switch when I hide/show the series.)

The attached small sample illustrates this bug.

Attachments (1)

n8868.html (1.5 KB) - added by Eugene Lazutkin 9 years ago.
The bug demo.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 10 years ago by Eugene Lazutkin

Milestone: tbdfuture
Status: newassigned

comment:2 Changed 10 years ago by Eugene Lazutkin

Description: modified (diff)

Next time attach files instead in pasting them inline.

comment:3 Changed 10 years ago by Eugene Lazutkin

Milestone: future1.4

comment:4 Changed 10 years ago by Eugene Lazutkin

Milestone: 1.41.5

bumping tickets that didn't make the 1.4 cut, but most likely to go in the next point release.

Changed 9 years ago by Eugene Lazutkin

Attachment: n8868.html added

The bug demo.

comment:5 Changed 9 years ago by Eugene Lazutkin

Description: modified (diff)

comment:6 Changed 9 years ago by Eugene Lazutkin

Resolution: fixed
Status: assignedclosed

(In [21836]) Refactored charting themes, !strict, refs #8866, fixes #8868, fixes #10897, refs #10938.

Note: See TracTickets for help on using tickets.