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
Param | Type | Description |
---|---|---|
key | String | a chart key |
pageStore.getChartData(key)
Returns data for a given chart
Kind: static method of pageStore
Param | Type | Description |
---|---|---|
key | String | a chart key |
pageStore.getChartDataActionString(key)
Returns the full action string for a given chart. Useful for checking in subscriptions
Kind: static method of pageStore
Param | Type | Description |
---|---|---|
key | String | a chart key |
pageStore.getChartProps(key)
Returns the props for a given chart if they exist
Kind: static method of pageStore
Param | Type | Description |
---|---|---|
key | String | a 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
Param | Type | Description |
---|---|---|
data | any | the data to be validated. If null, it will not validate (for lifecyle) |
key | the key for this data's chart |
pageStore.setChartData(key)
Sets data for a given chart
Kind: static method of pageStore
Param | Type | Description |
---|---|---|
key | String | a 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
Param | Type | Description |
---|---|---|
key | String | a chart key |
returnFormat | String | format 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
Param | Type | Description |
---|---|---|
key | String | a chart key |