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
var series = chart.marker([
5
{x: 1.2, value: 2},
6
{x: 2.3, value: 6},
7
{x: 3.4, value: 4},
8
{x: 4.1, value: 8}
9
]);
10
11
// Get state.
12
var state = series.selected();
13
14
state.type('star5');
15
state.fill('#FFEB3B');
16
17
chart.title('Get and modify selected state');
18
chart.container('container');
19
chart.draw();
20
21
series.select();
22
});