【问题标题】:How do I make my charts full screen in flexdashboards?如何让我的图表在 flexdashboards 中全屏显示?
【发布时间】:2019-12-17 22:10:43
【问题描述】:

我有这两张图表。它们填满了屏幕的一部分。

如何让它们填满整个屏幕?

我已经用这个配置代码设置了它

---
title: "Untitled"
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
---

然后使用此设置定义图表

Overview
=====================================  

Column 
-----------------------------------------------------------------------

    chart

Column 
-----------------------------------------------------------------------

    chart

【问题讨论】:

  • 如果你使用 {ggplot2},你将不得不修改每个块的大小。正如 RStudio 在这里提到的,“基于 htmlwidget 的图表非常适合与 flexdashboard 一起使用,因为它们可以动态地调整自身大小,因此几乎总是可以完美地适应其 flexdashboard 容器的范围。” rmarkdown.rstudio.com/flexdashboard/using.html#sizing
  • 我正在为我的图表使用 plotly
  • 你可以试试这个:` Column {style = "data-width: 50%;"} `

标签: r plotly flexdashboard


【解决方案1】:

您可以将您的 plotly 对象放在 plotly 函数 renderPlotly() 中。这个动态调整图表的大小到页面大小。在这篇博文中查看并举例说明我是如何使用它的: https://medium.com/analytics-vidhya/shiny-dashboards-with-flexdashboard-e66aaafac1f2

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-11-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-22
    • 1970-01-01
    相关资源
    最近更新 更多