Hi, thanks for the reply.
This thing is that I don't use categories. I just have a simple case like :
between x=3 and x=4 : y=2
between x=4 and x=5 : y=3
between x=5 and x=6 : y=4
between x=6 and x=7 : y=3
between x=7 and x=8 : y=1
I do agree that playing directly with bar width in pixels is ugly.
So far, here is a minimal example of what I have :
$(document).ready(function() {
line1 = [[3.5,2],[4.5,3],[5.5,4],[6.5,3],[7.5,1]];
plot1 = $.jqplot('chart2', [line1], {
series:[
{label:'Test', renderer:$.jqplot.BarRenderer}
],
axes:{
xaxis:{ ticks: [1,'',2,'',3,'',4,'',5,'',6,'',7,'',8,'',9,'',10] }
},
seriesDefaults: {
shadow: false,
rendererOptions: {
barMargin: 0, // number of pixels between adjacent groups of bars.
barWidth: null // width of the bars. null to calculate automatically.
}
},
});
});
It's tricky, I use the default "2 ticks" width of a bar to do what I need. Then I hide the intermediate ticks that I don't want...
May be somebody knows how to clean this up ?
Thanks,
Ben