bar works - 1
by no1uknow
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
renderTo: 'container',
width: 300,
height: 300,
type: 'bar'
},
title: {
text: 'Group by Flight Hours'
},
subtitle: {
text: 'Sub-ATA (20) / ATA (11)'
},
xAxis: {
categories: ['1','2','3'],
title: {
text: 'Group'
}
},
yAxis: {
min: 0,
title: {
text: 'Average',
align: 'high'
},
labels: {
overflow: 'justify'
}
},
tooltip: {
formatter: function() {
return ''+
this.series.name +': '+ this.y +' Average';
}
},
plotOptions: {
bar: {
dataLabels: {
enabled: true
}
},
series: {
/* pointWidth: 12, */
pointPadding: 0,
groupPadding: 0,
borderWidth: 1,
shadow: true
}
},
legend: {
layout: 'horizontal',
align: 'center',
verticalAlign: 'bottom',
floating: false,
borderWidth: 1,
backgroundColor: '#FFFFFF',
shadow: true,
labelFormatter: function() {
return '<div class="' + this.name + '-arrow"></div><span style="font-family: \'Advent Pro\', sans-serif; font-size:12px">' + this.name +'</span><br/><span style="font-size:10px; color:#ababaa"> Total: ' + this.options.total + '</span>';
}
},
credits: {
enabled: false
},
exporting: {
enabled: false
},
series: [{
name: 'A-Check',
total: '1.08',
data: [0.83,null,0.25]
},{
name: 'C-Check',
total: '7.5',
data: [2.00,3.50,2.00]
},{
name: 'MAINT',
total: '18.5',
data: [7.00,4.50,7.00]
},{
name: 'PIREP',
total: '11.42',
data: [3.67,4.50,3.25]
},]
});
});