How can I set decimal width for a column in R Shiny?(如何设置R闪亮中的列的小数宽度?)
本文介绍了如何设置R闪亮中的列的小数宽度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在我的R闪亮仪表板中为column()
元素设置小数宽度。例如,我需要5列,因此需要每列2.4的宽度。
有办法吗?
推荐答案
SHINY的列宽基于Bootstrap 12-wide grid system。您只能指定整数。但是,您可以nest multiple columns实现细粒度布局。
以下是有关嵌套列的示例:
library(shiny)
ui <- fluidPage(fluidRow(
p(),
column(4, p(), style = "background-color: red;"),
column(4, p(), style = "background-color: green;"),
column(
4,
column(4, p(), style = "background-color: red;"),
column(7, p(), style = "background-color: green;"),
column(1, p(), style = "background-color: blue;")
),
))
server <- function(input, output, session) {}
shinyApp(ui, server)
作为替代方案,您可能需要选中?splitLayout
,该选项接受css单位:
library(shiny)
ui <- fluidPage(splitLayout(
p("red", style = "background-color: red;"),
p("green", style = "background-color: green;"),
p("blue", style = "background-color: blue;"),
p("yellow", style = "background-color: yellow;"),
p("orange", style = "background-color: orange;"),
cellWidths = "20%"
))
server <- function(input, output, session) {
}
shinyApp(ui, server)
这篇关于如何设置R闪亮中的列的小数宽度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
沃梦达教程
本文标题为:如何设置R闪亮中的列的小数宽度?


基础教程推荐
猜你喜欢
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
- 每次设置弹出窗口的焦点 2022-01-01
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01