Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

sliding x axis

Hi Everyone.

 

I'm charting live data in the wpf Graph object with Measurement Studio 2019, and it works great. I'm using ChartCollection<double, double>, where the first value is a time stamp and the second value is the amplitude. As it works now, the horizontal axis starts to get compressed as time goes on, showing all the data received. 

 

Is there a way to have the x-axis 'slide', such that older data disappears, and only the last 'n' samples are displayed?

 

Thanks.

Don

0 Kudos
Message 1 of 4
(506 Views)

You can set the Adjuster on your horizontal axis to use ContinuousChart. In XAML:

<ni:AxisDouble Orientation="Horizontal" Adjuster="ContinuousChart" />

 

~ Paul H
0 Kudos
Message 2 of 4
(473 Views)

Thanks, sorry for the delayed response.

 

I tried that, and that gives me a real-time display of data, where I am looking to limit the scope of the chart to a fixed time window. I figured out how to do it by manually resetting the ChartCollection after a specific number of samples have been received.

0 Kudos
Message 3 of 4
(457 Views)

Ah, in that case you may be able to update the Capacity of your chart collection to get the same effect.

~ Paul H
0 Kudos
Message 4 of 4
(451 Views)