10-05-2021 11:24 AM
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
10-06-2021 09:42 AM
You can set the Adjuster on your horizontal axis to use ContinuousChart. In XAML:
<ni:AxisDouble Orientation="Horizontal" Adjuster="ContinuousChart" />
10-20-2021 02:48 PM
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.
10-21-2021 10:30 AM
Ah, in that case you may be able to update the Capacity
of your chart collection to get the same effect.