HTMLcopy
1
<button onclick="chart.shareWithFacebook();">Get the sharing dialog</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
var exports = chart.exports();
12
13
// Set Facebook sharing settings.
14
exports.facebook(
15
'ANYCHART.COM',
16
'https://www.anychart.com/',
17
'Column chart',
18
'Statistics of visits to the site',
19
'1000',
20
'500'
21
);
22
23
chart.title('Set Facebook sharing settings');
24
chart.container('container');
25
chart.draw();
26
});