修改图表

master
夜笙歌 2 months ago
parent c0d27266a4
commit b0550b2e10

@ -326,7 +326,7 @@ export default {
}, },
tooltip:{ tooltip:{
pointFormatter: function() { pointFormatter: function() {
return '占比:'+ this.options.y + '%' return '占比:'+ this.options.y + '%' +'<br>'+'数量:' + this.options.z
} }
}, },
credits: { credits: {
@ -398,7 +398,8 @@ export default {
data: e.data.wmsRawStocks.map(v => { data: e.data.wmsRawStocks.map(v => {
return { return {
name: v.materialName, name: v.materialName,
y: v.totalAmount, z:v.totalAmount,
y: parseFloat(((v.totalAmount/total)*100).toFixed(1)),
h: Math.min(parseFloat(((v.totalAmount / total) * 100).toFixed(2)),50) h: Math.min(parseFloat(((v.totalAmount / total) * 100).toFixed(2)),50)
} }
}) })
@ -414,7 +415,7 @@ export default {
}, },
tooltip:{ tooltip:{
pointFormatter: function() { pointFormatter: function() {
return '占比:'+ this.options.y + '%' return '占比:'+ this.options.y + '%' +'<br>'+'数量:' + this.options.z
} }
}, },
credits: { credits: {
@ -486,7 +487,8 @@ export default {
data: e.data.productStocks.map(v => { data: e.data.productStocks.map(v => {
return { return {
name: v.materialName, name: v.materialName,
y: v.totalAmount, z: v.totalAmount,
y: parseFloat(((v.totalAmount/total1)*100).toFixed(1)),
h: Math.min(parseFloat(((v.totalAmount / total1) * 100).toFixed(2)),50) h: Math.min(parseFloat(((v.totalAmount / total1) * 100).toFixed(2)),50)
} }
}) })

Loading…
Cancel
Save