瀏覽代碼

饼图支持切换实心和空心俩种样式

qianming 4 年之前
父節點
當前提交
50cbc26c0a

+ 12 - 0
report-ui/src/views/report/bigscreen/designer/tools.js

@@ -3702,6 +3702,18 @@ const widgetTools = [
           placeholder: '',
           value: ''
         },
+        {
+          type: 'el-select',
+          label: '饼图样式',
+          name: 'piechartStyle',
+          required: false,
+          placeholder: '',
+          selectOptions: [
+            {code: '50%', name: '实心饼图'},
+            {code: ["40%", "70%"], name: '空心饼图'},
+          ],
+          value: '50%'
+        },
         [
           {
             name: '标题设置',

+ 5 - 0
report-ui/src/views/report/bigscreen/designer/widget/widgetPiechart.vue

@@ -90,6 +90,11 @@ export default {
       this.setOptionsLegend();
       this.setOptionsColor();
       this.setOptionsData();
+      this.setOptionsPiechartStyle();
+    },
+    // 饼图样式
+    setOptionsPiechartStyle(){
+      this.options.series[0]['radius'] = this.optionsSetup.piechartStyle
     },
     // 标题设置
     setOptionsTitle() {