Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dreamRs/shinywb
Interface to WinBox JavaScript library to use in shiny applications
https://github.com/dreamRs/shinywb
Last synced: 3 months ago
JSON representation
Interface to WinBox JavaScript library to use in shiny applications
- Host: GitHub
- URL: https://github.com/dreamRs/shinywb
- Owner: dreamRs
- License: other
- Created: 2022-04-27T12:07:17.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-04T05:22:40.000Z (11 months ago)
- Last Synced: 2024-08-13T07:11:38.574Z (6 months ago)
- Language: R
- Size: 310 KB
- Stars: 13
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - dreamRs/shinywb - Interface to WinBox JavaScript library to use in shiny applications (R)
README
# shinywb
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[](https://github.com/dreamRs/shinywb/actions/workflows/R-CMD-check.yaml)> Interface to [WinBox](https://nextapps-de.github.io/winbox/) JavaScript library to use in [shiny](https://shiny.rstudio.com/) applications. WinBox is a modern HTML5 window manager for the web.
## Installation
You can install the development version of shinywb from [GitHub](https://github.com/) with:
``` r
# install.packages("remotes")
remotes::install_github("dreamRs/shinywb")
```## Example
Create window from your `server` function with `WinBox()` :
```r
library(shiny)
library(shinywb)
library(apexcharter)
library(ggplot2)
data("economics", package = "ggplot2")ui <- fluidPage(
html_dependency_winbox(),
actionButton(inputId = "show", label = "Show WinBox")
)server <- function(input, output, session) {
observeEvent(input$show, {
inputId <- paste0("var", input$show)
WinBox(
title = "With an htmlwidget",
ui = tagList(
tags$h3("Economic chart"),
selectInput(inputId, "Select a variable:", names(economics)[-1]),
renderApexchart({
apex(
data = economics,
type = "line",
mapping = aes(x = date, y = !!sym(input[[inputId]]))
) %>%
ax_stroke(width = 1)
})
),
options = wbOptions(height = 630)
)
})}
if (interactive())
shinyApp(ui, server)
```