Page 1 of 1

Undo Redo

Posted: Sun Oct 17, 2010 10:37 pm
by 10046016
There were the questions about Undo \ Redo inbuilt functionality for TChart in 2007, are you planning to implement it soon?
I am using TDragPoint and other inbuilt functions, in this case SaveChartToStream and LoadChartFromStream not returning the correct TChart.
Also very often if multi Series are in Chart, it changes the Series number (Series3 could be swapped with Series1 ).

Can you suggest a work around? Please give me the approximate date of implementation inbuilt UndoRedo.

Thank you

Re: Undo Redo

Posted: Tue Oct 19, 2010 1:04 pm
by yeray
Hi Nicho,

I guess you refer to this issue: TF02012223
I've added the same to the VCL wish list to be implemented in future releases (TV52015229).

I've incremented the issue priority. However I'm afraid I can't tell you when this will be implemented.
Nicho wrote:I am using TDragPoint and other inbuilt functions, in this case SaveChartToStream and LoadChartFromStream not returning the correct TChart.
I've tried to reproduce it with the following example but everything seems to work as expected. Doesn't it for you?

Code: Select all

uses Series, TeeStore, TeExport, TeeEditPRO, TeeDragPoint;

var tmpStream: TStream;

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  for i:=0 to 1 do with Chart1.AddSeries(TPointSeries) do
  begin
    FillSampleValues(6);
    Color:=RGB(random(255), random(255), random(255));
    with Chart1.Tools.Add(TDragPointTool) as TDragPointTool do Series:=Chart1[i];
  end;

  Chart1[0].Title:='A';
  Chart1[1].Title:='B';
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  Chart1.ExchangeSeries(0,1);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  tmpStream:=TMemoryStream.Create;

  SaveChartToStream(Chart1, tmpStream, true, true);

  tmpStream.Position:=0;
  LoadChartFromStream(TCustomChart(Chart2), tmpStream);

  tmpStream.Free;
end;
Nicho wrote:Also very often if multi Series are in Chart, it changes the Series number (Series3 could be swapped with Series1 ).
I've seen some strange behaviour with the colors of the series (that I've solved assigning a color to the series as in the example above), but nothing about the series names.

Could you please send us a simple example project we can run as-is to reproduce the problems here?