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

Free Support Forum - aspose.com

How to change the color of Chart series and legend using .NET

Hello, we develop a feature that creates chart in docx and xlsx at the same time by using Aspose.Words(for docx) and Aspose.Cells(for xlsx) .net products.

We have to customize the style of chart – by using customers` colors, font types and a size for a chart title. This was successful for the Aspose.Cells like:

var seriesIdx = chart.NSeries.Add("$B$2:$B$10", true);
var nSeries = chart.NSeries[seriesIdx];
nSeries.Area.ForegroundColor = System.Drawing.Color.Green;
chart.Legend.Font.Size = 20;
chart.Legend.Font.Name = “Arial”;
etc

We can’t use Aspose.Words.Reporting, because a chart type and style values can’t be hardcoded.
But how can we do that for docx chart in Aspose.Words? Is there such a possibility at all and will it appear in the future? Thanks.

@trimetr

Unfortunately, Aspose.Words does not provide API to get or set the color of chart series and legend. We logged these features as WORDSNET-12640 and WORDSNET-21056 in our issue tracing system. You will be notified via this forum thread once these feature are available.

We apologize for your inconvenience.

A post was split to a new topic: Change Chart’s Legend Color in Word Documents using C# .NET or Java

The issues you have found earlier (filed as WORDSNET-12275) have been fixed in this Aspose.Words for .NET 21.6 update and this Aspose.Words for Java 21.6 update.