I have put together an example that lets me independently add and remove traces from a plot. However, I would like to change the button stylings so that for each button, when it is ‘on’ (the corresponding trace is showing) the button is highlighted, and when it is ‘off’ (the corresponding trace is not showing) the button is greyed.
As it stands, if you click on a button, it is highlighted, but if you then click the other button then only that button is highlighted. But if both traces are showing, I would like both buttons to be highlighted. I could probably write more callbacks to change the css of the buttons, but I don’t know what attribute of a button is responsible for highlighting, and I am hoping there might be an easy solution. Many thanks.