瀏覽代碼

feat: 完善弧形图配置

liaojiaxing 8 月之前
父節點
當前提交
484a7d9174

+ 29 - 0
packages/shalu-dashboard-ui/components/charts/Bar/PolarBar/src/Config.vue

@@ -180,6 +180,35 @@ const formItems: IFormItem[] = [
           return inner / 0.8;
         },
       },
+      {
+        label: "分类间隔",
+        prop: "seriesExtend.barCategoryGap",
+        type: "slider",
+        format: (formatModel, value) => {
+          formatModel.value["seriesExtend.barCategoryGap"] = value + '%';
+        },
+        valueToForm: (value) => {
+          return value?.replace("%", "");
+        },
+      },
+    ]
+  },
+  {
+    label: "轴值",
+    prop: "",
+    type: "group",
+    children: [
+      {
+        label: "最大值",
+        prop: "angleAxis.max",
+        type: "inputNumber",
+      },
+      {
+        label: "最小值",
+        prop: "angleAxis.min",
+        type: "inputNumber",
+        defaultValue: 0,
+      }
     ]
   },
   {

+ 1 - 0
packages/shalu-dashboard-ui/components/charts/Bar/PolarBar/src/props.ts

@@ -99,6 +99,7 @@ const chartOptions = getNormalizedChart({
   // 极坐标系的角度轴
   angleAxis: {
     startAngle: 90,
+    max: undefined,
     splitLine: { show: false }, // 关闭角度轴上的分割线
     axisLine: { show: false },  // 关闭角度轴上的轴线
     axisTick: { show: false },  // 关闭角度轴上的刻度线