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
// data
3
data = [
4
["A", 637166],
5
["B", 721630],
6
["C", 148662],
7
["D", 78662],
8
["E", 90000]
9
];
10
11
// create a chart
12
var chart = anychart.column();
13
14
// set two color interlace
15
chart.yGrid().palette(["#FFF 0.25", "#000 0.25"]);
16
17
// chart title
18
chart.title("Custom Grid Interlace");
19
20
// set background gradient
21
chart.background().fill({keys: ["#BB0000", "#440000"],angle: 45});
22
23
// configure series
24
var series = chart.column(data);
25
series.stroke("#FFF");
26
series.fill("#FF0 0.85");
27
28
// adjust y axis
29
chart.yAxis().stroke("white");
30
chart.yAxis().ticks(false);
31
chart.yAxis().labels().fontColor("white");
32
33
// adjust x axis
34
chart.xAxis().stroke("white");
35
chart.xAxis().labels().fontColor("white");
36
37
// display chart
38
chart.container("container");
39
chart.draw();
40
});