Skip to main content
All docs
V24.2

TdxChartLineSeriesPointDrawParameters Class

Stores series point draw settings in a Line series View.

Declaration

TdxChartLineSeriesPointDrawParameters = class(
    TdxChartSeriesPointDrawParameters
)

Remarks

The TdxChartLineSeriesPointDrawParameters class implements the settings you can customize to change the appearance of individual series point markers and line segments in a Simple, Stacked, or Full-Stacked Line series. A line segment associated with a series point connects its marker with the marker of the previous point in the same series.

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 TdxChartLineSeriesPointDrawParameters class. These members allow you to customize the appearance of an individual series point in a Line series.

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

Provides access to line appearance settings.

You can use this property to change style and color of the line segment that connects the currently processed point and the previous series point.

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 Line series.

procedure TMyForm.cdLineGetSeriesPointDrawParameters(Sender: TdxChartCustomDiagram;
  AArgs: TdxChartGetSeriesPointDrawParametersEventArgs);
var
  ALineDrawParameters: TdxChartLineSeriesPointDrawParameters;
  ASeries: TdxChartCustomSeries;
  AIndex: Integer;
begin
  if AArgs.SeriesPoint.Series.Caption = 'Europe' then
  begin
    if AArgs.DrawParameters.ClassType <> TdxChartLineSeriesPointDrawParameters then Exit;
    ALineDrawParameters := AArgs.DrawParameters as TdxChartLineSeriesPointDrawParameters;
    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
      ALineDrawParameters.MarkerAppearance.FillOptions.Color := TdxAlphaColors.Red;
      ALineDrawParameters.Appearance.BeginUpdate;
      ALineDrawParameters.Appearance.StrokeOptions.Color := TdxAlphaColors.Red;
      ALineDrawParameters.Appearance.StrokeOptions.Style := TdxStrokeStyle.Solid;
      ALineDrawParameters.Appearance.EndUpdate;
    end;
  end;
end;

VCL Chart Control: A Custom Series Point in a Simple Line 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.

Inheritance

TObject
TdxChartSeriesPointDrawParameters
TdxChartLineSeriesPointDrawParameters
See Also