const handleModelData = (a) => {
  if (a == '任务一') return [16, 56, 78, 56, 36]
  if (a == '任务二') return [89, 12, 36, 78, 56]
  if (a == '任务三') return [15, 65, 11, 78, 56]
  if (a == '任务四') return [15, 65, 11, 78, 56]
  if (a == '任务五') return [15, 65, 11, 78, 56]
  if (a == '任务六') return [15, 65, 11, 78, 56]
  if (a == '任务七') return [15, 65, 11, 78, 56]
}

export const leftOption = {
  legend: {
    textStyle: {
      fontSize: 16,
      color: '#fff'
    }
  },
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      type: 'shadow'
    }
  },
  grid: {
    top: '10%',
    left: '5%',
    right: '10%',
    bottom: '10%',
    containLabel: true
  },
  xAxis: [
    {
      type: 'category',
      axisTick: { show: false },
      data: [],
      axisLine: {
        lineStyle: {
          color: '#fff'
        }
      },
      axisLabel: {
        fontSize: 16
      }
    }
  ],
  yAxis: [
    {
      type: 'value',
      axisLabel: { formatter: '{value} %', fontSize: 16 },
      axisLine: {
        lineStyle: {
          color: '#fff'
        }
      }
    }
  ],
  series: [
    {
      name: '任务装备完好率',
      type: 'bar',
      barWidth: 25,
      tooltip: {
        valueFormatter: function (value) {
          return value + '%'
        }
      },
      data: []
    }
  ]
}
export const rightOption = {
  legend: {
    textStyle: {
      fontSize: 16,
      color: '#fff'
    }
  },
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      type: 'shadow'
    }
  },
  grid: {
    top: '10%',
    left: '5%',
    right: '10%',
    bottom: '10%',
    containLabel: true
  },
  xAxis: [
    {
      type: 'category',
      axisTick: { show: false },
      data: ['飞机1', '飞机2', '飞机3', '飞机4', '飞机5'],
      axisLine: {
        lineStyle: {
          color: '#fff'
        }
      },
      axisLabel: {
        fontSize: 16
      }
    }
  ],
  yAxis: [
    {
      type: 'value',
      axisLabel: { formatter: '{value} %', fontSize: 16 },
      axisLine: {
        lineStyle: {
          color: '#fff'
        }
      }
    }
  ],
  series: [
    {
      name: '任务航材保障良好率',
      type: 'bar',
      barWidth: 25,
      tooltip: {
        valueFormatter: function (value) {
          return value + '%'
        }
      },
      data: []
    }
  ]
}
