View Issue Details

IDProjectCategoryView StatusLast Update
0035612LazarusTAChartpublic2019-05-22 18:04
ReporterMarcin WiazowskiAssigned Towp 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.1 (SVN)Product Build61262 
Target VersionFixed in Version 
Summary0035612: TAChart: patch for TCustomAnimatedChartSource, to reflect extents properly
DescriptionAs described in 0035356:0116211, in C), BasicExtent() needed to become virtual, to be reflected properly by TSortedChartSource.


Similar issue occurs also in TCustomAnimatedChartSource. The attached patch makes Origin's BasicExtent(), ExtentXYList() and ValuesTotal() reflected properly also by TCustomAnimatedChartSource.
TagsNo tags attached.
Fixed in Revision61270
LazTarget-
WidgetsetWin32/Win64
Attached Files
  • patch.diff (1,519 bytes)
    Index: components/tachart/taanimatedsource.pas
    ===================================================================
    --- components/tachart/taanimatedsource.pas	(revision 61262)
    +++ components/tachart/taanimatedsource.pas	(working copy)
    @@ -54,9 +54,12 @@
         constructor Create(AOwner: TComponent); override;
         destructor Destroy; override;
     
    +    function BasicExtent: TDoubleRect; override;
         function Extent: TDoubleRect; override;
         function ExtentCumulative: TDoubleRect; override;
         function ExtentList: TDoubleRect; override;
    +    function ExtentXYList: TDoubleRect; override;
    +    function ValuesTotal: Double; override;
     
         function IsAnimating: Boolean; inline;
         function Progress: Double; inline;
    @@ -116,6 +119,14 @@
       inherited;
     end;
     
    +function TCustomAnimatedChartSource.BasicExtent: TDoubleRect;
    +begin
    +  if Origin = nil then
    +    Result := EmptyExtent
    +  else
    +    Result := Origin.BasicExtent;
    +end;
    +
     function TCustomAnimatedChartSource.Extent: TDoubleRect;
     begin
       if Origin = nil then
    @@ -140,6 +151,22 @@
         Result := Origin.ExtentList;
     end;
     
    +function TCustomAnimatedChartSource.ExtentXYList: TDoubleRect;
    +begin
    +  if Origin = nil then
    +    Result := EmptyExtent
    +  else
    +    Result := Origin.ExtentXYList;
    +end;
    +
    +function TCustomAnimatedChartSource.ValuesTotal: Double;
    +begin
    +  if Origin = nil then
    +    Result := 0
    +  else
    +    Result := Origin.ValuesTotal;
    +end;
    +
     function TCustomAnimatedChartSource.GetCount: Integer;
     begin
       if Origin = nil then
    
    patch.diff (1,519 bytes)

Activities

Marcin Wiazowski

2019-05-21 21:18

reporter  

patch.diff (1,519 bytes)
Index: components/tachart/taanimatedsource.pas
===================================================================
--- components/tachart/taanimatedsource.pas	(revision 61262)
+++ components/tachart/taanimatedsource.pas	(working copy)
@@ -54,9 +54,12 @@
     constructor Create(AOwner: TComponent); override;
     destructor Destroy; override;
 
+    function BasicExtent: TDoubleRect; override;
     function Extent: TDoubleRect; override;
     function ExtentCumulative: TDoubleRect; override;
     function ExtentList: TDoubleRect; override;
+    function ExtentXYList: TDoubleRect; override;
+    function ValuesTotal: Double; override;
 
     function IsAnimating: Boolean; inline;
     function Progress: Double; inline;
@@ -116,6 +119,14 @@
   inherited;
 end;
 
+function TCustomAnimatedChartSource.BasicExtent: TDoubleRect;
+begin
+  if Origin = nil then
+    Result := EmptyExtent
+  else
+    Result := Origin.BasicExtent;
+end;
+
 function TCustomAnimatedChartSource.Extent: TDoubleRect;
 begin
   if Origin = nil then
@@ -140,6 +151,22 @@
     Result := Origin.ExtentList;
 end;
 
+function TCustomAnimatedChartSource.ExtentXYList: TDoubleRect;
+begin
+  if Origin = nil then
+    Result := EmptyExtent
+  else
+    Result := Origin.ExtentXYList;
+end;
+
+function TCustomAnimatedChartSource.ValuesTotal: Double;
+begin
+  if Origin = nil then
+    Result := 0
+  else
+    Result := Origin.ValuesTotal;
+end;
+
 function TCustomAnimatedChartSource.GetCount: Integer;
 begin
   if Origin = nil then
patch.diff (1,519 bytes)

wp

2019-05-22 12:47

reporter   ~0116331

Applied, thanks

Marcin Wiazowski

2019-05-22 18:04

reporter   ~0116342

Confirmed, thanks.

Issue History

Date Modified Username Field Change
2019-05-21 21:18 Marcin Wiazowski New Issue
2019-05-21 21:18 Marcin Wiazowski File Added: patch.diff
2019-05-22 00:56 wp Assigned To => wp
2019-05-22 00:56 wp Status new => assigned
2019-05-22 12:47 wp Status assigned => resolved
2019-05-22 12:47 wp Resolution open => fixed
2019-05-22 12:47 wp Fixed in Revision => 61270
2019-05-22 12:47 wp LazTarget => -
2019-05-22 12:47 wp Widgetset Win32/Win64 => Win32/Win64
2019-05-22 12:47 wp Note Added: 0116331
2019-05-22 18:04 Marcin Wiazowski Status resolved => closed
2019-05-22 18:04 Marcin Wiazowski Note Added: 0116342