Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 524

Summary: Give an alternative without needing to set Modified:=True after assigning a TChartValueList
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: SeriesAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: enhancement CC: david
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description yeray alonso 2013-12-20 11:31:10 EST
If you so like in the Real-Time Charting article:
http://www.teechart.net/reference/articles/index.php

When you assign a TChartValueList to the YValues or XValues, you have to call Modified:=True to make the chart to recalculate MinValue, MaxValue, Total i TotalABS so the axis can be automatically rescaled.

However, if you know these Statistics, you may want to skip the internal loop made at RecalcStats to calculate these values for the axis.

An option would be to set Modified:=False and manually set the axes scales with the known values.
Comment 1 david berneda 2013-12-30 11:04:29 EST
Fixed. Added a new overload method TChartValueList.RecalcStats with the four parameters that correspond to values stats (min, max, total and totalabs).

Series1.YValues.RecalcStats( 0, 1000, 123456, 34893478934);

When calling this method, it is not necessary to set YValues.Modified := True and this prevents to recalculate the stats.

(This is a performance optimization, when you change YValues.Value array directly and already know the stats amounts)