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.xScale().minimum(-1);
4
5
var firstSeries = chart.line([
6
{x: 0, value: 22},
7
{x: 1, value: 34},
8
{x: 2, value: 16},
9
{x: 3, value: 12},
10
{x: 4, value: 41},
11
{x: 5, value: 47}
12
]);
13
14
var secondSeries = chart.line([
15
{x: 0, value: 39},
16
{x: 1, value: 28},
17
{x: 2, value: 21},
18
{x: 3, value: 18},
19
{x: 4, value: 24},
20
{x: 5, value: 29}
21
]);
22
23
// Enable chart select labels.
24
chart.selectLabels(true);
25
26
chart.title("Enable chart select labels");
27
chart.container("container");
28
chart.draw();
29
30
firstSeries.select([0, 2, 4]);
31
secondSeries.select([1, 3, 5]);
32
});