import { EChartsOption } from 'echarts';

const option: EChartsOption = {
  xAxis: {
    type: 'category',
    boundaryGap: false,
    // show: false,
    axisLine: {
      show: false,
    },
    axisLabel: {
      show: true,
      color: '#fff',
      fontSize: 16,
    },
    data: ['09.15', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
  },
  yAxis: {
    type: 'value',
    show: false,
  },
  grid: {
    left: '5%', // 左边距
    right: '0', // 右边距
    top: '10%', // 上边距
    bottom: '30%', // 下边距
  },
  series: [
    {
      data: [100, 50, 60, 70, 50, 40, 50, 60, 40, 40, 80, 30, 40, 100],
      symbol: 'none',
      type: 'line',
      lineStyle: {
        color: 'rgb(87, 239, 229)',
      },
      smooth: false,

      areaStyle: {
        // 区域填充样式。设置后显示成区域面积图。
        color: {
          type: 'linear',
          x: 0,
          y: 1,
          x2: 0,
          y2: 0.2,
          colorStops: [
            {
              offset: 0,
              color: 'rgba(87, 239, 229, 0)', // 0% 处的颜色
            },
            {
              offset: 1,
              color: 'rgba(87, 239, 229, 0.36)', // 100% 处的颜色
            },
          ],
          global: false, // 缺省为 false
        },
      },
    },
  ],
};

export default option;
