HTMLcopy
1
<button onclick="chart.shareWithTwitter()">Share with Twitter</button>
2
<div id="container"></div>
CSScopy
9
1
html, body, #container {
2
width: 100%;
3
height: 100%;
4
margin: 0;
5
padding: 0;
6
}
7
button {
8
margin: 10px 0 0 10px;
9
}
JavaScriptcopy
x
1
var chart;
2
anychart.onDocumentReady(function () {
3
chart = anychart.line([6, 48, 6, 44, 8, 29, 9, 23, 9, 17]);
4
5
chart.width('100%').height('95%');
6
chart.title('Set Twitter sharing settings');
7
chart.container('container');
8
chart.draw();
9
10
// Set Twitter sharing settings.
11
anychart.exports.twitter(
12
'https://export.anychart.com/sharing/twitter',
13
'1000',
14
'500'
15
);
16
});