Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将Shining/flexdashboard的boxvalues中的值居中?_R_R Markdown_Flexdashboard - Fatal编程技术网

如何将Shining/flexdashboard的boxvalues中的值居中?

如何将Shining/flexdashboard的boxvalues中的值居中?,r,r-markdown,flexdashboard,R,R Markdown,Flexdashboard,我的仪表板顶部有这些框值。我想将标题和值居中对齐 为了重现您的示例,我使用了shinydashboard骨架,我将信息框放在列()中,该列位于fluidRow中。诀窍是在列中添加width=3,align=“center” library(shiny) library(shinydashboard) ui <- dashboardPage( dashboardHeader(), dashboardSidebar(), dashboardBody(fluidRow( #

我的仪表板顶部有这些框值。我想将标题和值居中对齐


为了重现您的示例,我使用了shinydashboard骨架,我将
信息框
放在
列()中,该列位于
fluidRow
中。诀窍是在列中添加
width=3,align=“center”

library(shiny)
library(shinydashboard)

ui <- dashboardPage(
  dashboardHeader(),
  dashboardSidebar(),
  dashboardBody(fluidRow(
    # A static infoBox
   column( infoBox("New Orders", 10 * 2, icon = icon("credit-card")), width = 3,align="center"),

    ),)
)

server <- function(input, output) { }

shinyApp(ui, server)
为了获得响应效果,必须放大Rmarkdown文件窗口


为了重现您的示例,我使用了shinydashboard骨架,我将
信息框
放在
列()中,该列位于
fluidRow
中。诀窍是在列中添加
width=3,align=“center”

library(shiny)
library(shinydashboard)

ui <- dashboardPage(
  dashboardHeader(),
  dashboardSidebar(),
  dashboardBody(fluidRow(
    # A static infoBox
   column( infoBox("New Orders", 10 * 2, icon = icon("credit-card")), width = 3,align="center"),

    ),)
)

server <- function(input, output) { }

shinyApp(ui, server)
为了获得响应效果,必须放大Rmarkdown文件窗口


谢谢,这是以块的形式还是在标记文件的顶部区域中编写的?您只需将其保存为常规的R文件,RStudio就会知道这是一个闪亮的应用程序。我更新了我的答案,将其显示在标记文件中。谢谢您做到了!谢谢,这是写在块中还是写在标记文件的顶部区域?您只需将其保存为常规的R文件,RStudio就会知道这是一个闪亮的应用程序。我更新了我的答案,将其显示在Rmarkdown文件中。谢谢您做到了!