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
// Get Y-axis.
11
var leftYAxis = chart.yAxis(0);
12
leftYAxis.ticks({stroke: '#2196F3'});
13
14
// Get Y-axis.
15
var rightYAxis = chart.yAxis(1);
16
rightYAxis.orientation('right');
17
rightYAxis.stroke('#2196F3');
18
rightYAxis.title(true);
19
20
chart.title('Get and modify chart yAxis');
21
chart.container('container');
22
chart.draw();
23
});