1
votes

I have an issue using Delphi 2007 & TChart 7.0.10.0 or 7.0.11.0 or the latest evaluation 9.0.5.0 on the TChart scaling.

The problem arises as soon I enlarge the window after a certain width and KEEP the Form height!

This is the drawing using a smaller form size.

Small Chart

now if I enlarge to 1200 weight I get this ugly scaling:

uggly scaling

If I export in the designer without the aspect ratio set and with 1200 weight you will se this:

enter image description here

How to get ride of this?

Hp

2
It would be very helpful if you could arrange a simple example project we can run as-is to reproduce the problem here. Thanks in advance. Steema Support Central.Yeray
OK, will prepare some small app and send to where??? While Steema simple only allow to register on the Forum in case having a valid Steema license. Even TeeChart is a part of D2007!HpW
@HpW that's a way to provide a more personalized service to registered customers since Embarcadero has its own reporting and charting forum (forums.embarcadero.com/forum.jspa?forumID=71) which we also monitor. You can post your files at steema.net/upload. Thanks in advance.Narcís Calvet
@Narcis: I sent already an e-mail with attached demo project to your info@ box. Also posted the demo to your upload server. Cheers.HpW
@HpW: I see your application uses 'Arial' as Bottom Axis' Labels&Title Fonts. I'm not sure why but changing both them at designtime to the default 'Verdana' seems to still draw the labels below the axis when you maximize the form. Does it work as you expected with it?Yeray

2 Answers

0
votes

I see you've set top and bottom margins to Chart1 in your project (8 and 20 percent respectively). I guess this has the intention of giving more space (in height) for Chart2 when you resize the form making it bigger.

Chart1's Top and Height properties should be set according to fill this blank space in the Form's OnResize event. Try this:

procedure TGSSkillgroupStatisticForm.FormResize(Sender: TObject);
begin
  Chart1.Draw;
  Chart2.Top:=Chart1.ChartRect.Bottom + 25;
  Chart2.Height:=Chart1.Height-Chart1.ChartRect.Bottom-40;
end;

Steema Support Central

0
votes

Keep in mind that I only scale in the x-axis. Your 3-D bar / construct will after a certain width, overlap the scaling numbers! Your given answer do not fix this issue at all. To see the real problem in a better way, I added on the form creation:


Chart2.BottomAxis.Maximum := 20;

Series2.AddBar(12, 'Hallo', clred);

Here the result:

OK Picture

False picture