Sync TrackBall Move on Two Charts

8 posts, 0 answers
  1. Amin
    Amin avatar
    2 posts
    Member since:
    Sep 2012

    Posted 27 Sep 2012 Link to this post

    This is for WPF ChartView. I am trying to Sync the track ball move of one chart to show up in another chart. I am displaying two different sets of information in both charts, but since the X-Axis has the same value for both, I need to Sync the move on one chart and see the result in the other chart. I am attaching a screenshot to explain better. Any Idea, how I can accomplish this. I know I have to trigger the  CharTrackBallBehavior_TrackInfoUpdated event somehow, but as far as I can see in other threads it's not possible to trigger that event manually. Any Other ideas on how I can accomplish this?
  2. Petar Marchev
    Petar Marchev avatar
    996 posts

    Posted 01 Oct 2012 Link to this post

    Hello Amin,

    The track-info behavior is designed to work much as a tool-tip. It reacts only when the mouse is over the chart. Thus you can not start it with code, it will only display if the mouse is on top of the chart. So, unfortunately you can not achieve this programatically.

    I have two suggestions for you:
    1. You can use a single chart view with two vertical axes - one for the two series from the top chart (in your snapshot) and a second one for the two series from the bottom chart. This way you can keep the track info behavior and show info for all 4 series in the track ball.

    2. Do not show the track ball at all. Use the TrackInfoUpdated event to only find out which category the mouse is over. Then show the required information somewhere else, say, on the right of the charts. (this would involve custom C# code and XAML)

    Let us know how it goes. 

    Petar Marchev
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  3. Senthil kumar
    Senthil kumar avatar
    21 posts
    Member since:
    Sep 2013

    Posted 17 Feb 2014 in reply to Petar Marchev Link to this post

    could you provide sample code for implementing the second point?

    i need to implement the same requirement in my project. 
  4. Petar Marchev
    Petar Marchev avatar
    996 posts

    Posted 18 Feb 2014 Link to this post

    Hello Senthil,

    You can check our sdk examples here. The provided example uses a utilities class and demonstrates one possible approach to using annotations that mimic synced track-balls.

    Petar Marchev
  5. DAVE
    DAVE avatar
    19 posts
    Member since:
    Jun 2010

    Posted 27 Dec 2014 in reply to Petar Marchev Link to this post

    Will this annotation technique for achieving "trackball" like effect work with ChartView for WinForms or is it only for the WPF version?
  6. Petar Marchev
    Petar Marchev avatar
    996 posts

    Posted 29 Dec 2014 Link to this post

    Hi Dave,

    This approach is valid for the WPF and Silverlight chart only. The WinForms chart has a different API and does not yet have annotations (soon to be). However the WinForms trackball has a MoveTrackball method which may get you what you want. If you need information about this I will ask that you open a new ticket with a product RadChartView for WindowsForms. This is a WPF forum and we prefer to keep questions separated. Thank you for understanding.

    Petar Marchev

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  7. Volodymyr
    Volodymyr avatar
    2 posts
    Member since:
    Sep 2014

    Posted 13 Oct 2016 Link to this post

    Hello Petar,


    I am using TrackBallSyncedCharts example from and I encounter strange behaviour.When I'm using two charts - everything is ok.But when it comes to 6 charts I get StackOverflow exception...Is that designed that way to handle only two charts(like in example) or this is not expected behaviour?
    If there is a infinite loop or recursion that caouses such exception can you please help me to fix that?It even breaks on 4 charts when we have big data to display.


    Thanks for any help,


  8. Dinko
    Dinko avatar
    442 posts

    Posted 18 Oct 2016 Link to this post

    Hi Volodymyr,

    We are not aware of such exception when you synchronize TrackBall of several charts and we weren't able to reproduce it on our side. That is why we would ask you to send us sample project reproducing it so we can directly test it.

    We are looking forward to your answer.

    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top