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: 'Cycling', value: 10},
4
{x: 'Swimming', value: 12},
5
{x: 'Run', value: 18},
6
{x: 'Hiking', value: 11},
7
{x: 'Alpinism', value: 9}
8
]);
9
10
var tooltip = chart.tooltip();
11
tooltip.width(110);
12
tooltip.height(75);
13
tooltip.format('Monthly Training: {%Value} hours');
14
15
// Set word-break mode.
16
tooltip.wordBreak('break-all');
17
18
chart.title('Set word-break mode');
19
chart.container('container');
20
chart.draw();
21
});