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
5
var controller = chart.annotations();
6
7
// Create infinite line annotation.
8
controller.infiniteLine({
9
xAnchor: 1,
10
valueAnchor: 10,
11
secondXAnchor: 3,
12
secondValueAnchor: 11,
13
stroke: "2 #F44336"
14
});
15
16
chart.title("Create infinite line annotation.");
17
chart.container("container");
18
chart.draw();
19
});