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
3
// create chart
4
var chart = anychart.cartesian();
5
6
// setting data
7
var data = [
8
["A", 4],
9
["B", 3],
10
["C", 2],
11
["D", 1]
12
];
13
14
// add series
15
chart.column(data);
16
17
// position of y axis changer. Now y is on the right
18
chart.yAxis().orientation("right");
19
20
// set x axis position. This position is set by default
21
chart.xAxis().orientation("bottom");
22
23
chart.container("container");
24
chart.draw();
25
});