动态添加节点
Chart1.AddSeries( TFastLineSeries.Create( self ) );
添加节点坐标值
Chart1.Series[0].AddXY(X,Y,Label,color); Chart1曲线0 坐标X Y处 添加点
第一条曲线是 Series[0].
第二条曲线是 Series[1]. 依此类推
function AddXY(Const AXValue, AYValue: Double; Const ALabel: String; AColor: TColor): Integer; virtual;
Description
This function inserts a new point in the Series.
The new point has X and Y values.
The ALabel parameter is optional (can be empty '').
The AColor parameter is optional (can be clTeeColor).
The function returns the new point position in the Values list.
Series1.AddXY( 123, 456, 'Hello', clGreen );
==============================================
if NodeNum > Chart1.SeriesCount then //如果收到的节点地址 大于 曲线数目 增加曲线
begin
for i:=Chart1.SeriesCount+1 to NodeNum do
begin
Chart1.AddSeries( TFastLineSeries.Create( self ) );
//TFastLineSeries.Create( self ).LinePen.Width:=2; //OText.Add:='节点'+ IntToStr(i)+'温度';
Chart1.Series[i-1].Title:='Node '+IntToStr(i)+'温度';
end
end ;