Skip to content

Charts ​

The following API functions allow developers to interact with charts. For more information on how to use these functions, see the API usage page.

pageStore ​

pageStore.getChartDefinition(key) ​

Returns the chart object for a given key

Kind: static method of pageStore

ParamTypeDescription
keyStringa chart key

pageStore.getChartData(key) ​

Returns data for a given chart

Kind: static method of pageStore

ParamTypeDescription
keyStringa chart key

pageStore.getChartDataActionString(key) ​

Returns the full action string for a given chart. Useful for checking in subscriptions

Kind: static method of pageStore

ParamTypeDescription
keyStringa chart key

pageStore.getChartProps(key) ​

Returns the props for a given chart if they exist

Kind: static method of pageStore

ParamTypeDescription
keyStringa chart key

pageStore.validateChartData(data, key) ​

Validates that data is formatted correctly for the downloadCSV function (an array of objects)

Kind: static method of pageStore

ParamTypeDescription
dataanythe data to be validated. If null, it will not validate (for lifecyle)
keythe key for this data's chart

pageStore.setChartData(key) ​

Sets data for a given chart

Kind: static method of pageStore

ParamTypeDescription
keyStringa chart key

pageStore.generateCSV(key, returnFormat) ​

Generates a csv of a given table, optionally formatted through a chart's tableAdapter prop

Kind: static method of pageStore

ParamTypeDescription
keyStringa chart key
returnFormatStringformat to generate the CSV in

pageStore.downloadCSV(key) ​

Downloads a csv of a given table, optionally formatted through a chart's tableAdapter prop. If a chartTitle prop exists, the csv will be generated using that as the file name

Kind: static method of pageStore

ParamTypeDescription
keyStringa chart key