Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plotlyProxy

Modify a plotly object inside a shiny app


Description

Modify a plotly object inside a shiny app

Usage

plotlyProxy(
  outputId,
  session = shiny::getDefaultReactiveDomain(),
  deferUntilFlush = TRUE
)

plotlyProxyInvoke(p, method, ...)

Arguments

outputId

single-element character vector indicating the output ID map to modify (if invoked from a Shiny module, the namespace will be added automatically)

session

the Shiny session object to which the map belongs; usually the default value will suffice.

deferUntilFlush

indicates whether actions performed against this instance should be carried out right away, or whether they should be held until after the next time all of the outputs are updated.

p

a plotly proxy object (created with plotlyProxy)

method

a plotlyjs method to invoke. For a list of options, visit https://plotly.com/javascript/plotlyjs-function-reference/

...

unnamed arguments passed onto the plotly.js method

Examples

if (require("shiny") && interactive()) {
  plotly_example("shiny", "proxy_relayout")
  plotly_example("shiny", "proxy_mapbox")
}

plotly

Create Interactive Web Graphics via 'plotly.js'

v4.10.0
MIT + file LICENSE
Authors
Carson Sievert [aut, cre] (<https://orcid.org/0000-0002-4958-2844>), Chris Parmer [aut], Toby Hocking [aut], Scott Chamberlain [aut], Karthik Ram [aut], Marianne Corvellec [aut] (<https://orcid.org/0000-0002-1994-3581>), Pedro Despouy [aut], Salim Brüggemann [ctb] (<https://orcid.org/0000-0002-5329-5987>), Plotly Technologies Inc. [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.