whyczyk
2021-03-04 707b1ea79680949571a2dd923d1412bb1a3d5fcc
src/components/charts/abeamProChart.vue
@@ -8,8 +8,10 @@
<script>
  import * as echarts from 'echarts';
  //引入提示框
  import "echarts/lib/component/tooltip";
  //引入chart字体自适应
  import {
    chartFontsize
  } from '@/assets/js/chartFontsize'
  export default {
    name: "abeamProChart",
    chart: "",
@@ -31,6 +33,7 @@
        this.$options.chart.setOption(opt);
      },
      setData(sendData) {
        this.$options.chartData = sendData;
        let dataColor = sendData.color;
        let bgColor = sendData.bgColor;
        let yData = sendData.yData;
@@ -69,7 +72,8 @@
            axisLabel: {
              show: true,
              textStyle: {
                color: '#fff'
                color: '#fff',
                fontSize: chartFontsize(12),
              },
            },
            splitLine: {
@@ -88,7 +92,8 @@
            axisLabel: {
              show: true,
              textStyle: {
                color: '#fff'
                color: '#fff',
                fontSize: chartFontsize(12),
              },
            },
            splitLine: {
@@ -130,7 +135,7 @@
                normal: {
                  show: true,
                  position: 'insideRight',
                  fontSize: 20,
                  fontSize: chartFontsize(20),
                  color: '#021750'
                }
              },
@@ -166,7 +171,11 @@
        this.setOption(option);
      },
      resize() {
        this.$options.chart.resize();
        let timers = null;
        timers = setTimeout(() => {
          this.$options.chart.resize();
          this.setData(this.$options.chartData);
        }, 300)
      }
    },
    mounted() {