Highcharts - Force Categories in x-axis to be shown, even without data

前端 未结 1 1214
轮回少年
轮回少年 2021-01-18 00:01

I\'m wondering if there\'s a way to force Highcharts to show ALL of the categories passed into its x-axis without giving filler data to hack it into working. For example, ht

相关标签:
1条回答
  • 2021-01-18 00:10

    Set the max on the xAxis to the index of the last category you want to show. See this jsfiddle

    xAxis: {
           categories: ['Apples', 'Bananas', 'Pears', 'Oranges', 'foo', 'bar', 'baz'],
           max:6
    },
    
    0 讨论(0)
提交回复
热议问题