由网友(转角遇上抢劫的。)分享简介:我的客户希望我创建一个包含以下图标的shinydashboard:有谁知道类似的图标或shiny/shinydashboard中允许我将数字放在圆圈中间的任何内容?推荐答案如果只是关于图标,您可以在这里找到:https://fontawesome.com/icons/circle?style=regular但是如果你...![仪表板图片大全 仪表板素材免费下载 千库网png 第4页](https://p.xsw88.cn/allimgs/daicuo/20230903/4386.png)
我的客户希望我创建一个包含以下图标的shinydashboard
:
![仪表板图片大全 仪表板素材免费下载 千库网png 第4页](https://p.xsw88.cn/allimgs/daicuo/20230903/4386.png)
有谁知道类似的图标
或shiny
/shinydashboard
中允许我将数字放在圆圈中间的任何内容?
推荐答案
如果只是关于图标,您可以在这里找到:
https://fontawesome.com/icons/circle?style=regular
但是如果你想在里面显示一个数字,你可以用普通的css来实现。
library(shiny)
ui <- fluidPage(
titlePanel("Circle"),
sidebarLayout(
sidebarPanel(
includeCSS("www/style.css"),
sliderInput("bins",
"Number of bins:",
min = 1,
max = 50,
value = 30)
),
# Show a plot of the generated distribution
mainPanel(
tags$div(id="insidediv", textOutput("slideroutput"))
)
)
)
# Define server logic required to draw a histogram
server <- function(input, output) {
output$slideroutput <- renderText({
input$bins
})
}
# Run the application
shinyApp(ui = ui, server = server)
css文件:
#insidediv {
background-color:#fff;
border:4.5px solid grey;
height:100px;
border-radius:50%;
-moz-border-radius:50%;
-webkit-border-radius:50%;
width:100px;
}
#slideroutput {
padding-top: 30px;
padding-bottom: 30px;
text-align: center;
font-weight: bold;
font-size: 24px;
}
相关推荐
最新文章