Page 1 of 1

Rezize Chart Problem

Posted: Tue Feb 07, 2012 8:08 am
by 9342094
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

Re: Rezize Chart Problem

Posted: Wed Feb 08, 2012 4:18 pm
by yeray
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.

Re: Rezize Chart Problem

Posted: Thu Feb 09, 2012 7:31 am
by 9342094
Hi Yeray,

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

Thanks in advance,
Dennis

Re: Rezize Chart Problem

Posted: Thu Feb 09, 2012 11:09 am
by yeray
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;