Page 1 of 1

chart synchronization

Posted: Tue Apr 13, 2004 4:09 pm
by 9079594
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)

Posted: Wed Apr 14, 2004 7:54 am
by Pep
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.

Posted: Wed Apr 14, 2004 7:57 am
by 9079594
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...

Posted: Wed Apr 14, 2004 1:52 pm
by Chris
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

Posted: Wed Apr 14, 2004 3:01 pm
by 9079594
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

Posted: Wed Apr 14, 2004 3:13 pm
by Chris
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.

Posted: Wed Apr 14, 2004 3:26 pm
by 9079594
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

Posted: Wed Apr 14, 2004 4:17 pm
by Chris
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?

Posted: Wed Apr 14, 2004 4:26 pm
by 9079594
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

Posted: Wed Apr 14, 2004 4:41 pm
by Chris
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

Posted: Sun Apr 18, 2004 7:37 am
by 9079594
Yes it is, thank you for your reply.

Ariel