Home | Sign in | English UK

  • When should the aggregation be used?
  • Aggregation and type of charts
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
grColumnAggregation (Function)
In french: grHistoAgrégation
Defines the algorithm for aggregating data in a clustered or stacked Column chart.
// Code of Radio Button control used to select the aggregation type
// Store the selected type of aggregation
let nAggregation = SWITCH (RADIO_AggregationType, grhaNone, grhaMax, grhaMin, grhaMean, grhaSum)
// Apply the aggregation
grColumnAggregation(CHART_Chart, nAggregation)
// Redraw the example
grColumnAggregation(<Chart name> , <Algorithm>)
<Chart name>: Character string (with or without quotes)
Name of chart to use. This name corresponds to:
  • the chart name defined by programming with grCreate.
  • the name of Chart control (found in the window editor, page editor or report editor).
<Algorithm>: Integer constant
Aggregation algorithm to use:
grhaNoneNo aggregation.
grhaMaxAggregation according to the maximum of data.
grhaMinAggregation according to the minimum of data.
grhaMeanAggregation according to the mean of data.
grhaSumAggregation according to the sum of data.

When should the aggregation be used?

When displaying a Column chart, the bars may become too small to be displayed. This is the case for the charts presenting a time scale. In this case, it becomes necessary to display a bar whose minimum size is the size of a mark and aggregating the data of all potential bars found in this mark.

Non-aggregated Column chart

Column chart aggregated according to the mean

Aggregation and type of charts

  • For the charts without time scale, the aggregation is not enabled by default.
  • For the charts with time scale, the default aggregation is the sum of columns.
Related Examples:
WD Chart Training (WINDEV): WD Chart
[ + ] This example shows the different uses of the chart control.
The following charts are presented:
- Semi-circular
- Donut
- Pie
- Sunburst
- Line
- Scatter
- 3D Scatter
- Column
- Area
- Bubble
- Radar
- Funnel
- Surface
- Waterfall
- Composite
- Comparative

The main features presented in this example are the customization of charts by programming, as well as the method used to fill a chart from an HFSQL file or in the editor.
Component : wd250grf.dll
Minimum version required
  • Version 23
This page is also available for…
Click [Add] to post a comment