-
Notifications
You must be signed in to change notification settings - Fork 4
Configuration
The most straightforward way to customize the Clinical Timelines is by using a configuration object whose properties describe the behavior and appearance of the chart. Since the Clinical Timelines is a Webcharts chart
object, many default Webcharts settings are set in the settings.js file as described below. Refer to the Webcharts documentation for more details on these settings.
In addition to the standard Webcharts settings several custom settings not available in the base Webcharts library have been added to the Clinical Timelines to facilitate data mapping and other custom functionality. These custom settings are described in detail below. All defaults can be overwritten by users.
The sections below describe each clinical-timelines setting as of version 1.4.0.
string
unique identifier variable name
default: "USUBJID"
string
unique identifier unit
default: "participant"
array
an array of identifier characteristic variables and associated metadata
default: none
string
undefined
default: none
string
undefined
default: none
string
event type variable name
default: "DOMAIN"
array
an array of event types displayed initially
default: none
string
initial highlighted event type
default: "null"
string
fill color of highlighted events
default: "black"
array
an array of event types and the symbols that will represent them
default: none
array
an array of event types that will be represented by the specified symbol
default: none
string
the symbol that will represent the corresponding event types
default: none
string
the direction the symbol points (only applies to triangles)
default: none
array
an array of filter variables and associated metadata
default: none
string
undefined
default: none
string
undefined
default: none
array
an array of categorical ID characteristic variables with which to group IDs
default: none
string
undefined
default: none
string
undefined
default: none
string
initial ID grouping variable
default: "null"
string
grouping annotation placement
default: "horizontal"
string
the time scale on which to plot events
default: "Date"
string
start date variable name
default: "STDT"
string
end date variable name
default: "ENDT"
array
start and stop dates with which to define the x-axis domain and which match settings.date_format
default: none
array
start and stop date ranges which populate the time range dropdown
default: none
array
start and stop dates with which to define the x-axis domain and which match settings.date_format
default: none
string
a description of the date range
default: none
string
date format of start and stop date variables
default: "%Y-%m-%d"
string
date format of x-axis
default: "%b %y"
string
start day variable name
default: "STDY"
string
end day variable name
default: "ENDY"
array
start and stop days with which to define the x-axis domain
default: none
array
start and stop day ranges which populate the time range dropdown
default: none
array
start and stop days with which to define the x-axis domain
default: none
string
a description of the day range
default: none
string
event type sequence variable name
default: "SEQ"
string
hovering over a mark displays a tooltip with the details of the event
default: "TOOLTIP"
string
ongoing event indicator variable name
default: "ONGO"
string
ongoing event indicator value
default: "Y"
string
the name of the variable that contains a ranking of vertical position at which to draw a mark
default: none
array
an array of reference timepoints and associated descriptions
default: none
string
undefined
default: none
string
undefined
default: none
boolean
by default data are exported as one record per event; this option transposes the data so each even type has two columns: start and end
default: false
number
a number that controls the the stroke width of lines and the radius of circles
default: 6
array
an array of detail listing variables and associated metadata
default: none
string
undefined
default: none
string
undefined
default: none
object
a webcharts table settings object
array
undefined
default: none
string
undefined
default: none
boolean
undefined
default: true
boolean
undefined
default: true
boolean
undefined
default: true
boolean
undefined
default: true
The object below contains each Webcharts setting as of version 1.4.0.
{
x: {
type: null, // set in syncSettings()
column: 'wc_value',
label: null, // set in syncSettings()
format: null // set in syncSettings()
},
y: {
type: 'ordinal',
column: null, // set in syncSettings()
label: null, // set in syncSettings()
sort: 'By Earliest Event',
behavior: 'flex',
grouping: null // set in syncSettings()
},
marks: [
{
type: 'line',
per: null, // set in syncSettings()
tooltip: null, // set in syncSettings()
attributes: {
'stroke-width': null, // set in syncSettings()
}
},
{
type: 'circle',
per: null, // set in syncSettings()
tooltip: null, // set in syncSettings()
radius: null, // set in syncSettings()
attributes: {
'stroke-width': null, // set in syncSettings()
}
}
],
colors: [
'#1b9e77',
'#d95f02',
'#7570b3',
'#a6cee3',
'#1f78b4',
'#b2df8a',
'#66c2a5',
'#fc8d62',
'#8da0cb'
],
color_dom: null, // set in syncSettings()
legend: {
location: 'top',
label: 'Event Type',
order: null, // set in syncSettings()
mark: 'circle'
},
range_band: 35,
margin: {
top: 60,
right: 40
}, // for second x-axis
resizable: false // can't be resizable so the multiples aren't overlapped by their titles
}