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

Item Value Appear on MouseOver?

2 Answers 80 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Nick Jones
Top achievements
Rank 1
Nick Jones asked on 23 Mar 2011, 02:05 PM
On a standard bar chart the item's value sits on top of the bar (see pic).  That's fine if you have a lot of space.  Does anyone know how or if it's possible to have the item value popup when the mouse is moved over the item.  Same can be said for the spleen mode and some of the over chart types in fact,

2 Answers, 1 is accepted

Sort by
0
Accepted
Evgenia
Telerik team
answered on 28 Mar 2011, 09:20 AM
Hi Nick Jones,

You can use the Activeregion.ToolTip property of the Chart Series to show the item label on mouse hover like this:
for (int i = 0; i < RadChart1.Series[0].Items.Count - 1; i++)
     {
         RadChart1.Series[0].Items[i].ActiveRegion.Tooltip = RadChart1.Series[0].Items[i].YValue.ToString();
     }

I hope this is hepful!

All the best,
Evgenia
the Telerik team
0
Nick Jones
Top achievements
Rank 1
answered on 28 Mar 2011, 10:38 AM
Thanks,

Exactly what I was after.  In case anyone in the future wants it in VB.

Private Sub RadChart1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadChart1.MouseHover
     Dim i As Integer
     For i = 0 To RadChart1.Series(0).Items.Count - 1
         RadChart1.Series(0).Items(i).ActiveRegion.Tooltip = RadChart1.Series(0).Items(i).YValue.ToString()
     Next
 End Sub
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Nick Jones
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Nick Jones
Top achievements
Rank 1
Share this question
or