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.line();
3
4
var series = chart.line([1, 2, 3, 4]);
5
series.id("firstSeries");
6
series.markers(false);
7
8
chart.line([2, 3, 4, 1]);
9
chart.line([3, 4, 1, 2]);
10
chart.line([4, 1, 2, 3]);
11
12
// Gets series by id.
13
var seriesById = chart.getSeries("firstSeries");
14
seriesById.markers(true);
15
16
chart.title("Get and modify series.");
17
chart.container("container");
18
chart.draw();
19
});