maxiaoxiao hace 11 meses
padre
commit
38a8298558
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      src/components/echartsTemplate/3dPie.vue

+ 4 - 4
src/components/echartsTemplate/3dPie.vue

@@ -101,14 +101,14 @@ export default {
     };
   },
   methods: {
-    setOptions(data) {
+    setOptions(data, boxHeight) {
       if (!this.myChart) {
         // var dom = document.getElementById("pie_echart");
         this.myChart = echarts.init(this.$refs.echart);
       }
-      this.initEchartXzqh(data);
+      this.initEchartXzqh(data, boxHeight);
     },
-    initEchartXzqh(optionsData) {
+    initEchartXzqh(optionsData, boxHeight) {
       let _this = this;
       option.legend.formatter = function (name) {
         const sItem = optionsData.find((item) =>
@@ -123,7 +123,7 @@ export default {
           return name;
         }
       };
-      option.legend.grid3D.boxHeight = data.boxHeight || 1;
+      option.grid3D.boxHeight = boxHeight || 1;
       const series = this.getPie3D(optionsData, 0.6);
       option.series = series;