Free Support Forum - aspose.com

Issue with setting MarkerBackgroundColor

We are trying to set the Markers background and foreground color to Color.Red and it is coming as black in excel.

With other colors like Color.Blue and Color.Yellow, it is coming properly. We also tried out adding Color.Red to palettes.

Could someone help us on this.

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

Well, I checked your issue by creating a simple chart and it works fine with the attached latest version and sample code below. Please try the attached latest version of Aspose.Cells. If you still face any issue, please share your sample code, template and generated excel files and we will check it soon.

Workbook workbook = new Workbook();

Cells cells = workbook.Worksheets[0].Cells;

cells["A1"].PutValue(1);

cells["A2"].PutValue(0);

cells["A3"].PutValue(3);

Charts charts = workbook.Worksheets[0].Charts;

int index = charts.Add(ChartType.Line, 5, 0, 15, 5);

Chart chart = charts[index];

chart.NSeries.Add("A1:A3", true);

chart.NSeries[0].DataLabels.IsValueShown = true;

chart.NSeries[0].MarkerStyle = ChartMarkerType.Circle;

chart.NSeries[0].MarkerSize =5;

chart.NSeries[0].MarkerBackgroundColor = System.Drawing.Color.Red;

workbook.Save(@"C:\dest.xls");

Thank You & Best Regards,