Description Usage Arguments Value Examples
Technically, minimizing a widget is more like un-maximizing a widget. When "minimized," the widget will return to its original position in the layout. When a widget is maximized, it will take up the full size of the dock.
1 2 3 | maximizeWidget(proxy, widgetId)
minimizeWidget(proxy, widgetId)
|
proxy |
Proxy LuminophoR object |
widgetId |
ID for luminophor widget |
Proxy LuminophoR object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | if (interactive()) {
library(shiny)
library(luminophor)
shinyApp(
ui = fluidPage(
titlePanel("Old Faithful Geyser Data"),
sidebarLayout(
sidebarPanel(
actionButton('maximize', 'Maximize Plot', icon = icon('window-maximize')),
actionButton('minimize', 'Minimize Plot', icon = icon('window-minimize'))
),
mainPanel(
luminophorOutput('lmo', height='90vh')
)
)
),
server = function(input, output) {
output$lmo <- renderLuminophor(
luminophor() %>%
addWidget("widget-slider",
title = "Slider",
ui = sliderInput("bins", "Number of bins:",
min = 1, max = 50, value = 30)) %>%
addWidget("widget-plot",
title = "Plot",
insertmode = "split-right",
refwidgetID = "widget-slider",
relsize = 0.75,
ui = plotOutput("distPlot"))
)
output$distPlot <- renderPlot({
x <- faithful[, 2]
bins <- seq(min(x), max(x), length.out = input$bins + 1)
hist(x, breaks = bins, col = 'darkgray', border = 'white')
})
observeEvent(input$maximize, {
luminophorProxy('lmo') %>%
maximizeWidget('widget-plot')
})
observeEvent(input$minimize, {
luminophorProxy('lmo') %>%
minimizeWidget('widget-plot')
})
}
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.