r - 绘图替换 Shiny 应用程序中先前绘图的位置
问题描述
我正在使用复选框在闪亮的应用程序主面板上绘制多个图,现在因为我的图是在我取消选中第一个复选框时选中我想要的复选框后发生的,所以第二个复选框图应该替换第一个图的位置,但不要保持固定在其上位置。我正在使用 SPLITLAYOUT 在主面板上绘制多个图。
navbarMenu("Data quality Control",
tabPanel("Item A"),
tabPanel("Item B")),
navbarMenu("Tools",
tabPanel("Item A"),
tabPanel("Item B")),
tabPanel("Calibration"),
tabPanel("Infrared_Prediction"),
sidebarLayout(
sidebarPanel(
fileInput(inputId = "fls", "Choose CSV File", multiple = F, buttonLabel = "Browse", placeholder = "No file loaded", accept = NULL),
#tags$hr(),
uiOutput("Raw"),
uiOutput("SG"),
#tags$hr(),
uiOutput("MSC"),
uiOutput("SNV"),
uiOutput("SNVDetrend"),
uiOutput("Baseline")
),
mainPanel(
fluidRow(
splitLayout(cellWidths = c("50%", "50%"), withSpinner(plotOutput("plts")), withSpinner(plotOutput("plts1"))),
splitLayout(cellWidths = c("50%", "50%"), withSpinner(plotOutput("plts2")), withSpinner(plotOutput("plts3"))),
splitLayout(cellWidths = c("50%", "50%"), withSpinner(plotOutput("plts4")), withSpinner(plotOutput("plts5")))
)
))
))
解决方案
查看 shinyjs 包,它允许您显示和隐藏带有动画的元素,这些元素可以滑动。没有可重复的例子,这是我能为你做的最好的。
推荐阅读
- android - 无法解决 Qualtrics 初始化中的错误
- regex - 如何在 MongoDB 中使用正则表达式在字符串末尾搜索单词?
- amazon-web-services - AWS boto3。如何将 EC2 实例启动到给定集群中?
- sql - Hive 使用分区连接表
- php - 如何使用 Carbon/Laravel 检查年份是否已过?
- python - 删除嵌入消息而不删除文本消息 discord.py
- python - 有没有办法从错误发生的地方继续而不是重复?
- xcode - iOS Share Extension App Group 错误在 react-native 中传递文件 URL
- c# - .Contains 在 Azure api 管理中的奇怪行为
- html - h2 元素和段落之间的行距