Item Value Appear on MouseOver?

3 posts, 1 answers
  1. Nick Jones
    Nick Jones avatar
    18 posts
    Member since:
    Jun 2009

    Posted 23 Mar 2011 Link to this post

    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. Answer
    Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 28 Mar 2011 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Nick Jones
    Nick Jones avatar
    18 posts
    Member since:
    Jun 2009

    Posted 28 Mar 2011 Link to this post

    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
Back to Top