Hi, please find the attached image and excel file (files.zip (44.3 KB)).
In excel file go to sheet “Sheet_ColumnClustered3DChart” and check the chart image named “Chart 2”
If you compare this chart which is present in excel sheet with the one attached (“axisImage.png”), Y-axis values are different from excel chart image.
Can you please let us know is this a bug or we are missing something in our implementation.
Below is the code i am using to conver chart object to image.
Workbook workbook = new Workbook("FilePath of Excel attached");
Worksheet sourceWorksheet = workbook.Worksheets["Sheet_ColumnClustered3DChart"];
ImageOrPrintOptions imageOrPrintOptions = new ImageOrPrintOptions();
imageOrPrintOptions.OnePagePerSheet = true;
// Always use Png as its file size is 8 times lesser than of Jpeg.
imageOrPrintOptions.ImageType = ImageType.Png;
imageOrPrintOptions.HorizontalResolution = 200;
imageOrPrintOptions.VerticalResolution = 200;
imageOrPrintOptions.IsCellAutoFit = true;
Aspose.Cells.Charts.Chart sourceChart = sourceWorksheet.Charts["Chart 2"];
sourceChart.Calculate();
imageToReturn = sourceChart.ToImage(imageOrPrintOptions);
Please provide a fix as soon as you can.
Regards,
Prathap