Explorar o código

图表列表界面饼图位置大小统一

zhuth %!s(int64=6) %!d(string=hai) anos
pai
achega
9cb49a9817
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      src/components/chart/resolveChartThumbnailOption.js

+ 6 - 1
src/components/chart/resolveChartThumbnailOption.js

@@ -99,7 +99,12 @@ export default (option) => {
         };
     }else if(viewType === 'pie') { // 饼图
         _option.series = _option.series.map(s => ({
-            ...s, label: { show: false }, labelLine: { show: false }, silent: true
+            ...s,
+            center: ['50%', '50%'],
+            radius: [(s.radius ? s.radius[0] || 0 : 0), '85%'],
+            label: { show: false },
+            labelLine: { show: false },
+            silent: true
         }));
     }else if(viewType === 'scatter') { // 散点图
         _option.series = _option.series.map(s => ({