Show value within bar on flot bar chart

Sergey G picture Sergey G · Feb 3, 2011 · Viewed 13.4k times · Source

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?

Answer

dinosaurwaltz picture dinosaurwaltz · Aug 2, 2011

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