Recent site activity

Projects‎ > ‎

Flot Value Labels Plugin

UPDATE: Christian Tritten made an improved version of Value Labels Plugin. I recommend that you use it: http://wiki.github.com/leonardoeloy/flot-valuelabels/

For seoprofesional toolbar I have written a small plugin for flot. It shows the values labels in place of values. Thanks to flot design it is quite small and simple. The code is attached. There is perhaps one thing to mention.  For every label there are 2 divs, on the same place, the first one is just a white box with 0.5 opacity so that the line under the label is lighter. Otherwise, if it is too dark, the label cannot be read. The labels' color and style in general is css-driven. See the attachments. Maybe one more thing: The labels may be placed too densely and could overlap and become completely unreadable. There is some logic trying to prevent it from happening. It is not perfect - it is a little bit too hard-coded.

As a matter of fact I have only tried in Firefox3.0+. I think it should work everywhere where flot works, because I did it in pretty much the same way flot's axis labels work. The only questionable point is IMHO the css opacity.
Č
ċ
ď
jquery.flot.valuelabels.js
(2k)
Petr Blahos,
Dec 13, 2009 12:36 PM
ċ
ď
plot.css
(0k)
Petr Blahos,
Dec 13, 2009 12:22 PM