Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var
ax, ay: TChartAxis;
ser: TFastLineSeries;
begin
ax:= Chart1.CustomAxes.Add;
ax.Horizontal:= TRUE;
ax.StartPosition:= 20.0;
ax.EndPosition:= 80.0;
ax.PositionPercent:= 20;
ax.axis.Color:= clBlue;
ay:= Chart1.CustomAxes.Add;
ay.StartPosition:= 20.0;
ay.EndPosition:= 80.0;
ay.PositionPercent:= 20;
ay.Axis.Color:= clRed;
ax.UsePartnerAxis:= TRUE;
ax.PartnerAxis:= ay;
ay.UsePartnerAxis:= TRUE;
ay.PartnerAxis:= ax;
ser:= TFastLineSeries.Create(Chart1);
chart1.AddSeries(ser);
ser.CustomHorizAxis:= ax;
ser.CustomVertAxis:= ay;
ser.FillSampleValues(100);
end;
Thanks in advance