I was dealing with the same problem so I reprogrammed the
jquery.flot.js file. I was going to try and put this into a plugin but
I don't think I will be able to do that because it took some changes
at the point of drawing the boxes. Of course I'm new to Javascript and
JQuery so maybe I'm just not seeing how. Anyway, I made it where you
can turn on/off all the code I wrote so just replacing the file won't
show any changes.
If you want to download my version you can get it here:
http://dl.dropbox.com/u/37159/jquery.flot.js
There are actually two changes:
1. You can now set the color for the border around the boxes. I wanted
black borders to make the boxes pop more from a distance.
2. You can add data labels to bar graphs (bar only for now, it's what
I needed but if someone needs more I'm willing to program it) with the
option of the label being in the center of the bar or hovering over
the top.
In order to do this I had to add some options to the Series:
series: {
bars: {
lineColor: null, // set if bar border color is different from
the series color
dataLabels: false, // set true if you want data labels to
show
labelColor: "#000000", // default is black
labelBold: false, // set to make the label bold
labelLoc: "center" // top or center - If using "top" you
should also set the yaxis autoscaleMargin to allow room for the label
lineColor - you can change the color of the bar border lines
dataLabels - just a switch to turn the labels on and off
labelColor - set the color of the data lebels, defaults to black
labelBold - self-explanatory
labelLoc - "center" puts it in the center (up and down as well as
right and left) where "top" has it hovering above the bar
If you use a top location you probably want to adjust the yaxis
autoscaleMargin so the label doesn't push into the top of the chart.
I did some basic testing and then a whole lot of testing on my
particular project so I think it is pretty stable but no guarantees.
While I have been programming for years this is actually the first
javascript/jquery programming I have ever done. It works similar to
the tick labels. It basically builds a data box the width of the bar
and centers the text in there which should always give you a nice,
centered label. If you have any questions let me know.