Tee6 TCompressFunction Problem

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
rotella
Newbie
Newbie
Posts: 7
Joined: Mon Nov 03, 2003 5:00 am
Location: chicago, IL

Tee6 TCompressFunction Problem

Post by rotella » Tue Sep 21, 2004 3:29 pm

We are noticing two problems with this:
1. The .Compress property does not seem to "keep" the value, ie if we set it to ocWeek, it will not necessarily use ocWeek, it will be a "random" value (ocMonth, ocQuarter, etc).

2. There seems to be no way to make the series attached to this function immediately "recompute" after changing the .Compress property, ie when changing at runtime from ocWeek to ocMonth.

Code: Select all

OutputDebugStringA(PChar(Format('start period %d  first %d  last %d', [ord(period), v_derived.Series.FirstValueIndex, v_derived.Series.LastValueIndex])));

(Series.FunctionType as TCompressFunction).Compress := period;

OutputDebugStringA(PChar(Format('end period %d  first %d  last %d', [ord(period), v_derived.Series.FirstValueIndex, v_derived.Series.LastValueIndex])));
The .FirstValueIndex and .LastValueIndex properties do not change, even though the .Compress does.
We have tried different combinations of function.ReCalculate(), chart.RefreshData(), etc.

The only event that seems to "synchronize" the derived series, is scrolling the chart.

This also seems to be an issue with using derived functions in general, which affects code that attempts to "rescale" the y-axis, based on the visible points, as denoted by series.FirstValueIndex and series.LastValueIndex.

Thanks in advance for any insight.

Post Reply