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.

214 lines
4.4 KiB
JavaScript

3 months ago
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.pieConfig = void 0;
var pieConfig = {
/**
* @description Whether to display this pie chart
* @type {Boolean}
* @default show = true
*/
show: true,
/**
* @description Legend name
* @type {String}
* @default name = ''
*/
name: '',
/**
* @description Radius of pie
* @type {String|Number}
* @default radius = '50%'
* @example radius = '50%' | 100
*/
radius: '50%',
/**
* @description Center point of pie
* @type {Array}
* @default center = ['50%','50%']
* @example center = ['50%','50%'] | [100, 100]
*/
center: ['50%', '50%'],
/**
* @description Pie chart start angle
* @type {Number}
* @default startAngle = -Math.PI / 2
* @example startAngle = -Math.PI
*/
startAngle: -Math.PI / 2,
/**
* @description Whether to enable rose type
* @type {Boolean}
* @default roseType = false
*/
roseType: false,
/**
* @description Automatic sorting in rose type
* @type {Boolean}
* @default roseSort = true
*/
roseSort: true,
/**
* @description Rose radius increasing
* @type {String|Number}
* @default roseIncrement = 'auto'
* @example roseIncrement = 'auto' | '10%' | 10
*/
roseIncrement: 'auto',
/**
* @description Pie chart data
* @type {Array}
* @default data = []
*/
data: [],
/**
* @description Pie inside label configuration
* @type {Object}
*/
insideLabel: {
/**
* @description Whether to display inside label
* @type {Boolean}
* @default show = false
*/
show: false,
/**
* @description Label formatter
* @type {String|Function}
* @default formatter = '{percent}%'
* @example formatter = '${name}-{value}-{percent}%'
* @example formatter = (dataItem) => (dataItem.name)
*/
formatter: '{percent}%',
/**
* @description Label default style configuration
* @type {Object}
* @default style = {Configuration Of Class Style}
*/
style: {
fontSize: 10,
fill: '#fff',
textAlign: 'center',
textBaseline: 'middle'
}
},
/**
* @description Pie Outside label configuration
* @type {Object}
*/
outsideLabel: {
/**
* @description Whether to display outside label
* @type {Boolean}
* @default show = false
*/
show: true,
/**
* @description Label formatter
* @type {String|Function}
* @default formatter = '{name}'
* @example formatter = '${name}-{value}-{percent}%'
* @example formatter = (dataItem) => (dataItem.name)
*/
formatter: '{name}',
/**
* @description Label default style configuration
* @type {Object}
* @default style = {Configuration Of Class Style}
*/
style: {
fontSize: 11
},
/**
* @description Gap beteen label line bended place and pie
* @type {String|Number}
* @default labelLineBendGap = '20%'
* @example labelLineBendGap = '20%' | 20
*/
labelLineBendGap: '20%',
/**
* @description Label line end length
* @type {Number}
* @default labelLineEndLength = 50
*/
labelLineEndLength: 50,
/**
* @description Label line default style configuration
* @type {Object}
* @default style = {Configuration Of Class Style}
*/
labelLineStyle: {
lineWidth: 1
}
},
/**
* @description Pie default style configuration
* @type {Object}
* @default style = {Configuration Of Class Style}
*/
pieStyle: {},
/**
* @description Percentage fractional precision
* @type {Number}
* @default percentToFixed = 0
*/
percentToFixed: 0,
/**
* @description Pie chart render level
* Priority rendering high level
* @type {Number}
* @default rLevel = 10
*/
rLevel: 10,
/**
* @description Animation delay gap
* @type {Number}
* @default animationDelayGap = 60
*/
animationDelayGap: 60,
/**
* @description Pie animation curve
* @type {String}
* @default animationCurve = 'easeOutCubic'
*/
animationCurve: 'easeOutCubic',
/**
* @description Pie start animation curve
* @type {String}
* @default startAnimationCurve = 'easeOutBack'
*/
startAnimationCurve: 'easeOutBack',
/**
* @description Pie animation frame
* @type {Number}
* @default animationFrame = 50
*/
animationFrame: 50
};
exports.pieConfig = pieConfig;