小编use*_*305的帖子

如何将ggvis图表限制在他们的shinydashboard框和列中?

我没有发现任何与我的问题和关键字一致的内容.我无法将ggvis图表限制在他们给定的shinydashboard区域.示例应用程序(Windows 7)显示三个ggvis图,每个图超过其各自仪表板框和列的右边框 - 除非窗口非常宽.

思考?

library(shiny)
library(shinydashboard)
library(ggvis)

ui <- dashboardPage(
  dashboardHeader(title = "Basic dashboard"),
  dashboardSidebar(),
  dashboardBody(
    # Boxes need to be put in a row (or column)
    fluidRow(
      box(
          width = 4,
          title = "fred",
          ggvisOutput("plot1")
      ),

      box(
        width = 4,
        title = "george",
        ggvisOutput("plot2")
      ),

      box(
        width = 4,
        title = "harold",
        ggvisOutput("plot3")
      )
    )
  )
)

server <- function(input, output) {
  mtcars %>%
    ggvis(~wt, ~mpg) %>%
    layer_points() %>%
    bind_shiny("plot1")

  mtcars %>%
    ggvis(~cyl, ~mpg) %>%
    layer_points() %>%
    bind_shiny("plot2") …
Run Code Online (Sandbox Code Playgroud)

shiny ggvis shinydashboard

2
推荐指数
1
解决办法
359
查看次数

标签 统计

ggvis ×1

shiny ×1

shinydashboard ×1