mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 23:39:24 +02:00
TAChart: Fix DatapointTools to work correctly with stacked and axis-transformed area and line series.
git-svn-id: trunk@53921 -
This commit is contained in:
parent
0e6c18073a
commit
7529e42389
@ -389,7 +389,6 @@ type
|
|||||||
FGraphPos: TDoublePoint;
|
FGraphPos: TDoublePoint;
|
||||||
FIndex: Integer;
|
FIndex: Integer;
|
||||||
FSeries: TBasicChartSeries;
|
FSeries: TBasicChartSeries;
|
||||||
|
|
||||||
procedure SetGraphPos(const ANewPos: TDoublePoint);
|
procedure SetGraphPos(const ANewPos: TDoublePoint);
|
||||||
public
|
public
|
||||||
procedure Assign(ASource: TPointRef);
|
procedure Assign(ASource: TPointRef);
|
||||||
@ -404,6 +403,7 @@ type
|
|||||||
FDistanceMode: TChartDistanceMode;
|
FDistanceMode: TChartDistanceMode;
|
||||||
FGrabRadius: Integer;
|
FGrabRadius: Integer;
|
||||||
FMouseInsideOnly: Boolean;
|
FMouseInsideOnly: Boolean;
|
||||||
|
FTarget: TNearestPointTarget;
|
||||||
function GetAffectedSeries: String; inline;
|
function GetAffectedSeries: String; inline;
|
||||||
function GetIsSeriesAffected(AIndex: Integer): Boolean; inline;
|
function GetIsSeriesAffected(AIndex: Integer): Boolean; inline;
|
||||||
procedure SetAffectedSeries(AValue: String); inline;
|
procedure SetAffectedSeries(AValue: String); inline;
|
||||||
@ -416,6 +416,8 @@ type
|
|||||||
procedure FindNearestPoint(APoint: TPoint);
|
procedure FindNearestPoint(APoint: TPoint);
|
||||||
property MouseInsideOnly: Boolean
|
property MouseInsideOnly: Boolean
|
||||||
read FMouseInsideOnly write FMouseInsideOnly default false;
|
read FMouseInsideOnly write FMouseInsideOnly default false;
|
||||||
|
property Target: TNearestPointTarget
|
||||||
|
read FTarget write FTarget default nptPoint;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
public
|
public
|
||||||
@ -458,6 +460,7 @@ type
|
|||||||
property ActiveCursor default crSizeAll;
|
property ActiveCursor default crSizeAll;
|
||||||
property EscapeCancels default true;
|
property EscapeCancels default true;
|
||||||
property KeepDistance: Boolean read FKeepDistance write FKeepDistance default false;
|
property KeepDistance: Boolean read FKeepDistance write FKeepDistance default false;
|
||||||
|
property Target;
|
||||||
property OnDrag: TDataPointDragEvent read FOnDrag write FOnDrag;
|
property OnDrag: TDataPointDragEvent read FOnDrag write FOnDrag;
|
||||||
property OnDragStart: TDataPointDragEvent
|
property OnDragStart: TDataPointDragEvent
|
||||||
read FOnDragStart write FOnDragStart;
|
read FOnDragStart write FOnDragStart;
|
||||||
@ -474,6 +477,7 @@ type
|
|||||||
procedure MouseUp(APoint: TPoint); override;
|
procedure MouseUp(APoint: TPoint); override;
|
||||||
published
|
published
|
||||||
property ActiveCursor;
|
property ActiveCursor;
|
||||||
|
property Target;
|
||||||
property OnPointClick: TChartToolEvent
|
property OnPointClick: TChartToolEvent
|
||||||
read FOnPointClick write FOnPointClick;
|
read FOnPointClick write FOnPointClick;
|
||||||
end;
|
end;
|
||||||
@ -514,6 +518,7 @@ type
|
|||||||
procedure MouseUp(APoint: TPoint); override;
|
procedure MouseUp(APoint: TPoint); override;
|
||||||
published
|
published
|
||||||
property ActiveCursor;
|
property ActiveCursor;
|
||||||
|
property Target;
|
||||||
property OnHint: TChartToolHintEvent read FOnHint write FOnHint;
|
property OnHint: TChartToolHintEvent read FOnHint write FOnHint;
|
||||||
property OnHintLocation: TChartToolHintLocationEvent
|
property OnHintLocation: TChartToolHintLocationEvent
|
||||||
read FOnHintLocation write FOnHintLocation;
|
read FOnHintLocation write FOnHintLocation;
|
||||||
@ -576,6 +581,7 @@ type
|
|||||||
property Shape: TChartCrosshairShape
|
property Shape: TChartCrosshairShape
|
||||||
read FShape write FShape default ccsCross;
|
read FShape write FShape default ccsCross;
|
||||||
property Size: Integer read FSize write FSize default -1;
|
property Size: Integer read FSize write FSize default -1;
|
||||||
|
property Target;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TReticuleTool = class(TChartTool)
|
TReticuleTool = class(TChartTool)
|
||||||
@ -1656,6 +1662,7 @@ begin
|
|||||||
p.FPoint := APoint;
|
p.FPoint := APoint;
|
||||||
p.FRadius := GrabRadius;
|
p.FRadius := GrabRadius;
|
||||||
p.FOptimizeX := DistanceMode <> cdmOnlyY;
|
p.FOptimizeX := DistanceMode <> cdmOnlyY;
|
||||||
|
p.FTarget := Target;
|
||||||
best.FDist := MaxInt;
|
best.FDist := MaxInt;
|
||||||
for s in CustomSeries(FChart, FAffectedSeries.AsBooleans(FChart.SeriesCount)) do
|
for s in CustomSeries(FChart, FAffectedSeries.AsBooleans(FChart.SeriesCount)) do
|
||||||
if
|
if
|
||||||
|
Loading…
Reference in New Issue
Block a user