This is a migrated thread and some comments may be shown as answers.

Help: Need more data in Tooltip.

3 Answers 41 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Chelsey
Top achievements
Rank 1
Chelsey asked on 18 Aug 2010, 12:05 AM
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

3 Answers, 1 is accepted

Sort by
0
Accepted
Sia
Telerik team
answered on 18 Aug 2010, 10:13 AM
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
0
Chelsey
Top achievements
Rank 1
answered on 18 Aug 2010, 04:18 PM
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
0
Chelsey
Top achievements
Rank 1
answered on 18 Aug 2010, 09:50 PM
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)

)
Tags
Chart
Asked by
Chelsey
Top achievements
Rank 1
Answers by
Sia
Telerik team
Chelsey
Top achievements
Rank 1
Share this question
or