mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 04:19:19 +02:00
TAChart: Support Marks.Attachment = maCenter in pie series
git-svn-id: trunk@38675 -
This commit is contained in:
parent
951b26f892
commit
a35e517060
@ -441,7 +441,10 @@ function TCustomPieSeries.TryRadius(ADrawer: IChartDrawer): TRect;
|
||||
end;
|
||||
b := a;
|
||||
end;
|
||||
Result := Norm([tmin * ca, tmin * sa]);
|
||||
if tmin = ALMOST_INF then // Should never happen.
|
||||
Result := 0
|
||||
else
|
||||
Result := Norm([tmin * ca, tmin * sa]);
|
||||
end;
|
||||
|
||||
procedure PrepareLabel(
|
||||
@ -451,8 +454,13 @@ function TCustomPieSeries.TryRadius(ADrawer: IChartDrawer): TRect;
|
||||
p: TPointArray;
|
||||
|
||||
function Ofs(AAngle: Double): TPoint;
|
||||
var
|
||||
d: Double;
|
||||
begin
|
||||
Result := EndPoint(AAngle, Marks.Distance + LabelExtraDist(p, AAngle));
|
||||
d := Marks.Distance;
|
||||
if not Marks.DistanceToCenter then
|
||||
d += LabelExtraDist(p, AAngle);
|
||||
Result := EndPoint(AAngle, d);
|
||||
end;
|
||||
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user