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.fibonacciRetracement();
9
10
// Set X anchor.
11
annotation.xAnchor(1);
12
13
// Set value anchor.
14
annotation.valueAnchor(10);
15
16
// Set second X anchor.
17
annotation.secondXAnchor(2);
18
19
// Set second value anchor.
20
annotation.secondValueAnchor(18);
21
22
chart.title("Set anchors settings.");
23
chart.container("container");
24
chart.draw();
25
});