Keep LineSerie Colors

Apr 27, 2013 at 1:30 AM
Edited Apr 27, 2013 at 1:39 AM
Currently I am using OxyPlot to plot vehicle trajectory data. The total number of lines would be around 2000. OxyPlot does a good job to render these lines efficiently and give them a different color automatically.

But I noticed that colors of lines would be changed if I remove one of lines. And it seems like the color would be rearranged by default color order, which is from green, khaki, red...

For example, I plot three vehicle trajectories below.


ID 2270 is in green. ID 2276 is in khaki. ID 2281 is in red. And the order I plot them is start from 2270, then 2276, finally 2281.


Now I remove ID 2276. Then ID 2281's color changed to be khaki from red.

I would like to know if there is a way to keep the line color as it will help user focus on certain line they are working on.

Here lists my code. It's quite simple.

var lineSerie = new LineSeries();

data.ToList().ForEach(d =>lineSerie.Points.Add(new DataPoint(Convert.ToDouble(d.X), Convert.ToDouble(d.Y))));



Thank you guys!
Apr 29, 2013 at 12:28 PM
I think you should keep your own list of colours, and set the colour for each series manually!
I see that OxyPlot could assign the automatic colour only once, but this requires some changes to the code. Create an issue if you think this is an important feature to add!
Apr 29, 2013 at 12:30 PM
btw, what kind of vehicles are you plotting trajectories for? I am curious :)