legend

legend为图表提供图例标签功能,它允许用户隐藏/显示series中的某个子图表。

show

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

orient

  1. /**
  2. * @description 图例标签方向
  3. * @type {String}
  4. * @default orient = 'horizontal'
  5. * @example orient = 'horizontal' | 'vertical'
  6. */

left

  1. /**
  2. * @description 图例标签左边距
  3. * 优先级高于right
  4. * @type {String|Number}
  5. * @default left = 'auto'
  6. * @example left = 'auto' | '10%' | 10
  7. */

right

  1. /**
  2. * @description 图例标签右边距
  3. * @type {String|Number}
  4. * @default right = 'auto'
  5. * @example right = 'auto' | '10%' | 10
  6. */

top

  1. /**
  2. * @description 图例标签上边距
  3. * 优先级高于bottom
  4. * @type {String|Number}
  5. * @default top = 'auto'
  6. * @example top = 'auto' | '10%' | 10
  7. */

bottom

  1. /**
  2. * @description 图例标签下边距
  3. * @type {String|Number}
  4. * @default bottom = 'auto'
  5. * @example bottom = 'auto' | '10%' | 10
  6. */

itemGap

  1. /**
  2. * @description 标签间距
  3. * @type {Number}
  4. * @default itemGap = 10
  5. */

iconWidth

  1. /**
  2. * @description 图例标签图标的宽度
  3. * @type {Number}
  4. * @default iconWidth = 25
  5. */

iconHeight

  1. /**
  2. * @description 图例标签图标的高度
  3. * @type {Number}
  4. * @default iconHeight = 10
  5. */

selectAble

  1. /**
  2. * @description 图里标签是否具有选择功能
  3. * 点击以隐藏/显示对应的series子图表
  4. * @type {Boolean}
  5. * @default selectAble = true
  6. */

data

  1. /**
  2. * @description 构成图例标签的数据
  3. * 其子元素可以为String也可以为Object
  4. * 要想定义图例标签图标颜色或图标形状请使用Object类型
  5. * @type {Array}
  6. * @default data = []
  7. */

data[i] | {String}

  1. /**
  2. * @description data子元素
  3. * 应与series子图表的name相对应
  4. * @type {String}
  5. * @example data = ['系列A', '系列B']
  6. */

data[i] | {Object}

  1. /**
  2. * @description data子元素
  3. * @type {Object}
  4. */

data[i].name

  1. /**
  2. * @description 与series子图表相对应的name值
  3. * @type {String}
  4. */

data[i].color

  1. /**
  2. * @description 用于设置图例标签图标的颜色 (Hex|rgb|rgba)
  3. * @type {String}
  4. */

data[i].icon

  1. /**
  2. * @description 图例标签图标形状
  3. * @type {String}
  4. * @example icon = 'rect' | 'line'
  5. */

textStyle

  1. /**
  2. * @description 图例标签文字默认样式
  3. * @type {Object}
  4. * @default style = {Class Style的配置项}
  5. */
  6. textStyle: {
  7. fontFamily: 'Arial',
  8. fontSize: 13,
  9. fill: '#000'
  10. }

iconStyle

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

textUnselectedStyle

  1. /**
  2. * @description 未选择的图例标签文字默认样式
  3. * @type {Object}
  4. * @default style = {Class Style的配置项}
  5. */
  6. textUnselectedStyle: {
  7. fontFamily: 'Arial',
  8. fontSize: 13,
  9. fill: '#999'
  10. }

iconUnselectedStyle

  1. /**
  2. * @description 未选择的图例标签图标默认样式
  3. * @type {Object}
  4. * @default style = {Class Style的配置项}
  5. */
  6. iconUnselectedStyle: {
  7. fill: '#999'
  8. }

rLevel

  1. /**
  2. * @description 图例标签渲染级别
  3. * 级别高者优先渲染
  4. * @type {Number}
  5. * @default rLevel = 20
  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. */