Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxChartSecondaryAxes.AxesY Property

Provides access to the collection of secondary Y-axes.

#Declaration

Delphi
property AxesY: TdxChartSecondaryAxisYCollection read; write;

#Property Value

Type Description
TdxChartSecondaryAxisYCollection

A collection of secondary axes of values.

#Remarks

Use AxesX and AxesY properties to access and manage secondary axis collections in an XY diagram.

#Code Example: Add a Secondary Axis of Values

The following code example creates a secondary axis of values and associates it with the first series in an XY diagram:

var
  ADiagram: TdxChartXYDiagram;
  AAxisY: TdxChartSecondaryAxisYCollectionItem;
  AXYSeries: TdxChartXYSeries;
begin
  if dxChartControl1.DiagramCount = 0 then Exit;
  ADiagram := dxChartControl1.Diagrams[0] as TdxChartXYDiagram;
  if ADiagram.SeriesCount = 0 then Exit;
  AXYSeries := ADiagram.Series[0];
  AAxisY := ADiagram.SecondaryAxes.AxesY.Add;
  AXYSeries.View.AxisY := AAxisY.Axis;
  AAxisY.Title.Text := 'Income (USD)';
  AAxisY.Title.Alignment := TdxAlignment.Center;
  AAxisY.Appearance.Color := TdxAlphaColors.Gray;
end;
See Also