admin管理员组文章数量:1221301
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, / 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!
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!
Share Improve this question asked May 30, 2012 at 20:49 ChrisChris 1,0492 gold badges14 silver badges24 bronze badges1 Answer
Reset to default 18Set 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
},
本文标签: javascriptHighchartsForce Categories in xaxis to be showneven without dataStack Overflow
版权声明:本文标题:javascript - Highcharts - Force Categories in x-axis to be shown, even without data - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1739361182a2159826.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论