Pie chart 2D - Hint painted over title

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
marder
Advanced
Posts: 115
Joined: Thu May 29, 2008 12:00 am

Pie chart 2D - Hint painted over title

Post by marder » Mon Aug 27, 2012 9:30 am

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!

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

Re: Pie chart 2D - Hint painted over title

Post by Yeray » Mon Aug 27, 2012 2:24 pm

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.
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

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

Re: Pie chart 2D - Hint painted over title

Post by Yeray » Wed Nov 07, 2012 12:00 pm

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
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

marder
Advanced
Posts: 115
Joined: Thu May 29, 2008 12:00 am

Re: Pie chart 2D - Hint painted over title

Post by marder » Wed Nov 07, 2012 4:55 pm

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.

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

Re: Pie chart 2D - Hint painted over title

Post by Yeray » Thu Nov 08, 2012 11:39 am

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.
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

marder
Advanced
Posts: 115
Joined: Thu May 29, 2008 12:00 am

Re: Pie chart 2D - Hint painted over title

Post by marder » Fri Nov 09, 2012 4:00 pm

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.

Post Reply