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.scatter();
3
chart.line([
4
{x: 1, value: 0},
5
{x: 2, value: 20},
6
{x: 3, value: 10},
7
{x: 4, value: 30},
8
{x: 5, value: 20},
9
{x: 6, value: 40},
10
{x: 7, value: 30},
11
{x: 8, value: 50},
12
{x: 9, value: 40},
13
{x: 1, value: 0}
14
]);
15
chart.label(0, {text: 'First label'});
16
chart.label(1, {offsetY: 10, text: 'Second label'});
17
18
// Disable the first label.
19
chart.label(0, false);
20
21
chart.title('Disable the chart label by index 0');
22
chart.xGrid(true).yGrid(true);
23
chart.container('container');
24
chart.draw();
25
});