Highcharts - 显示空白X轴

时间:2018-05-24 00:04:43

标签: javascript highcharts axis

例如,是否可以使用没有X轴的柱形图。我只是想让它成为空白。我尝试了这段代码,但仍然给出了默认数字:

Highcharts.chart('container', {
    xAxis: {
        categories: [],
        showEmpty: true // Think this is for something else.
    },
    series: [{
        name: 'Tokyo',
        type: 'column',
        data: [49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5]

    }]
});

Demo

1 个答案:

答案 0 :(得分:1)

解决方案是禁用标签:

 xAxis: {
     labels: {
         enabled: false
     }
 }