|
@@ -85,7 +85,16 @@ export default {
|
|
|
color: '#545454',
|
|
|
lineHeight: 22,
|
|
|
formatter: function(param) {
|
|
|
- return param.name + '(' + Math.round(param.percent) + '%' + ')' + '\n¥' + param.value + ''
|
|
|
+ let result = (+param.value || 0).toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ','))
|
|
|
+ const temp = result.split('.')
|
|
|
+ if (temp.length === 1) {
|
|
|
+ result += '.00'
|
|
|
+ } else if (temp.length > 1) {
|
|
|
+ if (temp[1].length < 2) {
|
|
|
+ result += '0'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return param.name + '(' + Math.round(param.percent) + '%' + ')' + '\n¥' + result
|
|
|
}
|
|
|
},
|
|
|
labelLine: {
|