import { BarECOption } from "../type";
const options: BarECOption = {
  legend: {
    top: 8,
    right: 10,
    textStyle: {
      color: "#B3E3E8",
    },
  },
  tooltip: {
    trigger: "axis",
    axisPointer: {
      type: "shadow",
    },
  },
  grid: {
    top: 40,
    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)",
      },
    },
  },
  series: [
    {
      type: "bar",
      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: "bar",
      itemStyle: {
        color: {
          type: "linear",
          x: 0,
          x2: 0,
          y: 0,
          y2: 1,
          colorStops: [
            {
              offset: 0,
              color: "#D9F6F7", // 100% 处的颜色
            },
            {
              offset: 0.5,
              color: "#8DA5A9", // 100% 处的颜色
            },
            {
              offset: 1,
              color: "rgba(0,0,0,0)", // 100% 处的颜色
            },
          ],
        },
      },
    },
  ],
};
export default options;
