Title Vertical Margin problem

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
riskassessor
Newbie
Newbie
Posts: 29
Joined: Tue Oct 13, 2015 12:00 am

Title Vertical Margin problem

Post by riskassessor » Fri Aug 12, 2016 3:36 pm

With the default settings, a TChart has a nice gap between the Title and the top of the graph. This is given by the Title Vertical Margin setting.

If one selects Chart1.Title.CustomPosition := True (e.g. by double clicking on the chart in the IDE to open the editor and going to Titles>Title>Position and clicking the CustomPosition checkbox), the Vertical Margin setting becomes disabled and the and the top of the graph rises up to just under the Title, resulting a very small gap.

The tiny gap between the Title and the graph cannot be made larger using the custom Top setting. Increasing Top causes the Title to overlap the graph while a negative value for Top can cause the Title to scroll upwards off the chart.

To reproduce the issue, just drop a TChart on a form and double click top open the editor. Then play around with the Title settings as described above.

Since the Vertical Margin setting is disabled when CustomPosition is true, how can I obtain a pleasingly large gap between the Title and the top of the graph? (The Title Margins don't work as I reported in a separate topic post.)

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

Re: Title Vertical Margin problem

Post by Yeray » Tue Aug 16, 2016 9:55 am

Hello,

The behaviour you describe sounds as per design to me.
Note you can increment the top margin at the "Chart/Panel/Margins" tab.
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

riskassessor
Newbie
Newbie
Posts: 29
Joined: Tue Oct 13, 2015 12:00 am

Re: Title Vertical Margin problem

Post by riskassessor » Tue Aug 16, 2016 10:41 am

Thank you for clarifying. Regarding the panel margins, how would I access them from code? I don't see Panel as a chart property.

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

Re: Title Vertical Margin problem

Post by Yeray » Wed Aug 17, 2016 7:16 am

Hello,

Code: Select all

  Chart1.MarginTop:=10;
  Chart1.MarginUnits:=muPixels; // muPercent (default), muPixels
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