BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Finding the series index for the data at the x-axis minimum

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Reporting-Charting
View previous topic :: View next topic  
Author Message
m610
Guest





PostPosted: Thu Dec 07, 2006 9:12 am    Post subject: Finding the series index for the data at the x-axis minimum Reply with quote



I'd like to be able to determine which item in a lineseries is located
at/near the x-axis minimum (left y-axis) without having to search all
my data (some 40,000 point) to find a close match. My searching
procedure works OK, but it is clumbsy and a bit slow. I was hoping
that TeeChart had a handy property I could read instead.

Thanks in advance.
Back to top
David Berneda
Guest





PostPosted: Thu Dec 07, 2006 10:40 pm    Post subject: Re: Finding the series index for the data at the x-axis mini Reply with quote



Hi

http://www.steema.net/TeeChart6Docs/TChartSeries.FirstValueIndex.html

When the line is displayed, the min and max indexes are internally calculated to avoid painting many points that might possible be
outside the chart rectangle.
These properties are available only *after* that chart has displayed.

var a,b : Integer;
a := Series1.FirstValueIndex;
b: =Series1.LastValueIndex;

They are "-1" meaning the whole series points ( from 0 to Series1.Count-1 ) need to be displayed.

With these indexes you can then query the series values:

var valueMin : Double;
valueMin := Series1.YValues[ a ];

regards
david
www.teechart.com

"m610" <mlmeier (AT) sbcglobal (DOT) net> wrote in message news:1165463322.790785.231110 (AT) n67g2000cwd (DOT) googlegroups.com...
Quote:
I'd like to be able to determine which item in a lineseries is located
at/near the x-axis minimum (left y-axis) without having to search all
my data (some 40,000 point) to find a close match. My searching
procedure works OK, but it is clumbsy and a bit slow. I was hoping
that TeeChart had a handy property I could read instead.

Thanks in advance.
Back to top
m610
Guest





PostPosted: Mon Dec 11, 2006 12:05 am    Post subject: Re: Finding the series index for the data at the x-axis mini Reply with quote



Thanks. It worked perfectly and everything is running smooth and quick
now.

Mike

David Berneda wrote:
Quote:
Hi

http://www.steema.net/TeeChart6Docs/TChartSeries.FirstValueIndex.html

When the line is displayed, the min and max indexes are internally calculated to avoid painting many points that might possible be
outside the chart rectangle.
These properties are available only *after* that chart has displayed.

var a,b : Integer;
a := Series1.FirstValueIndex;
b: =Series1.LastValueIndex;

They are "-1" meaning the whole series points ( from 0 to Series1.Count-1 ) need to be displayed.

With these indexes you can then query the series values:

var valueMin : Double;
valueMin := Series1.YValues[ a ];

regards
david
www.teechart.com

"m610" <mlmeier (AT) sbcglobal (DOT) net> wrote in message news:1165463322.790785.231110 (AT) n67g2000cwd (DOT) googlegroups.com...
I'd like to be able to determine which item in a lineseries is located
at/near the x-axis minimum (left y-axis) without having to search all
my data (some 40,000 point) to find a close match. My searching
procedure works OK, but it is clumbsy and a bit slow. I was hoping
that TeeChart had a handy property I could read instead.

Thanks in advance.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Reporting-Charting All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.