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
3
var data = anychart.data.set([
4
["John", 10000],
5
["Jake", 12000],
6
["Peter", 18000],
7
["James", 11000],
8
["Mary", 9000]
9
]);
10
11
// chart type
12
var chart = anychart.bar();
13
var series = chart.bar(data);
14
series.name("Year 2008");
15
16
// set title
17
chart.title("Adjusted Tooltip Background");
18
19
// disable tooltip for the first series
20
var tooltipBackground = series.tooltip().background();
21
22
tooltipBackground.fill("#EEE 0.8");
23
tooltipBackground.stroke("#888");
24
tooltipBackground.cornerType("round-inner");
25
tooltipBackground.corners(5);
26
27
// font settings for tooltip text
28
var tooltip = series.tooltip();
29
tooltip.fontColor("#444");
30
tooltip.fontWeight(900);
31
var title = series.tooltip().title();
32
title.fontWeight(900);
33
title.fontColor("#444");
34
35
// draw
36
chart.container("container");
37
chart.draw();
38
});