assigning series to customaxis at runtime
Posted: Wed Nov 14, 2007 9:52 am
Hi,
I have a Chart axis added at runtime. Now I fail to assign a series to this axis:
Thanks, Messie
I have a Chart axis added at runtime. Now I fail to assign a series to this axis:
Is suggest the cast does not work but I saw no alternative while I cannot create a custom THorizAxis at runtime.procedure TForm1.TntButton1Click(Sender: TObject);
begin
ca := TChartAxis.Create(Chart1);
ca.Visible := true;
ca.Automatic := true;
ca.Horizontal := true;
ca.PositionPercent := 30;
ca.StartPosition := 20;
ca.EndPosition := 80;
//available Series from designtime
Series1.HorizAxis := THorizAxis(ca);
end;
Thanks, Messie