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.waterfall(
3
[166, 43, -79, -46, 84, NaN],
4
[50, -25, 30, 28, 83, NaN]
5
);
6
7
chart.getSeries(0).fill(function () {
8
return this.sourceColor;
9
});
10
11
chart.getSeries(1).fill(function () {
12
return this.sourceColor;
13
});
14
15
// Set palette.
16
chart.palette(anychart.palettes.sea);
17
18
chart.title('Set series color palette from theme');
19
chart.container('container');
20
chart.draw();
21
});