Hi,
I am using the latest Aspose.Cells 8.1.0.2 build, and try to change the chart value axis fill by using the following code, but it doesn’t work, could you please take a look?
chart.ValueAxis.Area.FillFormat.Type = Aspose.Cells.Drawing.FillType.Solid
chart.ValueAxis.Area.FillFormat.SolidFill.Color = Color.Red
Thanks,
Wei
Hi Wei,
Thanks for your posting and using Aspose.Cells.
Please download and use the latest version: Aspose.Cells for .NET 8.1.1 and it works fine.
We have tested it with the following code and it generated correct output. I have attached the source xlsx file used in this code and output file generated by it for your reference.
C#
string filePath = @“F:\Shak-Data-RW\Downloads\source.xlsx”;
Workbook workbook = new Workbook(filePath);
Worksheet worksheet = workbook.Worksheets[0];
Chart chart = worksheet.Charts[0];
chart.ValueAxis.Area.FillFormat.Type = FillType.Solid;
chart.ValueAxis.Area.FillFormat.SolidFill.Color = Color.Green;
workbook.Save(“output.xlsx”);
Hi,
Thanks for the update.
I can see the value axis fill works in the excel, but I need to convert the Aspose.cells.chart object to an imaged using in our product, the value axis fill seems get lost during converting to image.
Dim chart As Aspose.Cells.Charts.Chart = wb.Worksheets(0).Charts(0)
chart.ValueAxis.Area.FillFormat.Type = Aspose.Cells.Drawing.FillType.Solid
chart.ValueAxis.Area.FillFormat.SolidFill.Color = Color.Green
Dim img As Image = chart.ToImage()
img.Save(“C:\img.jpeg”)
Thanks,
Wei
Hi Wei,
Thanks for your posting and using Aspose.Cells.
We have looked into your issue further. When chart is converted to image, then chart axis fill color applied does not show up.
We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as CELLSNET-42794.
C#
string filePath = @“F:\Shak-Data-RW\Downloads\source.xlsx”;
Workbook workbook = new Workbook(filePath);
Worksheet worksheet = workbook.Worksheets[0];
Chart chart = worksheet.Charts[0];
chart.ValueAxis.Area.FillFormat.Type = FillType.Solid;
chart.ValueAxis.Area.FillFormat.SolidFill.Color = Color.Green;
chart.ToImage().Save(filePath + “.out.jpg”);
The issues you have found earlier (filed as CELLSNET-42794) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Thanks for the update. I have checked in the new build, it works now.
Hi Wei,
Thanks for your feedback and using Aspose.Cells.
It is good to know that your issue is resolved with the latest release. Let us know if you encounter any other issue, we will be glad to look into it and help you further.