I want to display Ekg waves. I use echarts. But there is a small problem with the visualize.
My chart:
But I want to see like this page: https://www.arction.com/lightningchart-js-interactive-examples/examples/lcjs-example-0150-ecg.html
My code is here:
var chartDom = document.getElementById('main');
var myChart = echarts.init(chartDom);
var option;
option = {
title: {
text: '动态数据 + 时间坐标轴'
},
tooltip: {
trigger: 'axis',
axisPointer: {
animation: false
}
},
xAxis: {
type: 'category',
splitLine: {
show: false
}
},
yAxis: {
type: 'value',
boundaryGap: [0, '100%'],
min: -1,
max: 1,
splitLine: {
show: false
}
},
series: [{
name: '模拟数据',
type: 'line',
showSymbol: false,
hoverAnimation: false,
data: data
}]
};
setInterval(function () {
for (var i = 0; i < 5; i++) {
data.shift();
data.push(addData());
}
myChart.setOption({
series: [{
data: data
}]
});
}, 1000);
option && myChart.setOption(option);
So what do I need to set on the graph to show the whole thing from a distance instead of zooming in on the drawn part?