<button onclick="shareAsSvg();">Get the link to SVG image</button>
<div id="container"></div>
html, body, #container {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
var chart;
anychart.onDocumentReady(function () {
chart = anychart.mekko();
chart.data({
rows: [
['Apples', 1, 2, 3, 4],
['Pears', 2, 3, 4, 1],
['Bananas', 3, 4, 1, 2],
['Grapes', 4, 1, 2, 3]
]
});
chart.title('Share chart as SVG image');
chart.container('container');
chart.draw();
function shareAsSvg() {
// Share chart as SVG image.
chart.shareAsSvg(function (response) {
alert(response);