Javascript jqplot条形图之间的间距不变

Javascript jqplot条形图之间的间距不变,javascript,jquery,graph,jqplot,Javascript,Jquery,Graph,Jqplot,我尝试使用barMargin和barPadding更改jqplot条形图之间的间距,但两者都没有帮助。请帮我弄清楚我错过了什么 让我知道一种方法,以减少每个酒吧之间的空间 <script> $(document).ready(function(){ var line1 = [['Nissan', 4],['Porche', 6],['Acura', 2],['Aston Martin', 5],['Rolls Royce', 6],['Maserati',3]

我尝试使用
barMargin
barPadding
更改jqplot条形图之间的间距,但两者都没有帮助。请帮我弄清楚我错过了什么

让我知道一种方法,以减少每个酒吧之间的空间

<script>
        $(document).ready(function(){
    var line1 = [['Nissan', 4],['Porche', 6],['Acura', 2],['Aston Martin', 5],['Rolls Royce', 6],['Maserati',3],['Ferrari',3]];

    $('#chart3').jqplot([line1], {
        title:'Test with Custom Colors :)',
        // Provide a custom seriesColors array to override the default colors.
        seriesColors:['#3366cc', '#dc3912', '#ff9900', '#109618', '#ffc607'],
        seriesDefaults:{
            renderer:$.jqplot.BarRenderer,
            rendererOptions: {
                // Set varyBarColor to tru to use the custom colors on the bars.
                varyBarColor: true,
                barWidth: 25,
                barPadding:-10,
                barMargin: -10

            }
        },
        grid:{
           drawGridLines: true,       
           gridLineColor: '#000000',    
           background: '#ffffff',     
           borderColor: 'transparent',     
           borderWidth: 2.0,
           shadow:false,

        },
        tickOptions:{
        // markSize: 1,
        showMark: false,
        showGridline: false,
        },
        axes:{
            xaxis:{
                renderer: $.jqplot.CategoryAxisRenderer,
                 drawMajorGridlines: false
            }
        }
    });
});
    </script>

$(文档).ready(函数(){
var line1=[[Nissan',4],[Porche',6],[Acura',2],[Aston Martin',5],[Rolls-Royce',6],[Maserati',3],[Ferrari',3];
$('图表3').jqplot([line1]{
标题:“使用自定义颜色进行测试:)”,
//提供自定义系列颜色数组以替代默认颜色。
系列颜色:[“3366cc”、“dc3912”、“ff9900”、“109618”、“ffc607”],
系列默认值:{
渲染器:$.jqplot.blunderer,
渲染器选项:{
//将varyBarColor设置为tru以使用条上的自定义颜色。
瓦里巴科洛尔:是的,
条宽:25,
男:10岁,
边距:-10
}
},
网格:{
drawGridLines:没错,
gridLineColor:“#000000”,
背景:“#ffffff”,
边框颜色:“透明”,
边框宽度:2.0,
影子:错,
},
选择:{
//市场规模:1,
showMark:false,
显示网格线:错误,
},
轴线:{
xaxis:{
渲染器:$.jqplot.CategoryAxisRenderer,
drawMajorGridlines:false
}
}
});
});

您好,为什么要使用负值?如果你想在不同的条组之间留出空间并调整宽度,只需单独使用边距即可。只是尝试不同的组合,但即使这样也无济于事。我在这篇文章中的答案将回答你的问题:[[1]: