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.line();
3
chart.line([10, 4, 17, 20, 16, 35, 6, 15]);
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
chart.container("container");
19
chart.draw();
20
});