瀏覽代碼

饼图适配

maxiaoxiao 10 月之前
父節點
當前提交
58e4cca120
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/components/echartsTemplate/pie.vue
  2. 1 1
      src/views/farmlandProtection/components/fxjg.vue

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

@@ -195,7 +195,7 @@ export default {
       if (cartData.type == "vertical") {
         option.series[0].radius = ["27%", "42%"];
         option.series[0].center = ["50%", "100"];
-        // option.legend.height = "40%";
+        option.legend.height = cartData.data.length * 10;
         option.legend.top = "200";
         option.legend.orient = "vertical";
         option.legend.left = "2%";

+ 1 - 1
src/views/farmlandProtection/components/fxjg.vue

@@ -48,7 +48,7 @@
       <div class="echartCon">
         <pie
           class="echart"
-          :style="`height: ${200 + edata.length * 15}px`"
+          :style="`height: ${200 + edata.length * 10}px`"
           unit="㎡"
           @echartClick="(name) => echartClick(name)"
           :ref="`echartRef`"