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
// Create Andrews Pitchfork annotation.
9
controller.andrewsPitchfork({
10
xAnchor: 1,
11
valueAnchor: 9,
12
secondXAnchor: 1.3,
13
secondValueAnchor: 15,
14
thirdXAnchor: 2.2,
15
thirdValueAnchor: 15,
16
stroke: "2 #F44336"
17
});
18
19
chart.title("Create Andrews Pitchfork annotation.");
20
chart.container("container");
21
chart.draw();
22
});