我在使用Highcharts时遇到问题,其中每个条形图类别在横向排列方式都太高了。
以下是一个例子:
用于生成图表的代码如下:
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 ] }]
});
});
知道可能是什么问题吗? 谢谢!
答案 0 :(得分:0)
您还可以定义pointWidth:http://api.highcharts.com/highcharts#plotOptions.bar.pointWidth