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.cartesian();
3
4
var series = chart.marker([
5
{x: 1, value: 10},
6
{x: 2, value: 11},
7
{x: 3, value: 17},
8
{x: 4, value: 7},
9
{x: 5, value: 21},
10
{x: 6, value: 4}
11
]);
12
13
// Get tooltip.
14
var tooltip = series.tooltip();
15
16
tooltip.background().fill('#66cd00');
17
tooltip.fontColor('#ffff00');
18
19
chart.title('Get and modify tooltip');
20
chart.container('container');
21
chart.draw();
22
});