Browse Source

修改3d饼图数据高度

maxiaoxiao 1 year ago
parent
commit
35d785fa44
2 changed files with 4 additions and 5 deletions
  1. 3 4
      src/components/echartsTemplate/3dPie.vue
  2. 1 1
      src/views/cockpitNew1/gdbh.vue

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

@@ -118,11 +118,12 @@ export default {
           return `{name|${name}}  {value|${sItem.value}}  {unit|${_this.$props.unit}} `;
           // return name + 'sItem.value';
         } else {
-          console.log("name",name2);
+          console.log("name", name2);
 
           return name;
         }
       };
+      option.legend.grid3D.boxHeight = data.boxHeight || 1;
       const series = this.getPie3D(optionsData, 0.6);
       option.series = series;
 
@@ -341,9 +342,7 @@ export default {
       return series;
     },
   },
-  mounted() {
-
-  },
+  mounted() {},
 };
 </script>
 <style lang="scss" scoped>

+ 1 - 1
src/views/cockpitNew1/gdbh.vue

@@ -74,7 +74,7 @@ export default {
           optionsData.push({ name: edata.dlbmmc, value: edata.yjjbntmj });
         });
         this.$nextTick(() => {
-          this.$refs.echartRef.setOptions(optionsData);
+          this.$refs.echartRef.setOptions(optionsData, 1 / 100000);
         });
       });
     },