Giter Club home page Giter Club logo

shinydashboard's Introduction

shinydashboard's People

Contributors

alandipert avatar ashesitr avatar bborgesr avatar cpsievert avatar dependabot[bot] avatar dmpe avatar jcheng5 avatar jjallaire avatar schloerke avatar scottmmjackson avatar wch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shinydashboard's Issues

Feature Request: Dynamic sidebarMenu to accept list

Similar to the dropdownMenu function, it would be great to feed sidebarMenu a list in order to dynamically generate sidebar tabs.
In the meantime, is there a workaround for adding a list of menuItems with renderMenu?

Feature request: (contextual) Help messages in navbar

The current typology covers:

  • messages
  • notifications
  • tasks

While strictly speaking it would be possible to use messages for help communications, it would be better and cleaner to have another typology for help, of course associated with an appropriate "help" icon (the "letter" is not entirely appropriate).
An alternative would be to be able to select the icons also for the dashboard header drop down items: with an appropriate icon I could use "messages" exclusively for (contextual) help communications.

Dashboard page does not include fontawesome by default.

When loading a vanilla dashboardPage

library(shinydashboard)

dashboardPage(
  dashboardHeader(title='Title'),
  dashboardSidebar(),
  dashboardBody()
)

fontawesome is not rendered as an html link and the menu collapse icon appears as an unknown character.

Adding a sidebarSearchForm() however

library(shinydashboard)

dashboardPage(
  dashboardHeader(title='Title'),
  dashboardSidebar(
    sidebarSearchForm(textId="search", buttonId="searchButton", label="Search...")
    ),
  dashboardBody()
)

will correctly trigger the link to be included.

dashboardSidebar, selectInput nested under menuItem

I'd like to display Shiny input fields as a type of menuSubItem, however I'm finding it difficult to write the solution.

The dashboard tutorial page suggests inputs in the sidebar are possible:

http://rstudio.github.io/shinydashboard/structure.html#inputs-in-the-sidebar

I have seen this example where a sliderInput is effectively it's own menuItem:

https://github.com/rstudio/shiny-examples/blob/master/087-crandash/ui.R

What I would really like to happen is that a menuItem is selected, which not only displays content in the dashboardBody, but also reveals additional input fields as menuSubItems. Using dashboard example code, I was hoping something like this would work:

menuItem("Widgets", icon = icon("th"), tabName = "widgets", badgeLabel = "new", badgeColor = "green",
             selectInput("inputTest", label = h5("Input Test"), choices = c("a", "b", "c", "d"), multiple=TRUE, selectize=TRUE, width = '95%')
             )

Executing the example code (https://gist.github.com/wch/8957ee5e2d79770abf9a) with the above edit to the Widgets menuItem does not result in any errors, but also clicking the Widgets menuItem does not reveal a selectInput field.

I can't find any examples of this type structure elsewhere. Is it possible to do this?

Is it possible to have an example with tabsetPanel interacting with dashboardSidebar?

I really like shinydashboard.
On the other hand I'm a bit confused by the interaction of tabItems / tabItem and tabsetPanel / tabPanel:
I would really appreciate an example and / or some guidance on how the two sets work best together.

For example, could I build a "complex" set of tabsetPanel / tabPanel items and still drive the menu navigation from dashboardSidebar? Or using tabsetPanel prevents me to use menuItem / menuSubItem?
I have done some experimenting but it is confusing and very time consuming. It would be good to have some "best practice" example. Thanks!

Add href to taskItem, messageItem & valueBox

First, I may just be overlooking something obvious. Is there a way to add an action to taskItem, messageItem and valueBox elements so that when a user taps/clicks they would go to a specific URL? If not, is there any plan for such functionality?

server.R cannot access input$var from sidebar

I really like the dashboard, Winston, thank you! Unfortunately, while I can make the UI look really nice, I cannot access input variables defined in the sidebar in server.R. This is a snipped of the sidebar:

sidebar <- dashboardSidebar(
               sidebarMenu(
                   # Put the data selection options under one menuItem
                   menuItem("Data Selection",
                            icon=icon("sliders"),
                            selectInput(
                                inputId="year",
                                label="Year",
                                choices=years,
                                selected="All"
                            ),
                            selectInput(
                                inputId="state",
                                label="State",
                                choices=states,
                                selected="All"
                            ),
                            selectInput(
                                inputId="group",
                                label="Taxonomic Group",
                                choices=groups,
                                selected="All"
                            ),
                            selectInput(
                                inputId="species",
                                label="Species",
                                choices=species,
                                selected="All"
                            )
                   ),

                   menuItem("Overview",
                            tabName="overview",
                            icon=icon("th-large")
                   ), 
                   ...followed by a few more menuItems

(The choices here are vectors assigned at the top of ui.R.)

In the dashboardBody I want to get the currently selected state to render in a box, but no amount of renderText, textOutput, etc., will work. Nothing prints when I call observe({ print(input$state) }) in server.R, nor when I attempt to print from other reactive functions.

Unlike the disappearing boxes of issue #28, the box renders just fine...but there's no text and the server doesn't appear to "see" the variable exists.

Any thoughts on what might be going on here?

How to set the width of the sidebar?

Hi,

I was wondering if I could change the width of the sidebar since there are some lengthy contents in the sidebar turn out to be truncated. Thanks!

Removing list value attribute in sidebarMenu menuSubItem

Hi there,
This is my first question on github so I gope it is in the right place...

I've put some widgets into the sidebar sub menus but can't seem to get rid of the little double arrow icon for each widget?
I understand these sub items are a list which has value attributes and found the conspirator in this section of shinydashboard/R/dashboardSidebar.R

' @rdname sidebarMenu

' @export

menuSubItem <- function(text, tabName = NULL, href = NULL, newtab = TRUE) {
...
tags$li(
a(href = href,
data-toggle = if (isTabItem) "tab",
target = target,

' This guy!!

  shiny::icon("angle-double-right"),
  text
)

)
}

How do I remove the shiny::icon("angle-double-right")????

I've got a styles.css file in my www/ folder that has the code:
li {
list-style-type: none
}
Hoping this would cancel any list bullet mark type attributes in my shiny app, but I don't know too much about css styling...

Any help would be greatly appreciated, thanks!

sidebarUserPanel(): image in www/ subdir not working

Installed the latest shinydashboard version using the sidebarUserPanel() argument "image" combined with .png or .jpg image in subdirectory /www within the app directory gives only "?" in the app.

sidebarUserPanel(name = "myname",
subtitle = a(href = "#", icon("circle", class = "text-success"), "Online"),
# Image file should be in www/ subdir
image = "myimage.png"))

It also doesnt matter if I give the full path image = "C:/mydir/www/myimage.png"

Issue with valueBoxOutput

Code on guide page doesn't work in 0.2.2
http://rstudio.github.io/shinydashboard/structure.html#valuebox

valueBoxOutput("progressBox")
Error in shiny::uiOutput(outputId, class = paste0("col-sm-", width)) :
unused argument (class = paste0("col-sm-", width))

sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] shinydashboard_0.2.2 DiagrammeR_0.4 shiny_0.11
[4] ND3_0.1.2 stringr_0.6.2 igraph_0.7.999-125
[7] lazyeval_0.1.10.9000 tidyr_0.1 dplyr_0.4.1
[10] rCharts_0.4.2 RSQLite_1.0.0 DBI_0.3.1

Body Content Fails to Render When Using Widgets in Sidebar

If using widgets as nested menu or sub-menu items, content in the dashboardBody fails to render.

Examples

This displays the box in dashboardBody() correctly:

library("shinydashboard")

header <- dashboardHeader()

sidebar <- dashboardSidebar(
  sidebarMenu(
    menuItem("Inputs", icon = icon("bar-chart-o"), tabName = "tabOne"
    )
  )
)

body <- dashboardBody(
  tabItems(
    tabItem("tabOne",
            box(title = "Box One", 
                width = 12,
                height = "500px",
                status = "success", 
                solidHeader = TRUE, 
                collapsible = TRUE,
                verbatimTextOutput("boxOneText")
                )
            )
    )
  )

shinyApp(
  ui = dashboardPage(header, sidebar, body),
  server = function(input, output) {

    output$boxOneText <- renderText({
      paste("A test designed to provoke an emotional response")
    })

  }
)

However, the following code with correctly displaying widget inputs added as menu items, results in the dashboardBody() box disappearing.

library("shinydashboard")

header <- dashboardHeader()

sidebar <- dashboardSidebar(
  sidebarMenu(
    menuItem("Inputs", icon = icon("bar-chart-o"), tabName = "tabOne",
             # Input directly under menuItem
             selectInput("inputTest", "Input Test",
                         choices = c("a", "b", "c", "d"), multiple=TRUE, selectize=TRUE,
                         width = '98%'),

             # Input inside of menuSubItem
             menuSubItem(icon = NULL,
                         sliderInput("inputTest2", "Input test 2", min=0, max=10, value=5,
                                     width = '95%')
                         )
             )
    )
)

body <- dashboardBody(
  tabItems(
    tabItem("tabOne",
            box(title = "Box One", 
                width = 12,
                height = "500px",
                status = "success", 
                solidHeader = TRUE, 
                collapsible = TRUE,
                verbatimTextOutput("boxOneText")
                )
            )
    )
  )

shinyApp(
  ui = dashboardPage(header, sidebar, body),
  server = function(input, output) {

    output$boxOneText <- renderText({
      paste("A test designed to provoke an emotional response")
    })

  }
)

Cannot install from CRAN

install.packages("shinydashboard") fails on R "Smooth Sidewalk" 3.1.3

install.packages("shinydashboard")
Warning in install.packages :
package โ€˜shinydashboardโ€™ is not available (for R version 3.1.3)

Current workaround:
library(devtools)
install_github("rstudio/shinydashboard")

Publishing app on Shinyapps.io

I'm having trouble publishing a shinydashboard app to Shinyapps.io. I'm getting the error:

Preparing to deploy application...DONE
Uploading application bundle...DONE
Deploying application: 30514...
Error: /v1/applications/30514/deploy 400 - Unable to deploy application-30514. bundle-122840 not found.

Has anyone been successful in publishing an app using shinydashboard?

dropdownMenu does not drop down

I've added a dropdownMenu to the header of my page with some messages. It shows up in the header with the selected icon and a badge that correctly states the number of messages within it. But there is no way to get it to actually drop down. Clicking, mouseover, etc. just highlight the icon within the header without showing the messages within it. Would it be possible to add an example to your site that contains a dropdownMenu to help in tracking this down. I can see in the html that the list items for the menu are populated fine. Do you think it's an issue with the css? Thanks!

Unable to create header messages server-side (renderUI) - bug?

First of all congratulations for yet another great piece of software.

I tried to follow the instructions here.

Unfortunately, while I get the envelope icon on the navbar, I do not get the actual messages.

This is the code:

library(shiny)
# options(shiny.trace = T) 
msg <- data.frame(from = c("Admininstrator","New User","Support"),
                  message = c("Sales are steady this month.","How do I register?","The new server is ready."),
                  stringsAsFactors = F)
ui <- dashboardPage(
  dashboardHeader(title = "Basic dashboard",uiOutput("messageMenu")
#                   dropdownMenu(type = "messages",
#                                messageItem(
#                                  from = "Sales Dept",
#                                  message = "Sales are steady this month."
#                                ),
#                                messageItem(
#                                  from = "New User",
#                                  message = "How do I register?",
#                                  icon = icon("question"),
#                                  time = "13:45"
#                                ),
#                                messageItem(
#                                  from = "Support",
#                                  message = "The new server is ready.",
#                                  icon = icon("life-ring"),
#                                  time = "2014-12-01"
#                                )
#                   )
                  ),
  dashboardSidebar(),
  dashboardBody(
    # Boxes need to be put in a row (or column)
    fluidRow(
      box(plotOutput("plot1", height = 250)),

      box(
        title = "Controls",
        sliderInput("slider", "Number of observations:", 1, 100, 50)
      )
    )
  )
)

server <- function(input, output) {
  set.seed(122)
  histdata <- rnorm(500)

  output$plot1 <- renderPlot({
    data <- histdata[seq_len(input$slider)]
    hist(data)
  })
  #####
  output$messageMenu <- renderUI({
    # Code to generate each of the messageItems here, in a list. This assumes
    # that messageData is a data frame with two columns, 'from' and 'message'.
    msgs <- apply(msg, 1, function(row) {
      messageItem(from = row[["from"]], message = row[["message"]])
    })


#    msgs <- list(messageItem(from = "User", message = "this is the message",
#                             icon = shiny::icon("user"), time = NULL) )
#    print(msgs)
    # This is equivalent to calling:
    #   dropdownMenu(type="messages", msgs[[1]], msgs[[2]], ...)
    dropdownMenu(type = "messages", .list = msgs)

  })
}

shinyApp(ui, server)

I've tried different things, but nothing managed to work on the server side.

Maybe there is something missing either in the web doc or in the code?

Programmatically select sidebar tab

With the addition of id to the sidebarMenu, would it be possible to implement a way to programmatically select a sidebar tab?

For instance, it would be great if you could do something like:
updateTabsetPanel(session, sidebar.id, selected = a.sidebar.tab)

Probleme with tabbox ?

Hello,
i'm building a shinydashboard app, with different choices for the user and different tabbox. Here is an exemple :

library(shiny)
library(shinydashboard)

ui <- dashboardPage(
  dashboardHeader(title = "Header"),
  dashboardSidebar(
  sidebarMenu(
  menuItem("Recherche", tabName = "tab_rch", icon = icon("dashboard")),
  menuItem("A propos", tabName = "tab_propos",icon = icon("th"))
  )
  ),
  dashboardBody(
  tabItems(
    tabItem(tabName = "tab_rch",h2("Statistique"),
        fluidRow(
            column(width = 3,
            box(
                title = "Pollutant", width = NULL, solidHeader = TRUE, status = "primary",
                selectInput("pol", 
                label = NULL,
                choices = c("choose","Pollutant 1","Pollutant 2","Pollutant 3","Pollutant 4"),
                selected="choose"
                )                               
                ),          
            box(
                title = "Year", width = NULL, solidHeader = TRUE, status = "primary",
                selectInput("year", 
                label = NULL,
                choices =  as.character(c("choose",seq(2007,as.numeric(format(Sys.Date(),"%Y"))))),
                selected ="choose")
                ),          
            box(
                title = "Validate", width = NULL, solidHeader = TRUE, status = "primary",
                actionButton("actionButton_data","Refresh",icon=icon("refresh"))
                )                       
            ),

            column(width = 9,
            tabBox(         
            title = "Title tabBox",
            id = "tabset1", height = "2000px",
            tabPanel("Map", "Contenu carte"),
            tabPanel("Choice", "Contenu choix 1"),
            tabPanel("Choice2", htmlOutput("input_type_text2")),
            tabPanel("Table",dataTableOutput("ttable"))
                    )
            )
        )
    ),  
    tabItem(tabName = "tab_propos",h2("A propos"))
  )  
  )
)

server <- function(input, output) {
output$input_type_text2 <- renderText({
    input$actionButton_data
    isolate(paste0("Polluant :",input$pol))
  })

output$ttable <- renderDataTable({
    input$actionButton_data
    isolate(data.frame(A=input$pol,B=input$year))
  })
}

shinyApp(ui, server)

For instance, the user choose one polluant + one year and then click on the panel "Table", without refreshing page. I dont' understand the result, the table display values of user, however the user didn't click on action button. Is this normal ? Application works as expected without tabbox and simple boxes.

Thanks,

Difference in padding around div of a selecinput - Shinydashboards only

There is no padding around the selectinput div when using a uiOuput. When using a selectInput directly in the UI there is padding.

Minimal example:

library(shiny)
library(shinydashboard)

shinyApp(
  ui = dashboardPage(
    dashboardHeader(),
    dashboardSidebar(
      selectInput("select1", "test", runif(5)),
      uiOutput("select2")),
    dashboardBody()

  ), 
  server = function(input, output) {
    output$select2 <- renderUI(
      selectInput("select2", "test", runif(5))
    )
  }
)

How can I remove the googlefontapis usage?

I'm a fun of shinydashboard in China. I just update the shinydashboard and find that it will take a very long time to load the shiny app, because it can't reach fonts.googleapis.com in China. As you know, for some reasons, all the google's websites are blocked in China.

It brings me a lot trouble, because I have to wait for minutes to load the shiny app...

Because the 360.com provides an alternative way to use the public google api, which is use fonts.useso.com to replace fonts.googleapis.com. But I don't know how.

Is there any easy way to do this? I think the googleapis is only used in http://127.0.0.1:3298/AdminLTE-2.0.6/AdminLTE.min.css.

Thanks.

assign id value to sidebarMenu?

Hi,

I am wondering if id can be assigned to the sidebarMenu so that Joe's partials framework (https://github.com/jcheng5/shiny-partials) can be applied. When I try to add id = "partial" to sidebarMenu() the console keep throwing an error below:
Error in FUN(X[[1L]], ...) : Expected an object with class 'shiny.tag'.

Please provide an example, thanks...

Collapsing of boxes not working with dynamic output

When I generate a box with collapsible=TRUE on the server side, the collapse button doesn't work anymore - even if the box has no content at all:

library(shiny)
body <- dashboardBody(
  uiOutput("ui")
)

server <- function(input, output) {  
  output$ui <- renderUI({
    box(title = "Collapse me",
        status = "warning", solidHeader = TRUE, collapsible = TRUE
    )
  })
}

shinyApp(
  ui = dashboardPage(
    dashboardHeader(),
    dashboardSidebar(),
    body
  ), 
  server = server
)

Would be great if you can get this to work as it is a quite common use case.

Best regards,
Robert

tabBox doesn't appear in wide screen mode

I have the following as as my ui.R, but the tabBox doesn't show up unless browser scaled to a smaller width.

library(shinydashboard)
library(leaflet)
source("header.R")
source("sidebar.R")

body <- dashboardBody(

fluidRow(
  column(width = 10,
    # the big table on the top
    tabBox(
      # Title can include an icon
      title = tagList(shiny::icon("gear"), "tabBox status"),
      tabPanel("Tab1",
               "Currently selected tab from first box:",
               verbatimTextOutput("tabset1Selected")
      ),
      tabPanel("Tab2", "Tab content 2")
    ),

    box(width = NULL, solidHeader = TRUE
      #,uiOutput("numVehiclesTable")
      ,fluidRow(
        # the bubble chart
        column(width=5
          ,helpText("place holder for buble chart")
        )
        # the line chart
        ,column(width=5
          ,helpText("placeHolder for line graph (undecided item)")
        )
      )
    )
  ),

  column(width = 2,
    # the 
    box(width = NULL, status = "warning",
      uiOutput("routeSelect"),
      selectInput("interval", "Refresh interval",
                  choices = c(
                    "30 seconds" = 30,
                    "1 minute" = 60,
                    "2 minutes" = 120,
                    "5 minutes" = 300,
                    "10 minutes" = 600
                  ),
                  selected = "60"
      ),
      actionButton("zoomButton", "Analyze Now")
    )
  )
)

)

dashboardPage(
header
,sidebar
,body
)

collapsible box, collapsed at application start

Is it possible to make a collapsible box collapsed at the application start?

I tried to change the box class to "collapsed" using:

box(title = "title",
    width = NULL,
    collapsible = T, 
    class = "collapsed-box")

But it changes the box's body class instead of the box itselft. See the results:

<div>
  <div class="box">
    <div class="box-header">
      <h3 class="box-title">title</h3>
      <div class="box-tools pull-right">
        <button class="btn btn-box-tool" data-widget="collapse">
          <i class="fa fa-minus"></i>
        </button>
      </div>
    </div>
    <div class="box-body collapsed-box"></div>
  </div>
</div> 

And i love this package!

Should Be able to add a title to the menu bar

The current area to add title/logo is limited. It usually only provides enough space for a logo.
There should be a way to add a full text title to the right of the menubar collapse button.

This limitation is mainly due to AdminLTE, perhaps a hack can be developed in a shinydashboardExtras package? This way new updates from AdminLTE can be easily incorporated into shinydashboard without fear of breaking the hack.

Dynamic content in dropDownMenu for more than one type of item

I would like to dynamically generate more than one type of menu item in the header (messages, notifications or tasks). The sample code shows how to generate a single item type. However, when I try to use dropDownMenu for more than one type of item, it only renders the last menu item. See the code below as an example.

I have tried putting the args in an array, but that also does not work.

Please advise if my question is a feature request or if it is possible to implement dynamic content in menu items with today's version .

I'm really enjoying what you've developed, BTW.

server <- function(input, output) {
 output$messageMenu <- renderMenu({
    msgs <- apply(messageData, 1, function(row) {
      messageItem(from = row[["from"]], message = row[["message"]])
    })

    nots <- apply(notificationData, 1, function(row) {
      notificationItem(text = row[["message"]], status = row[["status"]])
    })

    taks <- apply(taskData, 1, function(row) {
      taskItem(text = row[["message"]], color = row[["color"]], value = row[["value"]])
    })

  dropdownMenu(type = "messages", .list = msgs)
  dropdownMenu(type = "notifications", .list = nots)
  dropdownMenu(type = "tasks", .list = taks)
})

}

Image in sidebarUserPanel

The sidebarUserPanel function has only one name argument, but its source code refers to an image:

sidebarUserPanel <- function(name) {
  div(class = "user-panel",
    div(class = "pull-left image",
      img(src = "foo.png", class = "img-circle", alt = "User Image")
    ),
    div(class = "pull-left info",
      p(paste("Hello,", name)),
      a(href = "#", shiny::icon("circle", class = "text-success"), "Online")
    )
  )
}

Consequently, a missing image appears. I guess the image src should be an argument of the sidebarUserPanel function, probably with a meaningful default.

Error in shinydashboard ui

Hi,

I get an error with this very simple code dashboard :

## app.R ##
library(shiny)
library(shinydashboard)

ui <- dashboardPage(

    dashboardHeader(title = "Basic dashboard"),

    dashboardSidebar(
    sidebarMenu(
      menuItem("Menu 1", tabName = "rsc1",icon=icon("calendar")),
      menuItem("Menu 2", tabName = "rsc2")
        )
        ),

    dashboardBody(
    tabItems(
      # First tab content
      tabItem(tabName = "rsc1",
      h2("Widgets tab content 1")
      ),

      # Second tab content
      tabItem(tabName = "rsc2",
        h2("Widgets tab content 1")
      )   
      )       
    )
  )

server <- function(input, output) {  
  }

shinyApp(ui, server)

R doesn't recognize the html generated ? It works without the icon option icon=icon("calendar")

Error in tagAssert(icon, type = "i") : 
  Expected an object with class 'shiny.tag'.

My session info :

R version 3.0.3 (2014-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252    LC_MONETARY=French_France.1252
[4] LC_NUMERIC=C                   LC_TIME=French_France.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] shinydashboard_0.2.2 shiny_0.10.2.1      

loaded via a namespace (and not attached):
[1] digest_0.6.4    htmltools_0.2.6 httpuv_1.3.2    mime_0.2        R6_2.0          Rcpp_0.11.3     RJSONIO_1.3-0  
[8] tools_3.0.3     xtable_1.7-

Second question : is it possible to use a ui.r file and server.r file with shinydashboard package (and not a single file) ?

Thanks,

How to generate menuItem & menuSubItem dynamically

Dear developers;

I really I appreciate your efforts to maintain this nice library.

I have a one question to use this. I tried to make menuItem & menuSubItem dynamically like you explained for DropdownMenu in the following document:

There are special functions to generate Dropdown dynamically :

  • renderDropdownMenu
  • dropdownMenuOutput

I already read the source code related to this topic and I understood that if I want to do the same thing for menuItem, I have to...

  1. Make special tag(e.g. shinydashboard-menu-output) for its rendering
  2. To render correctly, I need to modified shinydashboard.js

Is my understanding correct?

Same Box for multiple tabPanels

How can i update the same Box for multiple tab panels.

here is my code

fluidRow(
tabBox(title="Input Parameters",id="ht2",height = 550,width=5,side = "right",selected= strong(p("Paired Sample")),
tabPanel(strong(p("Proportions")),h4("Proportions"),
radioButtons("prtype",h5("Tail Type"),c("Two Tail","Left Tail","Right Tail"),selected = "Two Tail"),
div(class="row-fluid",
div(class="col-md-6",numericInput("p1", label = "p1", value = 0.2)),
div(class="col-md-6",numericInput("p2", label = "p2", value = 0.3))
),
div(class="row-fluid",
div(class="col-md-6",numericInput("n1Pr", label = "n1", value = 100.0)),
div(class="col-md-6",numericInput("n2Pr", label = "n2", value = 100.0))
),
numericInput("dp", label = "dp", value = 0.0),
numericInput("alphaPr", label = "alpha", value = 0.05)
),
tabPanel(strong(p("Independent Sample")),h4(p("Independent Sample")),
div(class = "row-fluid",
div(class="span4",radioButtons("itype",h5("Tail Type"),c("Two Tail","Left Tail","Right Tail"),selected = "Two Tail")),
div(class="span4 offset2",radioButtons("VarType",h5("Variance Type"),c("Pooled Variance","Unpooled Variance"),selected = "Pooled Variance"))
),
#radioButtons("VarType",h5("Variance Type"),c("Pooled Variance","Unpooled Variance"),selected = "Pooled Variance"),
div(class="row-fluid",
div(class="col-md-6",numericInput("x1", label = "x1", value = 2.0)),
div(class="col-md-6",numericInput("x2", label = "x2", value = 1.0))
),
div(class="row-fluid",
div(class="col-md-6",numericInput("s1", label = "s1", value = 1.0)),
div(class="col-md-6",numericInput("s2", label = "s2", value = 1.0))
),
div(class="row-fluid",
div(class="col-md-6",numericInput("n1", label = "n1", value = 100.0)),
div(class="col-md-6",numericInput("n2", label = "n2", value = 100.0))
),
numericInput("du", label = "du", value = 0.0),
numericInput("alphaI", label = "alpha", value = 0.05)
),
tabPanel(strong(p("Paired Sample")),h4(p("Paired Sample")),solidHeader=T,
radioButtons("ptype",h5("Tail Type"),c("Two Tail","Left Tail","Right Tail"),selected = "Two Tail"),
numericInput("dbar", label = "dbar", value = 0.0),
numericInput("D", label = "D", value = 0.0),
numericInput("sdbar", label = "sd", value = 1.0),
numericInput("nP", label = "n", value = 100.0),
numericInput("alphaP", label = "alpha", value = 0.05)
)
)

this creates 3 tab panels in one tab box. Now i need to create one box which gets updated from each tab Panel. Please Help.

Allow multiple lines in notificationItem text

Lines in the notificationItem text area do not wrap at the end of the notification area. Is it possible to have notification items with multiple lines show up nicely next to the icon?

I tried to include the tag$br with a div and without a div, but neither show up as I would like them to.

notifications <- dropdownMenu(type = "notifications", badgeStatus="info",
       notificationItem(icon=icon("warning"), status="danger",
       text = tags$div("With a div tag everything is",
       tags$br(),
       "below the icon")
       ),
      notificationItem(icon=icon("warning"), status="danger",
       text = tags$b("This line is besides the icon",
       tags$br(),
       "and this line no longer is")
        ))

results in:

notifationitem-textplacement

Horizontal scrollbar not present when disoplaying wide tables

Horizontal scroll bar is not present when displaying wide tables. So you can only see first few columns of the wide tables (tables with large number of columns). Please see reproducible example below:

library(shiny)
library(shinydashboard)
library(DT)

header <- dashboardHeader(title="Test Wide Tables")

sidebar <-  dashboardSidebar(
            sidebarMenu(
                    menuItem("First menu item", tabName="first"),
                    menuItem("Second menu item", tabName="second")
                )
            )

body <- dashboardBody(
            tabItems(                   
                tabItem(tabName="first",
                        h2("First menu item"),
                        fluidRow(
                            numericInput("numberOfColumns", label="Number of columns:", value=100, min=1, step=1),
                            numericInput("numberOfRows", label="Number of rows:", value=1000, min=1, step=1)
                        ),
                        fluidRow(
                            DT::dataTableOutput("wideTable")
                        )
                ),

                tabItem(tabName="second",
                        h2("Second menu item")
                )
            )
        )

ui<-dashboardPage(
    header,
    sidebar,
    body
)

server<-function(input, output) { 
    output$wideTable <- DT::renderDataTable({
                table <- do.call(cbind, lapply(1:input$numberOfColumns, function(i) 1:input$numberOfRows))
                colnames(table) <- paste0("name.", 1:input$numberOfColumns)
                DT::datatable(table)
            })
}

shinyApp(ui, server)

Error with big tables

I tried to show a wide table using dataTableOutput('showtable') and the horizontal scroll bar for the tab panel is hidden (disabled). So, it is not possible to scroll and if you try to do it by marking text and moving the mouse, the table goes over the sidebar. I think that it happens due tu z-index.

Is it any solution? Thanks

http://imgur.com/eoZGArT

Menuitem select only once

Strangely these dots appear to the left side.
I can click on each tab only ONCE. This means after three clicks I cannot switch to another tab.
_documents_development_predictr_r-stuff_geo_clusterregressionbootstrap-_shiny

Horizontal scrolling for large content (like a table)

Hi!

When trying to display a table in a box element, when it is very large it goes beyond the boundaries of the box. Could it be possible to add the possibility for a box to use an horizontal scroll bar to display such a content?

Here below, a simple application displaying a very large table in a very tiny box.

body <- dashboardBody(
    fluidRow(
        column(width = 4,
               box(
                   title = "Box title", width = NULL, status = "primary",
                   tableOutput('table')
               )
        )
    )
)

ui <- dashboardPage(
    dashboardHeader(title = "Column layout"),
    dashboardSidebar(),
    body
)

server <- function(input, output) {
    test.table <- data.frame(lapply(1:8, function(x) {1:10}))
    names(test.table) <- paste0('This_is_a_very_long_name_', 1:8)

    output$table <- renderTable({
        test.table
    })
}

# Preview the UI in the console
shinyApp(ui = ui, server = server)

Thanks!

Skasch

Initially Collapsed Box Fails to Render Content when Expanded

If a box is collapsed on initial load, the content then fails to load when the box is subsequently expanded.

Example problem code:

library("shinydashboard")

header <- dashboardHeader()

sidebar <- dashboardSidebar(
  sidebarMenu(
    menuItem("Inputs", icon = icon("bar-chart-o"), tabName = "tabOne"
    )
  )
)

body <- dashboardBody(
  tabItems(
    tabItem("tabOne",
            box(title = "Test Box One", 
                width = 12,
                status = "success", 
                solidHeader = TRUE, 
                collapsible = TRUE,
                collapsed = TRUE,
                verbatimTextOutput("boxOneText")
            )
    )
  )
)

shinyApp(
  ui = dashboardPage(header, sidebar, body),
  server = function(input, output) {

    output$boxOneText <- renderText({
      paste("A test designed to provoke an emotional response")
    })

  }
)

However, the following code, with the box expanded on initial load, works fine and even after collapsing and expanding the box. The text continues to render:

library("shinydashboard")

header <- dashboardHeader()

sidebar <- dashboardSidebar(
  sidebarMenu(
    menuItem("Inputs", icon = icon("bar-chart-o"), tabName = "tabOne"
    )
  )
)

body <- dashboardBody(
  tabItems(
    tabItem("tabOne",
            box(title = "Test Box One", 
                width = 12,
                status = "success", 
                solidHeader = TRUE, 
                collapsible = TRUE,
                collapsed = FALSE,
                verbatimTextOutput("boxOneText")
            )
    )
  )
)

shinyApp(
  ui = dashboardPage(header, sidebar, body),
  server = function(input, output) {

    output$boxOneText <- renderText({
      paste("A test designed to provoke an emotional response")
    })

  }
)

The problem only seems to manifest itself when boxes are initially collapsed.

I have shinydashboard 0.40 installed.

Menu Button Toggle Navigation Rendering Issue

The menu button to toggle the navigation looks out of line and shows the phrase "Toggle navigation" when hovered over (see attached screen shot). I first noticed this with a webapp I'm building, so I tested it with your starter code below. It does the same thing when opened in Chrome.

menu_button_toggle_navigation_error_image

app.R

library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody()
)
server <- function(input, output) { }
shinyApp(ui, server)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.