HTMLcopy
1
<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
anychart.onDocumentReady(function () {
2
var chart = anychart.pyramid([
3
{x: 'Physical', value: 125},
4
{x: 'Data Link', value: 135},
5
{x: 'Network', value: 125},
6
{x: 'Transport', value: 145},
7
{x: 'Session', value: 125},
8
{x: 'Presentation', value: 155},
9
{x: 'Application', value: 290}
10
]);
11
chart.selected().fill('#7fff00');
12
chart.title('Get an array of the selected points and modify the point');
13
chart.container('container');
14
chart.draw();
15
16
chart.listen('chartDraw', function () {
17
chart.select([1, 3]);
18
19
// Get selected points.
20
var points = chart.getSelectedPoints();
21
22
var point = points[1];
23
return point.selected(false);
24
});
25
});