import * as echarts from 'echarts'

const getMultiLineChart = (dataX, dataY1, dataY2, dataY3) => {
  return {
    tooltip: {
      trigger: 'axis',
      axisPointer: {
        type: 'cross',
        label: {
          backgroundColor: '#6a7985'
        }
      }
    },
    grid: {
      top: '15%',
      right: '5%',
      bottom: '5%',
      left: '5%',
      containLabel: true
    },
    legend: {
      show: true,
      top: 10,
      left:'10%'
    },
    xAxis: [
      {
        type: 'category',
        boundaryGap: false,
        data: dataX
      }
    ],
    yAxis: [
      {
        type: 'value'
      }
    ],
    series: [
      {
        name: '人工智能',
        type: 'line',
        emphasis: {
          focus: 'series'
        },
        data: dataY1
      },
      {
        name: '集成电路',
        type: 'line',
        emphasis: {
          focus: 'series'
        },
        data: dataY2
      },
      {
        name: '量子科技',
        type: 'line',
        emphasis: {
          focus: 'series'
        },
        data: dataY3
      }
    ]
  }
}

export default getMultiLineChart