PlotPlotly Module Class
PlotPlotly.RdPlotly module that handles plotly objects.
Details
Plotly exposes bindings to interact with the plot programaticaly.
Currently, only the plotly_selected binding is supported in this module.
Super classes
DarwinShinyModules::ShinyModule -> DarwinShinyModules::Plot -> PlotPlotly
Active bindings
plot(
plotly) object.source(
character) Source label for the plotly plot.bindings(
reactivevalues) bindings from the plotly object.
Examples
library(DarwinShinyModules)
plotlyFun <- function(data) {
plotly::ggplotly(
ggplot(data = data, mapping = aes(x = Sepal.Length, y = Sepal.Width, color = Species)) +
geom_point() +
theme_bw()
)
}
plotlyModule <- PlotPlotly$new(fun = plotlyFun, args = list(data = iris))
if (interactive()) {
preview(plotlyModule)
}