qHyperCubeDef
Most visualization that comes built-in with Qlik Sense are based on a hypercube definition (qHyperCubeDef) on root level. A hypercube can contain both dimensions and measures. If selections are applied to a hypercube, only the selected values are displayed.
You can have multiple hypercubes in your properties (initialProperties). This allows you to make advanced visualizations that combine several data sets. If you have multiple hypercubes, you need to place them at different paths in your property structure.
Examples
Example: Hypercube definition in Chart template
initialProperties: {
version: 1.0,
qHyperCubeDef: {
qDimensions: [],
qMeasures: [],
qInitialDataFetch: [{
qWidth: 2,
qHeight: 50
}]
}
},
Example: Multiple hypercubes definition
initialProperties : {
version : 1.0,
qHyperCubeDef : {
qDimensions : [],
qMeasures : [],
qInitialDataFetch : [{
qWidth : 10,
qHeight : 50
}]
},
second : {
qHyperCubeDef : {
qDimensions : [],
qMeasures : [],
qInitialDataFetch : [{
qWidth : 10,
qHeight : 50
}]
}
}
}
Example: Enabling numerical sorting
initialProperties : {
version : 1.0,
qHyperCubeDef : {
qDimensions : [],
qMeasures : [],
qInterColumnSortOrder : [1,0]
qInitialDataFetch : [{
qWidth : 10,
qHeight : 50
}]
}
},
Properties
Name | Type | Description |
---|---|---|
qStateName | String |
Name of the alternate state. Default is $ (current selections). |
qDimensions | Array of NxDimension |
Array of dimensions. See: NxDimension. |
qMeasures | Array of NxMeasure |
Array of measures. See: NxMeasure. |
qInterColumnSortOrder | Array of Integer. |
The order in which the columns of the hypercube should be sorted. Column numbers are separated by a comma. Example:[1,0,2] means that the first column to be sorted should be the column 1, followed by the column 0 and the column 2. If the list does not contain all columns, the order for the columns that are not in the list is the order of appearance from left to right. |
qSuppressZero | Boolean |
Removes zero values. Default is false. |
qSuppressMissing | Boolean |
Removes missing values. Default is false. |
qInitialDataFetch | Array of NxPage |
Initial data set. See: NxPage. |
qMode |
One of:
|
Defines the way the data are handled internally by the Qlik engine. Default value is S (DATA_MODE_STRAIGHT). |
qNoOfLeftDims | Integer |
Number of left dimensions. The index related to each left dimension depends on the position of the pseudo dimension (if any). |
qAlwaysFullyExpanded | Boolean |
If true, the cells are always expanded, meaning that it is not possible to collapse any cells. Default value is false. |
qMaxStackedCells | Integer | Maximum number of cells for an initial data fetch (set in qInitialDataFetch) when in stacked mode (qMode is K). |
qPopulateMissing | Boolean | If true, the missing symbols (if any) are replaced by 0 if the value is a numeric and by an empty string if the value is a string. |
NxDimension
Name | Type | Description |
---|---|---|
qLibraryId | String |
Refers to a dimension stored in the library. Information noteMandatory if qDef is not set.
Must not be set if qDef is set. |
qDef | Null or NxInlineDimensionDef |
Refers to a dimension stored in the hypercube. Information noteMandatory if qLibraryId is not set.
Must not be set if qLibraryId is set. See: NxInlineDimensionDef |
qNullSuppression | Boolean | If true, no null values are returned. |
qOtherTotalSpec | OtherTotalSpecProp |
Sets the dimension limits. Each dimension of a hypercube is configured separately. Defines if some values (grouped as Others) should be grouped together in the visualization. For example in a pie chart all values lower than 200 could be grouped together. See: OtherTotalSpecProp |
qShowAll | Boolean | If true, all dimension values are shown. |
qOtherLabel | String |
This property is used when some dimension limits are set. Label of the Others group. Default label is Others. |
qTotalLabel | String |
If this property is set, the total of the calculated values is returned. Default label is Total. |
NxMeasure
Attribute expressions do not affect the layout of an object. The sorting order is unchanged.
Name | Type | Description |
---|---|---|
qLibraryId | String |
Refers to a measure stored in the library. Information noteMandatory if qDef is not set.
Must not be set if qDef is set. |
qDef | Null or NxInlineMeasureDef. |
Refers to a measure stored in the hypercube. Information noteMandatory if qLibraryId is not set.
Must not be set if qLibraryId is set. |
qSortBy | SortCriteria |
Defines the sort criteria. This parameter is optional. The default value is sort by ascending alphabetic order. |
qAttributeExpressions | Array of NxAttrExprDef. | List of attribute expressions. |
NxPage
Name | Type | Description |
---|---|---|
qLeft | Integer |
Position from the left. Corresponds to the first column. |
qTop | Integer |
Position from the top. Corresponds to the first row |
qWidth | Integer |
Number of columns in the page. The indexing of the columns may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef). |
qHeight | Integer |
Number of rows or elements in the page. The indexing of the rows may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef). |
Learn more
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!