Hello, I am trying to convert an excel chart into an EMF image. However, the axis spacing on the chart in the EMF is not the same as in the excel workbook. I have provided two examples, one where the primary axis is effected and another where the secondary axis is effected.
I used the following code snippet for the conversion:
Workbook workbook = new Workbook("secondary_axis.xlsx");
Aspose.Cells.Charts.Chart chart = workbook.Worksheets[0].Charts[0];
chart.ToImage("output_secondary.emf", System.Drawing.Imaging.ImageFormat.Emf);
For example, in secondary_axis.xlsx, the chart’s secondary axis uses a 20% step between each label. However, in the corresponding EMF output in “output_secondary.emf” it has a 10% step.
This only seems to be an issue when setting the Major units in excel to Auto. When setting it manually, the axis are spaced as expected.
The following zip file contains the two test cases, and their corresponding EMF outputs.
incorrect_axis.zip (33.1 KB)
Thanks.