yichenxi
2022-12-12 eb07bc16cb0b06f3b96a4f59d74f82b62195f096
src/components/Echarts/LineChart2.vue
@@ -1,3 +1,4 @@
<<<<<<< HEAD
<template>
  <div :class="className" :style="{ height: height, width: width }" />
</template>
@@ -79,6 +80,7 @@
      this.setOptions(this.chartData)
    },
    setOptions(val) {
      // console.log(val,'123');
      function fontSize(res) {
        let clientWidth =
          window.innerWidth ||
@@ -104,7 +106,7 @@
            data: val.xAxis,
            boundaryGap: false,
            axisTick: {
              show: false,
              show: true,
            },
            // axisTick: { // 决定是否显示坐标刻度
            //   alignWithLabel: true,
@@ -138,7 +140,7 @@
          tooltip: {
            trigger: 'axis',
            position: function (pt) {
              return [pt[1], '-14%']
              return [pt[1], '-13%']
            },
            textStyle: {
              fontSize: fontSize(0.117), // 字体大小
@@ -176,7 +178,7 @@
            {
              start: 0,
              end: 20,
              bottom: fontSize(3.3),
              top: fontSize(4.8),
              height: fontSize(0.5),
            },
          ],
@@ -189,3 +191,4 @@
  },
}
</script>