BarLineOptions.js 1.29 KB
import * as echarts from 'echarts'
// import utils from '../../utils/util'
function getBarLineOptions(obj) {
  const { tooltipFormatter, seriesData } = obj
  var barLineOption = {
    tooltip: {
      trigger: 'axis',
      borderWidth: 0,
      padding: 0,
      backgroundColor: '#051526',
      formatter: tooltipFormatter || ''
    },
    xAxis: {
      data: []
    },
    yAxis: [
      {
        // 纵轴标尺固定
        type: 'value',
        scale: true,
        // max: 200,
        min: 0,
        splitNumber: 4,
        boundaryGap: [0.1, 0.1],
        splitLine: {
          lineStyle: {
            color: '#ffffff1a'
          }
        }
      }
    ],
    grid: {
      left: '3%',
      right: '2%',
      top: '25%',
      bottom: '6%',
      containLabel: true
    },
    series: [
      {
        name: 'line',
        type: 'line',
        data: [],
        showSymbol: true, // 是否默认展示圆点
        symbol: 'circle', // 设定为实心点
        symbolSize: 6, // 设定实心点的大小
        itemStyle: {
          normal: {
            color: '#FFC200', // 改变折线点的颜色
            lineStyle: {
              color: '#FFC200' // 改变折线颜色
            }
          }
        }
      }
    ]
  }
  return barLineOption
}

export default getBarLineOptions