【发布时间】:2018-11-15 16:13:46
【问题描述】:
我在闪亮的仪表板中使用plotly 和ggplot 在tabPanel 中呈现条形图。下面是我在 UI 部分的 tabPanel 上的代码。
tabBox(width =12, id = "plot4", height = "320px", selected = "FarmInputs",
tabPanel("FarmInputs", plotlyOutput("inputsPlot", height = "auto"))
)
我也在 tabPanel 中试过这个
tabPanel("FarmInputs", plotlyOutput("inputsPlot"),height = "320px")
在服务器函数中
renderPlotly({
ggplot(aes(var,value))+geom_bar(stat="Identity")+coord_flip()+theme_gdocs()
})
如屏幕截图所示,绘图呈现在所需的 tabPanel 高度之外。如何控制绘图的高度以使其在 tabPanel 中呈现精确?
【问题讨论】:
标签: r ggplot2 shiny shinydashboard r-plotly