<div id="container"></div>
html, body, #container {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
anychart.onDocumentReady(function () {
var chart = anychart.line([
{x: 0, value: 6},
{x: 1, value: 10},
{x: 2, value: 18},
{x: 3, value: 11},
{x: 4, value: 9}
]);
chart.yScale().minimum(0);
var controller = chart.annotations();
// Create infinite line annotation.
controller.infiniteLine({
xAnchor: 1,
valueAnchor: 10,
secondXAnchor: 3,
secondValueAnchor: 11,
stroke: '2 #F44336'
});
chart.title('Create infinite line annotation');
chart.container('container');
chart.draw();