Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/421.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jqPlot不';不显示所有预期的条_Javascript_Html_Jqplot - Fatal编程技术网

Javascript jqPlot不';不显示所有预期的条

Javascript jqPlot不';不显示所有预期的条,javascript,html,jqplot,Javascript,Html,Jqplot,我的jqPlot没有显示所有预期的条。谁能说我做错了什么 这是我的密码: plot5 = $.jqplot('chart1', [[ [1,1], [3,2], [2,6], [5,4], [7,6],

我的jqPlot没有显示所有预期的条。谁能说我做错了什么

这是我的密码:

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层水平条形图,不客气。如果答案能解决问题,也请接受。谢谢