| layout | post |
|---|---|
| title | Syncfusion webAPI reference for ejChart |
| description | Know more about the webAPI references available for the Syncfusion Essential Studio ejChart control to export the Chart control to specified formats. |
| documentation | ug |
| platform | js |
| keywords | Chart, ejChart, syncfusion, ejChart webapi |
[POST] /Api/Chart/Export
It is used to export the Chart control to the specified format.
| Parameter | Description |
|---|---|
| ChartModel | It contains the model of the chart. |
| Data | DataURL of the chart to be exported. |
Code: 200
Content-Type: application/octet-stream
{% highlight js %}
$("#chartContainer").ejChart( { exportSettings: { angle: 180, action: "http://js.syncfusion.com/demos/ejServices/api/Chart/Export" }, });
{% endhighlight %}
The above example will export the Chart into specified file format.
[POST] /Api/Chart/SvgExport
It is used to export the Chart control as an SVG image.
| Parameter | Description |
|---|---|
| ChartModel | It contains the model of the chart. |
| Data | DataURL of the chart to be exported. |
Code: 200
Content-Type: application/octet-stream
{% highlight js %}
$("#chartContainer").ejChart( {exportSettings: { type: "svg", angle: 180, action: "http://js.syncfusion.com/demos/ejServices/api/Chart/SvgExport" }, });
{% endhighlight %}
The above example will export the Chart as an SVG image.
[POST]/Api/Chart/ExcelExport
It is used to export the Chart control as an Excel document.
| Parameter | Description |
|---|---|
| ChartModel | It contains the model of the chart. |
| Data | DataURL of the chart to be exported. |
Code: 200
Content-Type: application/octet-stream
{% highlight js %}
$("#chartContainer").ejChart( {exportSettings: { type: "xlsx", angle: 180, action: "http://js.syncfusion.com/demos/ejServices/api/Chart/ExcelExport" }, });
{% endhighlight %}
The above example will export the Chart as an Excel file.
[POST] /Api/Chart/WordExport
It is used to export the Chart control as a Word document.
| Parameter | Description |
|---|---|
| ChartModel | It contains the model of the chart. |
| Data | DataURL of the chart to be exported. |
Code: 200
Content-Type: application/octet-stream
{% highlight js %}
$("#chartContainer").ejChart( {exportSettings: { type: "docx", angle: 180, action: "http://js.syncfusion.com/demos/ejServices/api/Chart/WordExport" }, });
{% endhighlight %}
The above example will export the Chart as an Word file.
[POST] /Api/Chart/PdfExport
It is used to export the Chart control as a PDF document.
| Parameter | Description |
|---|---|
| ChartModel | It contains the model of the chart. |
| Data | DataURL of the chart to be exported. |
Code: 200
Content-Type: application/octet-stream
{% highlight js %}
$("#chartContainer").ejChart( {exportSettings: { type: "pdf", angle: 180, action: "http://js.syncfusion.com/demos/ejServices/api/Chart/PdfExport" }, });
{% endhighlight %}
The above example will export the Chart as PDF file.
[POST] /Api/Chart/ImageExport
It is used to export the chart control as an image (PNG/JPG).
| Parameter | Description |
|---|---|
| ChartModel | It contains the model of the chart. |
| Data | DataURL of the chart to be exported. |
Code: 200
Content-Type: application/octet-stream
{% highlight js %}
$("#chartContainer").ejChart( {exportSettings: { type: "jpg", angle: 180, action: "http://js.syncfusion.com/demos/ejServices/api/Chart/ImageExport" }, });
{% endhighlight %}
The above example will export the Chart as JPG Image.