Skip to content
On this page

波形图


浏览器不支持html5
显示代码
html
<HuElectrocardiogram :mointerData="ecg" :option="option" ref="myRef" style="background-color: #000" />
<script setup>
  import { ref, reactive, toRefs, onMounted, nextTick } from 'vue'
  const data = reactive({
    ecg: [],
    option: [],
    myRef: ref(null),
  })
  onMounted(async () => {
    data.ecg = [
      134, 133, 133, 133, 133, 134, 133, 133, 133, 133, 133, 133, 133, 132, 131, 130, 129, 128, 127, 127, 126, 126, 126,
      126, 127, 127, 128, 129, 130, 132, 133, 133, 133, 133, 134, 134, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
      133, 133, 133, 133, 134, 134, 135, 136, 136, 132, 125, 114, 102, 90, 83, 82, 94, 107, 122, 133, 141, 144, 143,
      141, 139, 138, 136, 134, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
      133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 132, 132, 130, 129, 127, 126, 124, 123, 121, 119, 117, 116,
      115, 114, 113, 112, 112, 111, 111, 110, 110,
    ]
    data.option = [
      {
        color: '#50E473',
        coordinateY: 250,
        isLine: true,
        maxValue: 350,
        minValue: 15,
        length: 1900,
      }, // ECG画脉搏
    ]
    await nextTick()
    data.myRef.init()
  })
  const { ecg, option, myRef } = toRefs(data)
</script>

Attributes

参数说明类型默认值
mointerData数据集合Array[]
option波形的样式Array[]

Option Attributes

参数说明类型默认值
color波形颜色color-
maxValue最大值Number-
minValue最小值Number-
length一个完整画面最多数据量Number-

Released under the MIT License.