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.sparkline([1.3, 2, 1.4, 4, 2.3, 6]);
4
5
// To work with exports you need to reference the exports module from AnyChart CDN
6
// (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)
7
8
// Set exports settings.
9
chart.exports({facebook: {caption: 'ANYCHART.COM', description: 'Sparkline chart'}});
10
11
chart.title({text: 'Set exports settings', orientation: 'top'});
12
chart.container('container');
13
chart.draw();
14
});