How can I add a checkbox to a react chartjs Legend?

193 Views Asked by At

I would like to add a checkbox next to the Legend to enable/disable the dataset. It seems that all implementation examples I have seen completely overwrite the Legend, but I like it how it is. I simply only want to append my own input button next to it and hook callbacks to this input being clicked or not. The example I am referring to is from their documentation.

How can I very simply extend the current Legend appearance while keeping the default appearance? I am also using the <Line> component

enter image description here

https://www.chartjs.org/docs/latest/samples/legend/html.html

0

There are 0 best solutions below