HTMLcopy
1
<button onclick="chart.shareWithFacebook();">Share with Facebook</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([
4
{x: 'January', value: 2},
5
{x: 'February', value: 5},
6
{x: 'March', value: 3},
7
{x: 'April', value: 9},
8
{x: 'May', value: 4}
9
]);
10
11
// To work with exports you need to reference the exports module from AnyChart CDN
12
// (https://cdn.anychart.com/releases/8.13.0/js/anychart-exports.min.js for latest or https://cdn.anychart.com/releases/8.13.0/js/anychart-exports.min.js for the versioned file)
13
14
// Set exports settings.
15
chart.exports({facebook: {caption: 'ANYCHART.COM', description: 'Column chart'}});
16
17
chart.title('Set exports settings');
18
chart.container('container');
19
chart.draw();
20
});