Kaynağa Gözat

饼图适配

maxiaoxiao 10 ay önce
ebeveyn
işleme
58e4cca120

+ 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`"