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
// title settings
16
var title = chart.title();
17
// enable title
18
title.enabled(true);
19
// enables HTML tags
20
title.useHtml(true);
21
// place text in the center
22
title.hAlign("center");
23
title.text(
24
"Sales Performance"+
25
"<br><a style=\"color:#0000FF; font-size: 10px;\">"+
26
"according to annual report</a>"
27
);
28
29
// draw chart
30
chart.container("container");
31
chart.draw();
32
});