Skip to main content Skip to complementary content

GetHyperCubeReducedData method

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 note

This 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 Mandatory Type
qPath

Path to the definition of the object to be selected. For example, /qHyperCubeDef .

Yes String
qPages

Array of pages.

Yes Array of 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.
Yes Integer
qReductionMode

Defines the reduction mode.

One of:

  • N or DATA_REDUCTION_NONE
  • D1 or DATA_REDUCTION_ONEDIM
  • S or DATA_REDUCTION_SCATTERED
  • C or DATA_REDUCTION_CLUSTERED
  • ST or DATA_REDUCTION_STACKED
Yes String

Returns

Name Description Type
qDataPages

A data set.

Array of NxDataPage

See also

Reduce the values of a chart

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!