Bar graphs should color each bar in the set differently, based on the
color cycle/set.
I've looked through the source once, but my low-level JS skills aren't
quite good enough to figure out exactly what needs to be done.
-Woody
--
wgilk design and blog [ http://www.wgilk.com ]
follower of the fat penguin [ http://www.linux.org ]
Hm, that's a bug for sure. I committed the fix to SVN, it's a one-liner:
function drawSeriesBars(series) {
function plotBars(data, barWidth, offset, fill) {
- if (data.length < 2)
+ if (data.length < 1)
return;
As for the other thing: yes, the API is not really perfect for this
kind of thing. It's actually on the TODO, the last item. The problem
is that this type of bar chart is conceptually pretty different from
the other kind of graphs that Flot currently supports.
As I see it, there are two steps in solving this. Step 1: figure out
the appriopriate API for this kind of bar chart. Step 2: figure out
how to make Flot understand that API.
--
Ole Laursen
http://www.iola.dk/
True. It's definitely feasible, probably wouldn't even take long.
> Right now, what I'm missing most about this kind of charts is the ability to
> put labels for the bars on some key places - under the bar, above it, or
> inside the bar space. I think that this kind of functionality can be hacked
> relatively easy into Flot. One example to do this would be to add some
> options to the "bars" dictionary, for example "print_values = True|False;
> print_values_location = Above | Under | Inside_Top| Inside_Bottom..."
Hm, yeah. I'd like to think of that as sort of orthogonal since it'd
be useful to have that kind of support for other charts too. And it
also needs to be accessible from the plot object returned so that you
can turn a label on/off interactively. Then we would have show label
on hover functionality for free, almost. I've put it in the TODO.
Shouldn't be difficult to do.