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
// set stage
4
var stage = anychart.graphics.create("container");
5
6
// chart type
7
var chart = anychart.column();
8
9
// set title
10
chart.title("Multiple-Series Column Chart");
11
12
// set axes titles
13
chart.xAxis().title("Manager");
14
chart.yAxis().title("Sales");
15
16
var data = [
17
["John" , 10000, 12000],
18
["Jake" , 12000, 15000],
19
["Peter" , 18000, 16000],
20
["James" , 11000, 13000],
21
["Mary" , 9000, 19000]
22
];
23
24
// set series data
25
chart.data(data);
26
27
// draw
28
chart.container(stage);
29
chart.draw();
30
});