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, http://jsfiddle.net/cbargren/Sdnqu/ has 3 extra x-axis categories specified (foo, bar, baz) without any actual data (the series won't necessarily have data for the respective categories), and they aren't showing up on the chart. Can this be done? Thanks!
1 Answer
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
},
-
1Any thoughts on making this work with literally no Series / Y Data at all? Aug 28, 2015 at 22:09
-
1The "min" property must also be set to 0, otherwise the categories won't be shown until one is found that actually contains any data. Check stackoverflow.com/questions/27823608/…– DanielMAug 9, 2016 at 8:50