| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- export const barConfig = {
- /**
- * @description Whether to display this bar chart
- * @type {Boolean}
- * @default show = true
- */
- show: true,
- /**
- * @description Legend name
- * @type {String}
- * @default name = ''
- */
- name: '',
- /**
- * @description Data stacking
- * The data value of the series element of the same stack
- * will be superimposed (the latter value will be superimposed on the previous value)
- * @type {String}
- * @default stack = ''
- */
- stack: '',
- /**
- * @description Bar shape type
- * @type {String}
- * @default shapeType = 'normal'
- * @example shapeType = 'normal' | 'leftEchelon' | 'rightEchelon'
- */
- shapeType: 'normal',
- /**
- * @description Echelon bar sharpness offset
- * @type {Number}
- * @default echelonOffset = 10
- */
- echelonOffset: 10,
- /**
- * @description Bar width
- * This property should be set on the last 'bar' series
- * in this coordinate system to take effect and will be in effect
- * for all 'bar' series in this coordinate system
- * @type {String|Number}
- * @default barWidth = 'auto'
- * @example barWidth = 'auto' | '10%' | 20
- */
- barWidth: 'auto',
- /**
- * @description Bar gap
- * This property should be set on the last 'bar' series
- * in this coordinate system to take effect and will be in effect
- * for all 'bar' series in this coordinate system
- * @type {String|Number}
- * @default barGap = '30%'
- * @example barGap = '30%' | 30
- */
- barGap: '30%',
- /**
- * @description Bar category gap
- * This property should be set on the last 'bar' series
- * in this coordinate system to take effect and will be in effect
- * for all 'bar' series in this coordinate system
- * @type {String|Number}
- * @default barCategoryGap = '20%'
- * @example barCategoryGap = '20%' | 20
- */
- barCategoryGap: '20%',
- /**
- * @description Bar x axis index
- * @type {Number}
- * @default xAxisIndex = 0
- * @example xAxisIndex = 0 | 1
- */
- xAxisIndex: 0,
- /**
- * @description Bar y axis index
- * @type {Number}
- * @default yAxisIndex = 0
- * @example yAxisIndex = 0 | 1
- */
- yAxisIndex: 0,
- /**
- * @description Bar chart data
- * @type {Array}
- * @default data = []
- * @example data = [100, 200, 300]
- */
- data: [],
- /**
- * @description Background bar configuration
- * @type {Object}
- */
- backgroundBar: {
- /**
- * @description Whether to display background bar
- * @type {Boolean}
- * @default show = false
- */
- show: false,
- /**
- * @description Background bar width
- * @type {String|Number}
- * @default width = 'auto'
- * @example width = 'auto' | '30%' | 30
- */
- width: 'auto',
- /**
- * @description Background bar default style configuration
- * @type {Object}
- * @default style = {Configuration Of Class Style}
- */
- style: {
- fill: 'rgba(200, 200, 200, .4)'
- }
- },
- /**
- * @description Bar label configuration
- * @type {Object}
- */
- label: {
- /**
- * @description Whether to display bar label
- * @type {Boolean}
- * @default show = false
- */
- show: false,
- /**
- * @description Bar label position
- * @type {String}
- * @default position = 'top'
- * @example position = 'top' | 'center' | 'bottom'
- */
- position: 'top',
- /**
- * @description Bar label offset
- * @type {Array}
- * @default offset = [0, -10]
- */
- offset: [0, -10],
- /**
- * @description Bar label formatter
- * @type {String|Function}
- * @default formatter = null
- * @example formatter = '{value}件'
- * @example formatter = (dataItem) => (dataItem.value)
- */
- formatter: null,
- /**
- * @description Bar label default style configuration
- * @type {Object}
- * @default style = {Configuration Of Class Style}
- */
- style: {
- fontSize: 10
- }
- },
- /**
- * @description Bar gradient configuration
- * @type {Object}
- */
- gradient: {
- /**
- * @description Gradient color (Hex|rgb|rgba)
- * @type {Array}
- * @default color = []
- */
- color: [],
- /**
- * @description Local gradient
- * @type {Boolean}
- * @default local = true
- */
- local: true
- },
- /**
- * @description Bar style default configuration
- * @type {Object}
- * @default style = {Configuration Of Class Style}
- */
- barStyle: {},
- /**
- * @description Independent color mode
- * When set to true, independent color mode is enabled
- * @type {Boolean}
- * @default independentColor = false
- */
- independentColor: false,
- /**
- * @description Independent colors
- * Only effective when independent color mode is enabled
- * Default value is the same as the color in the root configuration
- * Two-dimensional color array can produce gradient colors
- * @type {Array}
- * @example independentColor = ['#fff', '#000']
- * @example independentColor = [['#fff', '#000'], '#000']
- */
- independentColors: [],
- /**
- * @description Bar chart render level
- * Priority rendering high level
- * @type {Number}
- * @default rLevel = 0
- */
- rLevel: 0,
- /**
- * @description Bar animation curve
- * @type {String}
- * @default animationCurve = 'easeOutCubic'
- */
- animationCurve: 'easeOutCubic',
- /**
- * @description Bar animation frame
- * @type {Number}
- * @default animationFrame = 50
- */
- animationFrame: 50
- }
|