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
var chart = anychart.column([
3
{x: 'John', value: 10000},
4
{x: 'Jake', value: 12000},
5
{x: 'Peter', value: 18000},
6
{x: 'James', value: 11000},
7
{x: 'Mary', value: 9000}
8
]);
9
10
var tooltip = chart.tooltip();
11
tooltip.displayMode('union');
12
13
// Set title formatter.
14
tooltip.titleFormat(function () {
15
return 'Custom title';
16
});
17
18
chart.title('Set title formatter');
19
chart.container('container');
20
chart.draw();
21
});