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
{x: 'Meat', value: 10},
4
{x: 'Fruit', value: 12},
5
{x: 'Nuts', value: 18},
6
{x: 'Milk', value: 5},
7
{x: 'Fish', value: 9}
8
]);
9
10
chart.xAxis(0);
11
chart.xAxis(1, {orientation: 'top', title: true});
12
13
// Disables X-axis by index.
14
chart.xAxis(0, false);
15
16
chart.title('Disable bottom xAxis by index');
17
chart.container('container');
18
chart.draw();
19
});