import * as echarts from 'echarts'
import { size, split } from 'lodash'

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: {
      icon:'circle',
      show: true,
      top: 10,
      left:'10%',
      textStyle: {
      fontSize: 16,
      fontFamily: 'Source Han Sans CN',
      fontWeight: 400,    
      lineHeight: 24,            
      letterSpacing: 0,                 
      align: 'left',       
      color:'rgb(95, 101, 108)'
      },
      itemWidth:12,
      itemHeight:12, 
    },
    xAxis: [
      {
        type: 'category',
        boundaryGap: false,
        data: dataX,
       axisLine: {
      lineStyle: {
        color: 'rgb(231, 243, 255)',
      },
      },
      axisLabel: {
      color: 'rgb(132, 136, 142)',
       fontFamily: 'Microsoft YaHei',
      fontWeight: 400,   
      fontSize:12,           
             
     
     
    },
 
    
      }
    ],
    yAxis: [
      {
        type: 'value',
        splitLine:{
          show:true,
          lineStyle:{
            color:"rgb(231, 243, 255)",
            type:'dashed'
          }
        }
      }
    ],
    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