Page 1 of 1

Title Vertical Margin problem

Posted: Fri Aug 12, 2016 3:36 pm
by 17576646
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.)

Re: Title Vertical Margin problem

Posted: Tue Aug 16, 2016 9:55 am
by yeray
Hello,

The behaviour you describe sounds as per design to me.
Note you can increment the top margin at the "Chart/Panel/Margins" tab.

Re: Title Vertical Margin problem

Posted: Tue Aug 16, 2016 10:41 am
by 17576646
Thank you for clarifying. Regarding the panel margins, how would I access them from code? I don't see Panel as a chart property.

Re: Title Vertical Margin problem

Posted: Wed Aug 17, 2016 7:16 am
by yeray
Hello,

Code: Select all

  Chart1.MarginTop:=10;
  Chart1.MarginUnits:=muPixels; // muPercent (default), muPixels