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: 0, value: 1},
6
{x: 1, value: 2},
7
{x: 2, value: 3},
8
{x: 3, value: 4}
9
]);
10
11
chart.line([
12
{x: 0, value: 2},
13
{x: 1, value: 3},
14
{x: 2, value: 4},
15
{x: 3, value: 1}
16
]);
17
18
chart.line([
19
{x: 0, value: 3},
20
{x: 1, value: 4},
21
{x: 2, value: 1},
22
{x: 3, value: 2}
23
]);
24
25
chart.line([
26
{x: 0, value: 4},
27
{x: 1, value: 1},
28
{x: 2, value: 2},
29
{x: 3, value: 3}
30
]);
31
32
// Set palette from theme.
33
chart.palette(anychart.palettes.sea);
34
35
chart.title('Set series color palette from theme');
36
chart.xScale().minimum(-0.5);
37
chart.container('container');
38
chart.draw();
39
});