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.pyramid([
4
{x: 'Physical', value: 125},
5
{x: 'Data Link', value: 135},
6
{x: 'Network', value: 125},
7
{x: 'Transport', value: 145},
8
{x: 'Session', value: 125},
9
{x: 'Presentation', value: 155},
10
{x: 'Application', value: 290}
11
]);
12
13
// To work with exports you need to reference the exports module from AnyChart CDN
14
// (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)
15
16
// Set exports settings.
17
chart.exports({facebook: {caption: 'ANYCHART.COM', description: 'Pyramid chart'}});
18
19
chart.title('Set exports settings');
20
chart.container('container');
21
chart.draw();
22
});