Display y-axis value with point

47 views
Skip to first unread message

Sandro Magi

unread,
Oct 23, 2020, 10:56:13 AM10/23/20
to Flot graphs
Flot is great so far, but I have one scenario that I'm not sure Flot can accomodate. I have a chart like this:

Basically, I need each point to list its y-axis value at all times, and not just when hovering so my users can see at a glance how far off they are from the target. Is there a standard option to do this?

Sandro

atm.g...@gmail.com

unread,
Oct 26, 2020, 10:58:58 PM10/26/20
to Flot graphs
So, this would probably be an odd, out-of-the-box feature for flot to have, as it would not have a desirable behavior for dense data sets. That said, it would not  be difficult to create a simple plug-in to achieve your desired result. You would probably want to use the 'draw' hook, and then draw something similar to what is being drawn for the plot hover event (jquery.flot.hover.js). See the PLUGINS.md doc and the plugin section of the API.md doc to help you get started. 

Let me know if I can help clear anything up for you. Good luck!

-Jonathan

Sandro Magi

unread,
Jan 13, 2021, 1:59:14 PM1/13/21
to Flot graphs
Thanks for the suggestion. I managed to find a plugin called "valuelabels" that does it:

Reply all
Reply to author
Forward
0 new messages