[英]Highcharts horizontal bar chart categories are sized incorrectly
I'm having a problem with Highcharts where each bar chart category is way too tall in a horizontal arrangement. 我在Highcharts上遇到问题,其中每个条形图类别在水平排列中都太高了。
Here is an example: 这是一个例子:
The code used to generate the chart is as follows: 用于生成图表的代码如下:
chart2 = new Highcharts.Chart({
chart: {
renderTo: 'wordchart1',
defaultSeriesType: 'bar'
},
title: {
text: 'Word Frequency Distribution'
},
xAxis: {
categories: ['LIL POP SHOP','SWEET BOX','LITTLE BABY\'S ICE CREAM','SUGAR PHILLY','Please pick one:' ],
title: {
text: ''
}
},
yAxis: {
min: 0,
title: {
text: 'Word Frequency Analysis',
align: 'high'
}
},
plotOptions: {
bar: {
dataLabels: {
enabled: true
}
}
},
series: [{
name: 'Word Frequency Analysis',
data: [89,43,32,24,3 ] }]
});
});
Any idea what may be the problem? 知道可能是什么问题吗? Thanks!
谢谢!
您还可以定义pointWidth: http ://api.highcharts.com/highcharts#plotOptions.bar.pointWidth
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.