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.dateTime();
5
6
customScale.startAutoCalc();
7
// Extends data range.
8
customScale.extendDataRange(new Date('28-Aug-07'), new Date('31-Aug-20'));
9
10
customScale.finishAutoCalc();
11
12
var linearAxis = anychart.standalones.axes.linear();
13
linearAxis.parentBounds(35, 190, 350, 60);
14
linearAxis.title('Extends data range');
15
linearAxis.scale(customScale);
16
linearAxis.container(stage);
17
linearAxis.draw();
18
});