|
|
@@ -1,5 +1,7 @@
|
|
|
import echarts from "echarts"
|
|
|
|
|
|
+const radius = window.innerWidth > 1600 ? '55%' : '45%'
|
|
|
+
|
|
|
const rowLimit = (params, max) => {
|
|
|
let result = ''
|
|
|
//一行显示几个字
|
|
|
@@ -192,7 +194,7 @@ export const acceptOption = {
|
|
|
{
|
|
|
name: '任务完成情况',
|
|
|
type: 'pie',
|
|
|
- radius: '55%',
|
|
|
+ radius,
|
|
|
center: ['35%', '50%'],
|
|
|
data: [],
|
|
|
itemStyle: {
|
|
|
@@ -205,7 +207,7 @@ export const acceptOption = {
|
|
|
label: {
|
|
|
show: true,
|
|
|
position: 'outer',
|
|
|
- formatter: `数量:{c} 占比:{d}%`,
|
|
|
+ formatter: `{c}【{d}%】`,
|
|
|
// formatter: `{b}:{c}`,
|
|
|
fontSize: 14
|
|
|
},
|
|
|
@@ -368,10 +370,8 @@ export const taskOption = {
|
|
|
{
|
|
|
name: '任务完成情况',
|
|
|
type: 'pie',
|
|
|
+ radius,
|
|
|
// radius: ['40%', '70%'],
|
|
|
- avoidLabelOverlap: true,
|
|
|
- // startAngle: 180,
|
|
|
- radius: '55%',
|
|
|
// center: ['50%', '70%'],
|
|
|
data: [],
|
|
|
itemStyle: {
|
|
|
@@ -385,34 +385,14 @@ export const taskOption = {
|
|
|
show: true,
|
|
|
position: 'outer',
|
|
|
// formatter: `占比:{d}%\t{b}:{c}`,
|
|
|
- formatter: `数量:{c} 占比:{d}%`,
|
|
|
+ formatter: `{c}【{d}%】`,
|
|
|
fontSize: 14
|
|
|
},
|
|
|
labelLine: {
|
|
|
show: true
|
|
|
}
|
|
|
}
|
|
|
- },
|
|
|
- // label: {
|
|
|
- // alignTo: 'edge',
|
|
|
- // minMargin: 5,
|
|
|
- // edgeDistance: 10,
|
|
|
- // lineHeight: 15
|
|
|
- // },
|
|
|
- // labelLine: {
|
|
|
- // length: -5,
|
|
|
- // length2: 0,
|
|
|
- // maxSurfaceAngle: 80
|
|
|
- // },
|
|
|
- // labelLayout (params) {
|
|
|
- // const isLeft = params.labelRect.x < myChart.getWidth() / 2
|
|
|
- // const points = params.labelLinePoints
|
|
|
- // // Update the end point.
|
|
|
- // points[2][0] = isLeft ? params.labelRect.x : params.labelRect.x + params.labelRect.width
|
|
|
- // return {
|
|
|
- // labelLinePoints: points
|
|
|
- // }
|
|
|
- // }
|
|
|
+ }
|
|
|
}
|
|
|
],
|
|
|
color: ['#00a78e', '#d20962', '#f47721'],
|
|
|
@@ -830,7 +810,7 @@ export const yearOption = {
|
|
|
{
|
|
|
name: '任务完成情况',
|
|
|
type: 'pie',
|
|
|
- radius: '55%',
|
|
|
+ radius,
|
|
|
center: ['50%', '50%'],
|
|
|
data: [],
|
|
|
itemStyle: {
|
|
|
@@ -844,7 +824,7 @@ export const yearOption = {
|
|
|
show: true,
|
|
|
position: 'outer',
|
|
|
// formatter: `占比:{d}%\t{b}:{c}`,
|
|
|
- formatter: `数量:{c} 占比:{d}%`,
|
|
|
+ formatter: `{c}【{d}%】`,
|
|
|
fontSize: 14
|
|
|
},
|
|
|
labelLine: {
|