Line color in Scatter_Line plot

Hi,

Formerly I had a scatter plot with markers (Scatter_Markers), for which I could set the color using

IChartSerie series = chart.Series.Add("My series");
series.SerieFormat.MarkerForegroundColor = Color.Red;

However, after changing the plot type to a scatter plot with lines (Scatter_Line) I can no longer find how to change the color of each line separately. I tried things like

series.SerieFormat.LineProperties.LineColor = Color.Red;

but I still get the default Excel colors.

Can you please help me out with this?

Thank you very much

Mischa Spelt
Tessella


3 Replies

SR Sridhar Syncfusion Team March 8, 2011 04:50 AM UTC

Hi Mischa,

Thank you for using Syncfusion products.

We have created the sample at our side and we could see that the particular line color cannot be changed. If we are able to change it using MSExcel then we can do it XlsIO.

We have attched the sample file for your reference.

Could you please update us with the simplified sample so that we can analyze further on this issue.

Please let me know if you have any queries.

Thanks,
Sridhar.S




PlotAreaShrink_918d237e.zip


MS Mischa Spelt March 8, 2011 08:58 AM UTC

Hi Sridhar,

Thank you for your example.
Using it I managed to find the reason it did not work for me. It appear I set
chart.ChartType = ExcelChartType.Scatter_Line;
/after/ adding series to the chart, which reset any custom colors I had assigned.

This problem is solved, thanks!

Mischa.



SR Sridhar Syncfusion Team March 9, 2011 04:32 AM UTC

Hi Mischa,

Thanks for the update.

Please get back to us if you have require any clarifications.

Thanks,
Sridhar.S


Loader.
Up arrow icon