2016-11-08 5 views
1

Ich habe Probleme, die DashboardBody Ursache neu zu positionieren, wie ich auf dem Bild im Anhang zeigen, es ist Teil des TabBox-Titel schneiden. Ich habe versucht, side = "right", auch tags$style(HTML(".tab-content{width:300px}")) zu verwenden und die width = "n values" zu ändern, aber es nimmt keine Änderungen vor. Kann jemand dieses Problem lösen? Ich schätze wirklich!Wie wird der Titel der Registerkarte gespeichert?

ui <- dashboardPage(

    dashboardHeader(title="Deteccao de arvores individuais de LiDAR em Shiny App - R", titleWidth = 800), 
    dashboardSidebar(tags$style(HTML(".main-sidebar{width: 300px;}")), 
    sidebarMenu(
     menuItem("Defina seus parametros e preferencias", icon =icon("dashboard"))), 
    conditionalPanel( 
     fileInput('layer', 'Select the CHM.asc file', multiple=FALSE, accept='asc', width = "350px"), 
     selectInput("fws", "Select the size of windows to find trees", choices = c("3x3"= (fws<-3), "5x5"= (fws<-5), "7x7"= (fws<-7)), width = "350px"), 
     checkboxInput("checkbox", "Would you like to apply the smoothing model for canopy?", value = FALSE, width = "350px"), selectInput("sws", "Select the size of the smoothing window for trees", choices = c("3x3" = (sws<-3), "5x5" = (sws<-5), "7x7"=(sws<-7)), width = "350px"), 
     checkboxInput("checkp", "Plot individual trees detected in CHM", value=FALSE, width="350px"), 
     checkboxInput("checkpd", "Download the shapefile (.shp) of Individual trees detected", value = FALSE, width = "350px"), uiOutput("shapefile"), 
     actionButton("action", "RUN!")) 

    ), 

    dashboardBody( 
    fluidRow(
     tabBox(title= tagList(shiny::icon("cogs"), "Results"), width = "200px", height = "600px", side = "right", 
       tabPanel("Visualization of CHM", plotOutput("mapPlot")), 
       tabPanel("Trees detected from rLiDAR", tableOutput("arvlist"), downloadButton("downList", "Download Tree List")), 
       tabPanel("Summary of LiDAR metrics", tableOutput("sumy"), downloadButton("downSumy", "Download Summary of LiDAR metrics")), 
       tabPanel("Profile of height model", plotOutput("hist"), downloadButton("downHist", "Download Height's Histogram of Density")), #histograma de densidade 
       tabPanel("Individual trees detected - Model 2D of CHM", plotOutput("plotTrees"), downloadButton("downDetec", "Download CHM of Trees Detected")) 


       ) 


    )) 
) 

enter image description here

+0

Versuchen Sie, die Breite der 'tabBox' zu verringern. Es sieht so aus, als wäre die Breite Ihrer 'tabBox' zu groß, um in den Dashboard-Body zu passen. – SBista

+0

Hey @SBista! Ich habe versucht, das zu tun, aber es scheint, dass aus irgendeinem Grund, dass ich nicht weiß, ändert sich die Breite in der App nicht, auch wenn ich die Werte in der ui.R. Weißt du, warum? Vielen Dank! –

Antwort

0

die Breite Ändern der Trick

library(shinydashboard) 

ui <- dashboardPage(

    dashboardHeader(title="Deteccao de arvores individuais de LiDAR em Shiny App - R", titleWidth = 800), 
    dashboardSidebar(tags$style(HTML(".main-sidebar{width: 200px;}")), 
        sidebarMenu(
        menuItem("Defina seus parametros e preferencias", icon =icon("dashboard"))), 
        conditionalPanel( 
        fileInput('layer', 'Select the CHM.asc file', multiple=FALSE, accept='asc', width = "350px"), 
        selectInput("fws", "Select the size of windows to find trees", choices = c("3x3"= (fws<-3), "5x5"= (fws<-5), "7x7"= (fws<-7)), width = "350px"), 
        checkboxInput("checkbox", "Would you like to apply the smoothing model for canopy?", value = FALSE, width = "350px"), selectInput("sws", "Select the size of the smoothing window for trees", choices = c("3x3" = (sws<-3), "5x5" = (sws<-5), "7x7"=(sws<-7)), width = "350px"), 
        checkboxInput("checkp", "Plot individual trees detected in CHM", value=FALSE, width="350px"), 
        checkboxInput("checkpd", "Download the shapefile (.shp) of Individual trees detected", value = FALSE, width = "350px"), uiOutput("shapefile"), 
        actionButton("action", "RUN!")) 

), 

    dashboardBody( 
    fluidRow(
     tabBox(title= tagList(shiny::icon("cogs"), "Results"), width = "500px", height = "600px", side = "right", 
      tabPanel("Visualization of CHM", plotOutput("mapPlot")), 
      tabPanel("Trees detected from rLiDAR", tableOutput("arvlist"), downloadButton("downList", "Download Tree List")), 
      tabPanel("Summary of LiDAR metrics", tableOutput("sumy"), downloadButton("downSumy", "Download Summary of LiDAR metrics")), 
      tabPanel("Profile of height model", plotOutput("hist"), downloadButton("downHist", "Download Height's Histogram of Density")), #histograma de densidade 
      tabPanel("Individual trees detected - Model 2D of CHM", plotOutput("plotTrees"), downloadButton("downDetec", "Download CHM of Trees Detected")) 


    ) 


    )) 
) 

Hoffe, es hilft!

Verwandte Themen