How to select a dataset in ChartJS without removing the others? #10954
Unanswered
Oceanestars
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I ended up going a different route where the onclick would set my selected dataset and I'd just recreate the dataset and I'd make the background color of all the one not selected be a grey color. However, I kind of hope chartJS does something like this out of the box, but wasn't able to find it. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I've asked this question on stack overflow with no luck. Maybe someone here has an idea.
I'm trying to be able to select a dataset without hiding the other or removing the others and being able to then select another dataset. I'm using Chart JS 3.9.1 and React-chartjs-2:4.3.1
Here is a sandbox with my attempt with onclick and iterating through the dataset and changing the background color: https://codesandbox.io/s/chartjs-select-dataset-r1kixh
Thanks for any help!
Beta Was this translation helpful? Give feedback.
All reactions