Is there a way to add custom CSS to Plotly dropdown buttons? I have the following ones:
...
updatemenus=[
dict(buttons=[
dict(
args=["type", "bar"],
label="Bar Chart",
method="restyle",
),
dict(
args=["type", "scatter"],
label="Line Chart",
method="restyle",
)
]
, direction="down"),
...
But when using a figure with the theme plotly_dark , this is how they look like when hovering :
I saw properties bgcolor, bordercolor, borderwidth... but nothing regarding hover styling. Anyone was able to make it work?
Thank you
You should use
font = dict(color='#000000')
For example,
...
updatemenus=[
dict(buttons=[
dict(
args=["type", "bar"],
label="Bar Chart",
method="restyle",
),
dict(
args=["type", "scatter"],
label="Line Chart",
method="restyle",
)
],
direction="down",
font = dict(color='#000000'),
),
...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.