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

将series子元素的type属性配置为pie,即可使用饼状图。

show

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

name

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

radius

  1. /**
  2. * @description 饼的半径
  3. * @type {String|Number}
  4. * @default radius = '50%'
  5. * @example radius = '50%' | 100
  6. */

center

  1. /**
  2. * @description 饼的中心点
  3. * @type {Array}
  4. * @default center = ['50%','50%']
  5. * @example center = ['50%','50%'] | [100, 100]
  6. */

startAngle

  1. /**
  2. * @description 饼状图的起始角度 (弧度值)
  3. * @type {Number}
  4. * @default startAngle = -Math.PI / 2
  5. * @example startAngle = -Math.PI
  6. */

roseType

  1. /**
  2. * @description 是否启用玫瑰图模式
  3. * @type {Boolean}
  4. * @default roseType = false
  5. */

roseSort

  1. /**
  2. * @description 玫瑰图模式下是否启用自动排序
  3. * @type {Boolean}
  4. * @default roseSort = true
  5. */

roseIncrement

  1. /**
  2. * @description 玫瑰半径递增值
  3. * @type {String|Number}
  4. * @default roseIncrement = 'auto'
  5. * @example roseIncrement = 'auto' | '10%' | 10
  6. */

data

  1. /**
  2. * @description 构成饼状图的数据
  3. * @type {Array}
  4. * @default data = []
  5. */

data[i].name

  1. /**
  2. * @description 构成饼状图的饼的名称
  3. * @type {String}
  4. */

data[i].value

  1. /**
  2. * @description 构成饼状图的饼的值
  3. * @type {Number}
  4. */

insideLabel

  1. /**
  2. * @description 饼状图内部标签配置
  3. * @type {Object}
  4. */

insideLabel.show

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

insideLabel.formatter

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

insideLabel.style

  1. /**
  2. * @description 标签默认样式
  3. * @type {Object}
  4. * @default style = {Class Style的配置项}
  5. */
  6. style: {
  7. fontSize: 10,
  8. fill: '#fff',
  9. textAlign: 'center',
  10. textBaseline: 'middle'
  11. }

outsideLabel

  1. /**
  2. * @description 饼状图外部标签配置
  3. * @type {Object}
  4. */

outsideLabel.show

  1. /**
  2. * @description 是否显示外部标签
  3. * @type {Boolean}
  4. * @default show = true
  5. */

outsideLabel.formatter

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

outsideLabel.style

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

outsideLabel.labelLineBendGap

  1. /**
  2. * @description 标签线弯曲点与饼状图的间距
  3. * @type {String|Number}
  4. * @default labelLineBendGap = '20%'
  5. * @example labelLineBendGap = '20%' | 20
  6. */

outsideLabel.labelLineEndLength

  1. /**
  2. * @description 标签线末端长度
  3. * @type {Number}
  4. * @default labelLineEndLength = 50
  5. */

outsideLabel.labelLineStyle

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

pieStyle

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

percentToFixed

  1. /**
  2. * @description 百分比小数部分精度
  3. * @type {Number}
  4. * @default percentToFixed = 0
  5. */

rLevel

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

animationDelayGap

  1. /**
  2. * @description 动画延迟间距
  3. * @type {Number}
  4. * @default animationDelayGap = 60
  5. */

animationCurve

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

startAnimationCurve

  1. /**
  2. * @description 饼状图起始缓动曲线
  3. * @type {String}
  4. * @default startAnimationCurve = 'easeOutBack'
  5. */

animationFrame

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