exportSVG

Exports the chart as an SVG document.

Inherited from Chart.exportSVG

Example

<div id="sparkline"></div>
<script>
var sparkline = $("#sparkline").kendoSparkline({
    type: "column",
    series: [{
        data: [10, 15, 8, 12]
    }]
}).data("kendoSparkline");

sparkline.exportSVG().then(function(dataURI) {
    // Display or save the SVG
    console.log(dataURI);
});
</script>

Parameters

options Object (optional)

Export options.

options.raw Boolean (default: false)

Resolves the promise with the raw SVG document without the Data URI prefix.

Returns

Promise A promise that will be resolved with a SVG document encoded as a Data URI.

In this article
exportSVG
Not finding the help you need?
Contact Support