x-axis label wrapping
by Danielle Parkinson
HTML
<div id="container1" style="height: 250px; width:700px;"></div>
<div id="container2" style="height: 250px; width:600px;"></div>
<script src="http://code.highcharts.com/2.2/highcharts.js"></script>
JavaScript
var options = {
chart: {},
legend: {
enabled: false
},
yAxis: {
tickmarkPlacement: 'on',
tickInterval: 2,
labels: {
style: {
width: '10px'
}
},
categories: [
'Q. 1 2011',
'Q. 2 2011',
'Q. 3 2011',
'Q. 4 2011',
'Q. 1 2012',
'Q. 2 2012',
'Q. 3 2012',
'Q. 4 2012'
]
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5]}]
};
var options1 = jQuery.extend(true, {}, options);
options1.chart.renderTo = 'container1';
var chart1 = new Highcharts.Chart(options1);
var options2 = jQuery.extend(true, {}, options);
options2.chart.renderTo = 'container2';
var chart2 = new Highcharts.Chart(options2);