我对我的dygraph高度和宽度有疑问。我成功运行了我的flexdashboard,但图表被剪切了。如何让我的图表正确形成。
以下是我的fledashboard代码。
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太棒了。