Răsfoiți Sursa

回复代码

zpf 11 luni în urmă
părinte
comite
666ad32f4d

+ 4 - 4
src/components/echartsTemplate/pie.vue

@@ -30,14 +30,14 @@ let option = {
   title: {
     show: false,
     text: "暂无数据",
+    x: "39%",
+    y: "28%",
     textStyle: {
       //  rich: {
       fontSize: 14,
       color: "#fff",
       fontWeight: "bold",
     },
-    x: "39%",
-    y: "28%",
   },
   legend: {
     // type: "scroll",
@@ -225,14 +225,14 @@ export default {
       option.series[0].label.normal.formatter = function (params) {
         return `${params.name} : ${params.value} ${_this.$props.unit}`;
       };
-      this.myChart.resize();
 
       if (cartData.data.length <= 0) {
         option.title.show = true;
-      }else{
+      } else {
         option.title.show = false;
 
       }
+      this.myChart.resize();
       this.myChart.setOption(option);
       // if (cartData.isclick) {
       //  legendselectchanged

+ 2 - 2
src/views/siteselection/components/dkDetailsNew.vue

@@ -93,8 +93,8 @@ export default {
     },
     setEchart(data, type, index) {
       this.$nextTick(() => {
-        let max = 5
-        let legend_right = "10%"
+        let max =3
+        let legend_right = "20%"
         this.$refs.ghxz_pie[index].setOptions({ data, type, max, legend_right });
       });
     },