const option01 = {
  tooltip: {
    trigger: "axis",
    axisPointer: {
      lineStyle: {
        color: "#dddc6b"
      }
    }
  },
  legend: {
    top: "0%",
    textStyle: {
      color: "#fff",
      fontSize: "12"
    }
  },
  grid: {
    left: "10",
    top: "30",
    right: "20",
    bottom: "10",
    containLabel: true
  },
  xAxis: [{
      type: "category",
      boundaryGap: false,
      axisLabel: {
        textStyle: {
          color: "#fff",
          fontSize: 12
        }
      },
      axisLine: {
        lineStyle: {
          color: "#fff"
        }
      },
      data: [
        "05-06",
        "05-07",
        "05-08",
        "05-09",
        "05-10",
        "05-11",
        "05-12",
        "05-13",
        "05-14",
      ]
    },
    {
      axisPointer: {
        show: false
      },
      axisLine: {
        show: false
      },
      position: "bottom",
      offset: 0
    }
  ],
  yAxis: [{
    type: "value",
    axisTick: {
      show: false
    },
    axisLine: {
      lineStyle: {
        color: "#fff"
      }
    },
    axisLabel: {
      textStyle: {
        color: "#fff",
        fontSize: 12
      }
    },
    splitLine: {
      show: false
    }
  }],
  series: [{
      name: "保温仓设定温度",
      type: "line",
      smooth: true,
      symbol: "circle", //标记的 图形
      symbolSize: 5,
      showSymbol: true,
      lineStyle: {
        normal: {
          color: "#39b6e6",
          width: 2
        }
      },
      areaStyle: {
        normal: {
          color: {
            type: 'linear',
            x: 0,
            y: 0,
            x2: 0,
            y2: 1,
            colorStops: [{
              offset: 0,
              color: 'rgba(61, 196, 241, 1)' // 0% 处的颜色
            }, {
              offset: 0.8,
              color: 'rgba(61, 196, 241, 0.2)' // 100% 处的颜色
            }],
            global: false // 缺省为 false
          },
          shadowColor: "rgba(0, 0, 0, 0.1)"
        }
      },
      itemStyle: {
        normal: {
          color: "#39b6e6",
          borderColor: "#39b6e6",
          borderWidth: 2
        }
      },
      data: [
        30,
        40,
        30,
        40,
        30,
        40,
        30,
        60,
        20,
      ]
    },
    {
      name: "保温仓当前温度",
      type: "line",
      smooth: true,
      symbol: "circle",
      symbolSize: 5,
      showSymbol: true,
      lineStyle: {
        normal: {
          color: "#c71881",
          width: 2
        }
      },
      itemStyle: {
        normal: {
          color: "#c71881",
          borderColor: "#c71881",
          borderWidth: 2
        }
      },
      data: [
        50,
        30,
        50,
        60,
        10,
        50,
        30,
        50,
        60,
      ]
    }
  ]
};

function bzyLine(data) {
  return {
    tooltip: {
      trigger: "axis",
      axisPointer: {
        lineStyle: {
          color: "#dddc6b"
        }
      }
    },
    legend: {
      top: "0%",
      textStyle: {
        color: "#fff",
        fontSize: "12"
      }
    },
    grid: {
      left: "10",
      top: "30",
      right: "20",
      bottom: "10",
      containLabel: true
    },
    xAxis: [{
        type: "category",
        boundaryGap: false,
        axisLabel: {
          textStyle: {
            color: "#fff",
            fontSize: 12
          }
        },
        axisLine: {
          lineStyle: {
            color: "#fff"
          }
        },
        data: data.time
      },
      {
        axisPointer: {
          show: false
        },
        axisLine: {
          show: false
        },
        position: "bottom",
        offset: 0
      }
    ],
    yAxis: [{
      type: "value",
      axisTick: {
        show: false
      },
      axisLine: {
        lineStyle: {
          color: "#fff"
        }
      },
      axisLabel: {
        textStyle: {
          color: "#fff",
          fontSize: 12
        }
      },
      splitLine: {
        show: false
      }
    }],
    series: [{
        name: "保温仓设定温度",
        type: "line",
        smooth: true,
        symbol: "circle", //标记的 图形
        symbolSize: 5,
        showSymbol: true,
        lineStyle: {
          normal: {
            color: "#39b6e6",
            width: 2
          }
        },
        areaStyle: {
          normal: {
            color: {
              type: 'linear',
              x: 0,
              y: 0,
              x2: 0,
              y2: 1,
              colorStops: [{
                offset: 0,
                color: 'rgba(61, 196, 241, 1)' // 0% 处的颜色
              }, {
                offset: 0.8,
                color: 'rgba(61, 196, 241, 0.2)' // 100% 处的颜色
              }],
              global: false // 缺省为 false
            },
            shadowColor: "rgba(0, 0, 0, 0.1)"
          }
        },
        itemStyle: {
          normal: {
            color: "#39b6e6",
            borderColor: "#39b6e6",
            borderWidth: 2
          }
        },
        data: data.set_temp
      },
      {
        name: "保温仓当前温度",
        type: "line",
        smooth: true,
        symbol: "circle",
        symbolSize: 5,
        showSymbol: true,
        lineStyle: {
          normal: {
            color: "#c71881",
            width: 2
          }
        },
        itemStyle: {
          normal: {
            color: "#c71881",
            borderColor: "#c71881",
            borderWidth: 2
          }
        },
        data: data.pre_temp
      }
    ]
  };
}

function qxzHisBar(data) {
  return {
    color: ["#2f89cf"],
    tooltip: {
      trigger: "axis",
      axisPointer: {
        // 坐标轴指示器，坐标轴触发有效
        type: "shadow" // 默认为直线，可选为：'line' | 'shadow'
      }
    },
    grid: {
      left: "10",
      top: "10",
      right: "10",
      bottom: "5",
      containLabel: true
    },
    xAxis: [{
      type: "category",
      data: data.time,
      axisTick: {
        alignWithLabel: true
      },
      axisLabel: {
        textStyle: {
          color: "rgba(255,255,255,.6)",
          fontSize: "12"
        }
      },
      axisLine: {
        show: false
      }
    }],
    yAxis: [{
      type: "value",
      axisLabel: {
        textStyle: {
          color: "rgba(255,255,255,.6)",
          fontSize: "12"
        }
      },
      axisLine: {
        lineStyle: {
          color: "rgba(255,255,255,.1)"
          // width: 1,
          // type: "solid"
        }
      },
      splitLine: {
        lineStyle: {
          color: "rgba(255,255,255,.1)"
        }
      }
    }],
    series: [{
      name: data.tex,
      type: "line",
      barWidth: "12",
      data: data.val,
      itemStyle: {
        normal: {
          barBorderRadius: 30,
          color: {
            type: 'linear',
            x: 0,
            y: 0,
            x2: 0,
            y2: 1,
            colorStops: [{
              offset: 0,
              color: '#3fedcc' // 0% 处的颜色
            }, {
              offset: 1,
              color: '#086ce6' // 100% 处的颜色
            }],
            global: false // 缺省为 false
          },
        },
      },
    }]
  };
}
export {
  bzyLine,
  qxzHisBar
}