Hello there,
I'm on my way to find out a way, how to set or change the color for a new added line on a XYChart. When I'm adding a second, third, fourth, ... n-th line, it seems the colors aren't fixed?
for instance:
On a XYChart two lines existing, where the base line has the default color (some blue) and the second is orange.
When I'm adding a third line, the base line still has its default color, however, the second line now has a green color or else whereas
the new third line now has the orange color.
This might look really ugly, because it may cause not to see all sub lines. Is there a way to set a given color for each new line?
I would like to set:
base line (default, maybe also in black, if possible)
second line: orange
third line: red
fourth line: green
...
appendix:
with:
demoChart.SeriesStyleSelector = new SeriesPaletteStyleSelector(new Palette(PaletteKind.Melon));
demoChart.Refresh();
I'm able to change the base line color, however, this might not work for a sub line.
A sub line here is defined as:
LineSeries ls = new LineSeries() {
ItemsSource = /*some list here*/,
XPath = "X",
YPath = "Y",
LineKind = XYSeriesLineKind.Step
};
demoChart.Series.Add(ls);
The LineSeries doesn't come with a series style selector property or similar.
Thanks. :o)