Highcharts bar width
author(s): Torstein Hønsi
by Rikin Patel
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 300px"></div>
<div id="container2" style="height: 300px"></div>
JavaScript
$(function() {
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'bar'
},
title: {
text: null
},
legend: {
enabled: false
},
credits: {
enabled: false
},
xAxis: {
categories: ['Hispanic', 'White', 'Black', 'Asian', 'American'],
title: {
text: 'Race/Ethnicity'
},
//labels: { align: "left", autoRotation: [-90]}
},
yAxis: {
plotLines: [{
zIndex: 5,
color: 'red', // Color value
dashStyle: 'solid', // Style of the plot line. Default to solid
value: 8, // Value of where the line will appear
width: 2 // Width of the line
}],
title: {
text: null,
useHTML: true
}
},
plotOptions: {
series: {
pointWidth: 40
// dataLabels: {
// enabled: true,
// align: 'right',
// color: '#FFFFFF'
// }
}
},
series: [{
data: [7.3,7.5,9.2,9.3,10.3]}]
});
});