I'm having an issue with flot multibar chart (using orderBars plugin) -- the bars are too far from each other, when having many (=24) columns. I started up from this example, directly from http://en.benjaminbuffet.com/labs/flot/
<script type='text/javascript' src='jquery.flot.min.js'></script>
<script type='text/javascript' src='jquery.flot.orderBars.js'></script>
...
var d1 = [];
for (var i = 0; i <= 5; i += 1)
d1.push([i, parseInt(Math.random() * 30)]);
var d2 = [];
for (var i = 0; i <= 5; i += 1)
d2.push([i, parseInt(Math.random() * 30)]);
ds.push({
data:d1,
bars: {
show: true,
barWidth: 0.3,
order: 1,
lineWidth : 2
}
});
ds.push({
data:d2,
bars: {
show: true,
barWidth: 0.3,
order: 2
}
});
$.plot($("#placeholder"), ds, {
grid:{
hoverable:true
}
});
The bars are nicely next to each other, pairs separated by a space.
But, if I put there 24 columns (yes, I want to create chart for values on 24 hours), i.e. change the beginning of the code:
var d1 = [];
for (var i = 0; i <= 23; i += 1)
d1.push([i, parseInt(Math.random() * 30)]);
var d2 = [];
for (var i = 0; i <= 23; i += 1)
d2.push([i, parseInt(Math.random() * 30)]);
There is a space between the bars that belong to the one x-value; and no space between the two pairs. This is very confusing, user is mismatching the pairs. I need no space (or very little space) between the corresponding bars, and reasonable space between the pairs.
Here is a picture of both graphs, so you can see the problem:

Any help on this? Thx.