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.gauges.linear([300, 250, 150]);
4
chart.addPointer(0, 1, 2);
5
6
// To work with exports you need to reference the exports module from AnyChart CDN
7
// (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)
8
9
// Set exports settings.
10
chart.exports({facebook: {caption: 'ANYCHART.COM', description: 'Linear Gauge'}});
11
12
chart.title('Set exports settings');
13
chart.container('container');
14
chart.draw();
15
});