Elise1369
Elise1369

Reputation: 319

R Plotly use a select input without Shiny

I am working on an interactive bar plot that will be integrated on a website.

I heard that to integrate a graph between other contents on a website, using Plotly without Shiny would be better.

I want to insert a selector button on my bar plot, that looks like selectInput buttons created on Shiny.

I saw how to use selector buttons on Plotly : https://plotly.com/r/range-slider/#basic-range-slider-and-selector-buttons. But I think I can't use it, because I want to select the city among a list of 1000 cities, so I want a scrollbar.

Do you know a way to add a selector button with a scrollbar on Plotly ?

Or should I use Shiny for that ? (then, will it be possible to insert my graph between other contents ?)

Upvotes: 1

Views: 913

Answers (1)

Elise1369
Elise1369

Reputation: 319

I found how to do with dropdowns : https://plotly.com/r/dropdowns/

(I had just to remove the option "type= 'buttons'" in the updatemenus to get a dropdown instead of buttons)

Upvotes: 2

Related Questions