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: "January", value: 10000},
6
{x: "February", value: 12000},
7
{x: "March", value: 18000},
8
{x: "April", value: 11000},
9
{x: "May", value: 9000}
10
];
11
12
// create a chart
13
var chart = anychart.verticalArea();
14
15
// create a spline area series and set the data
16
var series = chart.splineArea(data);
17
18
// set the chart title
19
chart.title("Vertical Spline Area Chart");
20
21
// set the container id
22
chart.container("container");
23
24
// initiate drawing the chart
25
chart.draw();
26
});