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

Linking DateTime Axis

10 Answers 192 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Murray
Top achievements
Rank 1
Murray asked on 27 Jun 2011, 01:52 AM
I have been trying to find examples of how to handle the linking of two charts axis.

I have two charts which each contain multiple series of dynamic data, the data all has a datetime x-axis.

What I am trying to do is to have them share the same zoom and values / spacing etc along the x-axis for the two charts.

Is there an easy way to achieve this with the radchart? Can you possibly point me in the direction of an example

thanks for you time

regards

Murray

10 Answers, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 29 Jun 2011, 03:14 PM
Hello Murray,

You may find a sample project attached
Some words about the project - there is a single Chart with Multiple Chart Areas. The XAxes of the two ChartAreas are set to one and the same ZoomScroll setting, while the YAxes have 2 different ZoomScroll settings.
For more information about the specifics of the settings - please refer to our help topic.
To hide the additional XAxis scroller you may use the approach given in this forum post.
You may modify the project attached as you wish so that it fits your needs.

I hope this is helpful!

Best wishes,
Evgenia
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Murray
Top achievements
Rank 1
answered on 01 Jul 2011, 01:35 AM
Thanks for the reply

I was hoping to be able to do use XAML and bind to properties in my view model.

Do you have an example of how to bind in XAML to those properties as I can't seem to find one

Thanks

Murray
0
Evgenia
Telerik team
answered on 06 Jul 2011, 10:03 AM
Hello Murray,

You can take a look at the attached project that is MVVM-ized version of the one I previously sent. However have in mind that the ZoomScrollSettingsX should be set to use one and the same object so that the ChartArea-s can zoom/scroll simultaneously.

All the best,
Evgenia
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Greg
Top achievements
Rank 1
answered on 05 Sep 2011, 02:53 PM
Hello Evgenia,

What about situation when data series are heaving different range X values (one can include in the other for example)?

Thanks
Greg
0
Tsvetie
Telerik team
answered on 08 Sep 2011, 01:52 PM
Hi Greg,
I noticed that you have opened a support ticket with the same question. We have already answered your question in the other ticket. I am posting the information here as well so that it is available to other customs, who have the same requirement:

In this case, you can use different ZoomScrollSettings for each chart's X-Axis, instead of sharing the setting for all charts.

Greetings,
Tsvetie
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 >>

0
Greg
Top achievements
Rank 1
answered on 09 Sep 2011, 02:53 PM
Hi

I'm not really happy with that solution. I have tried subscribe to RangeChanged of the wider range X axis and assign values

ActualMinValue, ActualMaxValue, ActualStep

to

MinValue, MaxValue, Step
of the second X axis but it looks like. I have marked middle of the charts (they stick to each other bottom-top). Further from the middle they are starting to desynchronize.

Thanks & Regards
Greg
0
Tsvetie
Telerik team
answered on 14 Sep 2011, 12:49 PM
Hello Greg,
I am not quite sure I understand your scenario completely and the result you want to achieve. That is why, in order to be able to point you in the right direction and not suggest something based on so little information, I will need detailed information, describing how you want the chart to behave. It will be great if you could provide images, demonstrating the expected result as well and a simple project, demonstrating your setup.

In the meantime, you can consider the following approach - in case, the two x-axes represent different ranges, you could manually set the smaller range to match the larger one. That way, you will not have problems synchronizing the two axes, no matter which approach you choose to implement.

Best wishes,
Tsvetie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Greg
Top achievements
Rank 1
answered on 14 Sep 2011, 01:18 PM
Hi

I have replied with the ticket, as I could not attach any sample here.

Thanks & Regards
Greg
0
Anand
Top achievements
Rank 1
answered on 18 Jan 2012, 09:46 PM
I'm also looking for this solution. The code you attached moves scroll bar in both charts however it does not scroll/zoom to actual chart.
0
Evgenia
Telerik team
answered on 23 Jan 2012, 03:15 PM
Hello Murray,

You may find a sample project attached that should help you achieve your scenario. It updates the MinValue, MaxValue and Step properties, when the range of the second x-axis changes. Let us know if you have any additional questions.

All the best,
Evgenia
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Chart
Asked by
Murray
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Murray
Top achievements
Rank 1
Greg
Top achievements
Rank 1
Tsvetie
Telerik team
Anand
Top achievements
Rank 1
Share this question
or