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.column();
3
chart.column([1, 4, 5, 7, 2]);
4
5
// Gets X-axis.
6
var bottomXAxis = chart.xAxis();
7
bottomXAxis.ticks({stroke: "#2196F3"});
8
9
// Gets X-axis by index.
10
var topXAxis = chart.xAxis(1);
11
topXAxis.orientation("top");
12
topXAxis.stroke("#2196F3");
13
topXAxis.title(true);
14
15
chart.title("Get and modify chart xAxis.");
16
chart.container("container");
17
chart.draw();
18
});