修改bug
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-27 13:54:52
|
||||
* @LastEditTime: 2024-03-26 10:50:30
|
||||
* @LastEditTime: 2024-03-27 16:50:04
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -42,7 +42,7 @@ export default {
|
||||
},
|
||||
height: {
|
||||
type: Number,
|
||||
default: 200
|
||||
default: 100
|
||||
},
|
||||
showLegend: {
|
||||
type: Boolean,
|
||||
@@ -127,23 +127,31 @@ export default {
|
||||
) : []
|
||||
};
|
||||
});
|
||||
// this.charts.resize({
|
||||
// //width: width,
|
||||
// //height: height,
|
||||
// // es6解构
|
||||
// width,
|
||||
// height
|
||||
// })
|
||||
this.chart.setOption({
|
||||
legend: {
|
||||
itemWidth: 12,
|
||||
itemHeight: 12,
|
||||
top:'10',
|
||||
bottom: '20',
|
||||
left: '20',
|
||||
icon: 'rect',
|
||||
textStyle: {
|
||||
color: '#ffffff'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
top:'80',
|
||||
top:'0',
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
// bottom: '3%',
|
||||
width: 'auto',
|
||||
height: '300',
|
||||
height: '95',
|
||||
containLabel: true
|
||||
},
|
||||
yAxis: [
|
||||
@@ -170,7 +178,7 @@ export default {
|
||||
verticalAlign: 'bottom',
|
||||
fontSize: 12,
|
||||
align: 'left',
|
||||
padding: [0, 0, 15, -5]
|
||||
padding: [0, 0, 10, -5]
|
||||
}
|
||||
},
|
||||
data: topNameList
|
||||
@@ -198,7 +206,7 @@ export default {
|
||||
verticalAlign: 'bottom',
|
||||
fontSize: 12,
|
||||
align: 'right',
|
||||
padding: [0, 0, 15, -5]
|
||||
padding: [0, 0, 10, -5]
|
||||
}
|
||||
},
|
||||
data: nameWasteList
|
||||
@@ -210,6 +218,10 @@ export default {
|
||||
},
|
||||
series:series
|
||||
})
|
||||
this.chart.resize({
|
||||
width: 'auto',
|
||||
height: 90
|
||||
});;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user