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
4
var series1 = chart.column([
5
{x: 0, value: 22},
6
{x: 1, value: 34},
7
{x: 2, value: 16},
8
]);
9
series1.hovered({fill: '#F44336'});
10
11
var series2 = chart.column([
12
{x: 0, value: 12},
13
{x: 1, value: 41},
14
{x: 2, value: 47}
15
]);
16
series2.hovered({fill: '#4CAF50'});
17
18
var interactivity = chart.interactivity();
19
interactivity.hoverMode('by-spot');
20
21
// Set spot radius.
22
interactivity.spotRadius(200);
23
24
chart.title('Set spot radius');
25
chart.container('container');
26
chart.draw();
27
});