Class Index | File Index

Classes


Namespace LABKEY.vis.TimeChartHelper

Namespace used to encapsulate functions related to creating study Time Charts. Used in the Chart Wizard and when exporting Time Charts as scripts.
Defined in: timeChartHelper.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<static>  
LABKEY.vis.TimeChartHelper.loadVisDependencies
Loads all of the required dependencies for a Time Chart.
Method Summary
Method Attributes Method Name and Description
<inner>  
convertSavedReportConfig(chartInfo, savedReportInfo)
Support backwards compatibility for charts saved prior to chartInfo reconfiguration (2011-08-31).
<inner>  
generateAcrossChartAxisRanges(config, data, seriesList, nounSingular)
Generates axis range min and max values based on the full Time Chart data.
<inner>  
generateAes(config, visitMap, individualColumnAliases, intervalKey, nounColumnName)
Generates the aesthetic map object needed by the visualization API to render the chart.
<inner>  
Determine whether or not the chart needs to clip the plotted lines and points based on manually set axis ranges.
<inner>  
generateIntervalKey(config, individualColumnAliases, aggregateColumnAliases, nounSingular)
Generate the x-axis interval column alias key.
<inner>  
generateLabels(mainTitle, subtitle, axisArr)
Generate the main title and axis labels for the chart based on the specified x-axis and y-axis (left and right) labels.
<inner>  
generateLayers(config, visitMap, individualColumnAliases, aggregateColumnAliases, aggregateData, seriesList, intervalKey, nounColumnName)
Generate an array of LABKEY.vis.Layer objects based on the selected chart series list.
<inner>  
generateNumberFormats(config, data, defaultNumberFormat)
Generate the number format functions for the left and right y-axis and attach them to the chart data object
<inner>  
generatePlotConfigs(config, data, seriesList, applyClipRect, maxCharts, nounColumnName)
Generates plot configs to be passed to the LABKEY.vis.Plot function for each chart in the report.
<inner>  
generateScales(config, tickMap, numberFormats)
Generates an object containing LABKEY.vis.Scale objects used for the chart.
<inner>  
Generate the list of series to be plotted in a given Time Chart.
<inner>  
generateTickMap(visitMap)
Generate that x-axis tick mark mapping for a visit based chart.
<inner>  
getAxisIndex(axes, axisName, side)
Get the index in the axes array for a given axis (ie left y-axis).
<inner>  
getChartData(config)
Get the data needed for the specified Time Chart based on the chart config.
<inner>  
getStudyMeasures(successCallback, callbackScope)
Get the set of measures from the tables/queries in the study schema.
<inner>  
If this is a container with a configured study, get the timepoint type from the study module context.
<inner>  
Verifies the information in the chart config to make sure it has proper measures, axis info, subjects/groups, etc.
<inner>  
validateChartData(data, config, seriesList, limit)
Verifies that the chart data contains the expected interval values and measure/dimension data.
Namespace Detail
LABKEY.vis.TimeChartHelper
Field Detail
<static> LABKEY.vis.TimeChartHelper.loadVisDependencies
Loads all of the required dependencies for a Time Chart.
Method Detail
<inner> convertSavedReportConfig(chartInfo, savedReportInfo)
Support backwards compatibility for charts saved prior to chartInfo reconfiguration (2011-08-31). Support backwards compatibility for save thumbnail options (2012-06-19).
Parameters:
chartInfo
savedReportInfo

<inner> generateAcrossChartAxisRanges(config, data, seriesList, nounSingular)
Generates axis range min and max values based on the full Time Chart data. This will be used when plotting multiple charts that are set to use the same axis ranges across all charts in the report.
Parameters:
{Object} config
The chart configuration object that defines the selected measures, axis info, subjects/groups, etc.
{Object} data
The data object, from getChartData.
{Array} seriesList
The list of series that will be plotted for a given chart, from generateSeriesList.
{String} nounSingular
The singular name of the study subject noun (i.e. Participant).

<inner> {Object} generateAes(config, visitMap, individualColumnAliases, intervalKey, nounColumnName)
Generates the aesthetic map object needed by the visualization API to render the chart. See LABKEY.vis.Plot and LABKEY.vis.Layer.
Parameters:
{Object} config
The chart configuration object that defines the selected measures, axis info, subjects/groups, etc.
{Object} visitMap
For visit based charts, the study visit information map.
{Array} individualColumnAliases
The array of column aliases for the individual subject data.
{String} intervalKey
The x-axis interval column alias key (i.e. Days, Weeks, etc.), from generateIntervalKey.
{String} nounColumnName
The name of the study subject noun column (i.e. ParticipantId).
Returns:
{Object}

<inner> {boolean} generateApplyClipRect(config)
Determine whether or not the chart needs to clip the plotted lines and points based on manually set axis ranges.
Parameters:
{Object} config
The chart configuration object that defines the selected measures, axis info, subjects/groups, etc.
Returns:
{boolean}

<inner> {String} generateIntervalKey(config, individualColumnAliases, aggregateColumnAliases, nounSingular)
Generate the x-axis interval column alias key. For date based charts, this will be a time interval (i.e. Days, Weeks, etc.) and for visit based charts, this will be the column alias for the visit field.
Parameters:
{Object} config
The chart configuration object that defines the selected measures, axis info, subjects/groups, etc.
{Array} individualColumnAliases
The array of column aliases for the individual subject data.
{Array} aggregateColumnAliases
The array of column aliases for the group/cohort aggregate data.
{String} nounSingular
The singular name of the study subject noun (i.e. Participant).
Returns:
{String}

<inner> {Object} generateLabels(mainTitle, subtitle, axisArr)
Generate the main title and axis labels for the chart based on the specified x-axis and y-axis (left and right) labels.
Parameters:
{String} mainTitle
The label to be used as the main chart title.
{String} subtitle
The label to be used as the chart subtitle.
{Array} axisArr
An array of axis information including the x-axis and y-axis (left and right) labels.
Returns:
{Object}

<inner> {Array} generateLayers(config, visitMap, individualColumnAliases, aggregateColumnAliases, aggregateData, seriesList, intervalKey, nounColumnName)
Generate an array of LABKEY.vis.Layer objects based on the selected chart series list.
Parameters:
{Object} config
The chart configuration object that defines the selected measures, axis info, subjects/groups, etc.
{Object} visitMap
For visit based charts, the study visit information map.
{Array} individualColumnAliases
The array of column aliases for the individual subject data.
{Array} aggregateColumnAliases
The array of column aliases for the group/cohort aggregate data.
{Array} aggregateData
The array of group/cohort aggregate data, from getChartData.
{Array} seriesList
The list of series that will be plotted for a given chart, from generateSeriesList.
{String} intervalKey
The x-axis interval column alias key (i.e. Days, Weeks, etc.), from generateIntervalKey.
{String} nounColumnName
The name of the study subject noun column (i.e. ParticipantId).
Returns:
{Array}

<inner> generateNumberFormats(config, data, defaultNumberFormat)
Generate the number format functions for the left and right y-axis and attach them to the chart data object
Parameters:
{Object} config
The chart configuration object that defines the selected measures, axis info, subjects/groups, etc.
{Object} data
The data object, from getChartData.
{Object} defaultNumberFormat

<inner> {Array} generatePlotConfigs(config, data, seriesList, applyClipRect, maxCharts, nounColumnName)
Generates plot configs to be passed to the LABKEY.vis.Plot function for each chart in the report.
Parameters:
{Object} config
The chart configuration object that defines the selected measures, axis info, subjects/groups, etc.
{Object} data
The data object, from getChartData.
{Array} seriesList
The list of series that will be plotted for a given chart, from generateSeriesList.
{boolean} applyClipRect
A boolean indicating whether or not to clip the plotted data region, from generateApplyClipRect.
{int} maxCharts
The maximum number of charts to display in one report.
{String} nounColumnName
The name of the study subject noun column (i.e. ParticipantId).
Returns:
{Array}

<inner> {Object} generateScales(config, tickMap, numberFormats)
Generates an object containing LABKEY.vis.Scale objects used for the chart.
Parameters:
{Object} config
The chart configuration object that defines the selected measures, axis info, subjects/groups, etc.
{Object} tickMap
For visit based charts, the x-axis tick mark mapping, from generateTickMap.
{Object} numberFormats
The number format functions to use for the x-axis and y-axis (left and right) tick marks.
Returns:
{Object}

<inner> {Array} generateSeriesList(measures)
Generate the list of series to be plotted in a given Time Chart. A series will be created for each measure and dimension that is selected in the chart.
Parameters:
{Array} measures
The array of selected measures from the chart config.
Returns:
{Array}

<inner> {Object} generateTickMap(visitMap)
Generate that x-axis tick mark mapping for a visit based chart.
Parameters:
{Object} visitMap
For visit based charts, the study visit information map.
Returns:
{Object}

<inner> {number} getAxisIndex(axes, axisName, side)
Get the index in the axes array for a given axis (ie left y-axis).
Parameters:
{Array} axes
The array of specified axis information for this chart.
{String} axisName
The chart axis (i.e. x-axis or y-axis).
{String} side Optional
The y-axis side (i.e. left or right).
Returns:
{number}

<inner> getChartData(config)
Get the data needed for the specified Time Chart based on the chart config. Makes calls to the LABKEY.Query.Visualization.getData to get the individual subject data and grouped aggregate data. Calls the success callback function in the config when it has received all of the requested data.
Parameters:
{Object} config
The chart configuration object that defines the selected measures, axis info, subjects/groups, etc.

<inner> getStudyMeasures(successCallback, callbackScope)
Get the set of measures from the tables/queries in the study schema.
Parameters:
successCallback
callbackScope

<inner> {String|null} getStudyTimepointType()
If this is a container with a configured study, get the timepoint type from the study module context.
Returns:
{String|null}

<inner> {Object} validateChartConfig(config)
Verifies the information in the chart config to make sure it has proper measures, axis info, subjects/groups, etc. Returns an object with a success parameter (boolean) and a message parameter (string). If the success pararameter is false there is a critical error and the chart cannot be rendered. If success is true the chart can be rendered. Message will contain an error or warning message if applicable. If message is not null and success is true, there is a warning.
Parameters:
{Object} config
The chart configuration object that defines the selected measures, axis info, subjects/groups, etc.
Returns:
{Object}

<inner> {Object} validateChartData(data, config, seriesList, limit)
Verifies that the chart data contains the expected interval values and measure/dimension data. Also checks to make sure that data can be used in a log scale (if applicable). Returns an object with a success parameter (boolean) and a message parameter (string). If the success pararameter is false there is a critical error and the chart cannot be rendered. If success is true the chart can be rendered. Message will contain an error or warning message if applicable. If message is not null and success is true, there is a warning.
Parameters:
{Object} data
The data object, from getChartData.
{Object} config
The chart configuration object that defines the selected measures, axis info, subjects/groups, etc.
{Array} seriesList
The list of series that will be plotted for a given chart, from generateSeriesList.
{int} limit
The data limit for a single report.
Returns:
{Object}

Documentation generated by JsDoc Toolkit 2.3.2 on Thu Jun 11 2020 17:30:57 GMT-0000 (UTC)