在此高圖表編碼中,我想更改X軸以顯示月份和年份(ex-Feb-20014)在這裏,我的代碼工作。怎麼辦?我想至少去5年。我的圖表是柱形圖。請注意,高圖表X軸顯示月份和年份
<script type="text/javascript">
$(function() {
// Set up the chart
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'column',
margin: 75,
options3d: {
enabled: false,
alpha: 15,
beta: 15,
depth: 50,
viewDistance: 25
}
},
title: {
text: 'Payment Details'
},
plotOptions: {
column: {
depth: 25
}
},
series: [{
data: [
<?php
for ($i = 0; $i <= 12; $i++) {
echo $i. ',';
}
?>
]
}]
});
function showValues() {
$('#R0-value').html(chart.options.chart.options3d.alpha);
$('#R1-value').html(chart.options.chart.options3d.beta);
}
// Activate the sliders
$('#R0').on('change', function() {
chart.options.chart.options3d.alpha = this.value;
showValues();
chart.redraw(false);
});
$('#R1').on('change', function() {
chart.options.chart.options3d.beta = this.value;
showValues();
chart.redraw(false);
});
showValues();
});
</script>
http://api.highcharts.com/highcharts#xAxis – 2014-10-17 04:10:30
標籤格式 - > HTTP: //api.highcharts.com/highcharts#xAxis.labels.formatter – artm 2014-10-17 04:11:48