Recent

Author Topic: TChartTitle.Frame  (Read 4253 times)

wp

  • Hero Member
  • *****
  • Posts: 13398
TChartTitle.Frame
« on: July 18, 2011, 09:38:44 am »
TChartTitle has the property Frame. I assume that this is for drawing a frame around the title. But changing its property Visible has no effect. It is set to true by default, but the frame is not shown.

Not at high priority, but just for the wish list: Sometimes it may be desirable to change the horizontal position of the title/footer. Presently it is always centered, the Alignment affects the alignment of a multi-lined title within its text bounds. How about properties "PositionOffset" and "Position : TTitlePosition" with

Code: [Select]
type
  TTitlePosition = (tpChartLeft, tpChartCentered, tpChartRight, tpChartRectLeft, tpChartRectCentered, tpChartRectRight);

which give freedom to define the horizontal title and footer position within the width of the entire chart or the chart rectangle.


Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: TChartTitle.Frame
« Reply #1 on: July 20, 2011, 11:48:26 am »
TChartTitle has the property Frame. I assume that this is for drawing a frame around the title. But changing its property Visible has no effect. It is set to true by default, but the frame is not shown.

Indeed, there was no frame drawing code at all ;-)
I have done some unification work on TChartTitle and other marks in r31756-r31759.
Now Frame property works, and, as a bonus, Alignment applies to all mark types
(see "Multiline" page of labels demo for an example).

How about properties "PositionOffset" and "Position : TTitlePosition" with
Code: [Select]
type
  TTitlePosition = (tpChartLeft, tpChartCentered, tpChartRight, tpChartRectLeft, tpChartRectCentered, tpChartRectRight);

I do not quite understand what you mean by "chart rectangle" vs "entire chart here".
For now, since r31760 TChartTitle.Alignment property affects horizontal position
as well as justification -- perhaps this is sufficient?

wp

  • Hero Member
  • *****
  • Posts: 13398
Re: TChartTitle.Frame
« Reply #2 on: July 21, 2011, 09:19:37 am »
I checked with the ChartTitle, and it runs nicely. Thank you for the quick fix.

Quote
I do not quite understand what you mean by "chart rectangle" vs "entire chart here".
"Chart rectangle" was meant to be the rectangle spanned by the axes, "entire chart" the rectangle spanned by the chart's ClientRect. But this is really not high priority, changing title position along with the alignment is fine.

 

TinyPortal © 2005-2018