Pre loader

How to define a constant X-axis range that all points enter only in its range?(Not NumericAxis.VisibleRange)

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

I get data in real time and I only care about the Y values.
I want to define a range of values on the X axis that will be fixed (but if I want I can change it from time to time)
For example: define that the range will be from 0 to 1000 and all the information that arrives will be displayed only in this range. And when I pass the 1000 points it will simply “push” the older points aside.
For example: the point located at X=2 will move to X=1, 1 will move to 0 and 0 will leave the graph…
During the program I want of course to give the user the possibility to change this range if he wants.
The optimal way for me was to define a range of the X axis and when I do Append(), add only Y values so that they enter the next place on the X axis in order…
Is there an option in the API to set this? If not, how is it recommended to do it?

Version
6.6
  • You must to post comments
0
0

Hi Ravid,

it is possible to do this in SciChart WPF using the UniformXyDataSeries.

UniformXyDataSeries

Stores Y data with optional metadata. X values are
calculated automatically based on XStart, XStep properties.

UniformXyDataSeries is a DataSeries type in SciChart that doesn’t require X-Values. Instead, X positions are calculated based on XStart and XStep properties.
This gives UniformXyDataSeries an advantage over other DataSeries types in terms of allocated memory and data processing speed. From a usage perspective, UniformXyDataSeries is beneficial when X values are equidistant.

There are various ways to create UniformXyDataSeries:

// Create a UniformXyDataSeries and initialize it with XStart, XStep
var uniformDataSeries = new UniformXyDataSeries<double>()
{
     XStart = -100,
     XStep = 1.5
};
// Create a UniformXyDataSeries and initialize it with array of YValues
var yValues = new double[] { -21, 3.6, -10, 13.3};
uniformDataSeries = new UniformXyDataSeries<double>(yValues);

… Read more in the documentation

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.