Hello,
I am using Aspose.Cells v17.3.0 to generate PDF of chart - Chart 1 in the attached excel file. In the PDF output, the x-axis labels are not the same as the labels in actual chart.
Following code is used to generate the output:
Workbook workbook = new Workbook("test.xlsx");
WorksheetCollection ws = workbook.getWorksheets();
String worksheetName = "Charts";
Chart chart = ws.get(worksheetName).getCharts().get("Chart 1");
chart.toPdf("D:\\response_17.3.0.pdf");
Can you please analyse this issue.
Thanks,
Neha
Hi,
Thanks for the template file, sample code and screenshot.
After an initial test,
I am able to reproduce the issue as you mentioned (via your screenshot: https://forum.aspose.com/t/18548) by using your template file (containing the chart) and sample code. I found that the x-axis labels of chart are incorrect in the output PDF file format. I have logged a ticket with an id “CELLSJAVA-42232
” for your issue. We will look into it soon.
Once we have an update on it, we will let you know here.
Thank you.
Hi,
We did evaluate your issue a bit and I am afraid, we cannot fix such an issue which is machine specific issue. Also, you may open the template Excel file into different MS Excel versions and get different display for x-axis values formation of the chart. For example, if you could open the file into MS Excel 2007, you will see same results for x-axis values as per the output image produced by Aspose.Cells APIs.
Thank you.
Hi,
Furthermore, we noticed, as the major unit is automatic for x-axis of the chart, (on our side, the value is 6 months), so we cannot do well/better for automatic major unit issues currently. It looks like it depends on the fonts on your machine or the DPI of your machine. I am afraid, it is too complex and we cannot fix it. I think you already posted similar issues here: <a rel=“nofollow” href="https://forum.aspose.com/t/24227
Thank you.