According to the following document I can assign different colors for the same series of data markers.
https://www.e-iceblue.com/Knowledgebase ... B.NET.html
Is there any way to change the whole series data markers color?
Thanks
for (int serieIndex = 0; serieIndex < chart.Series.Count; serieIndex++)
{
for (int categoryIndex = 0; categoryIndex < chart.Categories.Count; categoryIndex++)
{
ChartDataPoint dataPoint = new ChartDataPoint(chart.Series[serieIndex]);
dataPoint.Index = categoryIndex;
dataPoint.MarkerFill.Fill.FillType = FillFormatType.Solid;
dataPoint.MarkerFill.Fill.SolidColor.Color = Color.Red;;
dataPoint.MarkerFill.Line.FillType = FillFormatType.Solid;
dataPoint.MarkerFill.Line.SolidFillColor.Color = Color.Red;;
chart.Series[serieIndex].DataPoints.Add(dataPoint);
}
}
//Create a PowerPoint document.
Presentation presentation = new Presentation();
//Load the file from disk.
presentation.LoadFromFile("input.pptx");
//Get the chart from the presentation.
IChart chart = presentation.Slides[0].Shapes[0] as IChart;
//Set the fill color of the data marker.
chart.Series[0].MarkerFill.Fill.FillType = FillFormatType.Solid;
chart.Series[0].MarkerFill.Fill.SolidColor.Color = Color.Red;
chart.Series[0].MarkerFill.Line.FillType = FillFormatType.Solid;
chart.Series[0].MarkerFill.Line.SolidFillColor.Color = Color.Red;
//Save to file.
presentation.SaveToFile("output.pptx", Spire.Presentation.FileFormat.Pptx2013);