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.line([6, 10, 18, 11, 9]);
3
chart.yScale().minimum(0);
4
chart.xScale("linear");
5
6
var controller = chart.annotations();
7
8
var annotation = controller.trendChannel();
9
annotation.xAnchor(1.3);
10
annotation.valueAnchor(13);
11
annotation.secondXAnchor(2);
12
annotation.secondValueAnchor(19);
13
annotation.thirdXAnchor(2);
14
annotation.thirdValueAnchor(16);
15
16
// Set hover fill.
17
annotation.hoverFill({
18
src: "https://static.anychart.com/images/underwater.jpg",
19
mode: "stretch",
20
opacity: 0.5
21
});
22
23
chart.title("Set hover fill as an image.");
24
chart.container("container");
25
chart.draw();
26
});