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

Sync TrackBall Move on Two Charts

7 Answers 248 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Amin
Top achievements
Rank 1
Amin asked on 27 Sep 2012, 01:46 PM
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?

7 Answers, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 01 Oct 2012, 08:40 AM
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. 

Regards,
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.

0
Senthil kumar
Top achievements
Rank 1
answered on 18 Feb 2014, 03:54 AM
could you provide sample code for implementing the second point?

i need to implement the same requirement in my project. 
0
Petar Marchev
Telerik team
answered on 18 Feb 2014, 12:45 PM
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.

Regards,
Petar Marchev
Telerik
0
DAVE
Top achievements
Rank 1
answered on 27 Dec 2014, 10:14 PM
Will this annotation technique for achieving "trackball" like effect work with ChartView for WinForms or is it only for the WPF version?
0
Petar Marchev
Telerik team
answered on 29 Dec 2014, 01:00 PM
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.

Regards,
Petar Marchev
Telerik
 

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.

 
0
Volodymyr
Top achievements
Rank 1
answered on 13 Oct 2016, 12:39 PM

Hello Petar,

 

I am using TrackBallSyncedCharts example from https://github.com/telerik/xaml-sdk/tree/master/ChartView/WPF/TrackBallSyncedCharts 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,

Volodymyr 

0
Dinko | Tech Support Engineer
Telerik team
answered on 18 Oct 2016, 07:54 AM
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.

Regards,
Dinko
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
ChartView
Asked by
Amin
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Senthil kumar
Top achievements
Rank 1
DAVE
Top achievements
Rank 1
Volodymyr
Top achievements
Rank 1
Dinko | Tech Support Engineer
Telerik team
Share this question
or