Reputation: 9406
How can I modify the distance between the bars in jqplot. There is too much space between them when there are less elements on it. Here are 2 images, one with some bars showing and the second one with less bars showing.
The less bars that show, the bigger the difference between bars. I want to be able to change this WITHOUT making the bars fatter. I like the bars like they are right now but I want to make the grid width size smaller between the bar and the grid lines in the background.
Upvotes: 0
Views: 6961
Reputation: 51
Try this
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
rendererOptions: {
barMargin: 8
}
},
Upvotes: 4
Reputation: 1
I think first you should set barWidth.
seriesDefaults: { renderer: $.jqplot.BarRenderer, rendererOptions: {
barWidth: 15
} },
Upvotes: 0
Reputation: 18597
Set the barPadding to a negative value
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
rendererOptions: {
barPadding: -20
}
}
Upvotes: 5