TimeBar mouseover datapoint

2 posts, 0 answers
  1. Pete
    Pete avatar
    27 posts
    Member since:
    Feb 2011

    Posted 17 Aug 2011 Link to this post

    Referencing the API documentation http://www.telerik.com/help/silverlight/radtimebar-overview.html

    Is it possible to capture when the mouse hovers over the mark(s )on the sparkline(s) and show either a tooltip or popup with detail information for the mark over which the mouse is currently positioned?

    If it is how would I accomplish this?
  2. Missing user
    Missing user avatar

    Posted 22 Aug 2011 Link to this post

    Hello Pete,

    The TimeBar control does not provide this functionality by default. However, you can take advantage of the HoveredPeriodChanged event and HoveredPeriod property, which will give you information for the hovered period and when it is changed. Based on this information you can implement custom logic for manually getting the information for the point mark in the hovered period and display a tooltip with the retrieved details. For example:
    timeBar.HoveredPeriodChanged += new EventHandler<HoveredPeriodEventArgs>(timeBar_HoveredPeriodChanged);
    ...
    void timeBar_HoveredPeriodChanged(object sender, Telerik.Windows.Controls.TimeBar.HoveredPeriodEventArgs e)
    {
        if (timeBar.HoveredPeriod.HasValue)
        {
            // implement custom logic for manually getting the data for the hovered marks, based on the hovered period range
            // and display a ToolTip with these details
        }
    }

    I hope that this information helps.

    Best wishes,
    Polina
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. DevCraft banner
Back to Top