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
12
// Set tooltip width.
13
tooltip.width(150);
14
15
// Set tooltip height.
16
tooltip.height(50);
17
18
tooltip.format("Person: {%x} \nSum: {%Value}");
19
tooltip.titleFormat("{%SeriesName}");
20
21
chart.getSeries(0).name("Sales");
22
chart.title("Set tooltip width and height");
23
chart.container("container");
24
chart.draw();
25
});