import { BaseOption } from "../type";
const options: BaseOption = {
  legend: {
    top: 8,
    right: 10,
    textStyle: {
      color: "#B3E3E8",
    },
  },
  tooltip: {
    trigger: "axis",
    axisPointer: {
      type: "shadow",
    },
  },
  grid: {
    top: 60,
    bottom: 10,
    right: 15,
    left: 10,
    containLabel: true,
  },
  xAxis: {
    type: "category",
    axisLabel: {
      color: "#768F95",
    },
    splitLine: {
      lineStyle: {
        color: "#333",
      },
    },
  },
  yAxis: [
    {
      type: "value",
      name: "(个)",
      nameTextStyle: {
        color: "#768F95",
      },
      axisLabel: {
        formatter: "{value}",
        color: "#768F95",
      },
      splitLine: {
        lineStyle: {
          color: "rgba(255, 255, 255,0.2)",
        },
      },
    },
    {
      type: "value",
      name: "(%)",
      nameTextStyle: {
        color: "#768F95",
      },
      axisLabel: {
        formatter: "{value} %",
        color: "#768F95",
      },
      splitLine: {
        lineStyle: {
          color: "rgba(255, 255, 255,0.2)",
        },
      },
      min: 0,
      max: 50,
      //   interval: 5,
    },
  ],
  series: [
    {
      type: "bar",
      barWidth: 15,
      //   zlevel: 10,
      itemStyle: {
        color: {
          type: "linear",
          x: 0,
          x2: 0,
          y: 0,
          y2: 1,
          colorStops: [
            {
              offset: 0,
              color: "#17D6FF", // 100% 处的颜色
            },
            {
              offset: 0.5,
              color: "#148DAC", // 100% 处的颜色
            },
            {
              offset: 1,
              color: "rgba(0,0,0,0)", // 100% 处的颜色
            },
          ],
        },
      },
    },
    {
      type: "line",
      smooth: true,
      yAxisIndex: 1,
      //   symbolSize: 0,
      lineStyle: {
        width: 1.5,
        color: "#F5D6AD",
      },
      itemStyle: {
        color: "#F5D6AD",
      },
      areaStyle: {
        color: {
          type: "linear",
          x: 0,
          x2: 0,
          y: 0,
          y2: 1,
          colorStops: [
            {
              offset: 0,
              color: "#E5B98E", // 0% 处的颜色
            },
            {
              offset: 0.5,
              color: "#77634D", // 100% 处的颜色
            },
            {
              offset: 1,
              color: "rgba(0,0,0,0)", // 100% 处的颜色
            },
          ],
        },
      },
    },
  ],
};
export default options;
