riku
2025-06-04 66e48ee8e286533a9614efa34d42297213c1da4b
src/utils/chart/chart-option.js
@@ -22,16 +22,27 @@
    animationDelayUpdate: function (idx) {
      return idx * 5;
    },
    // toolbox: {
    //   bottom: 0,
    //   feature: {
    //     dataZoom: {},
    //     magicType: {
    //       type: ['line', 'bar']
    //     },
    //     restore: {}
    //   }
    // },
    toolbox: {
      // bottom: 0,
      feature: {
        // dataZoom: {},
        // magicType: {
        //   type: ['line', 'bar']
        // },
        // restore: {
        //   title: '刷新'
        // },
        saveAsImage: {
          show: true,
          backgroundColor: '#122b54a9',
          name: '走航监测图',
          title: '保存为图片',
          iconStyle: {
            borderColor: '#fff'
          }
        }
      }
    },
    tooltip: {
      textStyle: {
        fontSize: fontSize
@@ -48,6 +59,8 @@
    },
    xAxis: {
      name: '时间',
      nameLocation: 'middle',
      nameGap: 30,
      data: _xAxis,
      axisLabel: {
        textStyle: {
@@ -74,7 +87,16 @@
      }
    },
    yAxis: {
      name: '浓度(μg/m³)',
      name: '浓度(μg/m³)/温度(℃)/速度(m/s)',
      nameLocation: 'middle',
      nameGap: 30,
      // nameTruncate: {
      //   maxWidth: 100,
      //   ellipsis: '...'
      // },
      // nameTextStyle: {
      //   color: 'red'
      // },
      axisLabel: {
        textStyle: {
          fontSize: fontSize
@@ -112,7 +134,7 @@
      }
    },
    grid: {
      left: '11%',
      left: '12%',
      right: '2%',
      top: '7%',
      bottom: '20%'