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.area();
14
15
// create a range area series and set the data
16
var series = chart.rangeArea(data);
17
18
// set the chart title
19
chart.title("Range Area Chart: Basic Sample");
20
21
// set the titles of the axes
22
chart.xAxis().title("Month");
23
chart.yAxis().title("Temperature, \xb0C");
24
25
// set the container id
26
chart.container("container");
27
28
// initiate drawing the chart
29
chart.draw();
30
});