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
// Set Y-axis settings by index.
11
chart.yAxis(0, {ticks: {stroke: '#42A5F5'}});
12
chart.yAxis(1, {orientation: 'right', stroke: '#42A5F5', title: true});
13
14
chart.title('Set yAxis parameters as an object by index');
15
chart.container('container');
16
chart.draw();
17
});