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: 1, value: 1.1},
4
{x: 2, value: 1.4},
5
{x: 3, value: 1.2},
6
{x: 4, value: 1.95}
7
]);
8
chart.container('container');
9
chart.draw();
10
11
// Trying to get to '1.25' tick position.
12
var yScale = chart.yScale();
13
14
yScale.transform(1.25);
15
// Returns 0.25
16
});