나는 차트이 코드는 내가 일하고 있습니다두 번째 이후의 막대가 x 축에서 앞으로 이동하는 이유는 무엇입니까?
plot = $.jqplot('SalesChart2',
[
[[1,5]],
[[1,10]],
[[1,15]],
[[1,20]],
[[2,25]],
[[3,10]],
[[4,10]],
[[5, 6]]
]
, {
// Tell the plot to stack the bars.
stackSeries: true,
series: [
{ label: 'Cash' },
{ label: 'CreditCard' },
{ label: 'DebitCard' },
{ label: 'StoreCredit' },
{ label: 'Discount', disableStack: true },
{ label: 'AverageTransaction', xaxis: 'xaxis', yaxis: 'y2axis', disableStack: true },
{ xaxis: 'xaxis', yaxis: 'y2axis', label: 'ItemsPerTransaction', disableStack: true },
{ xaxis: 'xaxis', yaxis: 'y2axis', label: 'CustomerCount', disableStack: true }
],
animate: !$.jqplot.use_excanvas,
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
rendererOptions: {
highlightMouseDown: true,
barWidth: 50
},
pointLabels: { show: true }
},
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
ticks: [1,2,3,4,5]
},
yaxis: {
tickOptions: {
formatString: "$%'d"
}
},
y2axis: {
autoscale: true,
min: 0
}
},
legend: {
show: true,
location: 'e',
placement: 'outside'
},
grid: {
drawGridlines: false
}
});
이 아래와 같이 렌더링 :
여기
막대는 x 축에 지점 2에서 앞으로 조금 이동하고 있습니다 . 이러한 이유로 '고객 수'에 대한 마지막 막대가 표시되지 않습니다.
누군가 여기서 나에게 무슨 일이 일어나는지 안내 해줄 수 있습니까?
JQPlot의 마지막 버전을 사용하고 있습니까? – sdespont
'barWidth' 속성을 낮춰 보셨습니까? – jbabey
예, 작동하지 않습니다. – teenup