Reduces the data of a bar chart, a line chart or a scatter plot chart and retrieves them.
The reduction is dependent on the zoom factor (parameter qZoomFactor) and on the reduction mode.
Information noteThis method can be used to create mini charts.
Bar chart or line chart data reduction
For the data reduction to happen, the following conditions must be fulfilled:
The values cannot fit in the defined page (parameter qPages).
The zoom factor is not 0 (parameter qZoomFactor).
The reduction mode must be set to D1.
The reduction algorithm keeps the shape of the visualizations and works whatever the number of dimensions in the chart. The global profile of the chart is reduced, and not only a specific dimension. A visualization that has been reduced contains fewer values but its shape is the same. Data of all types can be reduced. Therefore it is hard to relate the values before and after a reduction especially when reducing string values.
Example:
If you have a chart with 1 million data, and you have set the zoom factor to 5, the GetHyperCubeReducedData method reduces the chart and retrieves 200 000 data.
Scatter plot chart data reduction
The reduction mode must be set to C.
This reduction mechanism follows the 2D K-Means algorithm. Data are reduced into a number of clusters. Each data is assigned to a specific centroid.
The number of centroids can be defined in the parameter qZoomFactor.
Scatter plot chart resolution reduction
The reduction mode must be set to S.
The resolution is reduced according to the zoom factor (parameter qZoomFactor).
Example:
If you have a scatter plot chart and the zoom factor is set to 2, the scatter plot chart resolution is reduced by 4.
Parameters
Name
Description
Type
qPath
Path to the definition of the object to be selected.
If set to -1, the engine decides of the zoom factor.
• If the reduction mode is D1 or S, the zoom factor is 2ⁿ. If the zoom factor is 5, the data are reduced by a factor 32.
• If the reduction mode is C, the zoom factor defines the number of centroids.
Integer
qReductionMode
Defines the reduction mode.
One of:
N for no data reduction.
D1 to reduce a bar chart or line chart. The profile of the chart is reduced whatever the number of dimensions in the chart.
S to reduce the resolution of a scatter plot.
C to reduce the data of a scatter plot chart.
ST to reduce the data of a stacked pivot table.
Name
Description
Type
qLeft
Position from the left.
Corresponds to the first column.
Integer
qTop
Position from the top.
Corresponds to the first row.
Integer
qWidth
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).
Integer
qHeight
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).
Is used for hypercube objects with multiple dimensions. It might happen that due to the window size some elements in a group cannot be displayed in the same page as the other elements of the group. Elements of a group of dimensions can be part of the previous or the next tail.
If there is no tail, the array is empty [ ].
Array of NxGroupTail
qArea
Size and offset of the data in the matrix.
Rect
qIsReduced
Is set to true, if the data have been reduced.
The default value is false.
Boolean
Name
Description
Type
NxCellRows
Array of data.
Array of NxCell
Name
Description
Type
qText
Some text.
This parameter is optional.
String
qNum
A value.
This parameter is optional.
Double precision floating point
qElemNumber
Rank number of the value, starting from 0.
If the element number is a negative number, it means that the returned value is not an element number.
You can get the following negative values:
-1: the cell is a Total cell. It shows a total.
-2: the cell is collapsed. Applies to pivot tables.
-3: the cell belongs to the group Others.
-4: the cell is empty. Applies to pivot tables.
Integer
qState
State of the value.
The default state for a measure is L.
One of:
L for Locked
S for Selected
O for Optional
D for Deselected
A for Alternative
X for eXcluded
XS for eXcluded Selected
XL for eXcluded Locked
qIsEmpty
Is set to true, if qText and qNum are empty.
This parameter is optional. The default value is false.
Boolean
qIsTotalCell
Is set to true if a total is displayed in the cell.
This parameter is optional. The default value is false.
Not applicable to list objects.
Boolean
qIsOtherCell
Is set to true if the cell belongs to the group Others.
Dimension values can be set as Others depending on what has been defined in OtherTotalSpecProp.
This parameter is optional. The default value is false.
Not applicable to list objects.
Boolean
qFrequency
Frequency of the value.
This parameter is optional.
String
qHighlightRanges
Search hits.
The search hits are highlighted.
This parameter is optional.
Null or NxHighlightRanges
qAttrExps
Attribute expression values.
Null or NxAttributeExpressionValues
qIsNull
Is set to true if the value is Null.
Boolean
Name
Description
Type
qRanges
Ranges of highlighted values
Array of CharRange
Name
Description
Type
qCharPos
Position of the first search occurrence
Integer
qCharCount
Number of occurrences found
Integer
Name
Description
Type
qValues
List of attribute expressions values.
Array of NxSimpleValue
Name
Description
Type
qText
Text related to the attribute expression value.
This property is optional. No text is returned if the attribute expression value is a numeric.
String
qNum
Numeric value of the attribute expression.
This property is set to NaN (Not a Number) if the attribute expression value is not a numeric.
Numerical values are not returned as text.
Double precision floating point
Name
Description
Type
qUp
Number of elements that are part of the previous tail.
This number depends on the paging, more particularly it depends on the values defined in qTop and qHeight
This parameter is optional. Is not shown if the value is 0.
Integer
qDown
Number of elements that are part of the next tail.
This number depends on the paging, more particularly it depends on the values defined in qTop and qHeight
This parameter is optional. Is not shown if the value is 0.
Integer
Name
Description
Type
qLeft
Position from the left.
Corresponds to the first column.
Integer
qTop
Position from the top.
Corresponds to the first row.
Integer
qWidth
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).
Integer
qHeight
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).