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
{x: 2.1, value: 1},
5
{x: 3.1, value: 2},
6
{x: 4.0, value: 3}
7
],
8
[
9
{x: 2.3, value: 2},
10
{x: 3.4, value: 3},
11
{x: 4.3, value: 4}
12
],
13
[
14
{x: 2.1, value: 3},
15
{x: 3.1, value: 4},
16
{x: 4.2, value: 1}
17
],
18
[
19
{x: 2.4, value: 4},
20
{x: 3.7, value: 1},
21
{x: 4.0, value: 2}
22
]
23
);
24
25
var series = chart.getSeries(0);
26
series.id('circle');
27
28
// Removes series by id.
29
chart.removeSeries('circle');
30
31
chart.title('Remove series by id');
32
chart.container('container');
33
chart.draw();
34
});