Javascript jqPlot不';不显示所有预期的条
我的jqPlot没有显示所有预期的条。谁能说我做错了什么 这是我的密码:Javascript jqPlot不';不显示所有预期的条,javascript,html,jqplot,Javascript,Html,Jqplot,我的jqPlot没有显示所有预期的条。谁能说我做错了什么 这是我的密码: plot5 = $.jqplot('chart1', [[ [1,1], [3,2], [2,6], [5,4], [7,6],
plot5 = $.jqplot('chart1', [[
[1,1],
[3,2],
[2,6],
[5,4],
[7,6],
[5,6]
]], {
captureRightClick: true,
seriesDefaults:{
renderer:$.jqplot.BarRenderer,
shadowAngle: 135,
rendererOptions: {
barDirection: 'horizontal',
highlightMouseDown: true
},
pointLabels: {show: true, formatString: '%d'}
},
axes: {
yaxis: {
renderer: $.jqplot.CategoryAxisRenderer
}
}
});
谢谢大家! jqPlot显示了所有的条,但是您有多个点具有相同的y轴值,因此它们是重叠的。如果按y值对点进行排序,则如下所示:
[1,1]
[3,2]
[5,4]
[2,6] //
[5,6] // All have same y value of 6
[7,6] //
请注意,最后三项都具有相同的y值。这将导致该点上出现多个重叠条。如果您查看您提供的图像,您可以看到第一个条形图在
x=2
、x=5
和x=7
处有3层水平条形图,不客气。如果答案能解决问题,也请接受。谢谢