I have played a bit with flot.js for plotting some data, but I have quite a few data series, so the user might want to hide some series. One of flot's examples shows how to toggle data series by using checkboxes. I would like to make clicking the legend's little color box or the label, to toggle the visibility of that series. Is that possible?
相关问题
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Include empty value fields in jQuery .serialize()
- Disable Browser onUnload on certain links?
- how to get selected text from iframe with javascri
Here is an example that uses checkboxes http://people.iola.dk/olau/flot/examples/turning-series.html
It could be modified to place a click event on each legendLabel, but you would only be able to show one legend at a time.
using something like this in the ready function
I am just getting back into programming and am not too familiar with ajax and the like, so I implemented my solution with javascript. You may be able to use to logic to do what you are seeking.