Multiple Value Axes

All of our charts with value axes (serial, xy, radar, angular gauge) can have any number of them. The example above has three value axes - two on the left and one on the right. You can set offset for value axis so that they wouldn't overlap in case you have more than one on the same side. You can easily hide all the assets of one of your axis and use it for creating more complicated charts. Value axes on our charts can even by synchronized using a predefined synchronization multiplier. <h4>Synchronizing grid lines</h4> If you set <strong>synchronizeGrid</strong> property of AmSerialChart to <strong>true</strong>, the chart will adjust minimum and maximum of axes so that the grid would be show at equal intervals. This helps users to compare values more easily.

by roberts gailitis

HTML

<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
<div id="chartdiv"></div>

CSS

#chartdiv {
	width	: 100%;
	height	: 500px;
}

JavaScript

alert(data.company[2015])

var chart = AmCharts.makeChart("chartdiv", {
    "type": "serial",
    "theme": "light",
    "legend": {
        "useGraphSettings": true
    },
    "dataProvider": data,
    "synchronizeGrid":true,
    "valueAxes": [{
        "id":"v1",
        "axisColor": "#FF6600",
        "axisThickness": 2,
        "axisAlpha": 1,
        "position": "left"
    }, {
        "id":"v2",
        "axisColor": "#FCD202",
        "axisThickness": 2,
        "axisAlpha": 1,
        "position": "right"
    }, {
        "id":"v3",
        "axisColor": "#B0DE09",
        "axisThickness": 2,
        "gridAlpha": 0,
        "offset": 50,
        "axisAlpha": 1,
        "position": "left"
    }],
    "graphs": [{
        "valueAxis": "v1",
        "type": "column",
        "lineColor": "#FF6600",
        "bullet": "round",
        "bulletBorderThickness": 1,

        "title": "red line",
        "valueField": '2014',
        "labelText": "[[value]]",
		"fillAlphas": 0
    }, {
        "valueAxis": "v2",
        "lineColor": "#FCD202",
        "bullet": "square",
        "bulletBorderThickness": 1,
     
        "title": "yellow line",
        "valueField": "2010",
        "labelText": "[[value]]",
		"fillAlphas": 0
    }, {
        "valueAxis": "v3",
        "lineColor": "#B0DE09",
        "bullet": "triangleUp",
        "bulletBorderThickness": 1,
      
        "title": "green line",
        "valueField": "2012",
        "labelText": "[[value]]",
		"fillAlphas": 0
    }],
    "chartScrollbar": {},
    "chartCursor": {
        "cursorPosition": "mouse"
    },
    "categoryField": 'company',
    "categoryAxis": {
    
        "axisColor": "#DADADA",
        "minorGridEnabled": true
    },
    "export": {
    	"enabled": true,
        "position": "bottom-right"
     }
});

chart.addListener("dataUpdated", zoomChart);
zoomChart();


// generate some random data, quite different range


function zoomChart(){
    chart.zoomToIndexes(chart.dataProvider.length - 10,...