R 闪亮进度框
R Shiny Progress Box
我正在开发一个闪亮的应用程序,并且已经实现了我的进度条,并在我的 CSS 中使用 .progress
、.progess-bar
和 .progress-text
对其进行了修改。我几乎得到了我想要的,但我只需要去掉带有 x 的灰色弹出框(见附图)。
我尝试了多种不同的 CSS 组合,但都没有成功。有人知道这个盒子的 CSS ID 吗?
示例:
ui:
ui <- shinyUI(fluidPage(
includeCSS("www/styles.css"),
plotOutput('plot', width = "300px", height = "300px"),
actionButton('goPlot', 'Go plot')
))
服务器:
server <- function(input, output) {
output$plot <- renderPlot({
input$goPlot
dat <- data.frame(x = numeric(0), y = numeric(0))
withProgress(message = 'Making plot', value = 0, {
n <- 1000
for (i in 1:n) {
dat <- rbind(dat, data.frame(x = rnorm(1), y = rnorm(1)))
incProgress(1/n, detail = paste("Doing part", i))
}
})
plot(dat$x, dat$y)
})
}
css
.progress{
position:fixed;
bottom:50px;
left:25%;
width:50%;
}
.progress-bar{
background-color:#000;
}
.progress-text{
position:fixed;
bottom:60px;
left:25%;
font-size:25px;
}
您可以将此添加到您的 CSS,它会隐藏通知:
.shiny-notification{
position:fixed;
left:-100px;
width:0px;
}
我正在开发一个闪亮的应用程序,并且已经实现了我的进度条,并在我的 CSS 中使用 .progress
、.progess-bar
和 .progress-text
对其进行了修改。我几乎得到了我想要的,但我只需要去掉带有 x 的灰色弹出框(见附图)。
我尝试了多种不同的 CSS 组合,但都没有成功。有人知道这个盒子的 CSS ID 吗?
示例:
ui:
ui <- shinyUI(fluidPage(
includeCSS("www/styles.css"),
plotOutput('plot', width = "300px", height = "300px"),
actionButton('goPlot', 'Go plot')
))
服务器:
server <- function(input, output) {
output$plot <- renderPlot({
input$goPlot
dat <- data.frame(x = numeric(0), y = numeric(0))
withProgress(message = 'Making plot', value = 0, {
n <- 1000
for (i in 1:n) {
dat <- rbind(dat, data.frame(x = rnorm(1), y = rnorm(1)))
incProgress(1/n, detail = paste("Doing part", i))
}
})
plot(dat$x, dat$y)
})
}
css
.progress{
position:fixed;
bottom:50px;
left:25%;
width:50%;
}
.progress-bar{
background-color:#000;
}
.progress-text{
position:fixed;
bottom:60px;
left:25%;
font-size:25px;
}
您可以将此添加到您的 CSS,它会隐藏通知:
.shiny-notification{
position:fixed;
left:-100px;
width:0px;
}