TAChart: Fix axis labels reaching beyond data limits in paned charts

git-svn-id: trunk@48473 -
This commit is contained in:
wp 2015-03-24 09:25:46 +00:00
parent 875cfefd74
commit 44f9503627
2 changed files with 6 additions and 1 deletions

View File

@ -586,6 +586,8 @@ begin
with FHelper do begin
FValueMin := GetTransform.AxisToGraph(axisMin);
FValueMax := GetTransform.AxisToGraph(axisMax);
FMinForMarks := GetTransform.AxisToGraph(d.FMin);
FMaxForMarks := GetTransform.AxisToGraph(d.FMax);
end;
if Inverted and (Length(FMarkValues) > 0) then
for i := 0 to High(FMarkValues) div 2 do begin

View File

@ -219,6 +219,8 @@ type
FTransf: ICoordTransformer;
FValueMax: Double;
FValueMin: Double;
FMaxForMarks: Double;
FMinForMarks: Double;
FZOffset: TPoint;
procedure BeginDrawing; virtual;
@ -328,7 +330,8 @@ begin
if
not IsInClipRange(coord) or
((FValueMax >= FValueMin) and not InRangeUlps(AMark, FValueMin, FValueMax, 2)) or
((FValueMax < FValueMin) and not InRangeUlps(AMark, FValueMax, FValueMin, 2))
((FValueMax < FValueMin) and not InRangeUlps(AMark, FValueMax, FValueMin, 2)) or
(not inRangeUlps(AMark, FMinForMarks, FMaxForMarks, 2))
then exit;
if FAxis.Grid.Visible then begin