Updatemenus buttons bgcolor not working

I am trying to restyle the buttons on my plot, but there seems to be a bug preventing me from changing the “bgcolor” property if the type of an updatemenus object is “buttons”. See the codepen here for reference: https://codepen.io/dbhathena/pen/yZJbye - if you uncomment line 20, the button changes to a “buttons” type, but the background color goes away. How can I fix this? Thanks in advance!

UPDATE: figured out why this wasn’t working: showactive: true for only one button in the menu means that that button will always be shown as active. Setting it to false fixed the issue.

Now I have a new problem: is there any way to change the background color when hovering over the button?

Not at the moment, unfortunately.

You can subscribe to Add an option to change the highlighting background color of `updatemenus` · Issue #1428 · plotly/plotly.js · GitHub for the most up-to-date development info

1 Like