Exporting Service

Description

Export Chart as PNG, JPG, SVG, PDF document, Excel document or Word document.

URL

https://js.syncfusion.com/ExportingServices/api/JSChartExport/ExportChart

Parameters

Name Value
exportMultipleChart false

Request

  • JS
  • var chart = $(".e-datavisualization-chart").ejChart("instance");
    var exportSettings = chart.model.exportSettings;
    exportSettings.fileName = "Chart";
    exportSettings.angle = "90";
    exportSettings.type = "png";
    exportSettings.mode = 'server';
    exportSettings.action = 'http://js.syncfusion.com/ExportingServices/api/JSChartExport/ExportChart';
    data = chart.export();

    Response (PNG, JPG, SVG, PDF, Word or Excel):

    Status Code: 200

    Content-Type: application/octet-stream

    Browser will prompt a dialog box to save the file (image or document).

    Online Demo

    Our Exporting Demo sample uses this service to export Chart as images (PNG, JPG, SVG), PDF document, Word document and Excel worksheet.