You have a waveform graph which only shows what is written to it on each time it is called.
Change that to a waveform chart. That maintains a history so it will append the new data to the end and maintain a history of old data. That old data will eventually roll off as it maintains a fixed history length.
I'm sorry, I didn't see in your original code that you were maintaining a shift register and appending more data to it. All those backwards running wires and unnecessary bends hid that.
You say "the result is not the expected one". But what are you expecting?
Get rid of your build array and shift register. Wire the data to a waveform chart.
Perhaps you are asking for the data to appear on the chart a sample at a time rather than having the data appear as the complete ECG cycle repeatedly?
If so, then you need to send data to the chart one point at a time rather than one waveform at a time.
You can also change the appearance of the way the data is swept across the screen.
See the attached modified VI.