这是此Color an area with a sliderInput in a闪亮应用程序的后续问题
假设我有这个图像:
我如何将@ismirsehregal 的解决方案应用于这张图片。我想我必须把食道的x和y放到代码中,但我不知道如何获取食道的x和y(图中绿色):
library(shiny)
library(plotly)
library(shinyWidgets)
DF <- data.frame(
x = c(cos(seq(0.01, 10, 0.01)) * 1000:1 + 1000, cos(seq(0.01, 10, 0.01)) * 1000:1 + 1500),
y = rep(1:1000, 2),
id = c(rep("trace_1", 1000), rep("trace_2", 1000))
)
ui <- fluidPage(
br(),
column(
2,
noUiSliderInput(
inputId = "noui2",
label = "Slider vertical:",
min = 0,
max = 1000,
step = 50,
value = c(100, 400),
margin = 100,
orientation = "vertical", …Run Code Online (Sandbox Code Playgroud)