亲爱的同事们美好的一天。问题是每个栏的名称不在您需要的地方。酒吧位于其名称的左右两侧。但我需要那个标题在每个栏的上方,而不是他的左边。如何做到这一点,我相信这并不像看起来那么难^这是我的代码:
$('header').jqChart({
title: { text: title],
fillStyle: '#85b1de'
},
legend: { visible: false },
border: { visible: false },
axes: [
{
strokeStyle: 'transparent',
visible: false,
majorGridLines: { visible: false },
lineWidth: 0,
location: 'bottom',
majorTickMarks: { visible: false },
labels: {
visible : false
}
},
{
strokeStyle: 'black',
visible: false,
majorGridLines: { visible: false },
lineWidth: 0,
location: 'left',
majorTickMarks: { visible: false },
labels: {
visible : true,
fillStyle: '#85b1de',
font: '16px sans-serif'
}
}
],
animation: { duration: 0.5 },
series: [
{
pointWidth: 0.5,
type: 'bar',
fillStyles: color,
data: [
[label[0], data['a']],
[label[1], data['b']],
[label[2], data['c']],
[label[3], data['d']]
],
labels: {
stringFormat: ' %s %%',
valueType: 'dataValue',
font: '14px sans-serif',
fillStyle: 'white'
}
}
]
});