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
chart.title('Set adjusting font size');
11
12
var tooltip = chart.tooltip();
13
tooltip.width(200);
14
tooltip.height(100);
15
tooltip.maxFontSize(20);
16
17
// Adjust font size on the specified size.
18
tooltip.adjustFontSize(true);
19
20
chart.title('Adjust font size');
21
chart.container('container');
22
chart.draw();
23
});