Skip to main content Skip to complementary content

GetHyperCubeReducedData method

Overview

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.

For example, /qHyperCubeDef.

String
qPages Array of pages.

Array of NxPage

See NxPage

qZoomFactor

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.

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.

Outputs

A data set is returned.

Name Description Type
qDataPages A data set

Array of NxDataPage

See NxDataPage

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!