xAxis

xAxis用来配置x坐标轴,它的值可以为对象,也可以为一个数组,为数组时即多个x坐标轴(至多2个)。

name

  1. /**
  2. * @description 坐标轴名称
  3. * @type {String}
  4. * @default name = ''
  5. */

show

  1. /**
  2. * @description 是否展示该坐标轴
  3. * @type {Boolean}
  4. * @default show = true
  5. */

data

  1. /**
  2. * @description 坐标轴的标签内容
  3. * x或y坐标轴应至少有一个配置为'value'
  4. * @type {Array}
  5. * @default data = null
  6. * @example data = ['周一', '周二', '周三', ...] | 'value'
  7. */

position

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

nameGap

  1. /**
  2. * @description 名称与坐标轴间距
  3. * @type {Number}
  4. * @default nameGap = 15
  5. */

nameLocation

  1. /**
  2. * @description 名称位置
  3. * @type {String}
  4. * @default nameLocation = 'end'
  5. * @example nameLocation = 'end' | 'center' | 'start'
  6. */

nameTextStyle

  1. /**
  2. * @description 名称默认样式
  3. * @type {Object}
  4. * @default style = {Class Style的配置项}
  5. */
  6. nameTextStyle: {
  7. fill: '#333',
  8. fontSize: 10
  9. }

min

  1. /**
  2. * @description 坐标轴最小值
  3. * data属性为'value'时才生效
  4. * @type {String|Number}
  5. * @default min = '20%'
  6. * @example min = '20%' | 0
  7. */

max

  1. /**
  2. * @description 坐标轴最大值
  3. * data属性为'value'时才生效
  4. * @type {String|Number}
  5. * @default max = '20%'
  6. * @example max = '20%' | 0
  7. */

interval

  1. /**
  2. * @description 数值间距
  3. * data属性为'value'时才生效
  4. * @type {Number}
  5. * @default interval = null
  6. * @example interval = 100
  7. */

minInterval

  1. /**
  2. * @description 最小数值间距
  3. * data属性为'value'时才生效
  4. * @type {Number}
  5. * @default minInterval = null
  6. * @example minInterval = 1
  7. */

maxInterval

  1. /**
  2. * @description 最大数值间距
  3. * data属性为'value'时才生效
  4. * @type {Number}
  5. * @default maxInterval = null
  6. * @example maxInterval = 100
  7. */

boundaryGap

  1. /**
  2. * @description 边界间隔
  3. * data属性不为'value'时默认为true
  4. * @type {Boolean}
  5. * @default boundaryGap = null
  6. * @example boundaryGap = true
  7. */

splitNumber

  1. /**
  2. * @description 坐标轴分割个数
  3. * @type {Number}
  4. * @default splitNumber = 5
  5. */

axisLine

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

axisLine.show

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

axisLine.style

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

axisTick

  1. /**
  2. * @description 坐标轴刻度线配置
  3. * @type {Object}
  4. */

axisTick.show

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

axisTick.style

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

axisLabel

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

axisLabel.show

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

axisLabel.formatter

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

axisLabel.style

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

splitLine

  1. /**
  2. * @description 坐标轴分割线配置
  3. * @type {Object}
  4. */

splitLine.show

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

splitLine.style

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

rLevel

  1. /**
  2. * @description X坐标轴渲染级别
  3. * 级别高者优先渲染
  4. * @type {Number}
  5. * @default rLevel = -20
  6. */

animationCurve

  1. /**
  2. * @description X坐标轴缓动曲线
  3. * @type {String}
  4. * @default animationCurve = 'easeOutCubic'
  5. */

animationFrame

  1. /**
  2. * @description X坐标轴缓动效果帧数
  3. * @type {Number}
  4. * @default animationFrame = 50
  5. */