Click or drag to resize
IGenericObjectGetHyperCubeReducedDataAsync Method (String, IEnumerableNxPage, Int32, NxDataReductionMode, AsyncHandle)

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.

** 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.

Namespace: Qlik.Engine
Assembly: Qlik.Engine (in Qlik.Engine.dll) Version: 1.1.0.0 (1.1.0.0)
Syntax
Task<IEnumerable<NxDataPage>> GetHyperCubeReducedDataAsync(
	string path,
	IEnumerable<NxPage> pages,
	int zoomFactor,
	NxDataReductionMode reductionMode,
	AsyncHandle asyncHandle = null
)

Parameters

path
Type: SystemString
Path to the definition of the object to be selected For example, /qHyperCubeDef.
pages
Type: System.Collections.GenericIEnumerableNxPage
Array of pages.
zoomFactor
Type: SystemInt32
Defines the zoom factor. 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.
reductionMode
Type: Qlik.EngineNxDataReductionMode
Defines the reduction mode.
asyncHandle (Optional)
Type: Qlik.EngineAsyncHandle
Handle to asyncronous method request

Return Value

Type: TaskIEnumerableNxDataPage
See Also