Zeigen Sie den Wert in bar auf flot-bar-chart
Möchte ich Ihnen zeigen, den Wert innerhalb der Balken auf der flot Balkendiagramm, so etwas wie dieses:
|
| +----+
| | |
| | |
| | |
| +----+ | 20 |
| | | | |
| | 10 | | |
| | | | |
|---+----+------+----+------
Daten = [[1, 10], [2, 20]]
Gibt es eine Möglichkeit, dies zu tun?
InformationsquelleAutor Sergey G | 2011-02-03
Du musst angemeldet sein, um einen Kommentar abzugeben.
Ich brauchte, die gleiche Sache, so dass ich schnell gehackt zusammen plugin für es und eine schnelle Beispiel es in Aktion.
ja, du hast Recht, ich habe es behoben zu berücksichtigen, die horizontalen Balken.
ich erhalte eine Fehlermeldung, wenn ich versuchte, mit dieser
Uncaught TypeError: Cannot read property 'toString' of null at formatter (jquery.flot.barnumbers.js:60) at Object.<anonymous> (jquery.flot.barnumbers.js:121) at Function.each (jquery-1.11.3.js:384) at draw (jquery.flot.barnumbers.js:57) at executeHooks (jquery.flot.js:717) at draw (jquery.flot.js:1886) at new Plot (jquery.flot.js:710) at Function.$.plot (jquery.flot.js:3146) at plot_graph (graphs.php:975) at Object.success (graphs.php:683)
InformationsquelleAutor dinosaurwaltz
Ich denke, deine Antwort ist hier:
http://code.google.com/p/flot/issues/detail?id=218
InformationsquelleAutor blueberryfields