1

请先看这张图

我对我的 dygraph 高度和宽度有疑问。我成功运行了我的 flexdashboard,但图表被剪切了。我怎样才能让我的图表正确形成。
以下是我的仪表板代码。

checkboxGroupInput("type", "Choose company", 
                       choices = names(stat_xts)[-1])
renderDygraph({
    req(input$type)     
        stat_xts1 <- stat_xts[, c("year", input$type)]
           dygraph(stat_xts1, main = "EP statistics",xlab = "time") %>%
      dyHighlight(highlightCircleSize = 4,hideOnMouseOut = T,
                  highlightSeriesBackgroundAlpha = 0.5,
                  highlightSeriesOpts = list(strokeWidth = 4)) %>%
      dyOptions(drawPoints = TRUE, pointSize = 2, fillGraph = TRUE, fillAlpha = 0.2, maxNumberWidth = 12, colors = RColorBrewer::brewer.pal(7, "Dark2")) %>%
      dyRangeSelector(height = 30, strokeColor = "teel") %>%
      dyLegend(show = "onmouseover", width = 500)
  })

非常感谢。StackOverflow 很棒。

4

0 回答 0