Skip to content

Updating rendered plot in shiny #580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TonyDIRL opened this issue May 11, 2016 · 4 comments
Closed

Updating rendered plot in shiny #580

TonyDIRL opened this issue May 11, 2016 · 4 comments

Comments

@TonyDIRL
Copy link

Hi,

Is it possible to update a plotly graph which has already rendered (in shiny) without rerendering the entire plot? An example usage would be initially plotting a large time series and then wishing to add various annotations without rerendering the entire plot.

Looking online it seems it might be possible with the restyle functionality.
https://plot.ly/javascript/plotlyjs-function-reference/

Was wondering if such a feature is available in R.

Cheers

@cpsievert
Copy link
Collaborator

In theory this is possible with clever use of htmlwidgets::onRender(), but I'll definitely think about a better way to achieve this without having to write JavaScript.

@TonyDIRL
Copy link
Author

Thank you - I will investigate htmlwidgets

@timelyportfolio
Copy link
Collaborator

Perhaps, we could look into a proxy pattern similar to leaflet.

@cpsievert cpsievert reopened this May 13, 2016
@pata-eth
Copy link

pata-eth commented May 9, 2017

DT also provides this functionality through a proxy variable. It'be great to have the same functionality for plotly.

http://rstudio.github.io/DT/shiny.html (example at the bottom of the page)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants