insightsengineering / goshawk

Functions that plot and summarize biomarkers/labs of interest
https://insightsengineering.github.io/goshawk/
Other
5 stars 1 forks source link

All Functions Legend: Filtered levels #191

Closed npaszty closed 1 year ago

npaszty commented 1 year ago

What happened?

2022_10_13 filtering an AMR level out does not remove it from the legend. this is unexpected/undesirable image

2022_06_09 filtering an AMR level out does remove it from the legend. this is expected and desirable image

sessionInfo()

see sample app behavior on rsconnect.roche.com. no session info available but here is text I copied out of the interface.

2022_10_13
Created Oct 14, 2022 11:41am (GMT-08:00) Last Deployed Oct 14, 2022 11:41am (GMT-08:00)
Shiny application
GUID 67055b29-c05c-44f9-8108-6632446a0707
R version 4.1.1

2022_06_09
Created Jun 9, 2022 3:13pm (GMT-08:00) Last Deployed Jun 9, 2022 3:58pm (GMT-08:00)
Shiny application
GUID 3b221526-03e5-4009-9aed-410e7f554bcb
R version 4.0.3

Relevant log output

no log output accessible from sample apps given my account was not used to publish.

Code of Conduct

Contribution Guidelines

Security Policy

npaszty commented 1 year ago

@donyunardi can we get a status on this issue. we are on the cusp of deploying another Lupus data mart with it's specific app that includes the goshawk package.

donyunardi commented 1 year ago

Using teal families at main, I can't reproduce the error and the legend behaves correctly:

image

We plan to release teal framework this increment and once we do, we need to find a way on how BEE user can bring the latest version to BEE.

donyunardi commented 1 year ago

Upon discussion with @chlebowa, the issue seems to be with ggplot2. I tested and confirmed this using 2022_10_13 snapshot. Once I got the latest ggplot2, the legend is behaving as expected.

Solution is to install ggplot2 in your R libraries and call it specifically in the beginning of your app when using the 2022_10_13 snapshot:

library(ggplot2, lib.loc = "<path to your local R library>")
chlebowa commented 1 year ago

I talked to IDR about this some time ago, maybe nudge them again?

donyunardi commented 1 year ago

Sure, let's handle this internally. Communicated solution with OP and it works. Closing issue.