const comom = {
  tooltip: { trigger: 'item' },
  legend: {}
}
const noPie = {
  xAxis: { type: 'category', data: [] },
  yAxis: { type: 'value' }
}
// const pie = {
// }
export default [
  {
    text: '折线图',
    value: 'line',
    icon: 'mdi mdi-chart-line',
    children: [
      {
        text: '基础折线图',
        img: 'line1.jpg',
        option: {
          ...comom,
          ...noPie,
          series: [{ data: [], type: 'line' }]
        }
      },
      {
        text: '基础平滑折线图',
        img: 'line2.jpg',
        option: {
          ...comom,
          ...noPie,
          series: [{ data: [], type: 'line', smooth: true }]
        }
      }
    ]
  },
  {
    text: '柱状图',
    value: 'bar',
    icon: 'mdi mdi-chart-bar',
    children: [
      {
        text: '基础柱状图',
        img: 'bar1.jpg',
        option: {
          ...comom,
          ...noPie,
          series: [{ data: [], type: 'bar' }]
        }
      },
      {
        text: '多条柱状图',
        img: 'bar2.jpg',
        option: {
          ...comom,
          ...noPie,
          series: [{ data: [], type: 'bar' }, { data: [], type: 'bar' }]
        }
      }
    ]
  },
  {
    text: '饼图',
    value: 'pie',
    icon: 'mdi mdi-chart-pie',
    children: [
      {
        text: '基础饼图',
        img: 'pie1.jpg',
        option: {
          ...comom,
          series: [
            {
              name: '',
              type: 'pie',
              radius: '50%',
              label: {
                show: true,
                formatter: '{b} {c}'
              },
              data: [],
              emphasis: {
                itemStyle: {
                  shadowBlur: 10,
                  shadowOffsetX: 0,
                  shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
              }
            }
          ]
        }
      },
      {
        text: '环形饼图',
        img: 'pie2.jpg',
        option: {
          ...comom,
          series: [
            {
              name: '',
              type: 'pie',
              radius: ['40%', '70%'],
              avoidLabelOverlap: false,
              label: {
                show: false,
                position: 'center',
                formatter: '{b} {c}'
              },
              emphasis: {
                label: {
                  show: true,
                  fontSize: 40,
                  fontWeight: 'bold'
                }
              },
              labelLine: {
                show: false
              },
              data: []
            }
          ]
        }
      }
    ]
  },
  {
    text: '表格',
    value: 'table',
    icon: 'mdi mdi-table',
    children: [
      {
        text: '基础表格',
        img: 'table1.jpg'
      }
    ]
  }
]
