Export

exportdata

Exports the current data. Only works if exportdataurl is set in zingchart.render or url parameter is set.


          
zingchart.exec('myid', 'exportdata');
        

getimagedata

Returns a Base64 encoded image string. Returns -1 if failed to get image data.


          
zingchart.exec('myid', 'getimagedata', {
    filetype : 'png'
});
        

Note: charts with output: 'svg' must get data inside callback function defined in the method call. SVG output is the default for ZingChart.

A ZingChart Embedded Demohttps://app.zingsoft.com/demos/embed/I9JFJ01A

AttributeTypeInfo

filetype/format

String

The image filetype. The default is jpg. Other options are bmp (flash only) and png.

"png" | "jpg" | "bmp" (flash only)

callback

Function

The callback function is used for svg charts exporting

function(imagedata) {...}

print

Creates a printable version of the chart and attempts to print it.


          
zingchart.exec('myid', 'print');
        
A ZingChart Embedded Demohttps://app.zingsoft.com/demos/embed/CDJWAX8X

saveasimage/exportimage

Produces an image of the graph. Only works if exportimageurl is set in zingchart.render or url parameter is set.


          
zingchart.exec('myid', 'saveasimage');