3

In particular, I am looking for a way to hide all buttons except the download image button. I tried to use the config argument but so far only managed to hide the entire modebar using displayModeBar = F. Any help would be highly appreciated.

Stéphane Laurent
  • 75,186
  • 15
  • 119
  • 225
Patrick Balada
  • 1,330
  • 1
  • 18
  • 37

1 Answers1

4

Here's what you are looking for:

plot_ly(economics, x = ~pop) %>% 
  config(displaylogo = FALSE, collaborate = FALSE,
         modeBarButtonsToRemove = c(
           'sendDataToCloud', 'autoScale2d', 'resetScale2d', 'toggleSpikelines',
           'hoverClosestCartesian', 'hoverCompareCartesian',
           'zoom2d','pan2d','select2d','lasso2d','zoomIn2d','zoomOut2d'
         ))

enter image description here

Since possible buttons are going to depend on the type of graph, keep in mind this list.

Julius Vainora
  • 47,421
  • 9
  • 90
  • 102