Skip to content

Instantly share code, notes, and snippets.

@leonawicz
Created February 1, 2017 23:08
Show Gist options
  • Save leonawicz/bd700264278fbaa1471929f14b0be1c4 to your computer and use it in GitHub Desktop.
Save leonawicz/bd700264278fbaa1471929f14b0be1c4 to your computer and use it in GitHub Desktop.
Divs issue with dynamic server-side rintrojs and shiny dashboard for some widgets?
library(shiny)
library(rintrojs)
shinyServer(function(input, output, session) {
steps <- reactive(data.frame(
element=c("#plot1", "#select1", "#slider1"),
intro=c("This is a plot.", "The selectInput.", "Thw sliderInput."),
position=c("bottom", "bottom", "right")
))
observeEvent(input$help, { introjs(session, options=list(steps=steps())) })
output$plot1 <- renderPlot({ plot(0,0) })
})
library(shiny)
library(shinydashboard)
library(rintrojs)
dashboardPage(
dashboardHeader(title="rintrojs test"),
dashboardSidebar(
introjsUI(),
sidebarMenu(menuItem("Tab #1", tabName="tab1"))
),
dashboardBody(
tabItems(
tabItem(tabName="tab1",
plotOutput("plot1"),
selectInput("select1", "Select", letters[1:2], letters[1]),
sliderInput("slider1", "Slide", 0, 1, 0, 0.5),
actionButton("help", "Take tour")
)
)
),
title="rintrojs test"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment