Working with multiple Y-axes

4 posts, 0 answers
  1. Jason
    Jason avatar
    1 posts
    Member since:
    Jul 2016

    Posted 01 Sep Link to this post

    I am working with multiple sets of live data. 

    1.) Live data currently being acquired.

    2.) A reference set of data

    3.) A calculated set of data

     

    Now, the LIVE and REFERENCE data sets are typically about the same scale. However, the calculated data set can be as small a 0 to 1 scale (percentage).

    What I'm attempting to accomplish is to have multiple Y-Axes like in the provided examples so I'll be able to properly display the calculated data. 

     

    I'm having a little bit of trouble figuring out how the provided example works (QSF > Charts > Multiple Axis). Is there a way to get some more information on how to set this up using C# over XAML?

    As far as I can tell by looking at the example, the C# code adds and removes the different data series based on the checkboxes. 

    These checkboxes are bound to specific sets of data. 

    Each set of data has it's own vertical axis styles and are aligned to the right. 

     

    Is it simply the different property name bindings used for the LineSeries.ValueBindings?

    I'm working with scatterLineSeries if it matters.

  2. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 02 Sep Link to this post

    Hello Jason,

    Thank you for contacting us! 

    The secondary axes are attached to each series through its Horizontal and Vertical properties. You can find an example how create basic setup in this help article.

    Let us know if this helps.

    Regards,
    Tsvyatko
    Telerik by Progress
    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 Feedback Portal and vote to affect the priority of the items
  3. Jason
    Jason avatar
    6 posts
    Member since:
    Jul 2016

    Posted 03 Sep Link to this post

    I think I might be getting closer. 

    Using an example provided that's XAML based, the multiple Y-axis feature of the chart seems to break unless you explicitly set the horizontal location of the vertical axis. If these values are not set then they seem to combine. 

    However, I've hit a bit of a road block getting this setup in C#. Running the code as seen below always triggers a nullReferenceException.

                mathDataScatterAreaSeries.ItemsSource = Values3;
                mathDataScatterAreaSeries.YValueBinding = new PropertyNameDataPointBinding("intensity2");
                mathDataScatterAreaSeries.XValueBinding = new PropertyNameDataPointBinding("pixel");
                mathDataScatterAreaSeries.VerticalAxis.HorizontalLocation = AxisHorizontalLocation.Right;

  4. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 05 Sep Link to this post

    Hello Jason,

    I have prepared sample demonstrating how you can achieve the desired behavior. In the attached sample notice how Reference and Live data share one vertical and horizontal axis, while the Calculated data uses only the horizontal one and defines its own (the red one).

    Let us know if this helps.

    Regards,
    Tsvyatko
    Telerik by Progress
    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 Feedback Portal and vote to affect the priority of the items
Back to Top