TCustomAxisPanel.CustomAxes

TCustomAxisPanel.CustomAxes
TCustomAxisPanel

property CustomAxes: TChartCustomAxes;

Unit
TeEngine

Description
This property returns the TChartCustomAxes list.
You may add, access and modify any Custom Axis via the list.
Alternatively you may bypass use of the list and work with the Custom axes directly as per any TChartAxis (Custom Axes are standard TChartAxis components).

See differing approaches below
.

Example of use TChartCustomAxes:

procedure TForm1.FormCreate(Sender: TObject);
begin
// Populate 2 Series in your Chart
Series1.FillSampleValues(10);
Series2.FillSampleValues(10);
end;

procedure TForm1.BitBtn1Click(Sender: TObject);
var
tmpVertAxis: TChartAxis;
tmpHorizAxis: TChartAxis;
begin
// Add vertical Axis
Chart1.CustomAxes.Add;
tmpVertAxis:=Chart1.CustomAxes[0];
tmpVertAxis.PositionPercent:=50;
Series1.CustomVertAxis:=tmpVertAxis;

// Add horizontal Axis
Chart1.CustomAxes.Add;
tmpHorizAxis:=Chart1.CustomAxes[1];

tmpHorizAxis.Horizontal:=True;
tmpHorizAxis.Axis.Color:=clGreen;
tmpHorizAxis.PositionPercent:=50;
Series1.CustomHorizAxis:=tmpHorizAxis;
end;

Example approach using TChartAxis.Create:

procedure TForm1.BitBtn2Click(Sender: TObject);
Var MyAxis : TChartAxis ;
begin
MyAxis := TChartAxis.Create( Chart1 );
Series2.CustomVertAxis := MyAxis;

// You can modify any property of the new created axes, such as the axis color or axis title

With MyAxis do
begin
Axis.Color:=clGreen ;
Title.Caption := 'Extra axis' ;
Title.Font.Style:=[fsBold];
Title.Angle := 90;
PositionPercent := 20; //percentage of Chart rectangle
end;
end;