HTMLcopy
1
<button onclick="chart.saveAsJpg();">Save chart</button>
2
<div id="container"></div>
CSScopy
6
1
html, body, #container {
2
width: 100%;
3
height: 100%;
4
margin: 0;
5
padding: 0;
6
}
JavaScriptcopy
x
1
var chart;
2
anychart.onDocumentReady(function () {
3
chart = anychart.column([32, 22, 27, 40, 120, 34, 37, 100, 22]);
4
5
// Set filename.
6
anychart.exports.filename('Custom file name');
7
8
chart.title('Set filename for exported file');
9
chart.container('container');
10
chart.draw();
11
});