R/Shiny/bs4DashでValueBox
こんな感じ。
library(shiny)
library(bs4Dash)
ui <- bs4DashPage(
navbar = bs4DashNavbar(),
sidebar = bs4DashSidebar(),
body = bs4DashBody(
fluidRow(
bs4ValueBox(
value = iris$Sepal.Length[nrow(iris)],
subtitle = "Sepal.Length",
icon = "pie-chart",
status = "primary",
width = 8
),
bs4ValueBoxOutput(
outputId = "vb",
width = 4
)
)
),
controlbar = bs4DashControlbar(),
footer = bs4DashFooter(),
title = "yono2844"
)
server <- function(input, output, session) {
output$vb <- renderbs4ValueBox(expr = {
bs4ValueBox(
value = iris$Sepal.Width[nrow(iris)],
subtitle = "Sepal.Width",
icon = "car",
status = "info"
)
})
}
shinyApp(ui = ui, server = server)
Author And Source
この問題について(R/Shiny/bs4DashでValueBox), 我々は、より多くの情報をここで見つけました https://qiita.com/yono2844/items/3ac0628572606a35535d著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .