修改图表

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)
})
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 + '<br>' + 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 + '<br>' + 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 + '<br>' + 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 + '<br>' + 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)
}
})
}]

Loading…
Cancel
Save