mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 00:59:25 +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;
|
end;
|
||||||
b := a;
|
b := a;
|
||||||
end;
|
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;
|
end;
|
||||||
|
|
||||||
procedure PrepareLabel(
|
procedure PrepareLabel(
|
||||||
@ -451,8 +454,13 @@ function TCustomPieSeries.TryRadius(ADrawer: IChartDrawer): TRect;
|
|||||||
p: TPointArray;
|
p: TPointArray;
|
||||||
|
|
||||||
function Ofs(AAngle: Double): TPoint;
|
function Ofs(AAngle: Double): TPoint;
|
||||||
|
var
|
||||||
|
d: Double;
|
||||||
begin
|
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;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user