Testing Column/Line overlap
behindColumns (http://docs.amcharts.com/3/javascriptcharts/AmGraph#behindColumns) only seems to affect lines that are after columns, lines before are always below.
by Anton
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>
<div id="chartdiv"></div>
CSS
#chartdiv {
width : 100%;
height : 400px;
font-size : 11px;
}
JavaScript
var chart = AmCharts.makeChart("chartdiv", {
"type": "serial",
"dataProvider": [{
"year": 2011,
"income": 30.1,
"expenses": 34.9
}, {
"year": 2012,
"income": 29.5,
"expenses": 31.1
}, {
"year": 2013,
"income": 30.6,
"expenses": 28.2,
}, {
"year": 2014,
"income": 34.1,
"expenses": 32.9,
"dashLengthColumn": 5,
"alpha": 0.2,
"additional": "(projection)"
}],
"valueAxes": [{
"axisAlpha": 0,
"position": "left"
}],
"graphs": [{
"title": "Income column",
"fillAlphas": 1,
"type": "column",
"valueField": "income",
}, {
"title": "Income line",
"bullet": "round",
"lineThickness": 3,
"bulletSize": 7,
"bulletBorderAlpha": 1,
"bulletColor": "#FFFFFF",
"useLineColorForBulletBorder": true,
"bulletBorderThickness": 3,
"fillAlphas": 0,
"lineAlpha": 1,
"valueField": "income"
}, {
"title": "Expenses column",
"fillAlphas": 1,
"type": "column",
"valueField": "expenses",
}, {
"title": "Expenses line",
"bullet": "round",
"lineThickness": 3,
"bulletSize": 7,
"bulletBorderAlpha": 1,
"bulletColor": "#FFFFFF",
"useLineColorForBulletBorder": true,
"bulletBorderThickness": 3,
"fillAlphas": 0,
"lineAlpha": 1,
"valueField": "expenses"
}],
"categoryField": "year",
"categoryAxis": {
"gridPosition": "start",
"axisAlpha": 0,
"tickLength": 0
},
"legend": {
"enabled": true,
"position": "bottom"
}
});