-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add and toggle legend item to show or hide data series #775
Comments
Hello, you could set an array variable for the ykeys populated with the default ykeys. Then when you click on legend items, it add/remove the associated ykey (i.e. in data attribute), then you update the ykeys options of Morris, then call the method .redraw() |
@pierresh thanks for getting replied, can you show a basic example please, because i think i am doing the same |
Hello, I just updated my fork to make this easier. A class per index is now added to line and circles. Then just just need to hide/display them when clicking on the legend. Here below is working example:
HTML
CSS
|
could somebody tell how to hide/unhide data series on legend items click in Morris Line graph ?
The text was updated successfully, but these errors were encountered: