How to color points on xy chart based upon another series
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!
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!
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.
sorry for delay, I've received it, I'm trying to find which is the problem. I'll let you know something asap.
Pep Jorge
http://support.steema.com
http://support.steema.com