Rezize Chart Problem

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
S-ON-S
Newbie
Newbie
Posts: 12
Joined: Tue Jun 07, 2005 4:00 am

Rezize Chart Problem

Post by S-ON-S » Tue Feb 07, 2012 8:08 am

Hi there,

i use a Surface Series with OpenGl. If i resize my form the chart is outside the range.
What can I do? See example.

Thanks in advance,
Dennis

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Rezize Chart Problem

Post by Yeray » Wed Feb 08, 2012 4:18 pm

Hi Dennis,

I'm not sure if the attached application is the correct one. I see a TPointSeries instead of a TSurfaceSeries. And the chart isn't aligned with the form so when the form is resized the chart does nothing.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

S-ON-S
Newbie
Newbie
Posts: 12
Joined: Tue Jun 07, 2005 4:00 am

Re: Rezize Chart Problem

Post by S-ON-S » Thu Feb 09, 2012 7:31 am

Hi Yeray,

sorry, it was the wrong example. Here is the correct one.

Thanks in advance,
Dennis
Attachments
Example.zip
(84.87 KiB) Downloaded 309 times

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Rezize Chart Problem

Post by Yeray » Thu Feb 09, 2012 11:09 am

Hi Dennis,

Right, when you maximize the window, the chart rect is zoomed too much. You could try setting a calculated Zoom relative to the form size at the Form's OnResize event. For example the following works better for me here:

Code: Select all

procedure TForm2.FormResize(Sender: TObject);
begin
  Chart1.Aspect.Zoom:=Round((Self.Width*0.75/Self.Height)*40);
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply