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([300, 250, 150]);
3
chart.addPointer(0, 1, 2);
4
chart.title('Click on the chart and then double-click');
5
6
chart.listen('click', function (e) {
7
chart.title({fontColor: '#4CAF50'});
8
});
9
10
chart.listen('dblClick', function (e) {
11
chart.title('You can\'t click here anymore');
12
chart.title({fontColor: '#000000'});
13
14
// Removes all listeners
15
chart.removeAllListeners();
16
17
});
18
19
chart.container('container');
20
chart.draw();
21
});