Highcharts 使用小记

Highcharts 使用小记_第1张图片

因 x 轴 label 间隔过小,highcharts 自动将 labels 错开显示,导致如上图结果。

此时,可以通过调整 xAxis 的 labels.step 来优化显示。代码如下: 

xAxis: {
    categories: time,
    labels: {
        step: 5    // 调整 x 轴 labels 的显示间隔
    }
}

最终效果:

Highcharts 使用小记_第2张图片

x 轴文字倾斜:

xAxis: {
    categories: time,
    labels: {
        rotation: -90,    // 垂直
        rotation: -45,    // 角度
        step: 5  // 调整 x 轴 labels 的显示间隔
    }
}

效果图:

Highcharts 使用小记_第3张图片

参考文章:http://blog.csdn.net/luckylcs/article/details/18315611

你可能感兴趣的:(Highcharts,图表)