Free Support Forum - aspose.com

Chart to Image beta

Aspose team,


I would like to try the chart to image feature scheduled to be released soon. Could you please give me a patched build which includes this feature?

Thanks,
Srivatsa.

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

Please try the attached latest version of Aspose.Cells. Also, please find the following sample code for reference regarding Chart2Image feature:

Workbook workbook = new Workbook();

Worksheets worksheets = workbook.getWorksheets();

//Obtaining the reference of the first worksheet

Worksheet worksheet= worksheets.getSheet(0);

Cells cells = worksheet.getCells();

cells.getCell("A1").setValue(50);

cells.getCell("A2").setValue(100);

cells.getCell("A3").setValue(150);

cells.getCell("A4").setValue(200);

cells.getCell("B1").setValue(60);

cells.getCell("B2").setValue(32);

cells.getCell("B3").setValue(50);

cells.getCell("B4").setValue(40);

cells.getCell("C1").setValue("Q1");

cells.getCell("C2").setValue("Q2");

cells.getCell("C3").setValue("Y1");

cells.getCell("C4").setValue("Y2");

Charts charts = worksheet.getCharts();

Chart chart= charts.addChart(ChartType.PIE,5,0,15,5);

chart.getNSeries().add("=A1:C4", true);

ImageOptions io = new ImageOptions();

io.setImageFormat(ImageFormat.JPEG);

chart.toImage("C:\\world.jpeg",io);

Thank You & Best Regards,

Hi,

Please try the latest attached version/fix (you may ignore the version attached by Nausherwan in previous post). In this version (attached), we have fixed an internal bug of Legend’s font.

Thank you.
<span style=“font-size: 9pt; font-family: “SimSun”,“serif”;”><o:p></o:p>