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.xScale("linear");
4
chart.annotations([{
5
type: "ellipse",
6
xAnchor: 1.9,
7
valueAnchor: 30,
8
secondXAnchor: 2.1,
9
secondValueAnchor: 100,
10
fill: "#673AB7 0.5",
11
stroke: "3 #FF9800"
12
}]);
13
14
var annotation = chart.annotations().getAnnotationAt(0);
15
16
// Get Y-scale.
17
annotation.yScale(anychart.scales.log());
18
19
chart.title("Set Y-scale.");
20
chart.container("container");
21
chart.draw();
22
});