diff --git a/components/tachart/demo/print/Main.lfm b/components/tachart/demo/print/Main.lfm index c787357192..c73fd09366 100644 --- a/components/tachart/demo/print/Main.lfm +++ b/components/tachart/demo/print/Main.lfm @@ -14,6 +14,7 @@ object Form1: TForm1 Width = 398 AxisList = < item + Marks.Distance = 10 Marks.LabelFont.Height = -13 Marks.Frame.Style = psSolid Title.LabelFont.Orientation = 900 diff --git a/components/tachart/tachartaxis.pas b/components/tachart/tachartaxis.pas index fdddf0cc7d..ba1f0abf51 100644 --- a/components/tachart/tachartaxis.pas +++ b/components/tachart/tachartaxis.pas @@ -679,7 +679,7 @@ begin else sz := CalcMarksSize(AExtent.a.X, AExtent.b.X).cy; if sz > 0 then - sz += ADrawer.Scale(TickLength) + Marks.Distance; + sz += ADrawer.Scale(TickLength) + ADrawer.Scale(Marks.Distance); with AMeasureData do begin FSize := Max(sz, FSize); FTitleSize := Max(CalcTitleSize, FTitleSize); diff --git a/components/tachart/tatypes.pas b/components/tachart/tatypes.pas index 2ecab77621..dc73a9f1f8 100644 --- a/components/tachart/tatypes.pas +++ b/components/tachart/tatypes.pas @@ -514,8 +514,11 @@ end; function TGenericChartMarks.CenterOffset( ADrawer: IChartDrawer; const AText: String): TSize; +var + d: Integer; begin - Result := Point(Distance, Distance); + d := ADrawer.Scale(Distance); + Result := Point(d, d); if not DistanceToCenter then Result += MeasureLabel(ADrawer, AText) div 2; end;