We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Use ThemeColor in Series

Both Series.Area.ForegroundColor and Series.Area.BackgroundColor only supports ARGB.

Which property should I use to specify a ThemeColor?

Also, is it possible to use preset gradients? (I have attached a screenshot in Excel.)

In the documentation FillFormat.SetPresetColorGradient says “Only applies for Excel 2007.”

Thank you!

GradientPreset.png (97.0 KB)

Please check document about themcolor: https://docs.aspose.com/cells/net/setting-chart-appearance/#applying-microsoft-excel-20072010-themes-to-charts

Thank you @simon.zhao, series.Area.FillFormat.SolidFill.CellsColor.ThemeColor does work.

Can you take a look at my second question? I still cannot find a way to use Preset gradients in modern Excel.

Now we do not support preset gradienets, we hava added a task CELLSNET-51925 for it.
Now please use GradientFill to set :
ser.Area.FillFormat.FillType = FillType.Gradient;
GradientFill gradient = ser.Area.FillFormat.GradientFill;

Thanks for the quick update. I hope it becomes supported soon.


We will keep you posted with updates (once available) on it.

1 Like

We have supported this feature, please wait for next release.
See following example codes:
Series ser = chart.NSeries[0];
ser.Area.FillFormat.FillType = FillType.Gradient;
ser.Area.FillFormat.GradientFill.SetPresetThemeGradient(PresetThemeGradientType.RadialGradient, ThemeColorType.Accent1);

The issues you have found earlier (filed as CELLSNET-51925) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi