series[i] ({type: ‘line’, …})

将series子元素的type属性配置为line,即可使用折线图。

show

  1. /**
  2. * @description 是否显示该折线图
  3. * @type {Boolean}
  4. * @default show = true
  5. */

name

  1. /**
  2. * @description 图例标签名
  3. * @type {String}
  4. * @default name = ''
  5. */

stack

  1. /**
  2. * @description 数据堆叠
  3. * 相同stack的series元素的data值将被叠加(后边的值将被叠加在前边的值上)
  4. * @type {String}
  5. * @default name = ''
  6. */

smooth

  1. /**
  2. * @description 光滑折线
  3. * @type {Boolean}
  4. * @default smooth = false
  5. */

xAxisIndex

  1. /**
  2. * @description 折线图x坐标系索引
  3. * @type {Number}
  4. * @default xAxisIndex = 0
  5. * @example xAxisIndex = 0 | 1
  6. */

yAxisIndex

  1. /**
  2. * @description 折线图y坐标系索引
  3. * @type {Number}
  4. * @default yAxisIndex = 0
  5. * @example yAxisIndex = 0 | 1
  6. */

data

  1. /**
  2. * @description 构成折线图的数据
  3. * @type {Array}
  4. * @default data = []
  5. * @example data = [100, 200, 300]
  6. */

lineStyle

  1. /**
  2. * @description 折线默认样式
  3. * @type {Object}
  4. * @default style = {Class Style的配置项}
  5. */
  6. lineStyle: {
  7. lineWidth: 1
  8. }

linePoint

  1. /**
  2. * @description 折线点配置
  3. * @type {Object}
  4. */

linePoint.show

  1. /**
  2. * @description 是否显示该折线点
  3. * @type {Boolean}
  4. * @default show = true
  5. */

linePoint.radius

  1. /**
  2. * @description 折线点半径
  3. * @type {Number}
  4. * @default radius = 2
  5. */

linePoint.style

  1. /**
  2. * @description 折线点默认样式
  3. * @type {Object}
  4. * @default style = {Class Style的配置项}
  5. */
  6. style: {
  7. fill: '#fff',
  8. lineWidth: 1
  9. }

lineArea

  1. /**
  2. * @description 折线区域配置
  3. * @type {Object}
  4. */

lineArea.show

  1. /**
  2. * @description 是否显示折线区域
  3. * @type {Boolean}
  4. * @default show = false
  5. */

lineArea.gradient

  1. /**
  2. * @description 折线区域渐变色 (Hex|rgb|rgba)
  3. * @type {Array}
  4. * @default gradient = []
  5. */

lineArea.style

  1. /**
  2. * @description 折线区域默认样式
  3. * @type {Object}
  4. * @default style = {Class Style的配置项}
  5. */
  6. style: {
  7. opacity: 0.5
  8. }

label

  1. /**
  2. * @description 折线标签配置
  3. * @type {Object}
  4. */

label.show

  1. /**
  2. * @description 是否显示折线标签
  3. * @type {Boolean}
  4. * @default show = false
  5. */

label.position

  1. /**
  2. * @description 标签位置
  3. * @type {String}
  4. * @default position = 'top'
  5. * @example position = 'top' | 'center' | 'bottom'
  6. */

label.offset

  1. /**
  2. * @description 标签位置偏移
  3. * @type {Array}
  4. * @default offset = [0, -10]
  5. */

label.formatter

  1. /**
  2. * @description 标签格式化
  3. * @type {String|Function}
  4. * @default formatter = null
  5. * @example formatter = '{value}件'
  6. * @example formatter = (dataItem) => (dataItem.value)
  7. */

label.style

  1. /**
  2. * @description 标签默认样式
  3. * @type {Object}
  4. * @default style = {Class Style的配置项}
  5. */
  6. style: {
  7. fontSize: 10
  8. }

rLevel

  1. /**
  2. * @description 折线图渲染级别
  3. * 级别高者优先渲染
  4. * @type {Number}
  5. * @default rLevel = 10
  6. */

animationCurve

  1. /**
  2. * @description 折线图缓动曲线
  3. * @type {String}
  4. * @default animationCurve = 'easeOutCubic'
  5. */

animationFrame

  1. /**
  2. * @description 折线图缓动效果帧数
  3. * @type {Number}
  4. * @default animationFrame = 50
  5. */