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.circular([{value: 7.5}]);
3
chart.axis();
4
chart.needle();
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.title('Click on the chart and then double-click');
20
chart.container('container');
21
chart.draw();
22
});