Skip to main content
All docs
V24.1

TdxChartAreaSeriesPointDrawParameters Class

Stores series point draw settings in an Area series View.

Declaration

TdxChartAreaSeriesPointDrawParameters = class(
    TdxChartLineSeriesPointDrawParameters
)

Remarks

The TdxChartAreaSeriesPointDrawParameters class implements the settings you can customize to change the appearance of individual series point markers as well as line and filled area segments in a Simple, Stacked, or Full-Stacked Area series. An area segment associated with a series point connects its marker with the marker of the previous point in the same series.

VCL Chart Control: A Custom Series Point Appearance Example

Handle an XY diagram‘s OnGetSeriesPointDrawParameters event to change the appearance of individual series points based on certain conditions as demonstrated in the code example below.

Main API Members

The list below outlines key members of the TdxChartAreaSeriesPointDrawParameters class. These members allow you to customize the appearance of an individual series point in an Area series.

MarkerAppearance
Allows you to change fill and outline settings of the currently processed series point’s marker.
Appearance

Provides access to area appearance settings.

You can use this property to change fill settings of the area segment between the currently processed point and the previous series point.

Note

The Appearance.Opacity property has no effect on the filled area. You need to assign a TdxAlphaColor value to Appearance.FillOptions.Color and Appearance.FillOptions.Color2 properties with the required opacity values.

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

Indirect TdxChartLineSeriesPointDrawParameters Class Reference

The TdxChartGetSeriesPointDrawParametersEventArgs.DrawParameters property references the TdxChartLineSeriesPointDrawParameters class as a TdxChartSeriesPointDrawParameters object when a diagram’s OnGetSeriesPointDrawParameters event occurs for an XY series with the active Simple, Stacked, or Full-Stacked Line View.

You need to cast a TdxChartSeriesPointDrawParameters object to the TdxChartLineSeriesPointDrawParameters class to access all draw settings of a series point in a Simple, Stacked, or Full-Stacked Line series.

Tip

You can call a TdxChartSeriesPointDrawParameters object’s ClassType function within an OnGetSeriesPointDrawParameters event handler to identify the actual point draw settings type.

See Also