diff --git a/components/tachart/fpdoc/tagraph.xml b/components/tachart/fpdoc/tagraph.xml
index c4e23a859a..eb2a478b31 100644
--- a/components/tachart/fpdoc/tagraph.xml
+++ b/components/tachart/fpdoc/tagraph.xml
@@ -661,6 +661,11 @@ as a replacement.
Indicates whether the scaling parameters for the conversion between graph and image coordinates have valid values.
Returns the index of the currently active chart tool in the toolset attached to the chart.
+ Determines the data range covered by all series assigned to the specified axis. Minimum and maximum are returned in axis units.
+ The inherited handler for MouseDown events is overridden to dispatch the event to the ChartToolset assigned to the chart.
+ The inherited handler for MouseMove events is overridden to dispatch the event to the ChartToolset assigned to the chart.
+ The inherited handler for MouseUp events is overridden to dispatch the event to the ChartToolset assigned to the chart.
+
diff --git a/components/tachart/tacustomseries.pas b/components/tachart/tacustomseries.pas
index e006c81c03..b9bd90b4f9 100644
--- a/components/tachart/tacustomseries.pas
+++ b/components/tachart/tacustomseries.pas
@@ -441,13 +441,17 @@ function TCustomChartSeries.GetAxisBounds(AAxis: TChartAxis;
out AMin, AMax: Double): Boolean;
var
ex: TDoubleRect;
+ axIndexX, axIndexY: Integer;
begin
- if (AAxis.Index = AxisIndexX) or (AAxis.Index = AxisIndexY) then begin
+ axIndexX := GetAxisX.Index;
+ axIndexY := GetAxisY.Index;
+
+ if (AAxis.Index = axIndexX) or (AAxis.Index = axIndexY) then begin
ex := EmptyExtent;
GetBounds(ex);
with ex do begin
- UpdateBoundsByAxisRange(FChart.AxisList, AxisIndexX, a.X, b.X);
- UpdateBoundsByAxisRange(FChart.AxisList, AxisIndexY, a.Y, b.Y);
+ UpdateBoundsByAxisRange(FChart.AxisList, axIndexX, a.X, b.X);
+ UpdateBoundsByAxisRange(FChart.AxisList, axIndexY, a.Y, b.Y);
if IsRotated then begin
Exchange(a.X, a.Y);
Exchange(b.X, b.Y);
diff --git a/components/tachart/tagraph.pas b/components/tachart/tagraph.pas
index ab77eaab67..9bc7d5c3ab 100644
--- a/components/tachart/tagraph.pas
+++ b/components/tachart/tagraph.pas
@@ -352,6 +352,7 @@ type
procedure Draw(ADrawer: IChartDrawer; const ARect: TRect);
procedure DrawLegendOn(ACanvas: TCanvas; var ARect: TRect);
procedure EnableRedrawing;
+ procedure GetAxisRange(AAxis: TChartAxis; out AMin, AMax: Double);
function GetFullExtent: TDoubleRect;
function GetLegendItems(AIncludeHidden: Boolean = false): TChartLegendItems;
procedure Notify(ACommand: Integer; AParam1, AParam2: Pointer; var AData); override;
@@ -1164,6 +1165,15 @@ begin
Result := FAxisList.GetAxisByAlign(AAlign);
end;
+procedure TChart.GetAxisRange(AAxis: TChartAxis; out AMin, AMax: Double);
+var
+ interval: TDoubleInterval;
+begin
+ interval := GetAxisBounds(AAxis);
+ AMin := interval.FStart;
+ AMax := interval.FEnd;
+end;
+
function TChart.GetChartHeight: Integer;
begin
Result := FClipRect.Bottom - FClipRect.Top;