How to color points on xy chart based upon another series

TeeChart for ActiveX, COM and ASP
amueller
Newbie
Newbie
Posts: 30
Joined: Tue Jul 26, 2005 4:00 am

Post by amueller » Wed Jan 25, 2006 2:27 pm

I sent the code off to PEP. Did you receive it?

amueller
Newbie
Newbie
Posts: 30
Joined: Tue Jul 26, 2005 4:00 am

Post by amueller » Wed Jan 25, 2006 9:46 pm

I haven't heard from anyone.... and I can't seem to figure this out on my own. Here is the code ... This is the code that I can cut and paste from a standard exe to an active x and it behaves like I mentioned.

tmp is ALWAYS = -1 when this code is in my ActiveX control. If I create a standard EXE with the same code that determines what the color of the point is, tmp is NOT ALWAYS = -1

This is frustrating!

---
If PSChart.Series(1).Count > 0 Then

'Re-color Previous Data Point
With PSChart
.Series(1).ColorEachPoint = True

XCoord = .Axis.Bottom.CalcXPosValue(.Series(1).XValues.Last)
YCoord = .Axis.Left.CalcYPosValue(.Series(1).YValues.Last)

Debug.Print "Last X: " & .Series(1).XValues.Last
Debug.Print "Last Y: " & .Series(1).YValues.Last

tmp = .Series(0).Clicked(XCoord, YCoord)

om.SendPMessage "tmp = " & tmp

If tmp <> -1 Then
.Series(1).PointColor(.Series(1).Count - 1) = RGB(0, 0, 0)
Debug.Print "temp <> -1"
Else
.Series(1).PointColor(.Series(1).Count - 1) = RGB(255, 0, 0)
Debug.Print "temp = -1"
End If

End With
End If
---

Please help me!

amueller
Newbie
Newbie
Posts: 30
Joined: Tue Jul 26, 2005 4:00 am

Post by amueller » Thu Jan 26, 2006 2:57 pm

Furthur analysis shows that:

XCoord = 388
YCoord = 223

ALWAYS, no matter what the last values were. In a standard exe, it does not do this.

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

Post by Pep » Mon Jan 30, 2006 8:18 am

Hi Andrew,

sorry for delay, I've received it, I'm trying to find which is the problem. I'll let you know something asap.

Post Reply