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

Free Support Forum - aspose.com

Chart to image is generated with extra values


We are having a problem with Chart.ToImage(). For some charts it generates extra values so it modifies the chart altogether.

Here is the following code used to reproduce the issue (along with the attached file):
var workbook = new Workbook(“testFile.xlsx”);
var worksheet = workbook.Worksheets[0];
const string chartName = “name”;

var chart = worksheet.Charts.FirstOrDefault(x => chartName.Equals(x.Name, StringComparison.OrdinalIgnoreCase));
if (chart == null)

workbook.FileFormat = FileFormatType.Xlsx;

var image = chart.ToImage(new ImageOrPrintOptions
Quality = 100,
VerticalResolution = 200,
HorizontalResolution = 200,
PrintingPage = PrintingPageType.IgnoreBlank,
ImageFormat = ImageFormat.Png,
OnePagePerSheet = true,
OnlyArea = true


InternalID: 25403

Best regards,
Jean-Alexandru Stanescu
Junior Developer
IBM Romania


Thanks for your posting and using Aspose.Cells.

We have generated the chart image by using your sample code with the latest version Aspose.Cells
for .NET v8.6.0.4
and were able to observe the issue partially. We now need your favor to download the chart image attached with this post and mark the issue(s) with red circles. This will help us look into your issues more precisely and closely and we will be able to fix it quickly. Thanks for your cooperation in this regard.

Hello again,

Sorry for not posting it the first time. I have marked the issues with red circles and one square (for multiple issues).

Best regards,
Jean-Alexandru Stanescu
Junior Developer
IBM Romania


Thanks for highlighting this issue nicely, we appreciate it and and using Aspose.Cells.

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-43978 - Chart to image is generated with extra values


Thanks for using Aspose.Cells.

Please try the new fix for extra data labels.

Please download and try the latest fix: Aspose.Cells
for .NET v8.6.1.6
and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-43978) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.