一、心电图效果之单线条
```html:run
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Echarts实现心电图效果</title>
<script src="https://cdn.bootcss.com/echarts/3.7.1/echarts.js"></script>
</head>
<body>
<div id="totalFlowRate" style="height:300px;"></div>
</body>
</html>
<script type="text/javascript">
var totalFlowRate = echarts.init(document.getElementById('totalFlowRate'));
var xAxisData=[];
var yAxisData=[];
for(var i=500 ;i>0;i--){
xAxisData.push(i+"秒前");
}
for(i=1;i<501;i++){
yAxisData.push(Math.round(Math.random()*1000));
}
var totalFlowRateOption = {
animation:false,
title: {
text: '总流量(kbps)'/*,
left:"110px"*/
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross'
}
},
grid: {
left: 50/*"50px"*/,
right: 15/*"15px"*/
},
legend: {
data:['当前流量']
},
xAxis: {
boundaryGap: false,
data: xAxisData
},
yAxis: {
boundaryGap:false
},
seri
43ECharts:心电图效果
最新推荐文章于 2024-05-17 13:52:13 发布