Contribution to Vaadin incubator: StatBar widget

Hi all,

Just made a small contribution to Vaadin incubator: the
StatBar
widget. Here is a screen-shot:

You can use it in your reports for various questionnaires/inquiries. For example you may have a question:

I like sushi:

  1. Couldn’t care less
  2. Rarely OK
  3. Mostly OK
  4. Could eat some every day!

When you combine all the answers for such survey, the StatBar widget will calculate option percentages and the average value. A simple demo may be found
here
.

Yes, bugs will be found and a better error handling should be done. At this point the widget supports options from 1-4 only. A little more generic approach may come in the future, but I promise you nothing. :stuck_out_tongue:

Cheers,

Ville

Ooh, nice! And all themeable via CSS, I presume?

I would’ve gone with the Vaadin colors myself, but personal tastes are allowed to vary :wink:

Wow. Looks really nice.

Please add rounded corners for webkit also - it gives a nice finishing touch.

Good point - Webkit support added.

And yes, you can do pretty much all tuning in CSS. Java code just makes a couple of calculations and that’s is.