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
Allow animation to/from hidden datasets #1833
Comments
Hi. Any progress on this one? |
No progress has been made. I have a general idea of what needs to be done, but have not explored it |
a workaround:
then use the update() method on the chart to change the state.. also, to tie it to a checkbox (as i am doing currently):
|
@WattsC-90 ...Hey ...would you please provide more details about how to use the checkbox to control hiding/display the data on the chart? I am working this task but feel confused how to pass the boolean value to the 'datasets[0].hidden' and update the chart? |
@hexx870206helen I am assuming you are working for the Chart.js repository and therefore my answer would be: I would probably have an option to enable series hiding on the chart globally, which enables checkboxes next to the key labels which have an event, on change or similar. When those checkboxes change state, the series gets hidden, probably by the onchange event handler simply doing what I mentioned above, changing the series to hidden and calling update. Hopefully this helps, if not, I can explain a bit more? I am trying to describe the behaviour, as I don't want to comment on implementation given I am not involved in the repository source code. |
@WattsC-90 hey...that's enough...appreciate your suggestions...thanks a lot |
@hexx870206helen I have had a dig around and found my old codepen from when I was doing this work.. take a look here: http://codepen.io/chriswatts90/pen/PGovpO and it shows you how to link the checkbox in with the graph, its very rough code, but should get you started! there is no data though as it points to a json-server (nodejs) endpoint to get its data. But i figure you dont need the data, just showing how it links the bits together. |
I see this feature is intended for v2.8. I look forward to its arrival :) |
@simonbrunel @etimberg hi there! very interested in this feature - is this part of 2.7 or 2.8? where can I find the docs if so? cc @ChristianBell1995 |
Requested in the comments of #1146
The text was updated successfully, but these errors were encountered: