Animation from sub-charts to charts

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
TestAlways
Advanced
Posts: 228
Joined: Tue Aug 28, 2007 12:00 am
Location: Oregon, USA

Animation from sub-charts to charts

Post by TestAlways » Wed Oct 10, 2007 8:43 pm

I have an idea of including several sub charts across the top of my chart--and allowing a user to click on one and making that the main chart. I would like to animate the click so that the sub chart 'expands' to the main chart.

Anyone know how this might be done? I think the effects would be great.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Oct 11, 2007 9:07 am

Hi TestAlways,

At the moment this can't be done but I've added it to our wish-list to be considered for inclusion in future releases.

In the meantime, you can put a SubChart into the main chart like this:

Code: Select all

uses TeeStore, TeeEditPro;

procedure TForm1.Button1Click(Sender: TObject);
var stream: TMemoryStream;
    tmpPos: TPoint;
    tmpW, tmpH: Integer;
begin
  stream:=TMemoryStream.Create;
  SaveChartToStream(TCustomChart(ChartTool1.Charts[0].Chart),stream, true);
  Chart1.Tools.Delete(0);

  tmpPos.X:=Chart1.Left;
  tmpPos.Y:=Chart1.Top;
  tmpW:=Chart1.Width;
  tmpH:=Chart1.Height;

  stream.Position:=0;
  LoadChartFromStream(TCustomChart(Chart1),stream);

  Chart1.Left:=tmpPos.X;
  Chart1.Top:=tmpPos.Y;
  Chart1.Width:=tmpW;
  Chart1.Height:=tmpH;

  stream.Free;
end;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply