How do I set the color of a ChartEx series?

How do I explicitly set the fill color of a series in a ChartEx?

Hi Jason,

Thanks for your interest in Aspose.Slides.

Please use the following code snippet to change the color of series.

series.Format.Fill.FillType=FillTypeEx.Solid;

series.Format.Fill.SolidFillColor.Color=Color.Blue;


I have a need to change the color of a column on a chart for a single data point in a series. For example the Series values would be: 4, 5, 8. I need the 4 bar to be red, the 5 bar to be yellow, and the 8 bar to be green. Is this possible? I confirmed that I can change the color of a entire series but, I can not figure out how to change the color of only a single data point.

Hi Jason,

You can change the color of columns on a chart by using the following code snippet.

int chartIdx = chartSheet.Charts.Add(ChartType.Column3DClustered, 0, 5, 0, 5);
Aspose.Cells.Charts.Chart chart = chartSheet.Charts[chartIdx];
chart.NSeries[0].Area.ForegroundColor = Color.Red;

chart.NSeries[1].Area.ForegroundColor = Color.Black;
chart.NSeries[2].Area.ForegroundColor = Color.Blue;

Thanks for the information Jason…

In the Aspose.Slides product, I do not have the Cells namspace and I do not have the NSeries property on my ChartEx object.

To help define the requirement here, I have attachech a slide with the desired formatting. As you can see the data is all one series and each data point has a diferent color. I need to accomplish this with the Aspose.Slides product.

Thanks,

Jason

Hi Jason,

You can change the color of series but can not change the color of categories. I will discuss this issue with our development team and will update you, If there is any workaround. Please read this to change the color of series.

We apologize for your inconvenience.

Hi Jason,

I regret to share with you that you can not change the color of each datapoint in Aspose.Slides at the moment. However, you can change the color of series as I mentioned before.

We apologize for your inconvenience.

Is this feature planned for a future release?

Hi Jason,

Please accept my apology for late response. An issue with ID SLIDESNET-31630 has
been created in our issue tracking system as a new feature request. Our
development team will look into the possibility of implementing the
mentioned feature.

You will be updated via this forum thread once this feature is available.

The issues you have found earlier (filed as SLIDESNET-31630) have been fixed in this update.