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
7
8
// data
9
var data = [
10
["A", 4],
11
["B", 3],
12
["C", 2],
13
["D", 1]
14
];
15
16
// add series
17
chart.column(data);
18
19
// position of y axis changer. Now y is on the right
20
chart.yAxis().orientation("right");
21
22
// inverts y scale. Now all elements has inverted (from right to left) direction
23
chart.yScale().inverted(true);
24
25
// set x axis position. This position is set by default
26
chart.xAxis().orientation("bottom");
27
28
chart.container("container");
29
chart.draw();
30
});