How do I set colors to be automatic in a chart?

When I create a chart, all the colors (e.g plot area, series columns etc…) are set to “Solid Fill” with a seemingly random color. I can arbitrarily set their color with something like:

chart.PlotArea.Area.ForegroundColor = Color.FromArgb(231, 231, 231);

However I would like to have them set to the “Automatic” setting.

I can’t for the life of me find a way to do this. I notice in the online API documentation there is a ColorType enumerator that sounds like it is linked to the functionality to do this (http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/aspose.cells.colortype.html) but I cannot find how this could be used within charts.

Does anyone know how to do this?

Hi,

I think you may try to use:
e.g
Area.Formatting = FormattingType.Automatic; for your need.


Thank you.