Skip to content

Commit 27885ad

Browse files
committed
Resolve conflicts on merge with latest test branch
Merge branch 'test' into 318005-legend-loss # Conflicts: # NEWS.md
2 parents 27cf541 + 9f180c7 commit 27885ad

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: dv.papo
22
Title: Patient Profile
3-
Version: 2.1.1-9000
3+
Version: 2.1.1-9001
44
Authors@R:
55
c(person("Boehringer-Ingelheim Pharma GmbH & Co.KG", role = c("cph", "fnd")),
66
person(given = "Korbinian",

NEWS.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
# dv.papo 2.1.1-9000
1+
# dv.papo 2.1.1-9001
22

33
- Fixed issue where setting analysis_indicator to NULL caused loss of plot legend.
44

5+
# dv.papo 2.1.1-9000
6+
7+
- Fixed issue with plot displays when POSIXt date-time variables used for the timeline limits.
8+
59
# dv.papo 2.1.1
610

711
- Remove early error feedback for trt_end is NA

R/mod_plots.R

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,19 +158,19 @@ patient_plot_server <- function(id, subject_var,
158158
# Compute plots ----
159159

160160
timeline_limits <- local({ # start...end, but takes icf and part_end dates into account if available
161-
min_total <- subject_level_dataset[[timeline_info[["trt_start_date"]]]]
161+
min_total <- sl_info[["trt_start_date"]]
162162
if ("icf_date" %in% names(timeline_info)) {
163-
icf_date <- subject_level_dataset[[timeline_info[["icf_date"]]]]
163+
icf_date <- sl_info[["icf_date"]]
164164
if (is.finite(icf_date)) min_total <- icf_date
165165
}
166166

167167
max_total <- as.Date(-Inf)
168-
trt_end_date <- subject_level_dataset[[timeline_info[["trt_end_date"]]]]
168+
trt_end_date <- sl_info[["trt_end_date"]]
169169
if (is.finite(trt_end_date)) {
170170
max_total <- trt_end_date
171171
}
172172
if ("part_end_date" %in% names(timeline_info)) {
173-
part_end_date <- subject_level_dataset[[timeline_info[["part_end_date"]]]]
173+
part_end_date <- sl_info[["part_end_date"]]
174174
if (is.finite(part_end_date)) max_total <- part_end_date
175175
}
176176
if (!is.finite(max_total)) max_total <- Sys.Date()
@@ -180,10 +180,11 @@ patient_plot_server <- function(id, subject_var,
180180

181181
x_limits <- local({ # we need to compute combined limits first because ggplot+plotly need them before layout calculation
182182
# the +/-1 avoids clipping the left and right arrows on the plot
183-
diff <- timeline_limits[[2]] - timeline_limits[[1]]
184-
offset_left <- min(-1L, round(-diff / 10))
185-
offset_right <- max(1L, round(diff / 10))
186-
c(timeline_limits[[1]] + offset_left, timeline_limits[[2]] + offset_right)
183+
timeline_limit_lower <- timeline_limits[[1]]
184+
timeline_limit_upper <- timeline_limits[[2]]
185+
diff <- timeline_limit_upper - timeline_limit_lower
186+
offset <- max(1L, round(diff / 10))
187+
c(timeline_limit_lower - offset, timeline_limit_upper + offset)
187188
})
188189

189190
plot_list <- local({

0 commit comments

Comments
 (0)