chart synchronization

TeeChart for ActiveX, COM and ASP
Post Reply
Ariel Tetro
Newbie
Newbie
Posts: 21
Joined: Mon Nov 03, 2003 5:00 am
Contact:

chart synchronization

Post by Ariel Tetro » Tue Apr 13, 2004 4:09 pm

Hi,

We have a chart with multiple series. Each series contains 19 points (18 indexes). when i click on the edge of a series the OnClickSeriesTChart captures a click on index 17. only when i move the mouse slowly and very delicately and click on the series' edge, do i get notify on a click on the 18th index.
Can you help me resolve this issue?

Teechart version (6.0.4)

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Apr 14, 2004 7:54 am

Hi,

which series type are you using ? Does this happens using for example a Point series type ? I think the problem is that if you're using a line series the index of each point goes from point to point so the index of the last point is just a litle portion.

Ariel Tetro
Newbie
Newbie
Posts: 21
Joined: Mon Nov 03, 2003 5:00 am
Contact:

Post by Ariel Tetro » Wed Apr 14, 2004 7:57 am

We are using a line series... So how can we avoid this behavior?
Even if i make the points visible (i.e. make a point become designated with a triangle) clicking on that point will still have the same result. We don't want to change the series type and how it is displayed...

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Wed Apr 14, 2004 1:52 pm

Hi --
We are using a line series... So how can we avoid this behavior?
Using TeeChart AXv6.0.0.4 the following seems to work OK here:

Code: Select all

Private Sub Form_Load()
With TChart1
    .Aspect.View3D = False
    For i = 0 To 5
        .AddSeries scLine
        .Series(i).FillSampleValues 19
        .Series(i).asLine.Pointer.Visible = True
    Next i
End With
End Sub

Private Sub TChart1_OnClickSeries(ByVal SeriesIndex As Long, ByVal ValueIndex As Long, ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
Label1.Caption = "Series " & SeriesIndex & "  ValueIndex " & ValueIndex
End Sub
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Ariel Tetro
Newbie
Newbie
Posts: 21
Joined: Mon Nov 03, 2003 5:00 am
Contact:

Post by Ariel Tetro » Wed Apr 14, 2004 3:01 pm

Here are my results:

when i set the pointer visibility to true, the correct index is returned, while when it is invisible, i keep getting the one before last ValueIndex index instead of the last one.
why is it so? is it possible to get the same result even if the series pointer is invisible?
Further to that, as far as i understood from the documentation, when you click near a point, you get the index to the closest point - this isn't the case both when the pointer is visible and invisible. when i click near the last point, i still get information about the previous one...

Ariel

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Wed Apr 14, 2004 3:13 pm

Hi --
when i set the pointer visibility to true, the correct index is returned, while when it is invisible, i keep getting the one before last ValueIndex index instead of the last one.
why is it so?
This is because the first line (between the points 0 and 1) has valueindex 0. The last line, from point 17 to 18 therefore has valueindex 17. When you make the pointers visible this mute point is resolved.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Ariel Tetro
Newbie
Newbie
Posts: 21
Joined: Mon Nov 03, 2003 5:00 am
Contact:

Post by Ariel Tetro » Wed Apr 14, 2004 3:26 pm

OK, thank you for the quick reply.
I would be happy to get some answers about the other issues i raised in my previous post.

10x again,

Ariel

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Wed Apr 14, 2004 4:17 pm

Hi --
I would be happy to get some answers about the other issues i raised in my previous post.
Could you please send me a link to the post in question?
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Ariel Tetro
Newbie
Newbie
Posts: 21
Joined: Mon Nov 03, 2003 5:00 am
Contact:

Post by Ariel Tetro » Wed Apr 14, 2004 4:26 pm

i meant what i wrote here:

when i set the pointer visibility to true, the correct index is returned, while when it is invisible, i keep getting the one before last ValueIndex index instead of the last one.
why is it so? is it possible to get the same result even if the series pointer is invisible?
Further to that, as far as i understood from the documentation, when you click near a point, you get the index to the closest point - this isn't the case both when the pointer is visible and invisible. when i click near the last point, i still get information about the previous one...

Ariel

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Wed Apr 14, 2004 4:41 pm

Hi --

Didn't I answer that when I said:
This is because the first line (between the points 0 and 1) has valueindex 0. The last line, from point 17 to 18 therefore has valueindex 17. When you make the pointers visible this mute point is resolved.
So, pointers visible on points 17 and 18. Click on the last pointer and the valueindex is 18; click on the line that leads to it and the valueindex is 17.

Pointers invisible .. you cannot click on point 18 because the pointer is invisible, so the whole of the last line has valueindex 17.

The problem here is this .. if the first line (between the points 0 and 1) had valueindex 1 then the "problem" would exist at the beginning of the line and not at the end of it, id est .. where is valueindex 0?

Given the impossibility of attaining a compromise position between these two extremes it was decided to name the first line with valueindex 0.

I hope this is clear :D
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Ariel Tetro
Newbie
Newbie
Posts: 21
Joined: Mon Nov 03, 2003 5:00 am
Contact:

Post by Ariel Tetro » Sun Apr 18, 2004 7:37 am

Yes it is, thank you for your reply.

Ariel

Post Reply