Skip to main content
All docs
V24.1

TdxChartGetSeriesPointDrawParametersEvent Type

The procedural type for series point customization events.

Declaration

TdxChartGetSeriesPointDrawParametersEvent = procedure(Sender: TdxChartCustomDiagram; AArgs: TdxChartGetSeriesPointDrawParametersEventArgs) of object;

Parameters

Name Type Description
Sender TdxChartCustomDiagram

The diagram that raised the series point customization event.

Cast this parameter value to the TdxChartXYDiagram or TdxChartSimpleDiagram class depending on the actual diagram type to access all public API members.

You can call the Sender.ClassType function to identify the diagram type.

AArgs TdxChartGetSeriesPointDrawParametersEventArgs

Provides access to draw parameters of the processed series point in the diagram accessible through the Sender parameter.

You can use Args.SeriesPoint and Args.DrawParameters properties to identify the currently processed series point and customize its appearance settings.

Remarks

Series Views and their settings define the appearance of all points in the same series. You can handle a series point customization event to change the appearance of individual series points depending on certain conditions.

Accessible Event Parameters

Use the Args.SeriesPoint property within an event handler to identify the currently processed series point.

The Args.DrawParameters property provides access to series point appearance settings depending on the parent series type and its active View. To access point appearance settings, you need to cast the Args.DrawParameters property value to the corresponding TdxChartSeriesPointDrawParameters class descendant:

TdxChartAreaSeriesPointDrawParameters
Stores series point draw settings in an Area series View.
TdxChartLineSeriesPointDrawParameters
Stores series point draw settings in a Line series View.
TdxChartBarSeriesPointDrawParameters
Stores series point draw settings in a Bar series View.
TdxChartSimpleSeriesPointDrawParameters
Stores series point draw settings in a simple series View.

Tip

You can call the Args.DrawParameters.ClassType function to identify the actual series point appearance settings type.

Code Example

The following code example demonstrates a diagram’s OnGetSeriesPointDrawParameters event handler that changes the appearance settings of points with peak values in a Simple Area series:

procedure TMyForm.cdAreaGetSeriesPointDrawParameters(Sender: TdxChartCustomDiagram;
  AArgs: TdxChartGetSeriesPointDrawParametersEventArgs);
var
  AAreaDrawParameters: TdxChartAreaSeriesPointDrawParameters;
  ASeries: TdxChartCustomSeries;
  AIndex: Integer;
begin
  if AArgs.SeriesPoint.Series.Caption = 'DevAV South' then
  begin
    if AArgs.DrawParameters.ClassType <> TdxChartAreaSeriesPointDrawParameters then Exit;
    AAreaDrawParameters := AArgs.DrawParameters as TdxChartAreaSeriesPointDrawParameters;
    AIndex := AArgs.SeriesPoint.Index;
    ASeries := AArgs.SeriesPoint.Series;
    if ((AIndex = 0) and (ASeries.Points.Values[AIndex] > ASeries.Points.Values[AIndex + 1])) or
       ((AIndex > 0) and (AIndex < ASeries.Points.Count - 1) and
       (ASeries.Points.Values[AIndex] > ASeries.Points.Values[AIndex + 1]) and
        (ASeries.Points.Values[AIndex] > ASeries.Points.Values[AIndex - 1])) then
    begin
      AAreaDrawParameters.MarkerAppearance.FillOptions.Color := TdxAlphaColors.Red;
      AAreaDrawParameters.Appearance.BeginUpdate;
      AAreaDrawParameters.Appearance.FillOptions.Color := TdxAlphaColors.OrangeRed;
      AAreaDrawParameters.Appearance.FillOptions.Mode := TdxFillOptionsMode.Hatch;
      AAreaDrawParameters.Appearance.FillOptions.HatchStyle := TdxFillOptionsHatchStyle.ForwardDiagonal;
      AAreaDrawParameters.Appearance.FillOptions.Color2 := TdxAlphaColors.Teal;
      AAreaDrawParameters.Appearance.StrokeOptions.Color := TdxAlphaColors.Red;
      AAreaDrawParameters.Appearance.StrokeOptions.Style := TdxStrokeStyle.Solid;
      AAreaDrawParameters.Appearance.EndUpdate;
    end;
  end;
end;

VCL Chart Control: A Custom Series Point in a Simple Area View

Direct TdxChartGetSeriesPointDrawParametersEvent Type References

The OnGetSeriesPointDrawParameters event of XY and simple diagrams references the TdxChartGetSeriesPointDrawParametersEvent procedural type.

See Also