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
// data
4
var data = [
5
["John", 10000],
6
["Jake", 12000],
7
["Peter", 18000],
8
["James", 11000],
9
["Mary", 9000]
10
];
11
12
// set chart type
13
var chart = anychart.column(data);
14
15
// adjust chart settings
16
var title = chart.title();
17
// enable title
18
title.enabled(true);
19
// set title text
20
title.text("Sales Performance");
21
// place title into bottom of the chart
22
title.orientation("bottom");
23
// stick title to the left side
24
title.align("left");
25
26
// draw chart
27
chart.container("container");
28
chart.draw();
29
});