// import echarts from "echarts";
import echarts from 'echarts/lib/echarts'

var blueliner = new echarts.graphic.LinearGradient(
  0,
  0,
  1,
  0,
  [
    {
      // 0% 处的颜色
      offset: 0,
      color: '#438CEA'
    },
    {
      // 100% 处的颜色
      offset: 1,
      color: '#6EE6FA'
    }
  ],
  false
)
var yellowliner = new echarts.graphic.LinearGradient(
  0,
  0,
  1,
  0,
  [
    {
      // 0% 处的颜色
      offset: 0,
      color: '#F9AF46'
    },
    {
      // 100% 处的颜色
      offset: 1,
      color: '#FDFA8E'
    }
  ],
  false
)
var greenliner = new echarts.graphic.LinearGradient(
  0,
  0,
  1,
  0,
  [
    {
      // 0% 处的颜色
      offset: 0,
      color: '#bfe8ab'
    },
    {
      // 100% 处的颜色
      offset: 1,
      color: '#71df3b'
    }
  ],
  false
)

var pinkliner = new echarts.graphic.LinearGradient(
  0,
  0,
  1,
  0,
  [
    {
      // 0% 处的颜色
      offset: 0,
      color: '#ffbd9d'
    },
    {
      // 100% 处的颜色
      offset: 1,
      color: '#ff7a3a'
    }
  ],
  false
)

var purpleliner = new echarts.graphic.LinearGradient(
  0,
  0,
  1,
  0,
  [
    {
      // 0% 处的颜色
      offset: 0,
      color: '#d0bdff'
    },
    {
      // 100% 处的颜色
      offset: 1,
      color: '#7e4aff'
    }
  ],
  false
)

var grayliner = new echarts.graphic.LinearGradient(
  0,
  0,
  1,
  0,
  [
    {
      // 0% 处的颜色
      offset: 0,
      color: '#ECEEED'
    },
    {
      // 100% 处的颜色
      offset: 1,
      color: '#D7D7D7'
    }
  ],
  false
)

var redliner = new echarts.graphic.LinearGradient(
  0,
  0,
  1,
  0,
  [
    {
      // 0% 处的颜色
      offset: 0,
      color: '#ff9b9b'
    },
    {
      // 100% 处的颜色
      offset: 1,
      color: '#ff5050'
    }
  ],
  false
)

const ColorDefines = {
  greenliner,
  yellowliner,
  blueliner,
  redliner,
  purpleliner,
  grayliner,
  pinkliner
}

export default ColorDefines
