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 a data set
4
var data = anychart.data.set([
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: Basic Sample");
20
21
// set the titles of the axes
22
var xAxis = chart.xAxis();
23
xAxis.title("Month");
24
var yAxis = chart.yAxis();
25
yAxis.title("Temperature, ?C");
26
27
// set the container id
28
chart.container("container");
29
30
// initiate drawing the chart
31
chart.draw();
32
});