Free Support Forum - aspose.com

Patterns and Colors for Charts

Hello, thanks for implementing FirstSliceAngel property of chart.

I’ve got another troubles.
I need the charts of types (Aspose.Excel.ChartType.Pie, Aspose.Excel.ChartType.Column, Aspose.Excel.ChartType.LineWithDataMarkers)

to have the same look as in my application.
To achieve this goal i need to set the color and pattern for the items of each type of chart.

Everithing is fine for Aspose.Excel.ChartType.LineWithDataMarkers type.

Aspose.Excel.ASeries aSeries = chart.NSeries[iSeries];
aSeries.Line.Color = cell.Style.ForegroundColor;
aSeries.Line.Style = LineType.Dot;

For Aspose.Excel.ChartType.Column type i want to set pattern:
aSeries.Area.FillFormat.Pattern = BackgroundType.ReverseDiagonalStripe;
but when i open the file in excel the pattern is not set. Am i doing smth wrong
or this feature is not implemented yet?

For Aspose.Excel.ChartType.Pie type Aspose create only one NSeries item.
So i can’t even set a color and pattern for each slice of pie.

Can you explain me if it possible to do it using Aspose?





The above features are not implemented yet. I will work on it right now. It will be available in about one week.

Please download v2.7.5. These features are available now.

To set color for each slice of pie, please try this:

ASeries aseries = chart.NSeries[0];
aseries.Points[0].Area.ForegroundColor = Color.Yellow;
aseries.Points[1].Area.ForegroundColor = Color.Red;