Data
Overview
The data object represents all the results of the executed data query. Use the data object (and its child structures) to draw the data visualization.
- From version: 2020.20
Properties
isTrellis
isTrellis: boolean
Represents whether the data was divided into parts by trellis selections (either x or y). Typically used when considering the layout of the custom visual.
const isTrellis = cvApi2.resultSet.data.isTrellis;
trellisData
trellisData: TrellisData[]
The collection of each of the trellised parts of the query result set. If there was no use of the "trellis" drop zones, this will return only one element in the collection representing all the data in the query. Use index of 0.
const trellisData = cvApi2.canvas.data.trellisData[0];
Methods
getCurrentTrellisData
getCurrentTrellisData (): TrellisData
This function returns the current trellisData that is being used in the renderer event . Use it for getting the data for the currently rendered visual instance.
const currentTrellisedData = cvApi2.resultSet.data.getCurrentTrellisData();
Returns TrellisData
Current context data the render was triggered for.