I-Plan Supply: Fix narrow Columns
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",
"theme": "light",
"dataDateFormat": "YYYY-MM-DD",
"valueAxes": [
{
"id": "default_axis",
"titleColor": "#606060",
"titleBold": false,
"startOnAxis": false,
"axisColor": "#909090",
"gridAlpha": 0.1,
"axisAlpha": 1.0
}
],
"categoryField": "DATEFROM",
"categoryAxis": {
"parseDates": true,
"equalSpacing": true,
"axisAlpha": 0,
"gridAlpha": 0,
"tickLength": 0
},
"chartCursor": {
"enabled": true,
"cursorPosition": "mouse",
"fullWidth": false,
"cursorAlpha": 0.0,
"categoryBalloonEnabled": true,
"categoryBalloonDateFormat": "",
"valueBalloonsEnabled": false
},
"legend": {
"position": "right",
"valueText": "",
"periodValueText": "",
"textClickEnabled": true,
"marginTop": 0,
"verticalGap": 10
},
"graphs": [
{
"type": "column",
"title": "Constrained Demand",
"valueField": "CONSTRAINEDDEMAND",
"fillAlphas": 1,
"stackable": true,
"balloonText": "[[title]] : [[value]]"
},
{
"type": "line",
"title": "Remaining Forecast",
"valueField": "REMAININGFORECAST",
"bullet": "round",
"balloonText": "[[title]] : [[value]]"
},
{
"type": "line",
"title": "Forecast",
"valueField": "FORECAST",
"bullet": "round",
"balloonText": "[[title]] : [[value]]"
},
{
"type": "column",
"fillAlphas": 1,
"title": "Unallocated Forecast",
"valueField": "UNALLOCATEDFORECAST",
"balloonText": "[[title]] : [[value]]"
},
{
"type": "line",
"bullet": "round",
"title": "Firm orders",
"valueField": "FIRMORDERS",
"balloonText": "[[title]] : [[value]]"
}
],
...