const option = {
  color: ['#5F8BFF'],
  tooltip: {
    trigger: 'axis',
    borderWidth: '0',
    backgroundColor: 'rgba(73,81,92,.95)',
    textStyle: {
      color: '#fff',
      fontSize: 16,
    },
  },
  grid: {
    left: '0',
    right: '0',
    bottom: '2%',
    top: '20%',
    containLabel: true,
  },

  xAxis: [
    {
      type: 'category',
      boundaryGap: true,
      axisLine: {
        show: false,
      },
      axisLabel: {
        show: true,
        interval: 0,
        textStyle: {
          padding: [2, 0, 0, 0],
          color: '#CBEDFF',
          fontSize: 14,
        },
      },
      axisTick: {
        show: false,
      },
      axisPointer: {
        type: 'shadow',
      },
      data: [],
    },
  ],
  yAxis: [
    {
      type: 'value',
      name: '件',
      min: 0,
      interval: 10,
      axisLabel: {
        show: false,
      },
      nameTextStyle: {
        align: 'left',
        color: '#CBEDFF',
        padding: [0, 0, 20, -20],
        fontSize: 16,
      },
      splitLine: {
        show: false,
      },
      axisLine: {
        show: false,
      },
      axisTick: {
        show: false,
      },
    },
  ],
  series: [
    {
      // name: '投诉量',
      type: 'bar',
      barWidth: 20,
      data: [],
      itemStyle: {
        borderRadius: 20,
        color: {
          type: 'linear',
          x: 0,
          y: 0,
          x2: 0,
          y2: 1,
          colorStops: [
            {
              offset: 0,
              color: '#5DDDFF', // 0% 处的颜色
            },
            {
              offset: 1,
              color: '#706BFF', // 100% 处的颜色
            },
          ],
          global: false, // 缺省为 false
        },
      },
      label: {
        show: true,
        position: 'top',
        distance: 6,
        color: '#FFFFFF',
        fontSize: 20,
        fontWeight: 700,
      },
    },
  ],
};

export const pieOption = {
  series: [
    {
      name: 'Access From',
      type: 'pie',
      radius: ['70%', '90%'],
      center: ['50%', '50%'],
      avoidLabelOverlap: false,
      padAngle: 5,
      itemStyle: {},
      label: {
        show: false,
        position: 'center',
      },
      emphasis: {
        label: {
          show: true,
          fontSize: 10,
          fontWeight: 'bold',
        },
      },
      labelLine: {
        show: false,
      },
      data: [],
    },
  ],
};

export default option;
