// 实时监测心率变化折线图 let data = [40, 50, 60, 70, 80, 90, 110, 50, 80, 120,50,40,20,60,80,70] option = { animation: false, grid: { top: 0, bottom: '10%', left: '12%', right: '6%' }, graphic: { elements: [{ type: 'text', style: { x: 50, y: 120, text: '偏高', fill: '#000' } }, { type: 'text', style: { x: 50, y: 340, text: '正常', fill: '#000' } }, { type: 'text', style: { x: 50, y: 570, text: '偏低', fill: '#000' } } ] }, xAxis: { type: "category", boundaryGap: false, axisTick: { show: false, }, axisLabel: { show: false, formatter(val) { return val.substr(11, 5); }, }, data: this.hrtime }, yAxis: [{ type: 'value', max: 140, axisLine: { show: true, }, splitNumber: 4, splitLine: { show: false }, axisLabel: { show: false } }, { type: 'value', max: 140, axisLine: { show: true, }, splitNumber: 4, splitLine: { show: false }, axisLabel: { show: false } } ], visualMap: { show: false, dimension: 1, pieces: [ // 正常区间 { gte: 50, lte: 95, color: "#0BD2C8", }, // 偏高 { gt: 95, color: "#f97f7f", }, // 偏低 { lt: 50, color: "#f97f7f", }, ], }, series: [{ type: "line", symbol: "none", markLine: { symbol: 'none', emphasis: { disabled: true }, data: [{ silent: false, lineStyle: { type: 'dashed', color: '#7d888b', opacity: 0.5 }, label: { show: false }, yAxis: 140 }, { silent: false, lineStyle: { type: 'dashed', color: '#7d888b', opacity: 0.5 }, label: { show: false }, yAxis: 95.1 }, { silent: false, lineStyle: { type: 'dashed', color: '#7d888b', opacity: 0.5 }, label: { show: false }, yAxis: 50 } ] }, data: data, markArea: { itemStyle: { color: "#003b41", }, data: [ [{ yAxis: 50, }, { yAxis: 95, }, ], ], }, },], };