whyczyk
2021-03-04 707b1ea79680949571a2dd923d1412bb1a3d5fcc
src/components/charts/latticeBar.vue
@@ -8,10 +8,13 @@
<script>
  import * as echarts from 'echarts';
  import {
    chartFontsize
  } from '@/assets/js/chartFontsize'
  export default {
    name: "latticeBar",
    chart: "",
    chartData: [],
    props: {
      id: {
        require: true,
@@ -29,6 +32,7 @@
        this.$options.chart.setOption(opt);
      },
      setData(sendData) {
        this.$options.chartData = sendData;
        let option = {
          tooltip: {
            trigger: 'axis',
@@ -71,7 +75,7 @@
            },
            axisLabel: {
              color: '#FFFFFF',
              fontSize: 12,
              fontSize: chartFontsize(12),
              interval: 0
            }
          }],
@@ -91,7 +95,8 @@
            },
            axisLabel: {
              textStyle: {
                color: '#FFFFFF'
                color: '#FFFFFF',
                fontSize: chartFontsize(12),
              },
            },
          }],
@@ -161,7 +166,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() {