OnMouseEnterSeries problem

TeeChart for ActiveX, COM and ASP
Post Reply
Mike
Newbie
Newbie
Posts: 40
Joined: Wed Jan 28, 2004 5:00 am

OnMouseEnterSeries problem

Post by Mike » Tue Feb 24, 2004 1:22 pm

hi,

I have two datasets in my ASP page and I use OnMouseEnterSeries to display the data value for each of the series in a textarea. I have tried a couple of cases and here are their descriptions:

Case 1:
I use the method only for Series0 and display the data for the two series. When moving the mouse over the datapoint(s) of Series0, the values are displayed correctly. When moving the mouse over Series1, both the values are 2.12199579096577E-311...even though the OnMouseEnterSeries method is not provided for Series1.

sub MyChart_OnMouseEnterSeries(Series0)
dim clicked, strValues
clicked = MyChart.Series(0).GetMousePoint
strValues = ""
strValues = strValues + "R1: " & CStr(MyChart.Series(0).YValues.Value(clicked)) & " mV" & vbNewLine
strValues = strValues + "R2: " & CStr(MyChart.Series(1).YValues.Value(clicked)) & " mV" & vbNewLine
window.frmValue.txtDecay.value = strValues
end sub



Case 2:
I added the second OnMouseEnterSeries method for Series1 and now the page works so that when moving the mouse over Series0 datapoint, both the shown values are 2.12199579096577E-311 and when moving over Series1, both the shown values are correct.


Case 3:
I modified the methods so that when moving the mouse over Series0, it should show only the data value of Series0 data point (.Series(0).YValues.Value(clicked)) and similarly, when moving the mouse over Series1, only the data value of Series1 data point is shown (.Series(1).YValues.Value(clicked)). HOWEVER, the actual shown data values are: 2.12199579096577E-311 when moving over Series0 and the correct value when moving over Series1.


Case 4:
I switched the two methods so that the OnMouseEnterSeries(Series1) is now defined BEFORE OnMouseEnterSeries(Series0) and the functionality described in Case 3 is now vice versa. It seems that only the function that has been defined last in the source code works correctly.


What should I do to implement the feature that when moving the mouse over any of the dataseries (data points), the data values of all series are shown correctly?

Thanks in advance for any advice

Mike

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 » Mon Mar 01, 2004 2:10 pm

Hi Mike,
What should I do to implement the feature that when moving the mouse over any of the dataseries (data points), the data values of all series are shown correctly?
You could try using code similar to the following (please excuse the VB.6.0 code -- this should be easy to implement in VBScript/ASP):

Code: Select all

Private Sub Form_Load()
With TChart1
    .AddSeries scPoint
    .AddSeries scPoint
    
    .Series(0).FillSampleValues 10
    .Series(1).FillSampleValues 10
End With
End Sub

Private Sub TChart1_OnMouseMove(ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
Dim Series0, Series1
With TChart1
    Series0 = .Series(0).Clicked(X, Y)
    Series1 = .Series(1).Clicked(X, Y)
    
    If Series0 <> -1 Then
        Label1.Caption = .Series(0).YValues.Value(Series0)
    End If
    If Series1 <> -1 Then
        Label1.Caption = .Series(1).YValues.Value(Series1)
    End If
End With
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/

Mike
Newbie
Newbie
Posts: 40
Joined: Wed Jan 28, 2004 5:00 am

Post by Mike » Tue Mar 02, 2004 1:58 pm

hello Christopher,

Thanks for your response. However, by trying out your code the graph was displayed correctly, but nothing happened during mouse movement over the chart.

Are all OnMouseMove, OnMouseEnterSeries, OnMouseLeaveSeries etc. functions fully usable also in VBScript, when using the .tee file as providing the chart to the client side?

TIA

Mike

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 » Tue Mar 02, 2004 3:54 pm

Hi Mike,
Are all OnMouseMove, OnMouseEnterSeries, OnMouseLeaveSeries etc. functions fully usable also in VBScript, when using the .tee file as providing the chart to the client side?
No. I have attached a working ASP/HTM example of the VB code I sent you earlier to:

[url]news://www.berneda.com/steema.public.attachments[/url]
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/

Mike
Newbie
Newbie
Posts: 40
Joined: Wed Jan 28, 2004 5:00 am

cannot download attachments

Post by Mike » Wed Mar 03, 2004 11:18 am

hi,

I found your attachments, but cannot download them due to

"OE removed access to the following unsafe attachments in your mail:...."

My settings or server's settings?

.-= Mike =-.

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 Mar 03, 2004 12:18 pm

Hi Mike,
I found your attachments, but cannot download them due to

"OE removed access to the following unsafe attachments in your mail:...."

My settings or server's settings?
Your settings :D. In OE go to Tools -> Options -> Security -> Do not allow attachments to be saved or opened that could potentially be a virus.
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/

Mike
Newbie
Newbie
Posts: 40
Joined: Wed Jan 28, 2004 5:00 am

found it

Post by Mike » Wed Mar 03, 2004 1:42 pm

hi,

thanks, found it, and posted.

Mike

Post Reply