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([
3
{x: 0, value: 2},
4
{x: 1, value: 5},
5
{x: 2, value: 3},
6
{x: 3, value: 9},
7
{x: 4, value: 4}
8
]);
9
chart.yScale({minimum: 0});
10
chart.xScale("linear");
11
12
var triangleAnnotations = chart.annotations();
13
14
chart.title('Set annotation type. Use mouse to draw annotation');
15
chart.container('container');
16
chart.draw();
17
18
// Set annotation type.
19
triangleAnnotations.startDrawing('fibonacci-arc');
20
});