Page 1 of 1

Pie chart 2D - Hint painted over title

Posted: Mon Aug 27, 2012 9:30 am
by 10049140
Hi.

When rotating a 2D pie chart it might happen that the yellow hints are painted over the chart title:

Image

It also my happen that the hints are painted over the chart legend.

I am using TeeChart Pro 2012.06.120613.

Is this a known issue?
Is there any workaround for this issue?

Best regards!

Re: Pie chart 2D - Hint painted over title

Posted: Mon Aug 27, 2012 2:24 pm
by yeray
Hi,

Right, the series (and the marks) are drawn later than the title and the legend. That's why the marks overlap these parts of the chart.
If you want, you could draw these parts manually at OnAfterDraw event.

Re: Pie chart 2D - Hint painted over title

Posted: Wed Nov 07, 2012 12:00 pm
by yeray
Hi,

On addition, you could also move the marks manually to avoid overlapping with the other marks or any other part of the chart whose rect is known, as in the following example:
http://www.teechart.net/support/viewtop ... ing#p34892

Re: Pie chart 2D - Hint painted over title

Posted: Wed Nov 07, 2012 4:55 pm
by 10049140
Hi Yeray,

Thank you for your additional feedback!

I tried out Series.Marks.ArrowLength := 0 and it does what it should.
The Marks are drawn directly beside the slices without an arrow.

Anyway, I like that there is a distance between the marks and the slice.

It would be nice to have a kind of "collusion" check if a mark would be drawn over a title or legend, and only manipulate the distance in these cases.
I notice that same is already done when there would be marks drawn over other marks:
Image

Could something like this be realized also for title and legend?

Best regards.

Re: Pie chart 2D - Hint painted over title

Posted: Thu Nov 08, 2012 11:39 am
by yeray
Hi Marder,
marder wrote:It would be nice to have a kind of "collusion" check if a mark would be drawn over a title or legend, and only manipulate the distance in these cases.
This is what is done in the code here, but only for the marks.
It wouldn't be difficult to extend this code and also move the current mark while its rectangle intersects with the chart title or the legend rectangle.

Re: Pie chart 2D - Hint painted over title

Posted: Fri Nov 09, 2012 4:00 pm
by 10049140
Hi Yeray,

Ok, thank you for your help!

To prevent the main issues here I did increase the Vertical Margin of the legend in my 2D pie chart.

Best regards.