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