Sergey G
Sergey G

Reputation: 243

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?

Upvotes: 12

Views: 14440

Answers (3)

vladimir
vladimir

Reputation: 15198

The plugin flot.barlabels can be used:

enter image description here

Upvotes: 1

dinosaurwaltz
dinosaurwaltz

Reputation: 1761

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

Upvotes: 16

blueberryfields
blueberryfields

Reputation: 50328

I think your answer is here:

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

Upvotes: 1

Related Questions