Commit b2e216db authored by dmattek's avatar dmattek

Change: bounds for display of y-axis changed from slider to numeric fields

parent 1bfeb168
......@@ -184,7 +184,8 @@ clustHier <- function(input, output, session, in.data4clust, in.data4trajPlot) {
selected = 1)
}
})
# UI for setting lower and upper bounds for heat map colour scale
output$uiSetColBoundsLow = renderUI({
ns <- session$ns
......
......@@ -25,7 +25,17 @@ modTrajPlotUI = function(id, label = "Plot Individual Time Series") {
column(
3,
sliderInput(ns('sliPlotTrajSkip'), 'Plot every n-th point:', min = 1, max = 10, value = 1, step = 1),
uiOutput(ns('uiSlYTrim'))
checkboxInput(ns('chBsetColBounds'), 'Set bounds for y-axis', FALSE),
fluidRow(
column(6,
uiOutput(ns('uiSetColBoundsLow'))
),
column(6,
uiOutput(ns('uiSetColBoundsHigh'))
)
)
),
column(
3,
......@@ -81,7 +91,40 @@ modTrajPlot = function(input, output, session,
# UI for trimming y-axis
output$uiSlYTrim = renderUI({
output$uiSetColBoundsLow = renderUI({
ns <- session$ns
if(input$chBsetColBounds) {
loc.dt = in.data()
numericInput(
ns('inSetColBoundsLow'),
label = 'Lower',
step = 0.1,
value = floor(min(loc.dt[['y']], na.rm = T))
)
}
})
output$uiSetColBoundsHigh = renderUI({
ns <- session$ns
if(input$chBsetColBounds) {
loc.dt = in.data()
numericInput(
ns('inSetColBoundsHigh'),
label = 'Upper',
step = 0.1,
value = ceil(max(loc.dt[['y']], na.rm = T))
)
}
})
output$uiSlYTrim = renderUI({
cat(file = stderr(), 'UI uiSlYTrim\n')
loc.dt = in.data()
......@@ -218,7 +261,7 @@ modTrajPlot = function(input, output, session,
aux.label2 = if (locPos) 'pos.y' else NULL,
aux.label3 = if (locObjNum) 'obj.num' else NULL,
stat.arg = input$chBPlotTrajStat,
ylim.arg = input$slYTrim
ylim.arg = c(input$inSetColBoundsLow, input$inSetColBoundsHigh)
)
return(p.out)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment