Recent

Author Topic: Centered legend in TAChart  (Read 6734 times)

wp

  • Hero Member
  • *****
  • Posts: 11916
Centered legend in TAChart
« on: March 22, 2011, 12:40:26 pm »
How can i center the legend above or below a chart? It would be nice to have options "laTopCenter" or "laBottomCenter" for this purpose.


Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: Centered legend in TAChart
« Reply #1 on: March 22, 2011, 09:23:29 pm »
Implemented in r29985
See legend demo for an example.

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: Centered legend in TAChart
« Reply #2 on: March 23, 2011, 12:06:14 am »
Thanks a lot. I'll give it a try as soon as I can. TAChart is getting better and better!

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: Centered legend in TAChart
« Reply #3 on: March 23, 2011, 10:50:26 am »
Works fine - thank you. There is one small thing which is a bit annoying, though: If UseSidebar is false the legend may overlap with the axis (e.g. Alignment = laCenterLeft, UseSidebar = false --> overlap with left axis). Of course I can correct this by adjustment of the margin parameters - but these may have to be adapted when axis labeling changes. It would be more convenient if the legend position for UseSidebar=false would be within the rectangle spanned by the axes, not within the entire diagram rect. By the way: what is ClipRect?

Ask

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 687
Re: Centered legend in TAChart
« Reply #4 on: March 23, 2011, 12:17:20 pm »
Quote
It would be more convenient if the legend position for UseSidebar=false would be within the rectangle spanned by the axes, not within the entire diagram rect.

Hmm, now you can work around the problem, but if I will change it, and some user wants current behaviour, he will have no way to achieve it.
And I am not sure this change deserves yet another option.
So, I need to think about it -- maybe there is some more general setting
that can be implemented instead.
You can create a feature request on the bug tracker to make sure this issue will not be forgotten.

Quote
what is ClipRect?
It is a property that returns the rectangle inside of which TAChart
is *currently* drawing.
Note that it changes during the drawing process, so it is mainly useful
for the chart events and interactive tools.

 

TinyPortal © 2005-2018