Posted 28 January 2025, 3:11 pm EST - Updated 28 January 2025, 3:17 pm EST
I am setting up a chart in my spreadJS on the frontend, with properties such as: colors, axis labels and column or row labels of the chart.
When generating an image of this chart using the code below, the generated image does not reflect the same appearance of the spread chart.
Snippet of the main code
IShape iShape = recuperaIShapeDeAcordoComAbaENomeShape(bytesFile, nomeAbaGrafico, nomeGrafico);
ImageSaveOptions options = new ImageSaveOptions();
options.setScaleX(3.0);
options.setScaleY(3.0);
options.setResolution(300);
iShape.toImage(outputStream, ImageType.PNG, options);
private IShape recuperaIShapeDeAcordoComAbaENomeShape(byte[] bytesFile, String nomeAbaGrafico, String nomeGrafico) {
Workbook workbook = this.abrirWorkbookPeloConteudo(bytesFile, OpenFileFormat.Sjs);
workbook.getOptions().getFormulas().setEnableIterativeCalculation(false);
IWorksheet aba = workbook.getWorksheets().get(nomeAbaGrafico);
return aba.getShapes().get(nomeGrafico);
}
Is the information being sent to generate the image sufficient, or is it necessary to include additional properties to ensure the chart matches the desired format and appearance?