TBoxSeries add last value
Posted: Mon Nov 03, 2014 1:45 am
How can I add the last observation to a Box Plot Chart?
Steema Software - Customer Support Forums
http://216.92.101.67/support/
Code: Select all
uses TeeBoxPlot, Series;
var BoxPlot: TBoxSeries;
LastPoint: TPointSeries;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=false;
BoxPlot:=Chart1.AddSeries(TBoxSeries) as TBoxSeries;
BoxPlot.FillSampleValues;
LastPoint:=Chart1.AddSeries(TPointSeries) as TPointSeries;
LastPoint.AddXY(0, BoxPlot.YValue[BoxPlot.Count-1]);
end;
procedure TForm1.Button1Click(Sender: TObject);
var newPoint: Double;
begin
newPoint:=BoxPlot.YValues.MinValue+random*BoxPlot.YValues.Range;
BoxPlot.Add(newPoint);
LastPoint.YValue[0]:=newPoint;
end;