I wrote several of them earlier in other languages, so I can introduce you to principles, not an example. I assume that you have some buttons on the left and right that allow the user to scroll through the data and that your signal data is stored in an array. You can determine how much data you can fit into one screen width, based on any scaling factor you use. Suppose you can display ten values at a time on your screen, then you just save the starting point in your signal array and use this at most to display on the screen. Then all you have to do is show the following ten values in your array. When the user selects a button to move left or right through the data, simply increase or decrease the starting point.If you broadcast your signal, the stream may increase the starting point when you receive a new piece of data. When you redraw after each change in the initial value, you get the impression of a scroll. Keep track of the start and end conditions (i.e. you don't want to scroll until you have at least a full data screen). All you do is create a window on the data that you have.
, .