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

Free Support Forum - aspose.com

Converting Chart to Image - distorted result

Hello,
We’ve stumbled upon some issue with Aspose.Cells v21.7 when converting some XLSX charts to PNG (displaying as HTML Base64) - all charts are converted, but some of them are distorted.
In attachment you can find sample solution with file and chart that is causing unwanted effect.
Is there something that we can do (change some code to make it work or change something in chart) that can fix this issue quickly?

AsposeExample.7z (310.8 KB)

Thanks

@avaaz,
This issue is reproduced here and logged in our database for further investigation. You will be notified in this thread once any update is ready for sharing.

This issue is logged as:
CELLSNETCORE-132 - Distorted chart created in converted Html

Hi @avaaz
We have done some optimization for this problem, please try Aspose.Cells21.8, see the effect. Let us know your feedback.

Currently, the optimized projects include:

  1. The scale on the left ordinate is now marked in the correct position.
  2. The bottom abscissa is now displayed correctly.

Hi @leoluo,
Sorry for late response. I’ve tested by updating example to 21.8, but result is still far from acceptable
This is the result
image.png (203.3 KB)
And this is original chart in Excel
image.png (33.9 KB)

Chart is still somehow narrowed, datapoints are unnaturally large and have text that I believe is comment or name (either way it’s not visible in Excel)

@avaaz,
Thank you for the feedback. We have recorded this information with the logged ticket for our reference. We will write back here as soon as some feedback is ready to share.

HI @avaaz
Thank you for your feedback. We found the problem and will continue to optimize it.

Hi @avaaz
We did some optimization, please use aspose.cells 21.9:

Or you can get it directly from nuget.
We have optimized the image compression, the text on the bubble point, the abnormal size of the bubble point.
There are still some problems, for example, the location of bubble points, we will continue to optimize in next patch version.
Please let us know your feedback and we will continue to optimizes your questions. Thank you.

Hi @leoluo,
this is current outcome from given example image.png (186.2 KB)
Apart from wrong location of the bubbles, there is still random label at the bottom (Jul-17), I think it comes from comment/name from one of the plots. Also the whole chart is narrowed (it moved away from left/right legends, or legends moved away from chart)
It’s better than before, but still not ideal :slight_smile:

@avaaz,
Thank you for the feedback. We are working on this issue and will consider your feedback.

Hi @avaaz
Please use the new patch 21.9.1, which we continuously optimized:
Aspose.Cells21.9.1 For .NetStandard20.Zip (5.6 MB)

Under the new patch version, we generate images like this, result.png (27.1 KB)

Compare it to the print preview of Excel: ExcelPrintView.png (39.0 KB)

In fact, we’ve already noticed the problem of " it moved away from left/right legends".
Our output to png/pdf/html follows the logic of the excel print preview, which does compress the chart to a certain extent.
However, this margin is determined by the stretch of the chart (legends are in the right position) .
You can see that the excel margin is larger, and we feel that the chart can no longer be stretched, or it will become uncoordinated.

The issues you have found earlier (filed as CELLSNETCORE-132) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao