var i:Integer; Series:array of TFastLineSeries; //这里最好写在全局变量中 begin SetLength(Series,MyTHead.Count); Chart1.SeriesList.Clear; for i:= 0 to MyTHead.Count-1 do //MyTHead是一个Tstringlist,根据MyTHead来动态创建曲线的数量 begin Series[i]:=TFastLineSeries.Create(nil); Series[i].ParentChart:= Chart1; //在名为CHART1的组件上建曲线 Series[i].Title:= MyTHead[i]; end; end;