Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show value within bar on flot bar chart

I would like to show the value within the bar on the flot bar chart, something like this:

|
|               +----+
|               |    |
|               |    |
|               |    |
|   +----+      | 20 |
|   |    |      |    |
|   | 10 |      |    |
|   |    |      |    |
|---+----+------+----+------

data = [[1, 10], [2, 20]]

Is there a way to do this?

like image 585
Sergey G Avatar asked Feb 03 '11 21:02

Sergey G


2 Answers

I needed the same thing, so I quickly hacked together a plugin for it and a quick example of it in action.

like image 56
dinosaurwaltz Avatar answered Sep 23 '22 14:09

dinosaurwaltz


I think your answer is here:

http://code.google.com/p/flot/issues/detail?id=218

like image 43
blueberryfields Avatar answered Sep 24 '22 14:09

blueberryfields