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.getSeries(0).tooltip();
11
12
// Enable HTML tooltip mode.
13
tooltip.useHtml(true);
14
15
tooltip.titleFormat('<img src="https://static.anychart.com/images/oceanic-airlines.png" hspace="15" width="50px" height="50px"/>')
16
tooltip.format('<b>{%X}</b>: <i>{%Value}</i>');
17
18
chart.title('Enable HTML tooltip');
19
chart.container('container');
20
chart.draw();
21
});