TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
-
stsl
- Newbie
- Posts: 26
- Joined: Mon Apr 19, 2004 4:00 am
- Location: France
Post
by stsl » Fri Oct 21, 2005 9:11 am
Hello,
I try to use the TMedianTeeFunction function.
I have an ERange error in the AddValue function.
My sample code :
Code: Select all
Series1.XValues.DateTime := True;
MedianFunction := TMedianTeeFunction.Create(Chart1);
MedianFunction.PeriodStyle := psRange;
MedianFunction.PeriodAlign := paCenter;
MedianFunction.IncludeNulls := False;
MedianFunction.Period := DateTimeStep[ dtOneDay ];
Series2.SetFunction(MedianFunction);
Series2.DataSource := Series1;
Series2.CheckDataSource;
When i use TAverageTeeFunction it work's properly with the same parameters.
Regards
-
stsl
- Newbie
- Posts: 26
- Joined: Mon Apr 19, 2004 4:00 am
- Location: France
Post
by stsl » Fri Oct 21, 2005 12:36 pm
Hello,
In the teeFuncI unit, function CustomSortedFunction.Calculate, i replaced :
Code: Select all
AddValue(SourceSeries.MandatoryValueList.Value[t],t);
by
AddValue(SourceSeries.MandatoryValueList.Value[t],t-FirstIndex);
and it work's properly.
Is it possible to test this ?
Regards
-
Narcís
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
-
Contact:
Post
by Narcís » Fri Oct 21, 2005 2:08 pm
Hi stsl,
I'm not able to reproduce the problem you reported here using latest TeeChart version available at our Customer Download Area, which is v7.05, and this code:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var MedianFunction: TMedianTeeFunction;
begin
Series1.FillSampleValues();
Series1.XValues.DateTime := True;
MedianFunction := TMedianTeeFunction.Create(Chart1);
MedianFunction.PeriodStyle := psRange;
MedianFunction.PeriodAlign := paCenter;
MedianFunction.IncludeNulls := False;
MedianFunction.Period := DateTimeStep[ dtOneDay ];
Series2.SetFunction(MedianFunction);
Series2.DataSource := Series1;
Series2.CheckDataSource;
end;
Which TeeChart version are you using? If you can reproduce it using v7.05, could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at [url]news://
www.steema.net/steema.public.attachments[/url] newsgroup.
-
stsl
- Newbie
- Posts: 26
- Joined: Mon Apr 19, 2004 4:00 am
- Location: France
Post
by stsl » Fri Oct 21, 2005 3:02 pm
Hi,
I will put a sample on your site.
And there is an other problem with the TMedianTeeFunction.CalcResult if ICount = 1.
Regards
-
stsl
- Newbie
- Posts: 26
- Joined: Mon Apr 19, 2004 4:00 am
- Location: France
Post
by stsl » Tue Oct 25, 2005 5:55 am
Hi,
I posted a sample on the newgroup.
Did you try my sample ?
Regards
-
Narcís
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
-
Contact:
Post
by Narcís » Fri Oct 28, 2005 1:24 pm
Hi stsl,
Thanks to your attached project we have been able to reproduce it. I've added your report to our defect list (TV52011063) to be looked carefully and be considered for inclusion in the next releases.