Conversation
xni7
left a comment
There was a problem hiding this comment.
@jwildfire , changing the meta data AVISIT and AVISITN does not seem to be sufficient. For example, safetyOutlierExplorer widget cannot render in the following function call, even if the visit_col and visitn_col are correctly mapped to AVISIT and AVISITN.
safetyGraphicsApp(
domainData=list(
labs=safetyGraphics::labs %>% select(-VISIT, -VISITNUM),
aes=safetyGraphics::aes,
dm=safetyGraphics::dm
),
meta = safetyGraphics::meta,
charts=NULL,
mapping=NULL,
chartSettingsPaths = NULL)The issue is safetyOutlierExplorer htmlwidget is expecting a list of time_cols in the settings, which is not found in the current meta data. The workaround is to use the init() function in YAML workflow. Not sure if time_cols is general enough to add to the global meta data, or we could create a safetyOutlierExplorer shiny module wrapper and add it there?
safetyOutlierExplorer_init<- function(data, settings){
print(data)
print(settings)
settings$time_cols <- data_frame(
value_col = c(settings[["visit_col"]], settings[["studyday_col"]]),
type = c("ordinal", "linear"),
order_col = c(settings[["visitn_col"]] , "null"),
rotate_tick_labels = c(T,F),
vertical_space = c(100,0)
)
return(list(data=data,settings=settings))
}|
Hmm, I think it makes sense that it's breaking. Hardcoding here was making this work in v1.0. Still a bit confused why this is rendering in the default build. At any rate, I'll clean this up and ping you for review. |
|
Ok, figured out why default renderer works. |
|
OK - I think this is fixed - for real this time. Try running with this branch and the |
xni7
left a comment
There was a problem hiding this comment.
Looks good, in reference to SafetyGraphics/safetyCharts#41
@xni7 Updated the metadata as discussed in #465. Let me know if the widgets render out of the box with the update.
fix #465.