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

Working with multiple Y-axes

3 Answers 68 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jason
Top achievements
Rank 1
Jason asked on 01 Sep 2016, 08:46 PM

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.

3 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 02 Sep 2016, 01:57 PM
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
0
Jason
Top achievements
Rank 1
answered on 03 Sep 2016, 09:27 PM

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;

0
Tsvyatko
Telerik team
answered on 05 Sep 2016, 09:28 AM
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
Tags
Chart
Asked by
Jason
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Jason
Top achievements
Rank 1
Share this question
or