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.gauges.linear([
3
{value: 15},
4
{value: 20},
5
{value: 25},
6
{value: 30},
7
{value: 44}
8
]);
9
chart.addPointer(4, 3, 2, 1, 0);
10
11
// Get the number of pointers in loop.
12
for (var i = 0; i < chart.getPointersCount(); i++) {
13
chart.getPointerAt(i).name((i + 1) + ' Pointer');
14
}
15
16
chart.legend(true);
17
chart.title('Get and use pointers count');
18
chart.container('container');
19
chart.draw();
20
});