修改图表

master
夜笙歌 4 months ago
parent e763d2271a
commit c0d27266a4

@ -132,7 +132,6 @@ export default {
this.topData.rawOutStock = [...[0, 0, 0, 0], ...(e.data.rawOutStock || 0).toString().split('')].slice(-4) this.topData.rawOutStock = [...[0, 0, 0, 0], ...(e.data.rawOutStock || 0).toString().split('')].slice(-4)
}) })
fifthPanake().then(e => { fifthPanake().then(e => {
console.log(e)
this.$refs.chart1.setData({ this.$refs.chart1.setData({
title: { title: {
text: '辅料空料箱占比', text: '辅料空料箱占比',
@ -140,6 +139,11 @@ export default {
color: '#fff' color: '#fff'
} }
}, },
tooltip:{
pointFormatter: function() {
return '占比:'+ this.options.y + '%'
}
},
credits: { credits: {
enabled: false enabled: false
}, },
@ -180,11 +184,13 @@ export default {
pie: { pie: {
allowPointSelect: false, allowPointSelect: false,
cursor: 'pointer', cursor: 'pointer',
depth: 35, depth: 15,
startAngle: 45, startAngle: 45,
size: 200, size: 150,
dataLabels: { dataLabels: {
enabled: true, enabled: true,
softConnector: true,
distance: 1,
formatter: function() { formatter: function() {
return this.point.options.name + '<br>' + this.point.options.y + '%' return this.point.options.name + '<br>' + this.point.options.y + '%'
} }
@ -224,6 +230,11 @@ export default {
color: '#fff' color: '#fff'
} }
}, },
tooltip:{
pointFormatter: function() {
return '占比:'+ this.options.y + '%'
}
},
credits: { credits: {
enabled: false enabled: false
}, },
@ -265,11 +276,13 @@ export default {
pie: { pie: {
allowPointSelect: false, allowPointSelect: false,
cursor: 'pointer', cursor: 'pointer',
depth: 35, depth: 15,
startAngle: 45, startAngle: 45,
size: 200, size: 150,
dataLabels: { dataLabels: {
enabled: true, enabled: true,
softConnector: true,
distance: 1,
formatter: function() { formatter: function() {
return this.point.options.name + '<br>' + this.point.options.y + '%' return this.point.options.name + '<br>' + this.point.options.y + '%'
} }
@ -311,6 +324,11 @@ export default {
color: '#fff' color: '#fff'
} }
}, },
tooltip:{
pointFormatter: function() {
return '占比:'+ this.options.y + '%'
}
},
credits: { credits: {
enabled: false enabled: false
}, },
@ -352,11 +370,13 @@ export default {
pie: { pie: {
allowPointSelect: false, allowPointSelect: false,
cursor: 'pointer', cursor: 'pointer',
depth: 35, depth: 15,
startAngle: 45, startAngle: 45,
size: 200, size: 150,
dataLabels: { dataLabels: {
enabled: true, enabled: true,
softConnector: true,
distance: 1,
formatter: function() { formatter: function() {
return this.point.options.name + '<br>' + this.point.options.y + '%' return this.point.options.name + '<br>' + this.point.options.y + '%'
} }
@ -379,7 +399,7 @@ export default {
return { return {
name: v.materialName, name: v.materialName,
y: v.totalAmount, 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' color: '#fff'
} }
}, },
tooltip:{
pointFormatter: function() {
return '占比:'+ this.options.y + '%'
}
},
credits: { credits: {
enabled: false enabled: false
}, },
@ -433,11 +458,13 @@ export default {
pie: { pie: {
allowPointSelect: false, allowPointSelect: false,
cursor: 'pointer', cursor: 'pointer',
depth: 35, depth: 15,
startAngle: 45, startAngle: 45,
size: 200, size: 150,
dataLabels: { dataLabels: {
enabled: true, enabled: true,
softConnector: true,
distance: 1,
formatter: function() { formatter: function() {
return this.point.options.name + '<br>' + this.point.options.y + '%' return this.point.options.name + '<br>' + this.point.options.y + '%'
} }
@ -460,7 +487,7 @@ export default {
return { return {
name: v.materialName, name: v.materialName,
y: v.totalAmount, y: v.totalAmount,
h: parseFloat(((v.totalAmount / total1) * 100).toFixed(2)) h: Math.min(parseFloat(((v.totalAmount / total1) * 100).toFixed(2)),50)
} }
}) })
}] }]

Loading…
Cancel
Save