I am using spline chart to plot the ECG graph.
var data = [];
var axesOptions = {
tickInterval: 125,
minorTicks: true,
minorTickInterval: 0.1,
gridLineWidth: 1,
gridLineColor: 'green'
};
var chart = Highcharts.chart('container', {
xAxis: axesOptions,
yAxis: axesOptions,
series: [{
name: 'ECG data',
marker: {
enabled: false
},
data: []
}]
});
About 125 points come from ECG sensor every second. I'm trying to create a graph similar to the image below.
I used the addpoint function as below, but it doesn't work as I want.
for (var k = 0; k < data.lenght; k++) {
chart.series[0].addPoint(data[k], true, true, { duration: 1 / data.lenght });
}
Any help is really appreciated thanks.