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 vertical line annotation.
8
controller.verticalLine({
9
xAnchor: 1,
10
stroke: "2 #F44336"
11
});
12
13
chart.title("Create vertical line annotation.");
14
chart.container("container");
15
chart.draw();
16
});