Linking DateTime Axis

11 posts, 0 answers
  1. Murray
    Murray avatar
    13 posts
    Member since:
    Jul 2010

    Posted 26 Jun 2011 Link to this post

    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
  2. Evgenia
    Admin
    Evgenia avatar
    1407 posts

    Posted 29 Jun 2011 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Murray
    Murray avatar
    13 posts
    Member since:
    Jul 2010

    Posted 30 Jun 2011 Link to this post

    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
  5. Evgenia
    Admin
    Evgenia avatar
    1407 posts

    Posted 06 Jul 2011 Link to this post

    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!

  6. Greg
    Greg avatar
    4 posts
    Member since:
    Aug 2011

    Posted 05 Sep 2011 Link to this post

    Hello Evgenia,

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

    Thanks
    Greg
  7. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 08 Sep 2011 Link to this post

    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 >>

  8. Greg
    Greg avatar
    4 posts
    Member since:
    Aug 2011

    Posted 09 Sep 2011 Link to this post

    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
  9. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 14 Sep 2011 Link to this post

    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 >>

  10. Greg
    Greg avatar
    4 posts
    Member since:
    Aug 2011

    Posted 14 Sep 2011 Link to this post

    Hi

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

    Thanks & Regards
    Greg
  11. Anand
    Anand avatar
    12 posts
    Member since:
    Dec 2011

    Posted 18 Jan 2012 Link to this post

    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.
  12. Evgenia
    Admin
    Evgenia avatar
    1407 posts

    Posted 23 Jan 2012 Link to this post

    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 >>
Back to Top
UI for WPF is Visual Studio 2017 Ready