在此高图表编码中,我想更改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