Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Cursor position change after reset the data

I have 2 graphs with a cursors on each of them.

In addition, there is a button that changes the location of the markers (the same location for both markers) - "Init Cursors", and a button that reproduces the data - "Generate Data".

 

I have a problem with the following scenario:

 

Press the "Init Cursors" button - and then press the "Generate Data" button several times at one time the X values in the cursors are not equal even though both have the saCapture.PNGme X values. 

 

I have come to the conclusion that changing the data causes a re-search of a point on the new plot for the cursor. And the search is not done by SearchDimensions.Horizontal.

Therefore, even when X values do not change but only Y values, the search can give a different point from the point that existed before.

 

Is it possible to determine that the search will always be done by SearchDimensions.Horizontal or to cancel the search that is being done in UI change?

 

[The project is attached].

 

0 Kudos
Message 1 of 3
(2,307 Views)

Graph cursors determine whether to maintaining their relative position (instead of “closest data value”), based on whether the horizontal axis is configured with a chart adjuster. (Currently, this check is hard-coded into the cursor logic, but I have created a task to look at exposing this in the future.)

 

In your example, if you update both graphs to use horizontal axes with chart adjusters, the cursors will stay synchronized:

<ni:Graph.Axes>
    <ni:AxisDouble Orientation="Horizontal" Adjuster="ContinuousChart" Range="3,3.1" />
</ni:Graph.Axes>

 

~ Paul H
0 Kudos
Message 2 of 3
(2,277 Views)

Just wanted to let you know the cursor behavior was updated in Measurement Studio 2019, and also that the RangeAdjuster.IgnoreDataValueOnRangeChange property was made public (this property is what causes cursors to behave differently with a chart range adjuster).

~ Paul H
0 Kudos
Message 3 of 3
(1,783 Views)