Ad details inline chart
by Angelos Chaidas
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container"></div>
CSS
#container {
width:270px;
height:180px;
margin:0 auto;
}
JavaScript
$(function () {
$('#container').highcharts({
chart: {
type: 'column'
},
title: {
text: ''
},
xAxis: {
categories: ['This job', 'National avg', 'Accounting & Finance avg', 'London avg'],
title: {text: null},
labels : {
style : {
fontSize : '10px',
lineHeight : '12px',
fontFamily : 'Arial'
}
}
},
yAxis: {
min: 0,
title: {
text: '',
},
labels : {
style : {
fontSize : '11px',
lineHeight : '12px',
fontFamily : 'Arial'
}
}
},
tooltip: {
valuePrefix: '£'
},
plotOptions: {
column: {
dataLabels: {
enabled: true,
format : '£{point.y:,.0f}',
style : {
fontSize : '11px',
lineHeight : '12px',
fontFamily : 'Arial'
}
}
}
},
legend: {
enabled : false
},
credits: {
enabled: false
},
series: [{
pointPadding : 0.1,
groupPadding : 0,
name: 'Average salary',
data: [{y:52532,color:'red'}, 35456, 40540, 23540]
}]
});
});