Show value within bar on flot bar chart

徘徊边缘 提交于 2019-11-27 23:39:56

问题


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?


回答1:


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




回答2:


I think your answer is here:

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




回答3:


The plugin flot.barlabels can be used:



来源:https://stackoverflow.com/questions/4892160/show-value-within-bar-on-flot-bar-chart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!