/*
 * @Author: your name
 * @Date: 2021-10-19 13:58:31
 * @LastEditTime: 2021-10-19 14:27:49
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \Foshan4A\src\layout\mixin\commonChartsPro.js
 */
export default {
  data () {
    return {
      options: {
        angleAxis: {
          max: 100, // 满分
          clockwise: false, // 逆时针
          // 隐藏刻度线
          axisLine: {
            show: false
          },
          axisTick: {
            show: false
          },
          axisLabel: {
            show: false
          },
          splitLine: {
            show: false
          }
        },
        radiusAxis: {
          type: 'category',
          // 隐藏刻度线
          axisLine: {
            show: false
          },
          axisTick: {
            show: false
          },
          axisLabel: {
            show: false
          },
          splitLine: {
            show: false
          }
        },
        polar: {
          center: ['50%', '50%'],
          radius: '175%' //图形大小
        },
        series: [{
          type: 'bar',
          data: [{
            name: '作文得分',
            value: 75,
            itemStyle: {
              normal: {
                color: 'red',
                // colorStops: [
                //     {
                //       offset: 0, color: 'rgba(137,185,253,0.59)' // 0% 处的颜色
                //     },
                //     {
                //       offset: 0.25, color: 'rgba(137,185,253,0.39)' // 50% 处的颜色
                //     },
                //     {
                //       offset: 0.75, color: 'rgba(137,185,253,0.1)' // 50% 处的颜色
                //     },
                //     {
                //       offset: 1, color: 'rgba(137,185,253,0.07)' // 100% 处的颜色
                //     }
                // ],
              }
            },
          }],
          coordinateSystem: 'polar',
          roundCap: true,
          barWidth: 14,
          barGap: '-100%', // 两环重叠
          z: 2,
        }, { // 灰色环
          type: 'bar',
          silent: true,
          data: [{
            value: 100,
            itemStyle: {
              color: '#F5F7FA',
              shadowColor: '#F5F7FA',
              shadowBlur: 5,
              shadowOffsetY: 2
            }
          }],
          coordinateSystem: 'polar',
          roundCap: true,
          barWidth: 14,
          barGap: '-100%', // 两环重叠
          z: 1
        }]
      }
    }
  }
}
