I'm using jquery.flot.barnumbers.js plugin for the Javascript plotting (charts) library for jQuery to show the numbers on the bars.
My code:
$.plot("#placeholderByDay", [
{
data: DataOne, label: "Total Calls", bars: {
numbers:{
show:true,
xAlign: 80,//align top
yAlign: 1
//yAlign: function(y) { return y+ 1; } //upside of bars
}
} ]);
What I get now is:
What I need is:
So when there is no data for a bar, the zeros should be just above the axis, and where there are values should be as is, both rotated let 90 degrees. How can I achieve this?
part of the plot
I use "categories" in yaxis,the y position of the text should be like that:
if you want the flot shows like that: the y position of the text should be like that:
align = barWidth/2, if bars' align = 'left'; align = -barWidth/2, if bars' align = 'right;
Oops, I did it again.
If you'd like to drop the plugin and do this the fun way; code it up yourself. It'll give you the freedom to customize any way you like.
Example here.