Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Chart Control
  New Posts New Posts RSS Feed - Display Y Axis Point Value On MouseOver
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Display Y Axis Point Value On MouseOver

 Post Reply Post Reply
Author
Message
SeatTrax View Drop Down
Newbie
Newbie


Joined: 01 June 2011
Location: Kansas City, MO
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote SeatTrax Quote  Post ReplyReply Direct Link To This Post Topic: Display Y Axis Point Value On MouseOver
    Posted: 06 December 2012 at 6:13pm
In our ChartSplineSeriesStyle charts, we don't like the look of the labels on the points, and always set Style.Label.Visible = False.

Now we have a customer that has asked if we can display the Y Axis point value when they mouse over the point.

I looked through the development forums, and didn't find any mention of a mouse over method, and the only thing I could find in the codejock sample chart programs was the following sub routine in ChartSample.vbp, but it writes the point value to the immediate window, and we want it to display above the point, when the point is mouse over'd.

Private Sub ChartControl_MouseMove(Button As Integer, Shift As Integer, x As Long, y As Long)
    Dim Element As ChartElement
    Set Element = ChartControl.HitTest(x, y)
   
    If TypeOf Element Is XtremeChartControl.ChartSeriesPoint Then
        Dim Point As ChartSeriesPoint
        On Error Resume Next
        Set Point = Element
   
        If (Not Point Is Nothing) Then
            Debug.Print "Point " & Point.Value(0)
        End If
    End If
   
End Sub

Is is possible to add this functionality w/ the existing Chart Control?
Back to Top
SeatTrax View Drop Down
Newbie
Newbie


Joined: 01 June 2011
Location: Kansas City, MO
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote SeatTrax Quote  Post ReplyReply Direct Link To This Post Posted: 07 December 2012 at 10:38am
Figured out the answer to my own dilemma Smile

Wish the CodeJock example code was a bit more detailed tho!

Private Sub ChartControl_MouseMove(Button As Integer, Shift As Integer, x As Long, y As Long)
    Dim Element As ChartElement
    Set Element = ChartControl.HitTest(x, y)
  
    If TypeOf Element Is XtremeChartControl.ChartSeriesPoint Then
        Dim Point As ChartSeriesPoint
        On Error Resume Next
        Set Point = Element
  
        If (Not Point Is Nothing) Then
            ChartControl.ToolTipText = Point.Value(0)

        End If
    End If
  
End Sub

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.