From c0d27266a4244a37018350c08acab78a8fb589a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Thu, 5 Dec 2024 16:47:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/board/warehouse/fifthFloor.vue | 49 ++++++++++++++----- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/hw-ui/src/views/board/warehouse/fifthFloor.vue b/hw-ui/src/views/board/warehouse/fifthFloor.vue index a4125959..dca4f3e1 100644 --- a/hw-ui/src/views/board/warehouse/fifthFloor.vue +++ b/hw-ui/src/views/board/warehouse/fifthFloor.vue @@ -132,7 +132,6 @@ export default { this.topData.rawOutStock = [...[0, 0, 0, 0], ...(e.data.rawOutStock || 0).toString().split('')].slice(-4) }) fifthPanake().then(e => { - console.log(e) this.$refs.chart1.setData({ title: { text: '辅料空料箱占比', @@ -140,6 +139,11 @@ export default { color: '#fff' } }, + tooltip:{ + pointFormatter: function() { + return '占比:'+ this.options.y + '%' + } + }, credits: { enabled: false }, @@ -180,11 +184,13 @@ export default { pie: { allowPointSelect: false, cursor: 'pointer', - depth: 35, + depth: 15, startAngle: 45, - size: 200, + size: 150, dataLabels: { enabled: true, + softConnector: true, + distance: 1, formatter: function() { return this.point.options.name + '
' + this.point.options.y + '%' } @@ -224,6 +230,11 @@ export default { color: '#fff' } }, + tooltip:{ + pointFormatter: function() { + return '占比:'+ this.options.y + '%' + } + }, credits: { enabled: false }, @@ -265,11 +276,13 @@ export default { pie: { allowPointSelect: false, cursor: 'pointer', - depth: 35, + depth: 15, startAngle: 45, - size: 200, + size: 150, dataLabels: { enabled: true, + softConnector: true, + distance: 1, formatter: function() { return this.point.options.name + '
' + this.point.options.y + '%' } @@ -311,6 +324,11 @@ export default { color: '#fff' } }, + tooltip:{ + pointFormatter: function() { + return '占比:'+ this.options.y + '%' + } + }, credits: { enabled: false }, @@ -352,11 +370,13 @@ export default { pie: { allowPointSelect: false, cursor: 'pointer', - depth: 35, + depth: 15, startAngle: 45, - size: 200, + size: 150, dataLabels: { enabled: true, + softConnector: true, + distance: 1, formatter: function() { return this.point.options.name + '
' + this.point.options.y + '%' } @@ -379,7 +399,7 @@ export default { return { name: v.materialName, y: v.totalAmount, - h: parseFloat(((v.totalAmount / total) * 100).toFixed(2)) + h: Math.min(parseFloat(((v.totalAmount / total) * 100).toFixed(2)),50) } }) }] @@ -392,6 +412,11 @@ export default { color: '#fff' } }, + tooltip:{ + pointFormatter: function() { + return '占比:'+ this.options.y + '%' + } + }, credits: { enabled: false }, @@ -433,11 +458,13 @@ export default { pie: { allowPointSelect: false, cursor: 'pointer', - depth: 35, + depth: 15, startAngle: 45, - size: 200, + size: 150, dataLabels: { enabled: true, + softConnector: true, + distance: 1, formatter: function() { return this.point.options.name + '
' + this.point.options.y + '%' } @@ -460,7 +487,7 @@ export default { return { name: v.materialName, y: v.totalAmount, - h: parseFloat(((v.totalAmount / total1) * 100).toFixed(2)) + h: Math.min(parseFloat(((v.totalAmount / total1) * 100).toFixed(2)),50) } }) }]