/**
 * @author  daya
 * @createDate  2021/11/15 16:50
 * 折线图放入宽度设置(lineSeries)
 **/
// eslint-disable-next-line no-unused-vars
import {linearGradientStyle} from '../../../../charts'
// 样式1 的多条线样式
export const seriesStyle1 = {
  type: 'line',
  name: '',
  symbol: 'none',
  areaStyle: {
    shadowColor: 'rgba(0,202,149,0)',
    shadowBlur: 20
  },
  lineStyle: {
    width: 0.4,
    shadowColor: 'rgb(0,0,0)',
    shadowBlur: 20,
    shadowOffsetY: -4
  },
  smooth: true,
  data: []
}
// 样式2 的多条线样式
export const seriesStyle2 = {
  type: 'line',
  name: '',
  symbol: 'none',
  areaStyle: {
  },
  data: []
}
// 样式3 的多条线样式
export const seriesStyle3 = {
  type: 'line',
  name: '',
  symbol: 'none',
  areaStyle: {
  },
  lineStyle: {
    width: 0.4
    // shadowColor: 'rgb(0,0,0)',
    // shadowBlur: 20,
    // shadowOffsetY: -4,
  },
  smooth: true,
  // data: [23,34,21, 23,34,21]
  data: []
}
// 样式4 的多条线样式
export const seriesStyle4 = {
  width: 1,
  type: 'line',
  symbol: 'roundRect', // 折线点设置为实心点
  symbolSize: 4, // 折线点的大小
  itemStyle: {
    shadowBlur: 15,
    shadowColor: '#ecf390'
  },
  areaStyle: {
    // color: linearGradient[3]
  },
  data: []
}
// 样式5 的多条线样式
export const seriesStyle5 = {
  width: 1,
  type: 'line',
  smooth: true,
  symbolSize: 1,
  lineStyle: {
    width: 2
  },
  symbol: 'circle',
  showBackground: true,
  itemStyle: {
    shadowBlur: 15,
    shadowColor: 'rgba(0, 216, 212, 0.3)'
  },
  areaStyle: {
    // color: linearGradient[4]
  },
  data: []
}
// 样式6 的多条线样式
export const seriesStyle6 = {
  width: 1,
  type: 'line',
  symbol: 'roundRect', // 折线点设置为实心点
  symbolSize: 4, // 折线点的大小
  itemStyle: {
    shadowBlur: 15,
    shadowColor: '#ecf390'
  },
  areaStyle: {
  },
  data: []
}
// 样式7 的多条线样式
export const seriesStyle7 = {
  width: 1,
  type: 'line',
  smooth: true,
  symbolSize: 3,
  lineStyle: {
    width: 3
  },
  symbol: 'none',
  showBackground: true,
  areaStyle: {
  },
  data: []
}
// 样式8 的多条线样式
export const seriesStyle8 = {
  name: '',
  type: 'line',
  // 实心同色折线点
  showAllSymbol: true,
  symbol: 'circle',
  symbolSize: 6,
  data: []
}
// 样式9 的多条线样式
export const seriesStyle9 = [
  {
    name: '',
    type: 'line',
    data: [],
    symbolSize: 1,
    symbol: 'line',
    smooth: true,
    showSymbol: false,
    lineStyle: {
      width: 5
    }
  },
  {
    name: '',
    type: 'line',
    data: [],
    symbol: 'line',
    smooth: true,
    showSymbol: false,
    lineStyle: {
      width: 5
    }
  }
]
// 样式12 的多条线样式
export const seriesStyle12 = {
  markPoint: {
    data: [{
      type: 'max',
      name: '最大值'
    }]
  },
  name: '',
  type: 'line',
  // 实心同色折线点
  showAllSymbol: true,
  symbol: 'circle',
  symbolSize: 6,
  data: []
}
// 样式2 的多条线样式
export const seriesStyle10 = [
  {
    width: 1,
    type: 'line',
    smooth: true,
    symbolSize: 3,
    lineStyle: {
      width: 6
    },
    symbol: 'none',
    showBackground: true,
    areaStyle: {
      // color: linearGradientStyle([0, 0, 0, 1], 'rgba(255, 255, 255, 1)', 'rgba(255, 255, 255, 0)')
    },
    data: []
  },
  {
    width: 1,
    type: 'line',
    smooth: true,
    symbolSize: 3,
    lineStyle: {
      width: 6
    },
    symbol: 'none',
    showBackground: true,
    areaStyle: {
      // color: linearGradientStyle([0, 0, 0, 1], '#42B2F3', 'rgba(74,111,255, 0)')
    },
    data: []
  }
]
// 样式5 的多条线样式
export const seriesStyle11 = {
  width: 1,
  type: 'line',
  smooth: true,
  symbolSize: 1,
  lineStyle: {
    width: 2
  },
  symbol: 'circle',
  showBackground: true,
  itemStyle: {
    shadowBlur: 15,
    shadowColor: 'rgba(0, 216, 212, 0.3)'
  },
  // areaStyle: {
  //   // color: linearGradient[4]
  // },
  data: []
}

export const seriesStyle31 = {
  name: '',
  type: 'line',
  // 实心同色折线点
  showAllSymbol: true,
  symbol: function (value, ind) {
    if (ind.dataIndex === 6) {
      return 'circle'
    } else {
      return 'none'
    }
  },
  symbolSize: 5,
  smooth: true,
  itemStyle: {
    normal: {
      color: '#999999',
      lineStyle: {
        color: '#52effb'
      },
      label: {
        show: true,
        textStyle: {
          color: '#27C0E4',
          fontSize: 20
        },
        formatter: (params) => {
          if (params.dataIndex === 6) {
            return params.value
          } else {
            return ''
          }
        }
      }
    }
  },
  data: []
}
export const seriesStyle32 = {
  name: '',
  type: 'line',
  // 实心同色折线点
  showAllSymbol: true,
  // symbol: function (value, ind) {
  //   if (ind.dataIndex === 6) {
  //     return 'circle'
  //   } else {
  //     return 'none'
  //   }
  // },
  symbol: 'circle',
  symbolSize: 5,
  smooth: true,
  itemStyle: {
    normal: {
      color: '#999999',
      lineStyle: {
        color: '#52effb'
      },
      label: {
        show: true,
        textStyle: {
          color: '#27C0E4',
          fontSize: 20
        },
        formatter: (params) => {
          // if (params.dataIndex === 6) {
          //   return params.value
          // } else {
          //   return ''
          // }
          return params.value
        }
      }
    }
  },
  data: []
}
export const seriesStyle33 = {
  name: '',
  type: 'line',
  // 实心同色折线点
  showAllSymbol: true,
  // symbol: function (value, ind) {
  //   if (ind.dataIndex === 6) {
  //     return 'circle'
  //   } else {
  //     return 'none'
  //   }
  // },
  // symbol: 'circle',
  symbolSize: 5,
  smooth: true,
  itemStyle: {
    normal: {
      // color: '#ff871f',
      // lineStyle: {
      //   color: '#ff871f'
      // },
      label: {
        show: true,
        textStyle: {
          color: '#ff871f',
          fontSize: 12
        },
        formatter: (params) => {
          // if (params.dataIndex === 6) {
          //   return params.value
          // } else {
          //   return ''
          // }
          return params.value
        }
      }
    }
  },
  markPoint: {
    label: {
      color: '#fff'
    },
    data: [
      { type: 'max', name: 'Max' }
    ]
  },
  data: []
}

export const seriesStyle41 = {
  name: '',
  type: 'line',
  // 实心同色折线点
  showAllSymbol: true,
  symbol: function (value, ind) {
    if (ind.dataIndex === 3) {
      return 'circle'
    } else {
      return 'none'
    }
  },
  symbolSize: 5,
  smooth: true,
  itemStyle: {
    normal: {
      color: '#999999',
      lineStyle: {
        color: '#52effb'
      },
      label: {
        show: true,
        textStyle: {
          color: '#27C0E4',
          fontSize: 20
        },
        formatter: (params) => {
          if (params.dataIndex === 3) {
            return params.value
          } else {
            return ''
          }
        }
      }
    }
  },
  data: []
}
export const seriesStyle42 = {
  name: '',
  type: 'line',
  // 实心同色折线点
  showAllSymbol: true,
  symbol: 'none',
  symbolSize: 5,
  smooth: true,
  itemStyle: {
    normal: {
      color: '#999999',
      lineStyle: {
        color: '#52effb'
      },
      areaStyle: {
        color: {
          type: 'linear',
          x: 0,
          y: 0,
          x2: 0,
          y2: 1,
          colorStops: [ // 渐变颜色
            {
              offset: 0.5,
              color: '#00FFFF'
            },
            {
              offset: 1,
              color: '#0A529C'
            }
          ],
          global: false
        }
      },
      label: {
        show: true,
        textStyle: {
          color: '#27C0E4',
          fontSize: 20
        },
        formatter: (params) => {
          if (params.dataIndex === 3) {
            return params.value
          } else {
            return ''
          }
        }
      }
    }
  },
  data: []
}
export const lineSeries = {
  seriesStyle1,
  seriesStyle2,
  seriesStyle3,
  seriesStyle4,
  seriesStyle5,
  seriesStyle6,
  seriesStyle7,
  seriesStyle8,
  seriesStyle9,
  seriesStyle10,
  seriesStyle11,
  seriesStyle12,
  seriesStyle31,
  seriesStyle32,
  seriesStyle41,
  seriesStyle33,
  seriesStyle42
}
export default lineSeries
