Drawing an ECG waveform in realtime

Hello,

I am working with a Bluetooth Electrocardiogram device and I would like to draw the waveform in realtime from the data I get from the device. The issue is that I don’t really know how to do that with ionic. I know that there are some libraries around, but is there one which “animates” charts in realtime? Basically, here is the result I would like to get :

http://jsfiddle.net/AbdiasSoftware/tFn66/
or
http://jsfiddle.net/m1erickson/f5sT4/

Do you think it is possible to achieve this kind of result with ionic 2?

Thanks,
Axel

The first jsfiddle looks good.

demo.onmousemove = function(e) {
    var r = demo.getBoundingClientRect();
    py = e.clientY - r.top;
}

Replace e.clientY (Y position of mouse) with ecg reading. You should end up with something like this in typescript.

updateChart(ecgReading : number) {
    let r = demo.getBoundingClientRect();
    py = ecgReading - r.top;
}