TAChart: Raise an EChartError if TBarSeries.Extent is called before adding the series to a chart (https://forum.lazarus.freepascal.org/index.php/topic,47295.msg338189.html).

git-svn-id: trunk@62162 -
This commit is contained in:
wp 2019-11-03 10:19:02 +00:00
parent d8191b7e9b
commit 7db04f024b

View File

@ -1516,6 +1516,10 @@ var
i: Integer;
begin
Result := inherited Extent;
if FChart = nil then
raise EChartError.Create('Calculation of TBarSeries.Extent is not possible when the series is not added to a chart.');
if IsEmpty then exit;
if BarWidthStyle = bwPercentMin then
UpdateMinXRange;