Point in time events

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
TheRoadrunner
Newbie
Newbie
Posts: 17
Joined: Thu Dec 07, 2006 12:00 am
Location: Sønderborg, Denmark

Point in time events

Post by TheRoadrunner » Tue May 01, 2007 11:37 am

Hi all,

being a TeeChart newbie, I'm not sure how to solve this one:

I have a Chart with a number of TLineSeries representing data logged at a given interval. The X-axis represents time obviously.
Asynchronus to this logging, some events might happen that should be represented on the same X-axis. The text describing the event could be a hint when the mouse hovers over each point, or even printed next to the points.
I tried adding a TPointSeries, where I can add events at different X-values (times), but this approach has (at least) two backsides:
1) I would like to avoid the events-series to show up in the legend.
2) The Label added with TPointSeries.AddXY(Time, 0, 'Label') is put on the X-axis instead of the date/time info that used to be there.

Any ideas ?

TIA

Søren

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed May 02, 2007 11:36 am

Hi Søren,
1) I would like to avoid the events-series to show up in the legend.
This can be easily solved using this:

Code: Select all

  Series1.ShowInLegend:=false;
2) The Label added with TPointSeries.AddXY(Time, 0, 'Label') is put on the X-axis instead of the date/time info that used to be there.


Try forcing your bottom axis to display series values using this:

Code: Select all

  Chart1.Axes.Bottom.LabelStyle:=talValue;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

TheRoadrunner
Newbie
Newbie
Posts: 17
Joined: Thu Dec 07, 2006 12:00 am
Location: Sønderborg, Denmark

Post by TheRoadrunner » Wed May 02, 2007 11:45 am

Hi Narcis

Thanks a lot for your quick response, that worked fine. :D

Do you have a suggestion for showing the label text (which is now showed as a tip) next to the point, or would that be annotations ?

/Søren

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed May 02, 2007 12:08 pm

Hi Søren,

Have you tried making series marks visible?

Code: Select all

  Series1.Marks.Visible:=true;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

TheRoadrunner
Newbie
Newbie
Posts: 17
Joined: Thu Dec 07, 2006 12:00 am
Location: Sønderborg, Denmark

Post by TheRoadrunner » Wed May 02, 2007 12:30 pm

Hi Narcis,

Yes, that shows the marks (obviously - stupid me).
But the mark text then hides the point, can i offset it relative to the point?

Best
Søren

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed May 02, 2007 1:11 pm

Hi Søren,

Yes, this can be done setting arrow's length:

Code: Select all

  Series1.Marks.ArrowLength:=20; 
Notice that negative values for ArrowLength are also supported.

Or another option is setting custom marks position as shown here.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

TheRoadrunner
Newbie
Newbie
Posts: 17
Joined: Thu Dec 07, 2006 12:00 am
Location: Sønderborg, Denmark

Post by TheRoadrunner » Wed May 02, 2007 1:47 pm

Thank you VERY much Narcis

Kind regards

Søren

Post Reply