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

Free Support Forum - aspose.com

Chart Fill formating not working

How do you get the chart fill to be none in c#. I have tried Chart.PlotArea.Area.ForegroundColor = Color.Transparent and BackgroundColor. Neither seem to do anything See my code below

int chartIndex = sheet.Charts.Add(ChartType.Bar, 8, 12, rwcnt, 15);

Chart chart1 = sheet.Charts[chartIndex];

chart1.IsLegendShown = false;

chart1.PlotArea.Border.IsVisible = false;

chart1.NSeries.Add("AA" + rwcnt + ":AA9" , true);

chart1.PlotArea.Area.ForegroundColor = Color.Transparent;

chart1.ChartArea.Area.ForegroundColor = Color.Transparent;

chart1.ValueAxis.MajorGridLines.IsVisible = false;

chart1.ValueAxis.MinorGridLines.IsVisible = false;

chart1.CategoryAxis.IsPlotOrderReversed = true;


Thanks for your posting and using Aspose.Cells.

You should use

chart.PlotArea.Area.Formatting = FormattingType.None;

Please see the following sample code. Please check the sample xlsx file and the output xlsx file generated by this code for your reference.

Let us know if you still face any issue, we will look into it and help you asap.


Workbook workbook = new Workbook(“sample.xlsx”);

Worksheet worksheet = workbook.Worksheets[0];

Chart chart = worksheet.Charts[0];

chart.PlotArea.Area.Formatting = FormattingType.None;