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
chart.spline([
4
{x: 'January', value: 1.1},
5
{x: 'February', value: 1.6},
6
{x: 'March', value: 1.4},
7
{x: 'April', value: 1.9}
8
]);
9
10
var yAxis = chart.yAxis();
11
12
// Set axis scale.
13
yAxis.scale(anychart.scales.linear());
14
15
chart.title('Set axis scale');
16
chart.container('container');
17
chart.draw();
18
});