Skip to main content

TcxPivotGridChartConnection.OnGetDataCells Event

Enables you to specify which data cells are to be visualized in a linked unbound Chart View.

Declaration

property OnGetDataCells: TcxPivotGridChartGetDataCellsEvent read; write;

Remarks

By default, only the data cells specified via the SourceData property provide their values for Chart View series values. To change the default behavior, handle the OnGetDataCells event.

The Sender parameter provides access to the current connection object.

The ACol and ARow parameters specify the zero-based row and column indexes that identify the currently processed cell.

The ACell parameter provides access to summary values calculated for the currently processed cell.

Pass True as the AUseInCalculations parameter to use the cell’s value as a series value. Otherwise, a series value is not assigned. This way, it cannot be visualized in a Chart View. By default, the AUseInCalculations parameter is already assigned a value based on the SourceData option.

The following code demonstrates how to handle the OnGetDataCells event to exclude payment amounts that are less than 100000.

procedure <TForm>.cxPivotGridChartConnectionGetDataCells(
  Sender: TcxPivotGridChartConnection; ACol, ARow: Integer;
  ACell: TcxPivotGridCrossCellSummary; var AUseInCalculations: Boolean);
begin
  if (ACell.DataField = pgfPaymentAmount) and (ACell.Sum < 100000) then
    AUseInCalculations := False;
end;
See Also