|
@@ -28,16 +28,16 @@ let option = {
|
|
|
fontSize: 16,
|
|
|
},
|
|
|
title: {
|
|
|
- // text: "报建数量",
|
|
|
- x: "20%",
|
|
|
+ show: false,
|
|
|
+ text: "暂无数据",
|
|
|
textStyle: {
|
|
|
// rich: {
|
|
|
fontSize: 14,
|
|
|
color: "#fff",
|
|
|
fontWeight: "bold",
|
|
|
},
|
|
|
- x: "20%",
|
|
|
- y: "45%",
|
|
|
+ x: "39%",
|
|
|
+ y: "28%",
|
|
|
},
|
|
|
legend: {
|
|
|
// type: "scroll",
|
|
@@ -169,6 +169,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
setOptions(cartData) {
|
|
|
+ console.log('cartData: ', cartData);
|
|
|
let _this = this;
|
|
|
if (!this.myChart) {
|
|
|
// var dom = document.getElementById("pie_echart");
|
|
@@ -226,6 +227,11 @@ export default {
|
|
|
return `${params.name} : ${params.value} ${_this.$props.unit}`;
|
|
|
};
|
|
|
this.myChart.resize();
|
|
|
+ console.log('cartData.data.length: ', cartData.data.length);
|
|
|
+
|
|
|
+ if (cartData.data.length <= 0) {
|
|
|
+ option.title.show = true;
|
|
|
+ }
|
|
|
this.myChart.setOption(option);
|
|
|
// if (cartData.isclick) {
|
|
|
// legendselectchanged
|