src/utils/chartFunction/exceptionOption.js
@@ -17,6 +17,7 @@
    endIndex,
    exceptionName,
    areaObj,
    lineColor,
    exceptionType
  ) {
    switch (exceptionType) {
@@ -65,7 +66,8 @@
          exceptionName
        )
      case '8':
        return this.validOption(xData, yData, exceptionName, areaObj)
        console.log('传进来',lineColor)
        return this.validOption(xData, yData, exceptionName, areaObj,lineColor)
    }
  },
@@ -564,7 +566,7 @@
   * @param:
   * @returns:
   */
  validOption(xData, yData, exceptionName, areaObj) {
  validOption(xData, yData, exceptionName, areaObj,lineColor) {
    return {
      title: {
        text: exceptionName,
@@ -577,9 +579,6 @@
      toolbox: {
        // 工具栏
        feature: {
          // dataZoom: {
          //   yAxisIndex: 'none'
          // },
          // 保存为图片
          saveAsImage: {}
        }
@@ -622,7 +621,32 @@
            data: areaObj
          }
        }
      ]
      ],
      // 指定时间区间的线段变颜色
      // visualMap: {
      //   show: false,
      //   dimension: 0,
      //   // pieces: [
      //   //   {
      //   //     lte: beginIndex,
      //   //     color: 'green'
      //   //   },
      //   //   {
      //   //     gt: beginIndex,
      //   //     lte: endIndex,
      //   //     color: 'red'
      //   //   },
      //   //   {
      //   //     gt: endIndex,
      //   //     lte: xData.length - 1,
      //   //     color: 'green'
      //   //   }
      //   // ],
      //   pieces: lineColor
      // }
    }
  }
}