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([15, 20, 25, 30, 44]);
3
chart.legend(true);
4
5
var barPointer = chart.bar(2);
6
7
// Get pointer legend item.
8
var legendItem = barPointer.legendItem();
9
legendItem.text('Blue pointer');
10
legendItem.iconType('circle');
11
12
chart.width(600).height(400);
13
chart.title('Get and modify pointer legend item');
14
chart.container('container');
15
chart.draw();
16
});