我有一个highcharts脚本问题。到目前为止,我已经使用了几次,但没有遇到这个问题。似乎不想显示我列出的某些类别(Y轴)。我注意到它们放置不正确,其坐标为waaaay off(x = 0,y = -9999)。难道我做错了什么?可以轻松解决此问题,还是必须修复的错误?
JsFiddle:http : //jsfiddle.net/E6cc3/
$(function () {
$('#questionsBx').highcharts({
chart: {
type: 'bar'
},
title: {
style: {
color: '#8EC526',
font: 'normal 16px font-family: "Open Sans", sans-serif;'
},
text: 'Performance per Question Dec 19 2013 - Jan 21 2014'
},
xAxis: {
categories: ["Was your call answered promptly?","How helpful and knowledgeable was the staff in making your reservation?","What was the level of courtesy and professionalism of the staff answering the phone?","Was the Chauffeur on time for your pickup?","Was the Chauffeur's appearance neat and professional?","Did the Chauffeur open the door for you?","Did the Chauffeur assist you with your luggage?","Was the Chauffeur prepared and familiar with the itinerary?","Was the amount of talking by the Chauffeur appropriate?","Did the Chauffeur drive you in a safe, comfortable manner?","What was the level of courtesy and professionalism of the Chauffeur providing services?","Was the vehicle clean inside and out?","What was your overall level of satisfaction pertaining to the vehicle?","How would you rate your overall experience?"]
},
yAxis: {
min: 0,
title: {
text: 'Performance per Question'
}
},
legend: {
backgroundColor: '#FFFFFF',
reversed: true
},
plotOptions: {
series: {
stacking: 'normal'
}
},
series: [{
name: 'Below Expectations',
data: [2,1,2,1,2,2,1,1,1,1,1,2,1,2]
}, {
name: 'Met Expectations',
data: [0,4,3,2,2,1,1,2,2,4,2,1,4,2]
}, {
name: 'Above Expectations',
data: [6,3,3,5,3,4,4,3,3,3,4,5,3,4]
}]
});
});
感谢您的时间!
图表本身的大小很小,无法容纳类别标题。缩小类别标题以适合图表区域,或者增加图表的高度。
例如。更改图表高度:http : //jsfiddle.net/E6cc3/4/
chart: {
type: 'bar',
height: 1000
},
或例如 更改标题:
use : Level of courtesy and professionalism in chauffeur services
instead of : What was the level of courtesy and professionalism of the Chauffeur providing services
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句