Chart series colours

Hello,
how can i change the colour of dynamically added series lines in a line chart?
thanks

1 Reply

GM Geetha M Syncfusion Team August 17, 2009 09:42 AM UTC

Hi,

Thank you for your interest in Syncfusion products.

Could you please clarify me if you intend to use 'Directly entered Values' as 'Dynamically added series'? If yes, then you can achieve it using the code snippet given below.

IChartShape chart = sheet.Charts.Add();
IChartSerie serie = chart.Series.Add("Line Chart", ExcelChartType.Line);
serie.EnteredDirectlyValues = new object[] { 32, 34, 63, 62, 73 };
serie.EnteredDirectlyCategoryLabels = new object[] { "One", "Two", "Three", "Four", "Five" };

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

Please try this and let me know if you have any questions.

Regards,
Geetha

Loader.
Up arrow icon