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
3
// create data
4
var data = [
5
["January", 0.7, 6.1],
6
["February", 0.6, 6.3],
7
["March", 1.9, 8.5],
8
["April", 3.1, 10.8],
9
["May", 5.7, 14.4]
10
];
11
12
// create a chart
13
var chart = anychart.column();
14
15
// create a range column series and set the data
16
var series = chart.rangeColumn(data);
17
18
// set the chart title
19
chart.title("Range Column Chart: Padding (Single Series)");
20
21
// set the padding between column groups
22
chart.barGroupsPadding(0);
23
24
// set the titles of the axes
25
chart.xAxis().title("Month");
26
chart.yAxis().title("Temperature, \xb0C");
27
28
// set the container id
29
chart.container("container");
30
31
// initiate drawing the chart
32
chart.draw();
33
});