|
@@ -242,37 +242,8 @@ function getDistributionOption(
|
|
|
fontFamily: FONT_FAMILY
|
|
fontFamily: FONT_FAMILY
|
|
|
}
|
|
}
|
|
|
}),
|
|
}),
|
|
|
- graphic: [
|
|
|
|
|
- {
|
|
|
|
|
- type: 'text',
|
|
|
|
|
- left: '19.5%',
|
|
|
|
|
- top: '45%',
|
|
|
|
|
- style: {
|
|
|
|
|
- text: `总库存\n${formatAmount(inventoryTotal)}万元`,
|
|
|
|
|
- textAlign: 'center',
|
|
|
|
|
- fill: THEME.text.strong,
|
|
|
|
|
- fontSize: layout.compact ? 8 : 10,
|
|
|
|
|
- fontWeight: 700,
|
|
|
|
|
- lineHeight: layout.distributionTitleLineHeight + 6,
|
|
|
|
|
- fontFamily: FONT_FAMILY
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: 'text',
|
|
|
|
|
- left: '67%',
|
|
|
|
|
- top: '45%',
|
|
|
|
|
- style: {
|
|
|
|
|
- text: `总积压\n${formatAmount(backlogTotal)}万元`,
|
|
|
|
|
- textAlign: 'center',
|
|
|
|
|
- fill: THEME.text.strong,
|
|
|
|
|
- fontSize: layout.compact ? 8 : 10,
|
|
|
|
|
- fontWeight: 700,
|
|
|
|
|
- lineHeight: layout.distributionTitleLineHeight + 6,
|
|
|
|
|
- fontFamily: FONT_FAMILY
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- ],
|
|
|
|
|
series: [
|
|
series: [
|
|
|
|
|
+ // ===== 第一个饼图:库存数据(带外标签) =====
|
|
|
{
|
|
{
|
|
|
name: '库存',
|
|
name: '库存',
|
|
|
type: 'pie',
|
|
type: 'pie',
|
|
@@ -293,11 +264,8 @@ function getDistributionOption(
|
|
|
},
|
|
},
|
|
|
labelLine: {
|
|
labelLine: {
|
|
|
show: true,
|
|
show: true,
|
|
|
- // length: layout.compact ? 6 : 10,
|
|
|
|
|
- // length2: layout.compact ? 8 : 14,
|
|
|
|
|
minTurnAngle: 90,
|
|
minTurnAngle: 90,
|
|
|
lineStyle: {
|
|
lineStyle: {
|
|
|
- color: distributionColors[0],
|
|
|
|
|
width: 1.5,
|
|
width: 1.5,
|
|
|
opacity: 1
|
|
opacity: 1
|
|
|
}
|
|
}
|
|
@@ -324,6 +292,34 @@ function getDistributionOption(
|
|
|
}
|
|
}
|
|
|
}))
|
|
}))
|
|
|
},
|
|
},
|
|
|
|
|
+ // ===== 第二个饼图:库存中心文字(不显示饼图) =====
|
|
|
|
|
+ {
|
|
|
|
|
+ name: '库存中心文字',
|
|
|
|
|
+ type: 'pie',
|
|
|
|
|
+ radius: ['0%', '0%'],
|
|
|
|
|
+ center: ['25%', layout.distributionPieCenterY],
|
|
|
|
|
+ label: {
|
|
|
|
|
+ show: true,
|
|
|
|
|
+ position: 'center',
|
|
|
|
|
+ formatter: `总库存\n${formatAmount(inventoryTotal)}万元`,
|
|
|
|
|
+ color: THEME.text.strong,
|
|
|
|
|
+ fontSize: layout.compact ? 8 : 10,
|
|
|
|
|
+ fontWeight: 700,
|
|
|
|
|
+ lineHeight: layout.distributionTitleLineHeight + 6,
|
|
|
|
|
+ fontFamily: FONT_FAMILY
|
|
|
|
|
+ },
|
|
|
|
|
+ data: [{ name: '中心文字', value: 1 }],
|
|
|
|
|
+ animation: false,
|
|
|
|
|
+ tooltip: { show: false },
|
|
|
|
|
+ legend: { show: false },
|
|
|
|
|
+ // ✅ 关键:禁用所有交互
|
|
|
|
|
+ silent: true,
|
|
|
|
|
+ emphasis: {
|
|
|
|
|
+ scale: false,
|
|
|
|
|
+ label: { show: false }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ // ===== 第三个饼图:积压数据(带外标签) =====
|
|
|
{
|
|
{
|
|
|
name: '积压库存',
|
|
name: '积压库存',
|
|
|
type: 'pie',
|
|
type: 'pie',
|
|
@@ -344,11 +340,8 @@ function getDistributionOption(
|
|
|
},
|
|
},
|
|
|
labelLine: {
|
|
labelLine: {
|
|
|
show: true,
|
|
show: true,
|
|
|
- // length: layout.compact ? 6 : 10,
|
|
|
|
|
- // length2: layout.compact ? 8 : 14,
|
|
|
|
|
minTurnAngle: 90,
|
|
minTurnAngle: 90,
|
|
|
lineStyle: {
|
|
lineStyle: {
|
|
|
- color: distributionColors[0],
|
|
|
|
|
width: 1.5,
|
|
width: 1.5,
|
|
|
opacity: 1
|
|
opacity: 1
|
|
|
}
|
|
}
|
|
@@ -376,6 +369,33 @@ function getDistributionOption(
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}))
|
|
}))
|
|
|
|
|
+ },
|
|
|
|
|
+ // ===== 第四个饼图:积压中心文字(不显示饼图) =====
|
|
|
|
|
+ {
|
|
|
|
|
+ name: '积压中心文字',
|
|
|
|
|
+ type: 'pie',
|
|
|
|
|
+ radius: ['0%', '0%'],
|
|
|
|
|
+ center: ['73%', layout.distributionPieCenterY],
|
|
|
|
|
+ label: {
|
|
|
|
|
+ show: true,
|
|
|
|
|
+ position: 'center',
|
|
|
|
|
+ formatter: `总积压\n${formatAmount(backlogTotal)}万元`,
|
|
|
|
|
+ color: THEME.text.strong,
|
|
|
|
|
+ fontSize: layout.compact ? 8 : 10,
|
|
|
|
|
+ fontWeight: 700,
|
|
|
|
|
+ lineHeight: layout.distributionTitleLineHeight + 6,
|
|
|
|
|
+ fontFamily: FONT_FAMILY
|
|
|
|
|
+ },
|
|
|
|
|
+ data: [{ name: '中心文字', value: 1 }],
|
|
|
|
|
+ animation: false,
|
|
|
|
|
+ tooltip: { show: false },
|
|
|
|
|
+ legend: { show: false },
|
|
|
|
|
+ // ✅ 关键:禁用所有交互
|
|
|
|
|
+ silent: true,
|
|
|
|
|
+ emphasis: {
|
|
|
|
|
+ scale: false,
|
|
|
|
|
+ label: { show: false }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
}
|
|
}
|