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 - Give an alternative without needing to set Modified:=True after assigning a TChartValueList
Summary: Give an alternative without needing to set Modified:=True after assigning a T...
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Series (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-20 11:31 EST by yeray alonso
Modified: 2013-12-30 11:04 EST (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)