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 stage = anychart.graphics.create('container');
3
4
var customScale = anychart.scales.linear();
5
6
// Extend data ranges.
7
customScale.extendDataRange(-15, 16);
8
9
var axis = anychart.standalones.axes.linear();
10
axis.title('Extend data ranges');
11
axis.parentBounds(50, 70, 300, 60);
12
axis.scale(customScale);
13
axis.container(stage);
14
axis.draw();
15
});