Gilead-BioStats / gsm

Good Statistical Monitoring R Package
https://gilead-biostats.github.io/gsm/
Apache License 2.0
39 stars 9 forks source link

Closes #1882 adds a toggle to display past year or full data #1931

Closed zdz2101 closed 1 week ago

zdz2101 commented 2 weeks ago

Overview

Create multiple table/gt objects in Widget_FlagOverTime() to then feed in to the JS script Modify JS script toggle between the two objects

Reprex:

devtools::install_github("Gilead-Biostats/gsm", ref = "fix-1882")
library(dplyr)
library(gsm)

reportingResultsSubset <- dplyr::filter(
  reportingResults,
  GroupID %in% head(unique(reportingResults$GroupID))
)
reportingResultsSubset2 <- reportingResultsSubset %>%
  mutate(SnapshotDate = SnapshotDate + 365)

reportingResultsSubset3 <- bind_rows(
  reportingResultsSubset2,
  reportingResultsSubset
)

Widget_FlagOverTime(
  dfResults = reportingResultsSubset3,
  dfMetrics = reportingMetrics
)

image image

lauramaxwell commented 2 weeks ago

Not sure exactly what the issue is, but the dropdown filter menu is no longer filtering the table properly

lauramaxwell commented 2 weeks ago

@zdz2101 / @samussiah - I was still seeing an issue with the subset dropdown. part of it had to do with recent hex code changes in rbm-viz, but haven't totally fixed it. see most recent commit to see what I've done so far. I'm also ok with pushing this to another PR if it's out of scope here.

lauramaxwell commented 2 weeks ago

Figured out the last piece to be able to close #1935 via js. I think everything is looking good now, but @zdz2101 take a look!

zdz2101 commented 1 week ago

looking good! since i made edits, i won't merge, but i'm done fiddling with the toggle and i think this is ready to go!

Certainly improved from before, works for me