mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 12:00:15 +02:00
TAChart: Rename TChart.GetAxisRange to .GetAllSeriesAxisLimits (more precise).
git-svn-id: trunk@65389 -
This commit is contained in:
parent
ce0d904223
commit
9f896e3f00
@ -95,6 +95,7 @@ type
|
||||
procedure seTitleDistanceChange(Sender: TObject);
|
||||
private
|
||||
FAxis: TChartAxis;
|
||||
FAxisMin, FAxisMax: Double;
|
||||
FTitleFontFrame: TChartFontFrame;
|
||||
FTitleShapeBrushPenMarginsFrame: TChartShapeBrushPenMarginsFrame;
|
||||
FLabelFontFrame: TChartFontFrame;
|
||||
@ -357,8 +358,6 @@ begin
|
||||
end;
|
||||
|
||||
procedure TChartAxisFrame.Prepare(Axis: TChartAxis);
|
||||
var
|
||||
mn, mx: Double;
|
||||
begin
|
||||
FAxis := Axis;
|
||||
|
||||
@ -381,9 +380,9 @@ begin
|
||||
end;
|
||||
|
||||
// Page "Labels"
|
||||
GetChart.GetAxisRange(Axis, mn, mx);
|
||||
seMaximum.Value := mx;
|
||||
seMinimum.Value := mn;
|
||||
GetChart.GetAllSeriesAxisLimits(Axis, FAxisMin, FAxisMax);
|
||||
seMaximum.Value := IfThen(Axis.Range.UseMax, Axis.Range.Max, FAxisMax);
|
||||
seMinimum.Value := IfThen(Axis.Range.UseMin, Axis.Range.Min, FAxisMin);
|
||||
cbAutoMax.Checked := not Axis.Range.UseMax;
|
||||
cbAutoMin.Checked := not Axis.Range.UseMin;
|
||||
cbInverted.Checked := Axis.Inverted;
|
||||
|
@ -661,11 +661,12 @@ as a replacement.
|
||||
<element name="TChart.ScalingValid"><short>Indicates whether the scaling parameters for the conversion between graph and image coordinates have valid values.</short>
|
||||
</element><element name="TChart.ActiveToolIndex"><short>Returns the index of the currently active chart tool in the toolset attached to the chart.</short>
|
||||
</element>
|
||||
<element name="TChart.GetAxisBounds"/><element name="TChart.GetAxisRange"><short>Determines the data range covered by all series assigned to the specified axis. Minimum and maximum are returned in axis units.</short>
|
||||
</element><element name="TChart.MouseDown"><short>The inherited handler for MouseDown events is overridden to dispatch the event to the ChartToolset assigned to the chart.</short>
|
||||
<element name="TChart.MouseDown"><short>The inherited handler for MouseDown events is overridden to dispatch the event to the ChartToolset assigned to the chart.</short>
|
||||
</element><element name="TChart.MouseMove"><short>The inherited handler for MouseMove events is overridden to dispatch the event to the ChartToolset assigned to the chart.</short>
|
||||
</element><element name="TChart.MouseUp"><short>The inherited handler for MouseUp events is overridden to dispatch the event to the ChartToolset assigned to the chart.</short>
|
||||
</element>
|
||||
<element name="TChart.GetAllSeriesAxisLimits"><short>Determines the data range covered by all series assigned to the specified axis. Minimum and maximum are returned in axis units.</short>
|
||||
</element>
|
||||
</module>
|
||||
</package>
|
||||
</fpdoc-descriptions>
|
||||
|
@ -352,7 +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);
|
||||
procedure GetAllSeriesAxisLimits(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;
|
||||
@ -1141,6 +1141,15 @@ begin
|
||||
AClass := nil;
|
||||
end;
|
||||
|
||||
procedure TChart.GetAllSeriesAxisLimits(AAxis: TChartAxis; out AMin, AMax: Double);
|
||||
var
|
||||
interval: TDoubleInterval;
|
||||
begin
|
||||
interval := GetAxisBounds(AAxis);
|
||||
AMin := interval.FStart;
|
||||
AMax := interval.FEnd;
|
||||
end;
|
||||
|
||||
function TChart.GetAxisBounds(AAxis: TChartAxis): TDoubleInterval;
|
||||
var
|
||||
s: TBasicChartSeries;
|
||||
@ -1165,15 +1174,6 @@ 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;
|
||||
|
Loading…
Reference in New Issue
Block a user