Losing Top of Chart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
MikeD
Newbie
Newbie
Posts: 30
Joined: Mon Jun 25, 2007 12:00 am

Losing Top of Chart

Post by MikeD » Fri Mar 28, 2008 10:13 pm

In some cases the drawing of the chart loses some of the upper portion. You can see this behavior in the design time TChart component. Drop a TChart on the form and make sure you have the following set:

1. Ensure that the Titles are not visible.
2. Be sure the chart is a 2D chart.
3. Set the left or right axis such that the top tick mark is exactly at the top of the chart. In my case this was 500, and not 450.
4. Set the panel margins to 0.

The result is the upper half of the axis value is lost. The reason for this is the top of the chart is the upper edge of the drawing, but the axis fonts extend above the top of the chart because they are centered on the top of the chart.

A simple detour for this is to set the panel's top margin to 1%.

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

Post by Narcís » Mon Mar 31, 2008 9:30 am

Hi MikeD,

I wouldn't say this is a bug, panel margins are for that. It may also help you setting axes MaximumOffset, for example:

Code: Select all

  Chart1.Axes.Left.MaximumOffset:=10;
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

MikeD
Newbie
Newbie
Posts: 30
Joined: Mon Jun 25, 2007 12:00 am

Post by MikeD » Mon Mar 31, 2008 3:02 pm

I agree that it may not be a problem. However, if you set the panel background to a color, then the text runs off of the panel and into the margin.

While not a big deal, it doesn't look good.

Do with it what you wish.

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

Post by Narcís » Mon Mar 31, 2008 3:10 pm

Hi MikeD,

I've added your request to our wish-list to be enhanced for future releases. Have you tried using MaximumOffset as I suggested?
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