Page 1 of 1

Pie mark label location not centered to segment

Posted: Wed Jul 10, 2013 3:57 am
by 9236183
Hello,
I'm trying to use a number of pie or TDonutSeries styles but I'm having problems with the Marks label. I would like to use the label rotation as well depending on the pie rotation angle.

Its seems the the mark label for a segment draws with the right hand side of the label in the centre of the segment. I would like to move the label so that it is centered in the segment.

I've attached an example of a pie chart drawing the label not centered in a segment. In this example the Total angle = 90, circle = true, Rotation = 45

Any ideas ?

Re: Pie mark label location not centered to segment

Posted: Wed Jul 10, 2013 3:29 pm
by yeray
Hi,

You could modify the marks positions manually calculating the desired positions in a similar way than in the following threads:
http://www.teechart.net/support/viewtop ... 589#p61589
http://www.teechart.net/support/viewtop ... 643#p45643

In your case, you'll have to use some properties like XRadius, YRadius, Angles.MidAngle and AngleToPos function to calculate the desired position

Re: Pie mark label location not centered to segment

Posted: Thu Jul 11, 2013 1:54 am
by 9236183
Thanks.

That got me on the right track, TSeriesMarkPosition* tsp->Custom = true, was a key for me