소스 검색

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

qianming 4 년 전
부모
커밋
50cbc26c0a
2개의 변경된 파일17개의 추가작업 그리고 0개의 파일을 삭제
  1. 12 0
      report-ui/src/views/report/bigscreen/designer/tools.js
  2. 5 0
      report-ui/src/views/report/bigscreen/designer/widget/widgetPiechart.vue

+ 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() {