Help: Need more data in Tooltip.

4 posts, 1 answers
  1. Chelsey
    Chelsey avatar
    8 posts
    Member since:
    Aug 2010

    Posted 17 Aug 2010 Link to this post

    Hello,
      I have a line chart that is working great. I was wondering how I could add extra data to the tooltip? 

    Currently I have the yValue contained in it, which is great, I just need a little more. Like a datetime and serial number.

    Please help.

    Chelsey
  2. Answer
    Sia
    Admin
    Sia avatar
    746 posts

    Posted 18 Aug 2010 Link to this post

    Hello Chelsey,

    Please check the approach used in our First Look example. You can see how to put more information in your tooltips there.

    Greetings,
    Sia
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Chelsey
    Chelsey avatar
    8 posts
    Member since:
    Aug 2010

    Posted 18 Aug 2010 Link to this post

    Hi, great thanks,

    No I have a new problem caused by your solution!

    The Tooltip is getting populated with bogus data. I'm using the same variable that I used to populate the yValue of the chart.

    Every high(er) point has a value of 9102
    Every low(er) point has a value of 992
    > very strange IMO

    Not sure what is causing this, but I did see that in the example there is a #XCAT and #Y{C0} inside the string to populate your tooltip,
     I am really not  sure what this is. I will look into it while I wait for your reply.

    /**********UPDATE*********/
    OK, I fixed that, but now, yValue is working great in the tool tip, but when I add a string to it, it only shows the last record on ALL of the tooltips.

    Here is my code ///

      series_test.Add(New DataPoint(realcount, tempValue))
      series_test.Definition.ItemToolTipFormat = "Gain: #Y" & vbCr & vbLf & "Serial: " & tempSerial

    ///

    What am I doing wrong?

    /*****END UPDATE*****/

    Thanks,
    Chelsey
  4. Chelsey
    Chelsey avatar
    8 posts
    Member since:
    Aug 2010

    Posted 18 Aug 2010 Link to this post

    OK, I figured this one out myself.

    I had to create a new DataPoint and add everything in manually -

    First I was using ( 
    series_test.Add(New DataPoint(realcount, tempValue))
    )

    to add anything I want into the point label I did this (
         Dim dptest As New DataPoint

                                dptest.YValue = tempValue
                                dptest.XValue = realcount

                                dptest.Tooltip = "Gain: " & tempValue & vbCr & vbLf & vbCr & vbLf & tempResults

                                series_test.Add(dptest)

    )
Back to Top