| | |
| | | }, |
| | | ], |
| | | } |
| | | |
| | | import _ from 'lodash' |
| | | // chart.setOption(option); |
| | | |
| | | const pieOption = { |
| | |
| | | tarValue = data[i].value |
| | | } |
| | | } |
| | | let percentage = ((tarValue / total) * 100).toFixed(1) |
| | | let percentage = total ? _.round(((tarValue / total) * 100),1) : 0 |
| | | return `${name} ${percentage}%` |
| | | }, |
| | | }, |
| | |
| | | label: { |
| | | show: true, |
| | | position: 'inside', |
| | | formatter: '{c}%', |
| | | formatter: function(params) { |
| | | return params.value > 0 ? params.value : '' |
| | | }, |
| | | fontSize: 12, |
| | | color: '#fff', |
| | | }, |
| | |
| | | { value: 0, name: '处理中', itemStyle: { color: '#FFC398' } }, |
| | | { value: 0, name: '已完成', itemStyle: { color: '#AFD9FB' } }, |
| | | // { value: 0, name: '待分拨', itemStyle: { color: '#E9C81A' } }, |
| | | |
| | | |
| | | { value: 0, name: '已完结', itemStyle: { color: '#11C4FF' } }, |
| | | ], |
| | | }, |