Open wkdavis opened 5 years ago
It works when you provide a list:
plot_ly(data = mtcars, x = ~mpg, y = ~wt) %>%
config(modeBarButtonsToRemove = list("hoverCompareCartesian"))
I suppose I could wrap modeBarButtonsToRemove
in I()
internally though to make this easier to use
That makes sense, especially considering that all of the examples in the documentation use the list()
verbiage. Perhaps I've come to rely too heavily on the interchangeability of list()
and c()
in R functions. That said, it might be a convenient feature to wrap it with I()
if that doesn't impact anything else.
Now that the plotly.js exports a schema for the config, there's a possibility of converting to arrays automatically, but not until https://github.com/plotly/plotly.js/issues/3731 is addressed
The plot silently fails to render and throws a javascript error when listing only 1 button for removal with
config(modeBarButtonsToRemove = c(...))
Adding a second, even irrelevant value, fixes the error.
I am using plotly 4.8.0