Page 1 of 1

Single Mark on LineSeries Value

Posted: Wed Oct 19, 2005 12:11 pm
by 8443014
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

Posted: Wed Oct 19, 2005 1:00 pm
by narcis
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.

Posted: Wed Oct 19, 2005 1:16 pm
by 8443014
Ok!

I found it. And I programmed it.

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

Jogi

Posted: Wed Oct 19, 2005 1:41 pm
by narcis
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.

Posted: Wed Oct 19, 2005 3:39 pm
by 8443014
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

Posted: Thu Oct 20, 2005 8:01 am
by narcis
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.