// 传参示例 export const paramsExample = { title: 'CPU', // 标题 value: '76', // 值 useColorIndex: 0, // 图标颜色序号 默认使用第一个颜色 height: '100px', // 默认100px width: '100px', // 默认100px } // 图表颜色 export const getColor = (index:any) => { let startColorList = [ '#00cefc', '#9f3edd', '#0ff', ] let endColorList = [ '#367bec', '#4897f6', '#5467df', ] const startColor = startColorList[index]? startColorList[index] : startColorList[0] const endColor = endColorList[index]? endColorList[index] : endColorList[0] return { startColor, endColor } } export const placeHolderStyle = { normal: { label: { show: false }, labelLine: { show: false }, color: "rgba(0,0,0,0)", borderWidth: 0 }, emphasis: { color: "rgba(0,0,0,0)", borderWidth: 0 } } export const dataStyle = { normal: { formatter: '{c}%', position: 'center', show: true, textStyle: { fontSize: '15', fontWeight: 'normal', color: '#AAAFC8' } } }