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
4
chart.line([
5
{x: 1, value: 0},
6
{x: 2, value: 20},
7
{x: 3, value: 10},
8
{x: 4, value: 30},
9
{x: 5, value: 20},
10
{x: 6, value: 40},
11
{x: 7, value: 30},
12
{x: 8, value: 50},
13
{x: 9, value: 40},
14
{x: 1, value: 0}
15
]);
16
17
// Get selected state.
18
var state = chart.selected();
19
state.labels({enabled: true, fontColor: '#ff0000'});
20
21
chart.title('Get and modify selected state');
22
chart.container('container');
23
chart.draw();
24
25
chart.getSeries(0).select([2, 4, 6]);
26
});