Hello,
Knowing what you have and what you want to get from the charts stored in your tee files, you can:
- Load the first tee file into the final chart
- Load the second tee file into a dummy temporal chart
- Clone series or tools from the dummy chart to the final chart.
Ie, here I use 3 charts. The first two are to generate the tee files, the third is the destination chart I use to load the two tee files into:
Code: Select all
uses Series, TeeStore;
procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
tmpChart: TChart;
oldX, oldY, oldW, oldH: Integer;
const temp1: array[0..23] of Integer = (9, 9, 8, 8, 7, 6, 6, 4, 7, 11, 13, 15, 16, 16, 17, 17, 15, 14, 14, 14, 14, 13, 11, 10);
temp2: array[0..23] of Integer = (8, 7, 6, 6, 6, 6, 6, 5, 7, 9, 13, 14, 18, 20, 21, 20, 19, 18, 17, 16, 15, 13, 12, 12);
fileName1='E:\tmp\Temp_01052017.tee';
fileName2='E:\tmp\Temp_02052017.tee';
begin
Chart1.Legend.Visible:=False;
Chart1.View3D:=false;
with Chart1.AddSeries(TLineSeries) as TLineSeries do
begin
Pointer.Visible:=True;
for i:=0 to High(temp1) do
AddXY(i, temp1[i]);
end;
Chart1.Title.Text.Text:='01/05/2017';
Chart2.Legend.Visible:=False;
Chart2.View3D:=false;
with Chart2.AddSeries(TLineSeries) as TLineSeries do
begin
Pointer.Visible:=True;
for i:=0 to High(temp2) do
AddXY(i, temp2[i]);
end;
Chart2.Title.Text.Text:='02/05/2017';
SaveChartToFile(Chart1, fileName1);
SaveChartToFile(Chart2, fileName2);
//Load Charts
RegisterTeeStandardSeries;
oldX:=Chart3.Left;
oldY:=Chart3.Top;
oldW:=Chart3.Width;
oldH:=Chart3.Height;
LoadChartFromFile(Chart3, fileName1);
Chart3.Left:=oldX;
Chart3.Top:=oldY;
Chart3.Width:=oldW;
Chart3.Height:=oldH;
tmpChart:=TChart.Create(Self);
LoadChartFromFile(tmpChart, fileName2);
CloneChartSeries(tmpChart[0], Chart3);
Chart3[0].Title:=Chart3.Title.Text.Text;
Chart3[1].Title:=tmpChart.Title.Text.Text;
Chart3.Legend.Visible:=True;
Chart3.Title.Text[0]:=Chart3.Title.Text[0] + ' vs ' + tmpChart.Title.Text[0];
Chart3[0].Color:=OperaPalette[1];
Chart3[1].Color:=OperaPalette[2];
FreeAndNil(tmpChart);
end;
- Project2_2017-05-03_10-00-39.png (38.31 KiB) Viewed 10970 times