hello,
For some reason my Nearest Tool stopped working totally and instead, the same code now provides the Cursor effect on my ASP site. Here's the code:
...
MyChart1.Tools.Add tcNearest
MyChart1.Tools.Items(0).Active = True
MyChart1.Tools.Items(0).asNearest.Series = 0
MyChart1.Tools.Items(0).asNearest.DrawLine = true
MyChart1.Tools.Items(0).asNearest.Pen.Color = vbRed
MyChart1.Tools.Items(0).asNearest.Size = 15
MyChart1.Tools.Items(0).asNearest.Style = hsDiamond
MyChart1.Tools.Add tcNearest
MyChart1.Tools.Items(1).Active = True
MyChart1.Tools.Items(1).asNearest.Series = 1
MyChart1.Tools.Items(1).asNearest.DrawLine = true
MyChart1.Tools.Items(1).asNearest.Pen.Color = vbGreen
MyChart1.Tools.Items(1).asNearest.Size = 15
MyChart1.Tools.Items(1).asNearest.Style = hsDiamond
As can be seen, I use two datasets, each of them drawing linechart (asLine).
I also use the following code to follow the mouse and show the current data point value in an textfield:
sub MyChart_OnNearestToolChange()
dim Nearest0, Nearest1
dim OldNearest0, OldNearest1
With MyChart
Nearest0 = .Tools.Items(0).asNearest.Point
Nearest1 = .Tools.Items(1).asNearest.Point
.Series(0).PointColor(Nearest) = vbCyan
document.frmValue.txtCurrent.value = "Point: " & .Series(0).XValues.Value(Nearest0) & ", Value: " & .Series(0).YValues.Value(Nearest0) & " mA"
document.frmValue.txtVoltage.value = "Point: " & .Series(1).XValues.Value(Nearest1) & ", Value: " & .Series(1).YValues.Value(Nearest1) & " V"
End With
OldNearest0 = Nearest0
OldNearest1 = Nearest1
End sub
This code worked correctly on Wednesday, but after installing Dreamweaver 2004 MX and making a minor change (=.asNearest.Size = 10) the Nearest Tool did not work anymore; instead, I see a cursor for each of the linecharts. After changing the code back to normal and even removing the Dreamweaver, the cursor still appears in the ASP site.
Am I missing something in my code or could this be some kind of fault in the component itself?
Thanks for any replies.
Mike
What happened to Nearest Tool ???
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi Mike,
Mmmm .. shot in the dark here ... mabe something happened to the typelibrary -- have you tried using "4" instead of "tcNearest"?
Mmmm .. shot in the dark here ... mabe something happened to the typelibrary -- have you tried using "4" instead of "tcNearest"?
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/
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/
Typelibrary problem....how to fix?
hi Christopher,
using "4" instead of tcNearest seemed to fix the problem. THANKS!!!!
What could mess up the typelibrary? And how could I fix this problem; namely I reinstalled the whole OS to my laptop (since I needed a server edition of Win 2000) and the same problem persisted there, when I only installed the TeeChart component and copied one of my test ASP pages and tested it.
Mike
using "4" instead of tcNearest seemed to fix the problem. THANKS!!!!
What could mess up the typelibrary? And how could I fix this problem; namely I reinstalled the whole OS to my laptop (since I needed a server edition of Win 2000) and the same problem persisted there, when I only installed the TeeChart component and copied one of my test ASP pages and tested it.
Mike
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi Mike --
Are you sure you have the Metadata tag at the top of your ASP pages, e.g.And how could I fix this problem; namely I reinstalled the whole OS to my laptop (since I needed a server edition of Win 2000) and the same problem persisted there, when I only installed the TeeChart component and copied one of my test ASP pages and tested it.
Code: Select all
<!--METADATA NAME="TeeChart Pro Activex control v6" TYPE="TypeLib"
UUID="{54294AC6-FA71-4C7F-B67C-6C6405DFFD48}"-->
<%
'...code ...
%>
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/
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/
METADATA missing
hi Christopher,
[crying....]
Seems that the METADATA tag was missing; I've deleted it at some point, but don't remember doing that....
Anyway, thanks a million for your support. Now it runs like an angel
Mike
[crying....]
Seems that the METADATA tag was missing; I've deleted it at some point, but don't remember doing that....
Anyway, thanks a million for your support. Now it runs like an angel
Mike