Skip to content

safetyOutlierExplorer and safetyResultsOverTime widgets initialization #465

@xni7

Description

@xni7

@jwildfire , I tried an ADaM dataset with AVISIT and AVISITN columns, but couldn't render safetyOutlierExplorer or safetyResultsOverTime widgets. The value "VISIT" for the this.config.x.column setting does not match any column in the provided dataset.

After referring to their JS Data Guidelines, two widgets requires other metadata/mapping than visit_col and visitn_col.

Two considerations

mappingLabs$time_cols <- data.frame(
  value_col = c("AVISIT", "ADY"),
  type = c("ordinal", "linear"),
  order_col = c("AVISITN" , "null"),
  rotate_tick_labels = c(T,F),
  vertical_space = c(100,0)
)
  • Add widget init function in config/workflow. The Chart Config Vignette is really helpful! I followed the aeExplorer_init() example and created a custom workflow for safetyOutlierExplorer_init() function and added to its YAML. It worked like a charm!
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))
}

Comments

  • I think the widget initialization is "hidden" in the code backend, and users need to familiar with the JavaScript Data Specifications. It will be challenging for non technical users.
  • Some of the widget JS settings are not in the meta data, perhaps consider some chart specific control UIs using Shiny on those charts?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions