r - R Shiny ValueBox 和表格布局
问题描述
我正在 R Shiny 中构建一个 UI,并在布局部分苦苦挣扎。我想将 ValueBoxes 和 Table 一起绘制。以下是当前输出,但是行与间隙一起出现。那么,您能否建议可以采取哪些措施来消除这种差距并获得所需的布局。这是代码
tabItem("overall_current_performance",
fluidRow(
column(width = 12,
valueBoxOutput("vlue", width = 3),
valueBoxOutput("vlue1", width = 3),
valueBoxOutput("win_loose", width = 3),
box(
title = "Box title", width = 3,
div(style = "height:200px"), status = "primary",
"Box content"
)
),
column(width = 12,
valueBoxOutput("performance", width = 3),
valueBoxOutput("performance1", width = 3),
valueBoxOutput("win_loose1", width = 3)
)
)
)
当前布局与行间距:
解决方案
以下更改给出了正确的布局,
column(
width = 3,
valueBoxOutput(
"vlue", width = NULL
),
valueBoxOutput(
"vlue1", width = NULL
)
),
column(width = 3,
valueBoxOutput(
"performance", width = NULL
),
valueBoxOutput(
"performance1", width = NULL
)
),
column(width = 3,
valueBoxOutput(
"win_loose", width = NULL
),
valueBoxOutput(
"win_loose1", width = NULL
)
),
column(width = 3,
box(
title = "Box title", width = NULL, div(style = "height:150px"),
status = "primary","Box content"
)
所需布局:
推荐阅读
- c++ - 为什么我的链表实现不起作用?
- flutter - 如何创建一个具有 2 种颜色的 Flutter 扁平按钮?非渐变,2 纯色并排
- linux-kernel - radeon(hd 7450)在Linux内核中的中断处理程序在哪里?
- google-cloud-platform - 同一个 GCP 项目中的 Kubeflow 管道存储访问错误?
- java - 我们如何将方向向量转换为角度?
- elasticsearch - 如何在elasticsearch中将字符附加到字符串?
- python - 如何将数据帧中的值添加到另一个数据帧以获得正确的索引?
- python - 将多列中的行移动到它们自己的列中Python
- xamarin.forms - OxyPlot.Xamarin.Forms 1.0.0 并支持 NETStandard 版本 2.0
- mongodb - 尝试为 mongodb 指定数据库路径