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
{x: "1995", low: 0.10, high: 0.15},
6
{x: "1996", low: 0.10, high: 0.15},
7
{x: "1997", low: 0.12, high: 0.17},
8
{x: "1998", low: 0.13, high: 0.20},
9
{x: "1999", low: 0.15, high: 0.20},
10
{x: "2000", low: 0.15, high: 0.22},
11
{x: "2001", low: 0.15, high: 0.22},
12
{x: "2002", low: 0.19, high: 0.23},
13
{x: "2003", low: 0.20, high: 0.23}
14
];
15
16
// create a chart
17
var chart = anychart.verticalArea();
18
19
// create a range step area series and set the data
20
var series = chart.rangeStepArea(data);
21
22
// set step direction to the forward mode
23
series.stepDirection("forward");
24
25
// set the chart title
26
chart.title("Vertical Range Step Area Chart");
27
28
// set the container id
29
chart.container("container");
30
31
// initiate drawing the chart
32
chart.draw();
33
});