Skip to content

Configuration

jwildfire edited this page Oct 20, 2017 · 9 revisions

Overview

The most straightforward way to customize an Safety Explorer Suite is by using a settings object whose properties describe the renderers. All defaults can be over-written by users when creating an AE Explorer.

settings

object

an object passed to safetyExplorerSuite() which controls the settings and appearance of the output.

settings.title

string

Optional title (e.g. study name) to be displayed in large text (using <h1> tag) above the nav.

** default:** null

settings.instructions

string

Optional instructions to be displayed in small text (using <small> tag) above the nav.

** default:** null

settings.renderers

array or string

An array listing which safety explorer renderers to include in the output. All available renderers are included by default. valid options are:

  • "aeexplorer"
  • "ae-timelines"
  • "safety-histogram"
  • "safety-outlier-explorer"
  • "safety-shift-plot"
  • "safety-results-over-time"
  • "paneled-outlier-explorer"

default: null

settings.chartSettings

object

An object defining the settings for the various charts in the safety explorer. There are several ways to configure settings:

  • By default, all charts are created using their defaults settings (typically an empty object {}).
  • Users can provide custom settings as a json object
  • Users can identify the location of an external settings object to be loaded (Note that external settings overwrite custom settings if both are provided)

Both custom and external settings must be specified as an array of objects, and each object must have a renderer_name field matching an option in settings.renderers in the object. For example, the settings object below would add a site filter for the outlier explorer, while all other charts would use their default values.

var settings =  {
  chartSettings:{
    custom:[
      {
        renderer_name:"safety-outlier-explorer",
        filters:[{value_col:"site_name", label:"Site"}]
      {
    ]
  }
}

default: null

chartSettings.custom

array of objects

An array with one settings objects per renderer. The renderer should be specified with a required renderer_name field.

chartSettings.path

object

An object specifying the location of an array of objects (as described in chartSettings.custom above) to be loaded. The object has path field and a file field. If path is not specified, the \lib directory is used. If path is specified, chartSettings.custom is ignored.

settings.custom_settings

array of object

This setting has been deprecated in v0.4.0; it now automatically maps to chartSettings.custom

Clone this wiki locally