Graphic defect

Defect.zip (2.2 MB)
Hi,
attached to the mail there are a document that show some defect exporting graphic from Excel to SVG. In the compressed file there are also the original file and the SVG generated.
Best regards.

@gmaglie

Thanks for using Aspose APIs.

There are total of 56 charts in your Excel file. We have rendered all of them to Pdf. Please download your charts and see which of them has errors, then add comments inside them and give us back. We will then look into this issue further and log the issues based on your comments.

Download Link:
All 56 Output Excel Charts

Here is the sample code we used to generate the charts. Please note, we have used Workbook.CalculateFormula() and Chart.Calculate() methods before rendering them to Pdf.

C#

Workbook wb = new Workbook("DssRep_1517566422433.xlsx");

wb.CalculateFormula();

for(int i=0; i<wb.Worksheets.Count; i++)
{
    Worksheet ws = wb.Worksheets[i];

    Debug.WriteLine(i + "---" + ws.Charts.Count);

    for(int j=0; j<ws.Charts.Count; j++)
    {
        Chart ch = ws.Charts[j];
        ch.Calculate();

        string sheetId = i < 10 ? "0" + i : "" + i;

        ch.ToPdf(sheetId + "__" + j + "__" + ws.Name + "__" + ch.Name + ".pdf");
    }//for
}//for

Defect1.zip (1.0 MB)

Attached the file with defects. Not only the graphs have some imprecision, but also the rectangle with label that refer to values (see leverage chart where is diplayed N/D instead of value). In the docx there are the Excel version vs the PNG version of the entire page exported: the issues are in sheets RWA, Leverage, ECAP, Profitability, AIR Portfolio, Financial Assets.
Regards.

Just other information, I refreshed the objects with this java code:

					TextBoxCollection tbColl = sheet.getTextBoxes();
					for (int nP = 0; nP < tbColl.getCount(); nP++) {
						TextBox tb = tbColl.get(nP);
						tb.updateSelectedValue();
					}

					ShapeCollection sColl = sheet.getShapes();
					for (int nP = 0; nP < sColl.getCount(); nP++) {
						Shape sh = sColl.get(nP);
						DEILoggerUser.debug("Refresh Shape name: "+sh.getName());
						// String name = sh.getName();
						sh.updateSelectedValue();
					}
					for (int nP = 0; nP < sheet.getCharts().getCount(); nP++) {
						Chart ch = sheet.getCharts().get(nP);
						DEILoggerUser.debug("Refresh Chart name: "+ch.getName());
						// String name = sh.getName();
						ch.calculate();
					}

but in the log I don’t found the object Rounded Rectangle 22 (and Others objects), but only the follows objects:

2018-02-02 17:48:22,319;[INFO ];[USER];;Recalc sheet:Leverage
2018-02-02 17:48:22,350;[DEBUG];[USER];;Refresh Shape name: Chart 6
2018-02-02 17:48:22,350;[DEBUG];[USER];;Refresh Shape name: Chart 1
2018-02-02 17:48:22,350;[DEBUG];[USER];;Refresh Shape name: Rounded Rectangle 5
2018-02-02 17:48:22,350;[DEBUG];[USER];;Refresh Shape name: Rounded Rectangle 8
2018-02-02 17:48:22,350;[DEBUG];[USER];;Refresh Shape name: Rounded Rectangle 9
2018-02-02 17:48:22,350;[DEBUG];[USER];;Refresh Shape name: Rounded Rectangle 10
2018-02-02 17:48:22,350;[DEBUG];[USER];;Refresh Shape name: Chart 12
2018-02-02 17:48:22,350;[DEBUG];[USER];;Refresh Chart name: Chart 6
2018-02-02 17:48:22,381;[DEBUG];[USER];;Refresh Chart name: Chart 1
2018-02-02 17:48:22,397;[DEBUG];[USER];;Refresh Chart name: Chart 12

Hi,
I solved the refresh of shapes defined inside the graphs cycling the shapes of the graphs objects.

					for (int nP = 0; nP < sheet.getCharts().getCount(); nP++) {
						Chart ch = sheet.getCharts().get(nP);
						DEILoggerUser.debug("Refresh Chart name: "+ch.getName());
						ShapeCollection schColl = ch.getShapes();
						if (schColl!=null){
							for (int nP1 = 0; nP1 < schColl.getCount(); nP1++) {
								Shape sh = schColl.get(nP1);
								DEILoggerUser.debug("Refresh Graph Shape name: "+sh.getName());
								// String name = sh.getName();
								sh.updateSelectedValue();
							}
						}
						ch.calculate();
					}

@gmaglie

Thanks for your feedback and using Aspose APIs.

We were able to observe the issues in your provided graphs. We will look into them and fix the issues if possible. Once, there is some fix for you or any other update for you, we will let you know asap.

Your issues have been logged as

  • CELLSNET-45897 - Rendering Issues in Graphs
  • CELLSNET-45906 - Missing Label in the rendering of Chart
  • CELLSNET-45907 - Missing Values in the rendering of Chart
  • CELLSNET-45908 - Bad Position in the rendering of Chart
  • CELLSNET-45909 - Line not required in rendering of Grafico Chart
  • CELLSNET-45910 - Line not required in rendering of Credit Risk Chart
  • CELLSNET-45911 - Bad Position and Line in the rendering of Market Risk Chart

@gmaglie,

Please try our latest version/fix: Aspose.Cells for .NET v18.2.1:

One of your issues (logged earlier as “CELLSNET-45906”) has been fixed.

Let us know your feedback.

@gmaglie,

This is to inform you that we have also fixed a couple of more issues:

  • CELLSNET-45908 - Bad Position in the rendering of Chart
  • CELLSNET-45911 - Bad Position and Line in the rendering of Market Risk Chart

A new fix will be published after we perform QA and incorporating other enhancements and fixes.

@gmaglie

Thanks for using Aspose APIs.

Please download and try the following fix for your issues CELLSNET-45908 and CELLSNET-45911 and let us know your feedback.


For your issue

  • CELLSNET-45909 - Line not required in rendering of Grafico Chart

We have investigated this issue and found that the line is a leader line of data label (“0%”). The position of the label is too near to the critical value that determines whether the leader line is to display or not. Now we cannot fix this issue. If you drag the label (“0%”) in MS-Excel, you will find the leader line will be visible/invisible.

Hi,
where I can download the java version 18.2.2 ?
I use Aspose cell for Java.
Regards.

@gmaglie

We will provide you Java version including these fixes in next week hopefully. Once, it is available, we will share a download link with you.

@gmaglie

Please download and try the following Aspose.Cells for Java fix for Bad Position in the rendering of Chart in sheet “ECAP” and “Financial Assets”.

@shakeel.faiz

Please download and try the following new fix for missing label in sheet “RWA”. It includes previous fixes as well.

The issues you have found earlier (filed as CELLSNET-45911) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi

The issues you have found earlier (filed as CELLSNET-45908) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi

The issues you have found earlier (filed as CELLSNET-45906) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi

The issues you have found earlier (filed as CELLSNET-45911) have been fixed in this update. Please also check the following article:* <a href="Install Aspose Cells through NuGet|Documentation

The issues you have found earlier (filed as CELLSNET-45908) have been fixed in this update. Please also check the following article:* <a href="Install Aspose Cells through NuGet|Documentation

The issues you have found earlier (filed as CELLSNET-45906) have been fixed in this update. Please also check the following article:* <a href="Install Aspose Cells through NuGet|Documentation

@gmaglie

Thanks for using Aspose APIs.

Please download and try the following fix and let us know your feedback.


We have tested this fix using the following code and it generates good results.

Java

Workbook wb = new Workbook(dirPath + "DssRep_1517566422433.xlsx");

wb.calculateFormula();

for(int i=0; i<wb.getWorksheets().getCount(); i++)
{
    Worksheet ws = wb.getWorksheets().get(i);
    
    System.out.println(i + "---" + ws.getShapes().getCount());
    
    for(int j=0; j<ws.getShapes().getCount(); j++)
    {
    	ws.getShapes().get(j).updateSelectedValue();
    }

}//for


for(int i=0; i<wb.getWorksheets().getCount(); i++)
{
    Worksheet ws = wb.getWorksheets().get(i);

    System.out.println(i + "---" + ws.getCharts().getCount());

    for(int j=0; j<ws.getCharts().getCount(); j++)
    {
        Chart ch = ws.getCharts().get(j);
        ch.calculate();

        String sheetId = i < 10 ? "0" + i : "" + i;

        ch.toPdf(dirPath + sheetId + "__" + j + "__" + ws.getName() + "__" + ch.getName() + ".pdf");
    }//for
}//for