exportSVG
Exports the chart as an SVG document.
Inherited from Chart.exportSVG
Example
<div id="stock-chart"></div>
<script>
var stockChart = $("#stock-chart").kendoStockChart({
dataSource: {
data: [
{ date: "2012/01/01", open: 10, high: 15, low: 8, close: 12, volume: 1000 },
{ date: "2012/01/02", open: 12, high: 18, low: 10, close: 15, volume: 1200 }
]
},
dateField: "date",
series: [{
type: "candlestick",
openField: "open",
highField: "high",
lowField: "low",
closeField: "close"
}]
}).data("kendoStockChart");
// Export as SVG
stockChart.exportSVG().done(function(data) {
kendo.saveAs({
dataURI: data,
fileName: "stock-chart.svg"
});
});
</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