You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

247 lines
5.4 KiB
JavaScript

3 months ago
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.barConfig = void 0;
var 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
};
exports.barConfig = barConfig;