0
내 반짝이는 응용 프로그램에 문제가 있습니다. flexdashboard
패키지에서 gauge
을 소개하기 전에 내 응용 프로그램은 valueBox
이 정상적으로 작동했습니다.R 반짝이 값 상자와 계기가 함께 작동하지 않습니다.
gauge
을 사용하면 my valueBox가 더 이상 UI에서 렌더링되지 않습니다.
다른 게시물을 읽는 중, 이것이 flexdashboard
패키지의 문제라고 생각합니다.
모든 해결 방법을 알려 주시면 감사하겠습니다. 아래
일부 재현 코드 :
library(shiny)
library(shinydashboard)
#library(flexdashboard)
ui <-dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody(
fluidRow(
valueBoxOutput("vbox1"),
column(6,box(plotOutput("plt1"),width=12,title="Gauge Graph",background ="green")),
column(6,box(plotOutput("plt2"),width=12,title="Graph2",background="yellow"))
),
fluidRow(actionButton("plot","plot"))
)
)
server <- shinyServer(function(input, output, session) {
observeEvent(input$plot,{
output$plt1 <- renderPlot({
flexdashboard::gauge(56, min = 0, max = 100, symbol = '%', label = paste("Test Label"),gaugeSectors(
success = c(100, 6), warning = c(5,1), danger = c(0, 1), colors = c("#CC6699")
))
})
output$plt2 <- renderPlot({plot(runif(100),runif(100))})
})
output$vbox1 <- renderValueBox({
valueBox(
"Gender",
input$count,
icon = icon("users")
)
})
})
shinyApp(ui = ui, server = server)
https://www.rdocumentation.org/packages/flexdashboard/versions/0.4/topics/gauge-shiny –