Excel Charts Are Scaled when Converted to EMF Images in C#

@JThomas98,

We reproduced the three issues (1, 3 and 4) you mentioned using your template Excel files. We event tried using your both Excel files to convert to PDFs and still found the issues in the output PDFs. We require thorough evaluation of the issues. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s):

  • CELLSNET-57051 - “[+]” symbol in the bar graph captured in the output image
  • CELLSNET-57052 - The font color changed (should be white for the percentage values) in the graph image
  • CELLSNET-57053 - Chart is rendered little pixelated

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@JThomas98,

Could you please provide more details about this issue (#2). You may give screenshots and mention the names of the worksheets where issue occurred. We will evaluate the issue soon.

Thanks, @amjad.sahi for the quick response. Were you able to replicate issue mentioned in #2?

@JThomas98,

Check above reply and do the needful.

@amjad.sahi,
Here’s a screenshot of what the issue is:
Comparison.jpg (37.7 KB)

You can find this chart in worksheet ExecSumReport in template1. The chart is called ExecSumChart_COM

@JThomas98,

Thanks for the screenshot and details.

We reproduced the issue (#2) as you mentioned via screenshot using your template Excel files. We have opened the following new ticket in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s):

  • CELLSNET-57054 - Thin blue line for no data in bar graph is not rendered in the output image

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

One we have an update on it, we will let you know.

1 Like

@JThomas98,

We are pleased to inform that your issue (Ticket: “CELLSNET-57051 - “[+]” symbol in the bar graph captured in the output image”) has been implemented. The fix/enhancement will be included in our upcoming release (Aspose.Cells v24.11) that we plan to release in the first half of November 2024. You will be notified when the next version is released.

@amjad.sahi, thank you for updating me. Is it possible to share a screenshot of the fix? There should be one where there is supposed to be [-] symbol to the right of the graph for one line. If you could show me what this graph looks like now, I’d really appreciate it.
Here’s a screenshot of a graph that contains the symbol. This is in Template2 that I previously shared:
Chart1.jpg (66.6 KB)

@JThomas98,

Sure, the issue is fixed precisely/fully which convers all your mentioned problems. For the time being, see a sample image (attached) which is generated by the fix.
241025.png (912 Bytes)

We might not provide all the images by different charts in the template Excel file. But we will check if we could provide you more images by the latest fix for your reference.

Sounds good. Thank you!

@JThomas98,

You are welcome. We will also keep you posted with updates on your other issues once available.

Hi @JThomas98
Please check the new results:
CELLSNET-57051.zip (443.5 KB)

@JThomas98,

We are pleased to inform that your issue (Ticket: “CELLSNET-57052 - The font color changed (should be white for the percentage values) in the graph image") has been resolved. The fix/enhancement will be included in our upcoming release (Aspose.Cells v24.11) that we plan to release in the first half of November 2024. You will be notified when the next version is released.

1 Like

Hi @JThomas98
For CELLSNET-57053, the shape edge is pixelated, please try the following code:

        book = new Workbook(path + "Chart_Template1.xlsm");
        Chart chart = book.Worksheets[9].Charts[0];
        ImageOrPrintOptions imageOptions = new ImageOrPrintOptions();
        imageOptions.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
        imageOptions.ImageType = ImageType.Png;
        chart.ToImage(path + "CELLSNET57053.png", imageOptions);

Attached is a comparison of my output images for your reference:
CELLSNET-57053.zip (30.2 KB)

Hi @JThomas98
For CELLSNET57054, our optimized results are as follows, which will take effect in version 24.11.
CELLSNET57054.png (967 Bytes)

Thank you for this! Really appreciate it.

@JThomas98,

You are welcome. We believe all the issues you raised in this thread have been addressed, and the fixes will be included in the upcoming release of Aspose.Cells v24.11. Please feel free to reach out to us if you have any further queries, comments or issue.

1 Like

The issues you have found earlier (filed as CELLSNET-57051,CELLSNET-57052,CELLSNET-57054) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi

Hey Aspose Team,
I’m noticing another issue.
The text before the graph is clipped in some cases:
7_25.png (4.6 KB)
This is from the screenshots you shared with me.
Another issue is that this text is being wrapped into multiple lines.
7_13.png (3.1 KB)
7_14.png (1.9 KB)

I was able to replicate these issues with the new version V 24.11 of aspose cells.
Is there some property that I’m missing or is this something you’ll have to address?

@JThomas98
We can reproduce the issue by testing on the latest version v24.11 using sample files and the following sample code. It was found that some texts in front of the graphics were clipped, and some graphic texts were wrapped into multiple lines.

The sample code as follows:

Workbook book = new Workbook(filePath + "Chart_Template1.xlsm");
Chart chart = book.Worksheets["DetailReport"].Charts["DetailChart_PRVSERV"];
ImageOrPrintOptions imageOptions = new ImageOrPrintOptions();
imageOptions.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
imageOptions.ImageType = ImageType.Png;
chart.ToImage(filePath + "out_net.png", imageOptions);



chart = book.Worksheets["DetailReport"].Charts["DetailChart_SVCSUSED"];
           
chart.ToImage(filePath + "out_net2.png", imageOptions);

chart = book.Worksheets["DetailReport"].Charts["DetailChart_QUALLIFE"];

chart.ToImage(filePath + "out_net3.png", imageOptions);

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): 
CELLSNET-57199: The text before the graph is clipped when converting chart to image
CELLSNET-57200: Text is wrapped into multiple lines when converting chart to image

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

1 Like