Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy Q: function/resource to find out what settings are needed for specific charts in the library? #119

Closed
MayaGans opened this issue Aug 5, 2022 · 2 comments

Comments

@MayaGans
Copy link
Contributor

MayaGans commented Aug 5, 2022

Im struggling to find the mandatory mappings for aeTimeline and my mental model was that if I shove in my data here I'd get the settings object I need and then can back fill the NULLs with my column names, but it looks like this function only gives me colors and highlight

safetyCharts::init_aeTimelines(mydata, list())

Based on AEtimelines.js looks like I also need id_col, seq_col, stdy_col, endy_col, and term_col as well? Im sure this was intentional to leave out of the init function but I was curious how you'd anticipate a dev to just make this single widget/what that workflow looks like assuming they (read I) am naïve about the mappings needed? I bet this is all written down somewhere just figured I'd share my wacky workflow and expose some design questions, but I totally realize I am most likely using this package in unintended ways 😈

Thanks for always entertaining my musings!!

@samussiah
Copy link
Contributor

Great question @MayaGans - it's not immediately apparent to me where to find the required renderer configurations either and I'm not sure we have documentation. The column mappings live in safetyCharts::meta_aes, a data frame, but the renderer settings should be a list:

mapping <- safetyCharts::meta_aes %>%
    dplyr::pull(standard_sdtm) %>% # or standard_adam for ADaM data
    as.list %>%
    rlang::set_names(safetyCharts::meta_aes$text_key)

Once you have the mapping you can call render_widget with your data:

render_widget('aeTimelines', data, mapping)

Added a few issues: #120, #121, #122, #123

@jwildfire
Copy link
Contributor

There's no way to know this now without going to look at the requirements in the js library, BUT I have a PR in safetyGraphics that adds an (optional) dataspec parameter in the chart object, that lists required mapping elements.

  • PR
  • Issue with discussion on approach

Still a bit of work needed (see #111) to get this fully implemented, but I'm picking up work on this again now, and planning to release sometime in the next few months.

@jwildfire jwildfire closed this as not planned Won't fix, can't repro, duplicate, stale Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants