RealTimeGraphX icon indicating copy to clipboard operation
RealTimeGraphX copied to clipboard

Fixed width proposal

Open raffaeler opened this issue 4 years ago • 2 comments

In wanted to preserve the width of the X scale at the beginning of an acquisition. In fact, I find confusing seeing the data being compressed until the X size reaches the Range.MaximumX value.

I successfully made a change in the code with the following goals:

  • Start plotting at the left of the control
  • As soon as the data reaches the right side of the control, the default scrolling behavior take place

The change was straightforward in the GraphController.cs file (line 313):

if (_to_render.Count > 0 && _to_render.First().Value.XX.Count > 0)
{
    min_x = _to_render.First().Value.XX.First();
    var runtimeMax = _to_render.First().Value.XX.Last();
    if (runtimeMax > max_x)
        max_x = runtimeMax;
}

This could be a small change to control with a (dependency) property.

HTH

raffaeler avatar Oct 14 '21 12:10 raffaeler

Very useful! Thanks @raffaeler

guillemonzo avatar Mar 04 '22 13:03 guillemonzo

@raffaeler sorry to bother you. I have some problems using the library and I was wondering if you have faced the same issues.

Could you take a look at #15? As I can see, you have proposed some improvements and I feel like you know well how this library works, so any help is appreciated.

Thanks in advance.

guillemonzo avatar Mar 17 '22 10:03 guillemonzo