Single Mark on LineSeries Value

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Thomas Klingler
Advanced
Posts: 103
Joined: Tue Mar 02, 2004 5:00 am
Location: Bad Wurzach
Contact:

Single Mark on LineSeries Value

Post by Thomas Klingler » Wed Oct 19, 2005 12:11 pm

Hi,

I want to show a Single Mark on a LineSeries at that x-Position that I click.

Because the Line Series has more than 1000 Values and if I show all marks, they overlap each other and nothing is seen.

I would like to use the OnClickSeries Event do do this.
Any solution?

Thanks
Jogi

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 Oct 19, 2005 1:00 pm

Hi Jogi,

There's a specific tool for that purpose which is called TMarkTipsTool and can be found on unit TeeTools. For more information about this tool please have a look at the features demo available at TeeChart's program group.
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

Thomas Klingler
Advanced
Posts: 103
Joined: Tue Mar 02, 2004 5:00 am
Location: Bad Wurzach
Contact:

Post by Thomas Klingler » Wed Oct 19, 2005 1:16 pm

Ok!

I found it. And I programmed it.

But the Mark disappears after 2 seconds.
I allso need it to be printed.

Jogi

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 Oct 19, 2005 1:41 pm

Hi Jogi,

Ok, then you'd better us a TAnnotationTool which examples you can find at the feature demo as well. Specially have a look at the "Annotation Callout" example.
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

Thomas Klingler
Advanced
Posts: 103
Joined: Tue Mar 02, 2004 5:00 am
Location: Bad Wurzach
Contact:

Post by Thomas Klingler » Wed Oct 19, 2005 3:39 pm

Hi Narcis,

thanks, this would help me a bit.

But is it not exactly what I wanted.
Because I have up to 100 Series in the Chart and the TAnnotationTool let me show the Value of only one series. So I have to use 100 TAnnotationTools to solve the problem.
Not so nice!

Greetings
Jogi

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

Post by Narcís » Thu Oct 20, 2005 8:01 am

Hi Jogi,

Then you can do what's done in the example but for all series. Something like:

Code: Select all

for i:=0 to Chart1.SeriesCount - 1 do
begin
    tmp:=NearestPoint(Chart1[i], x, y);

    if tmp<>-1 then SetCallout(tmp); 
end;
And at annotation text set:

Code: Select all

  // Change annotation text
  ChartTool1.Text:=ChartTool1.Text+#13+'Point: '+IntToStr(AIndex)+#13+
                   'Value: '+Series1.ValueMarkText[AIndex];
However, if you need to draw info for 100 series this annotation tool can be really messy. Maybe it would be better you used a Memo, ListBox or ... to display that info out of the chart.
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

Post Reply