TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
-
msd48
- Newbie
- Posts: 14
- Joined: Mon Oct 15, 2007 12:00 am
Post
by msd48 » Fri Aug 29, 2008 6:13 am
Hi!
I have some series
Code: Select all
...
series1.HorizAxis := aBottomAxis;
series1.XValues.DateTime := true;
...
how i can get XValueIndex by XValue?
I need some function like this
Code: Select all
var
dt: TDateTime;
vValueIndex: integer;
begin
...
dt := StrToDateTime('21.11.2008 11:00');
vValueIndex := someFunction(dt);
...
end;
-
Narcís
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
-
Contact:
Post
by Narcís » Fri Aug 29, 2008 8:05 am
Hi msd48,
You can use Locate method:
Code: Select all
vValueIndex := Series1.XValues.Locate(dt);
-
msd48
- Newbie
- Posts: 14
- Joined: Mon Oct 15, 2007 12:00 am
Post
by msd48 » Fri Aug 29, 2008 8:17 am
Hi, Narcís
It`s magnificent!
Thanks for the early reply!
Question is closed.