浏览代码

toolbox图形组件

liujiejie 3 月之前
父节点
当前提交
9def6d24e8
共有 35 个文件被更改,包括 533 次插入59 次删除
  1. 2 1
      src/assets/js/constants/echarts-config/Cp.js
  2. 1 0
      src/assets/js/constants/echarts-config/Heatmap.js
  3. 1 0
      src/assets/js/constants/echarts-config/bar.js
  4. 1 0
      src/assets/js/constants/echarts-config/barandline.js
  5. 1 0
      src/assets/js/constants/echarts-config/boxPlot.js
  6. 3 2
      src/assets/js/constants/echarts-config/doughnut.js
  7. 5 5
      src/assets/js/constants/echarts-config/funnelPlot2.js
  8. 2 1
      src/assets/js/constants/echarts-config/hexbin.js
  9. 1 0
      src/assets/js/constants/echarts-config/histogram.js
  10. 2 1
      src/assets/js/constants/echarts-config/horizontalStackedBar1.js
  11. 1 1
      src/assets/js/constants/echarts-config/line.js
  12. 1 1
      src/assets/js/constants/echarts-config/lineHighlight.js
  13. 2 1
      src/assets/js/constants/echarts-config/pareto.js
  14. 1 1
      src/assets/js/constants/echarts-config/pie.js
  15. 2 1
      src/assets/js/constants/echarts-config/radar.js
  16. 1 0
      src/assets/js/constants/echarts-config/sankeyDiagram.js
  17. 1 0
      src/assets/js/constants/echarts-config/scatter.js
  18. 1 0
      src/assets/js/constants/echarts-config/stackedBar.js
  19. 1 1
      src/assets/js/constants/echarts-config/timeSeries.js
  20. 1 0
      src/assets/js/constants/echarts-config/waterfall.js
  21. 36 0
      src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/Heatmap.js
  22. 3 2
      src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/barAndLine.js
  23. 37 1
      src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/boxPlot.js
  24. 36 0
      src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/cp.js
  25. 23 8
      src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/funnelPlot2.js
  26. 36 0
      src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/horizontalStackedBar1.js
  27. 37 1
      src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/pareto.js
  28. 37 1
      src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/pie.js
  29. 37 1
      src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/radar.js
  30. 65 9
      src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/roseChart.js
  31. 37 1
      src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/sankeyDiagram.js
  32. 38 10
      src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/scatter.js
  33. 37 1
      src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/stackedBar.js
  34. 1 2
      src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/configFn.js
  35. 42 6
      src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/toolbox.vue

+ 2 - 1
src/assets/js/constants/echarts-config/Cp.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-19 16:22:48
- * @LastEditTime: 2024-11-27 14:50:45
+ * @LastEditTime: 2025-08-29 14:59:58
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/assets/js/constants/echarts-config/Cp.js
@@ -51,6 +51,7 @@ export const option = {
   },
   legend: {
     top: "bottom",
+    show: false,
   },
   toolbox: {
     feature: {

+ 1 - 0
src/assets/js/constants/echarts-config/Heatmap.js

@@ -19,6 +19,7 @@ export const option = {
   },
   legend: {
     top: "bottom",
+    show: false,
   },
   grid: {
     left: "15%",

+ 1 - 0
src/assets/js/constants/echarts-config/bar.js

@@ -34,6 +34,7 @@ export const option = {
   },
   legend: {
     top: "bottom",
+    show: false,
   },
   yAxis: {
     type: "value",

+ 1 - 0
src/assets/js/constants/echarts-config/barandline.js

@@ -34,6 +34,7 @@ export const option = {
   },
   legend: {
     top: "bottom",
+    show: false,
   },
   xAxis:
     // [

+ 1 - 0
src/assets/js/constants/echarts-config/boxPlot.js

@@ -19,6 +19,7 @@ export const option = {
   },
   legend: {
     top: "bottom",
+    show: false,
   },
   toolbox: {
     feature: {

+ 3 - 2
src/assets/js/constants/echarts-config/doughnut.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2025-08-15 09:58:57
- * @LastEditTime: 2025-08-15 10:13:36
+ * @LastEditTime: 2025-08-29 15:00:10
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/doughnut.js
@@ -23,9 +23,10 @@ export const option = {
       saveAsImage: { show: true },
     },
   },
+
   legend: {
     top: "bottom",
-    left: "left",
+    show: false,
     data: ["风速 1-5 m/s", "风速 5-10 m/s", "风速 10-15 m/s", "风速 15+ m/s"],
   },
   series: [

+ 5 - 5
src/assets/js/constants/echarts-config/funnelPlot2.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2025-08-25 15:54:37
- * @LastEditTime: 2025-08-26 14:01:52
+ * @LastEditTime: 2025-08-29 14:54:09
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/assets/js/constants/echarts-config/funnelPlot2.js
@@ -26,10 +26,10 @@ export const option = {
       saveAsImage: {},
     },
   },
-  legend: {
-    top: "10%",
-    data: ["理想状态", "轻微偏离", "中等偏离", "严重偏离", "故障风险"],
-  },
+  //   legend: {
+  //     top: "10%",
+  //     // data: ["理想状态", "轻微偏离", "中等偏离", "严重偏离", "故障风险"],
+  //   },
   series: [
     {
       name: "风机性能状态",

+ 2 - 1
src/assets/js/constants/echarts-config/hexbin.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-20 09:17:31
- * @LastEditTime: 2024-11-27 15:04:43
+ * @LastEditTime: 2025-08-29 15:00:52
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/assets/js/constants/echarts-config/hexbin.js
@@ -19,6 +19,7 @@ export const option = {
   },
   legend: {
     top: "bottom",
+    show: false,
   },
   toolbox: {
     feature: {

+ 1 - 0
src/assets/js/constants/echarts-config/histogram.js

@@ -27,6 +27,7 @@ export const option = {
   },
   legend: {
     top: "bottom",
+    show: false,
   },
   xAxis: {
     name: "风速范围 (m/s)",

+ 2 - 1
src/assets/js/constants/echarts-config/horizontalStackedBar1.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2025-08-25 14:46:21
- * @LastEditTime: 2025-08-25 14:46:59
+ * @LastEditTime: 2025-08-29 15:01:04
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/assets/js/constants/echarts-config/horizontalStackedBar1.js
@@ -22,6 +22,7 @@ export const option = {
   xAxis: {},
   legend: {
     top: "bottom",
+    show: false,
   },
   toolbox: {
     feature: {

+ 1 - 1
src/assets/js/constants/echarts-config/line.js

@@ -15,7 +15,7 @@ export const option = {
   },
   legend: {
     top: "bottom",
-    // data: ["Email", "Union Ads", "Video Ads", "Direct", "Search Engine"],
+    show: false,
   },
   toolbox: {
     feature: {

+ 1 - 1
src/assets/js/constants/echarts-config/lineHighlight.js

@@ -17,7 +17,7 @@ export const option = {
   },
   legend: {
     top: "bottom",
-    // data: ["Email", "Union Ads", "Video Ads", "Direct", "Search Engine"],
+    show: false,
   },
   toolbox: {
     feature: {

+ 2 - 1
src/assets/js/constants/echarts-config/pareto.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-20 09:19:45
- * @LastEditTime: 2024-12-31 11:10:20
+ * @LastEditTime: 2025-08-29 15:01:23
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/assets/js/constants/echarts-config/pareto.js
@@ -46,6 +46,7 @@ export const option = {
   },
   legend: {
     top: "bottom",
+    show: false,
   },
   toolbox: {
     feature: {

+ 1 - 1
src/assets/js/constants/echarts-config/pie.js

@@ -19,7 +19,7 @@ export const option = {
   },
   legend: {
     top: "bottom",
-    left: "left",
+    show: false,
     data: ["风速 1-5 m/s", "风速 5-10 m/s", "风速 10-15 m/s", "风速 15+ m/s"],
   },
   series: [

+ 2 - 1
src/assets/js/constants/echarts-config/radar.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-04 11:33:31
- * @LastEditTime: 2024-11-25 09:45:05
+ * @LastEditTime: 2025-08-29 15:01:45
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/assets/js/constants/echarts-config/radar.js
@@ -27,6 +27,7 @@ export const option = {
   },
   legend: {
     top: "bottom",
+    show: false,
     data: ["风电场 A", "风电场 B"],
     // data: ["单价", "客单价"],
   },

+ 1 - 0
src/assets/js/constants/echarts-config/sankeyDiagram.js

@@ -17,6 +17,7 @@ export const option = {
   },
   legend: {
     top: "bottom",
+    show: false,
   },
   tooltip: {
     trigger: "item",

+ 1 - 0
src/assets/js/constants/echarts-config/scatter.js

@@ -14,6 +14,7 @@ export const option = {
   },
   legend: {
     top: "bottom",
+    show: false,
   },
   toolbox: {
     feature: {

+ 1 - 0
src/assets/js/constants/echarts-config/stackedBar.js

@@ -23,6 +23,7 @@ export const option = {
   },
   legend: {
     top: "bottom",
+    show: false,
   },
   toolbox: {
     feature: {

+ 1 - 1
src/assets/js/constants/echarts-config/timeSeries.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-20 09:16:47
- * @LastEditTime: 2024-11-27 15:05:51
+ * @LastEditTime: 2025-08-29 15:02:10
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/assets/js/constants/echarts-config/timeSeries.js

+ 1 - 0
src/assets/js/constants/echarts-config/waterfall.js

@@ -16,6 +16,7 @@ export const option = {
   },
   legend: {
     top: "bottom",
+    show: false,
   },
   xAxis: {
     type: "category",

+ 36 - 0
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/Heatmap.js

@@ -138,4 +138,40 @@ export function handleHeatmapPlotChartLogic(
       },
     ];
   }
+  item.option.title = {
+    text: formLabelAlign.text ?? item.option.title?.text ?? "",
+    textStyle: {
+      color:
+        formLabelAlign.titleColor ??
+        item.option.title?.textStyle?.color ??
+        "#464646",
+      fontSize: formLabelAlign.titleColor
+        ? formLabelAlign.size
+        : item.option.title?.textStyle?.fontSize ?? 18,
+    },
+  };
+
+  item.option.backgroundColor =
+    formLabelAlign.background || item.option.backgroundColor || "transparent";
+
+  // 定义一个位置映射
+  const legendMap = {
+    top: { top: "top", left: "center" },
+    bottom: { top: "bottom", left: "center" },
+    left: { top: "center", left: "left", type: "scroll", orient: "vertical" },
+    right: { top: "center", left: "right", type: "scroll", orient: "vertical" },
+  };
+  // 获取 legendPosition,没有就默认 right
+  const legendPosition = formLabelAlign.legendPosition
+    ? legendMap[formLabelAlign.legendPosition]
+    : item.option.legend || legendMap.bottom;
+
+  // 设置 legend 配置
+  item.option.legend = {
+    ...legendPosition,
+    show: formLabelAlign.enableLegend ?? item.option.legend.show,
+  };
+  item.option.color = item.option.color.map((colorItem, colorInd) => {
+    return formLabelAlign?.dataColor?.[colorInd] ?? colorItem;
+  });
 }

+ 3 - 2
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/barAndLine.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-20 11:18:35
- * @LastEditTime: 2025-08-28 16:00:07
+ * @LastEditTime: 2025-08-29 14:40:11
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/utils/chartLogic/modules/barAndLine.js
@@ -75,6 +75,7 @@ export function handleBarChartLogic(
       ? formLabelAlign?.Ylable
       : item.option.yAxis.name,
   };
+
   item.option.title = {
     text: formLabelAlign.text ?? item.option.title?.text ?? "",
     textStyle: {
@@ -106,7 +107,7 @@ export function handleBarChartLogic(
   // 设置 legend 配置
   item.option.legend = {
     ...legendPosition,
-    show: formLabelAlign.enableLegend || item.option.legend.show,
+    show: formLabelAlign.enableLegend ?? item.option.legend.show,
   };
   item.option.color = item.option.color.map((colorItem, colorInd) => {
     return formLabelAlign?.dataColor?.[colorInd] ?? colorItem;

+ 37 - 1
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/boxPlot.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-27 15:20:57
- * @LastEditTime: 2024-12-27 15:11:52
+ * @LastEditTime: 2025-08-29 13:47:35
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/boxPlot.js
@@ -80,6 +80,42 @@ export function handleBoxPlotChartLogic(
     ...item.option.yAxis,
     name: formLabelAlign.Ylable,
   };
+  item.option.title = {
+    text: formLabelAlign.text ?? item.option.title?.text ?? "",
+    textStyle: {
+      color:
+        formLabelAlign.titleColor ??
+        item.option.title?.textStyle?.color ??
+        "#464646",
+      fontSize: formLabelAlign.titleColor
+        ? formLabelAlign.size
+        : item.option.title?.textStyle?.fontSize ?? 18,
+    },
+  };
+
+  item.option.backgroundColor =
+    formLabelAlign.background || item.option.backgroundColor || "transparent";
+
+  // 定义一个位置映射
+  const legendMap = {
+    top: { top: "top", left: "center" },
+    bottom: { top: "bottom", left: "center" },
+    left: { top: "center", left: "left", type: "scroll", orient: "vertical" },
+    right: { top: "center", left: "right", type: "scroll", orient: "vertical" },
+  };
+  // 获取 legendPosition,没有就默认 right
+  const legendPosition = formLabelAlign.legendPosition
+    ? legendMap[formLabelAlign.legendPosition]
+    : item.option.legend || legendMap.bottom;
+
+  // 设置 legend 配置
+  item.option.legend = {
+    ...legendPosition,
+    show: formLabelAlign.enableLegend ?? item.option.legend.show,
+  };
+  item.option.color = item.option.color.map((colorItem, colorInd) => {
+    return formLabelAlign?.dataColor?.[colorInd] ?? colorItem;
+  });
 
   // 生成 boxplot 数据
   if (item.Ydata.length > 4 && item.Ydata[4]?.data?.length > 0) {

+ 36 - 0
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/cp.js

@@ -119,6 +119,42 @@ export function handleCpChartLogic(
     ...item.option.yAxis,
     name: formLabelAlign.Ylable,
   };
+  item.option.title = {
+    text: formLabelAlign.text ?? item.option.title?.text ?? "",
+    textStyle: {
+      color:
+        formLabelAlign.titleColor ??
+        item.option.title?.textStyle?.color ??
+        "#464646",
+      fontSize: formLabelAlign.titleColor
+        ? formLabelAlign.size
+        : item.option.title?.textStyle?.fontSize ?? 18,
+    },
+  };
+
+  item.option.backgroundColor =
+    formLabelAlign.background || item.option.backgroundColor || "transparent";
+
+  // 定义一个位置映射
+  const legendMap = {
+    top: { top: "top", left: "center" },
+    bottom: { top: "bottom", left: "center" },
+    left: { top: "center", left: "left", type: "scroll", orient: "vertical" },
+    right: { top: "center", left: "right", type: "scroll", orient: "vertical" },
+  };
+  // 获取 legendPosition,没有就默认 right
+  const legendPosition = formLabelAlign.legendPosition
+    ? legendMap[formLabelAlign.legendPosition]
+    : item.option.legend || legendMap.bottom;
+
+  // 设置 legend 配置
+  item.option.legend = {
+    ...legendPosition,
+    show: formLabelAlign.enableLegend ?? item.option.legend.show,
+  };
+  item.option.color = item.option.color.map((colorItem, colorInd) => {
+    return formLabelAlign?.dataColor?.[colorInd] ?? colorItem;
+  });
   // 生成折线图数据
   if (item.LineYdata[0]?.data?.length > 0) {
     const lineSeries = generateSeriesData(

+ 23 - 8
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/funnelPlot2.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2025-08-25 15:38:10
- * @LastEditTime: 2025-08-26 15:24:28
+ * @LastEditTime: 2025-08-29 14:55:55
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/funnelPlot2.js
@@ -85,13 +85,13 @@ export function handleFunnelPlot2Chart(
   // 4. 配置漏斗图
   item.option = {
     ...item.option,
-    legend: {
-      top: "10%",
-      data:
-        funnelSeriesData.length > 0
-          ? funnelSeriesData.map((d) => d.name)
-          : item.option.legend.data,
-    },
+    // legend: {
+    //   top: "10%",
+    //   data:
+    //     funnelSeriesData.length > 0
+    //       ? funnelSeriesData.map((d) => d.name)
+    //       : item.option.legend.data,
+    // },
     series: [
       {
         name: yLabel || item.series[0].name,
@@ -103,4 +103,19 @@ export function handleFunnelPlot2Chart(
       },
     ],
   };
+  item.option.title = {
+    text: formLabelAlign.text ?? item.option.title?.text ?? "",
+    textStyle: {
+      color:
+        formLabelAlign.titleColor ??
+        item.option.title?.textStyle?.color ??
+        "#464646",
+      fontSize: formLabelAlign.titleColor
+        ? formLabelAlign.size
+        : item.option.title?.textStyle?.fontSize ?? 18,
+    },
+  };
+
+  item.option.backgroundColor =
+    formLabelAlign.background || item.option.backgroundColor || "transparent";
 }

+ 36 - 0
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/horizontalStackedBar1.js

@@ -75,6 +75,42 @@ export function handlHorizontalStackedBar1ChartLogic(
     type: "category", // 横向,y轴是分类轴
     name: formLabelAlign.Ylable, // y轴名称
   };
+  item.option.title = {
+    text: formLabelAlign.text ?? item.option.title?.text ?? "",
+    textStyle: {
+      color:
+        formLabelAlign.titleColor ??
+        item.option.title?.textStyle?.color ??
+        "#464646",
+      fontSize: formLabelAlign.titleColor
+        ? formLabelAlign.size
+        : item.option.title?.textStyle?.fontSize ?? 18,
+    },
+  };
+
+  item.option.backgroundColor =
+    formLabelAlign.background || item.option.backgroundColor || "transparent";
+
+  // 定义一个位置映射
+  const legendMap = {
+    top: { top: "top", left: "center" },
+    bottom: { top: "bottom", left: "center" },
+    left: { top: "center", left: "left", type: "scroll", orient: "vertical" },
+    right: { top: "center", left: "right", type: "scroll", orient: "vertical" },
+  };
+  // 获取 legendPosition,没有就默认 right
+  const legendPosition = formLabelAlign.legendPosition
+    ? legendMap[formLabelAlign.legendPosition]
+    : item.option.legend || legendMap.bottom;
+
+  // 设置 legend 配置
+  item.option.legend = {
+    ...legendPosition,
+    show: formLabelAlign.enableLegend ?? item.option.legend.show,
+  };
+  item.option.color = item.option.color.map((colorItem, colorInd) => {
+    return formLabelAlign?.dataColor?.[colorInd] ?? colorItem;
+  });
 
   // 3. 设置 series(保持不变)
   if (item.Ydata[0]?.data?.length > 0) {

+ 37 - 1
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/pareto.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-27 09:59:10
- * @LastEditTime: 2024-12-31 11:08:57
+ * @LastEditTime: 2025-08-29 13:50:10
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/pareto.js
@@ -245,4 +245,40 @@ export function handleParetoChartLogic(
     // 合并折线图和柱状图的数据
     item.option.series = [...lineSeries, ...scatterSeries];
   }
+  item.option.title = {
+    text: formLabelAlign.text ?? item.option.title?.text ?? "",
+    textStyle: {
+      color:
+        formLabelAlign.titleColor ??
+        item.option.title?.textStyle?.color ??
+        "#464646",
+      fontSize: formLabelAlign.titleColor
+        ? formLabelAlign.size
+        : item.option.title?.textStyle?.fontSize ?? 18,
+    },
+  };
+
+  item.option.backgroundColor =
+    formLabelAlign.background || item.option.backgroundColor || "transparent";
+
+  // 定义一个位置映射
+  const legendMap = {
+    top: { top: "top", left: "center" },
+    bottom: { top: "bottom", left: "center" },
+    left: { top: "center", left: "left", type: "scroll", orient: "vertical" },
+    right: { top: "center", left: "right", type: "scroll", orient: "vertical" },
+  };
+  // 获取 legendPosition,没有就默认 right
+  const legendPosition = formLabelAlign.legendPosition
+    ? legendMap[formLabelAlign.legendPosition]
+    : item.option.legend || legendMap.bottom;
+
+  // 设置 legend 配置
+  item.option.legend = {
+    ...legendPosition,
+    show: formLabelAlign.enableLegend ?? item.option.legend.show,
+  };
+  item.option.color = item.option.color.map((colorItem, colorInd) => {
+    return formLabelAlign?.dataColor?.[colorInd] ?? colorItem;
+  });
 }

+ 37 - 1
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/pie.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-26 16:33:45
- * @LastEditTime: 2025-08-18 09:01:26
+ * @LastEditTime: 2025-08-29 13:50:25
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/pie.js
@@ -104,4 +104,40 @@ export function handlePieChartLogic(
   if (item.Ydata[0]?.data?.length > 0) {
     item.option.series = res;
   }
+  item.option.title = {
+    text: formLabelAlign.text ?? item.option.title?.text ?? "",
+    textStyle: {
+      color:
+        formLabelAlign.titleColor ??
+        item.option.title?.textStyle?.color ??
+        "#464646",
+      fontSize: formLabelAlign.titleColor
+        ? formLabelAlign.size
+        : item.option.title?.textStyle?.fontSize ?? 18,
+    },
+  };
+
+  item.option.backgroundColor =
+    formLabelAlign.background || item.option.backgroundColor || "transparent";
+
+  // 定义一个位置映射
+  const legendMap = {
+    top: { top: "top", left: "center" },
+    bottom: { top: "bottom", left: "center" },
+    left: { top: "center", left: "left", type: "scroll", orient: "vertical" },
+    right: { top: "center", left: "right", type: "scroll", orient: "vertical" },
+  };
+  // 获取 legendPosition,没有就默认 right
+  const legendPosition = formLabelAlign.legendPosition
+    ? legendMap[formLabelAlign.legendPosition]
+    : item.option.legend || legendMap.bottom;
+
+  // 设置 legend 配置
+  item.option.legend = {
+    ...legendPosition,
+    show: formLabelAlign.enableLegend ?? item.option.legend.show,
+  };
+  item.option.color = item.option.color.map((colorItem, colorInd) => {
+    return formLabelAlign?.dataColor?.[colorInd] ?? colorItem;
+  });
 }

+ 37 - 1
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/radar.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-21 09:40:55
- * @LastEditTime: 2025-04-11 16:59:00
+ * @LastEditTime: 2025-08-29 13:50:45
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/radar.js
@@ -125,4 +125,40 @@ export function handleRadarChartLogic(
       return tooltipText;
     },
   };
+  item.option.title = {
+    text: formLabelAlign.text ?? item.option.title?.text ?? "",
+    textStyle: {
+      color:
+        formLabelAlign.titleColor ??
+        item.option.title?.textStyle?.color ??
+        "#464646",
+      fontSize: formLabelAlign.titleColor
+        ? formLabelAlign.size
+        : item.option.title?.textStyle?.fontSize ?? 18,
+    },
+  };
+
+  item.option.backgroundColor =
+    formLabelAlign.background || item.option.backgroundColor || "transparent";
+
+  // 定义一个位置映射
+  const legendMap = {
+    top: { top: "top", left: "center" },
+    bottom: { top: "bottom", left: "center" },
+    left: { top: "center", left: "left", type: "scroll", orient: "vertical" },
+    right: { top: "center", left: "right", type: "scroll", orient: "vertical" },
+  };
+  // 获取 legendPosition,没有就默认 right
+  const legendPosition = formLabelAlign.legendPosition
+    ? legendMap[formLabelAlign.legendPosition]
+    : item.option.legend || legendMap.bottom;
+
+  // 设置 legend 配置
+  item.option.legend = {
+    ...legendPosition,
+    show: formLabelAlign.enableLegend ?? item.option.legend.show,
+  };
+  item.option.color = item.option.color.map((colorItem, colorInd) => {
+    return formLabelAlign?.dataColor?.[colorInd] ?? colorItem;
+  });
 }

+ 65 - 9
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/roseChart.js

@@ -15,7 +15,8 @@ export function handleRoseChartChartLogic(
       id: yItem.id,
       data: yItem.data.map((val) => {
         const filters = formFilterAlign[index]?.filters || [];
-        return val === null || (filters.length > 0 && !filters.includes(val[yItem.label]))
+        return val === null ||
+          (filters.length > 0 && !filters.includes(val[yItem.label]))
           ? null
           : val;
       }),
@@ -25,10 +26,17 @@ export function handleRoseChartChartLogic(
       const filter = formFilterAlign[index];
       const { number1, number2 } = filter;
 
-      if ((number1 === null || number1 === "") && (number2 === null || number2 === "")) {
+      if (
+        (number1 === null || number1 === "") &&
+        (number2 === null || number2 === "")
+      ) {
         return filteredItem;
       } else {
-        const filterDatas = filterData(filter, filteredItem.data, filteredItem.label);
+        const filterDatas = filterData(
+          filter,
+          filteredItem.data,
+          filteredItem.label
+        );
         return { ...filteredItem, data: [...filterDatas] };
       }
     });
@@ -42,10 +50,20 @@ export function handleRoseChartChartLogic(
   const xres = item.Xdata?.map((xitem) => ({
     boundaryGap: false,
     type: "category",
-    data: xitem.data && xitem.data.map((val) => xitem.label + val[xitem.label] || null),
+    data:
+      xitem.data &&
+      xitem.data.map((val) => xitem.label + val[xitem.label] || null),
   })).filter((items) => items);
 
-  const baseColors = ["#E3F4BF", "#BEF7C8", "#86E6C8", "#36CFC9", "#209BDD", "#1581E6", "#0860BF"];
+  const baseColors = [
+    "#E3F4BF",
+    "#BEF7C8",
+    "#86E6C8",
+    "#36CFC9",
+    "#209BDD",
+    "#1581E6",
+    "#0860BF",
+  ];
 
   const yres = item.Ydata?.map((yitem, yIndex) => ({
     name: yitem.label,
@@ -54,10 +72,12 @@ export function handleRoseChartChartLogic(
     progressiveThreshold: 3000,
     progressive: true,
     renderMode: "webgl",
-    data: yitem.data && yitem.data.map((val, idx) => ({
-      value: (val && val[yitem.label]) || 0,
-      itemStyle: { color: baseColors[idx % baseColors.length] },
-    })),
+    data:
+      yitem.data &&
+      yitem.data.map((val, idx) => ({
+        value: (val && val[yitem.label]) || 0,
+        itemStyle: { color: baseColors[idx % baseColors.length] },
+      })),
   })).filter((items) => items);
 
   if (item.Ydata[0]?.data?.length > 0) {
@@ -71,4 +91,40 @@ export function handleRoseChartChartLogic(
       axisPointer: { type: "shadow" },
     };
   }
+  item.option.title = {
+    text: formLabelAlign.text ?? item.option.title?.text ?? "",
+    textStyle: {
+      color:
+        formLabelAlign.titleColor ??
+        item.option.title?.textStyle?.color ??
+        "#464646",
+      fontSize: formLabelAlign.titleColor
+        ? formLabelAlign.size
+        : item.option.title?.textStyle?.fontSize ?? 18,
+    },
+  };
+
+  item.option.backgroundColor =
+    formLabelAlign.background || item.option.backgroundColor || "transparent";
+
+  // 定义一个位置映射
+  const legendMap = {
+    top: { top: "top", left: "center" },
+    bottom: { top: "bottom", left: "center" },
+    left: { top: "center", left: "left", type: "scroll", orient: "vertical" },
+    right: { top: "center", left: "right", type: "scroll", orient: "vertical" },
+  };
+  // 获取 legendPosition,没有就默认 right
+  const legendPosition = formLabelAlign.legendPosition
+    ? legendMap[formLabelAlign.legendPosition]
+    : item.option.legend || legendMap.bottom;
+
+  // 设置 legend 配置
+  item.option.legend = {
+    ...legendPosition,
+    show: formLabelAlign.enableLegend ?? item.option.legend.show,
+  };
+  item.option.color = item.option.color.map((colorItem, colorInd) => {
+    return formLabelAlign?.dataColor?.[colorInd] ?? colorItem;
+  });
 }

+ 37 - 1
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/sankeyDiagram.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-27 17:15:51
- * @LastEditTime: 2024-12-31 14:25:18
+ * @LastEditTime: 2025-08-29 13:51:20
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/sankeyDiagram.js
@@ -121,4 +121,40 @@ export function handleSankeyDiagramPlotChartLogic(
       },
     ];
   }
+  item.option.title = {
+    text: formLabelAlign.text ?? item.option.title?.text ?? "",
+    textStyle: {
+      color:
+        formLabelAlign.titleColor ??
+        item.option.title?.textStyle?.color ??
+        "#464646",
+      fontSize: formLabelAlign.titleColor
+        ? formLabelAlign.size
+        : item.option.title?.textStyle?.fontSize ?? 18,
+    },
+  };
+
+  item.option.backgroundColor =
+    formLabelAlign.background || item.option.backgroundColor || "transparent";
+
+  // 定义一个位置映射
+  const legendMap = {
+    top: { top: "top", left: "center" },
+    bottom: { top: "bottom", left: "center" },
+    left: { top: "center", left: "left", type: "scroll", orient: "vertical" },
+    right: { top: "center", left: "right", type: "scroll", orient: "vertical" },
+  };
+  // 获取 legendPosition,没有就默认 right
+  const legendPosition = formLabelAlign.legendPosition
+    ? legendMap[formLabelAlign.legendPosition]
+    : item.option.legend || legendMap.bottom;
+
+  // 设置 legend 配置
+  item.option.legend = {
+    ...legendPosition,
+    show: formLabelAlign.enableLegend ?? item.option.legend.show,
+  };
+  item.option.color = item.option.color.map((colorItem, colorInd) => {
+    return formLabelAlign?.dataColor?.[colorInd] ?? colorItem;
+  });
 }

+ 38 - 10
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/scatter.js

@@ -112,22 +112,13 @@ export function handleScatterChartLogic(
     `;
           },
         },
-
         symbolSize: 5, // 设置点大小
-        itemStyle: {
-          color: "#1890ff", // 设置固定点颜色,例如蓝色
-        },
+
         emphasis: {
           itemStyle: {
             color: "red", // 鼠标悬停高亮
           },
         },
-
-        // itemStyle: {
-        //   shadowBlur: 3,
-        //   shadowColor: "rgba(25, 100, 150, 0.3)",
-        //   shadowOffsetY: 1.5,
-        // },
       };
     });
 
@@ -203,4 +194,41 @@ export function handleScatterChartLogic(
     //   item.chartInstance.on("click", handleClick); // 然后绑定新的点击事件
     // }
   }
+  item.option.title = {
+    text: formLabelAlign.text ?? item.option.title?.text ?? "",
+    textStyle: {
+      color:
+        formLabelAlign.titleColor ??
+        item.option.title?.textStyle?.color ??
+        "#464646",
+      fontSize: formLabelAlign.titleColor
+        ? formLabelAlign.size
+        : item.option.title?.textStyle?.fontSize ?? 18,
+    },
+  };
+
+  item.option.backgroundColor =
+    formLabelAlign.background || item.option.backgroundColor || "transparent";
+
+  // 定义一个位置映射
+  const legendMap = {
+    top: { top: "top", left: "center" },
+    bottom: { top: "bottom", left: "center" },
+    left: { top: "center", left: "left", type: "scroll", orient: "vertical" },
+    right: { top: "center", left: "right", type: "scroll", orient: "vertical" },
+  };
+  // 获取 legendPosition,没有就默认 right
+  const legendPosition = formLabelAlign.legendPosition
+    ? legendMap[formLabelAlign.legendPosition]
+    : item.option.legend || legendMap.bottom;
+
+  // 设置 legend 配置
+  item.option.legend = {
+    ...legendPosition,
+    show: formLabelAlign.enableLegend ?? item.option.legend.show,
+  };
+  console.log(item.option.color, "item.option.color");
+  item.option.color = item.option.color.map((colorItem, colorInd) => {
+    return formLabelAlign?.dataColor?.[colorInd] ?? colorItem;
+  });
 }

+ 37 - 1
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/stackedBar.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-27 09:36:28
- * @LastEditTime: 2024-12-27 15:13:05
+ * @LastEditTime: 2025-08-29 13:51:42
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/chartLogic/modules/stackedBar.js
@@ -113,4 +113,40 @@ export function handlestackedBarChartLogic(
       },
     };
   }
+  item.option.title = {
+    text: formLabelAlign.text ?? item.option.title?.text ?? "",
+    textStyle: {
+      color:
+        formLabelAlign.titleColor ??
+        item.option.title?.textStyle?.color ??
+        "#464646",
+      fontSize: formLabelAlign.titleColor
+        ? formLabelAlign.size
+        : item.option.title?.textStyle?.fontSize ?? 18,
+    },
+  };
+
+  item.option.backgroundColor =
+    formLabelAlign.background || item.option.backgroundColor || "transparent";
+
+  // 定义一个位置映射
+  const legendMap = {
+    top: { top: "top", left: "center" },
+    bottom: { top: "bottom", left: "center" },
+    left: { top: "center", left: "left", type: "scroll", orient: "vertical" },
+    right: { top: "center", left: "right", type: "scroll", orient: "vertical" },
+  };
+  // 获取 legendPosition,没有就默认 right
+  const legendPosition = formLabelAlign.legendPosition
+    ? legendMap[formLabelAlign.legendPosition]
+    : item.option.legend || legendMap.bottom;
+
+  // 设置 legend 配置
+  item.option.legend = {
+    ...legendPosition,
+    show: formLabelAlign.enableLegend ?? item.option.legend.show,
+  };
+  item.option.color = item.option.color.map((colorItem, colorInd) => {
+    return formLabelAlign?.dataColor?.[colorInd] ?? colorItem;
+  });
 }

+ 1 - 2
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/configFn.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-11-12 09:27:50
- * @LastEditTime: 2025-08-28 15:56:38
+ * @LastEditTime: 2025-08-29 14:20:39
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/configFn.js
@@ -23,7 +23,6 @@ export const getFormattedLabels = (index, lableData) => {
 };
 
 export const getFormattedSeries = (data, chartType) => {
-  console.log(chartType, "chartType  Fn 文件");
   let series = [];
   data.forEach((item, ind) => {
     series.push({

+ 42 - 6
src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/toolbox.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-08-14 11:28:28
- * @LastEditTime: 2025-08-28 16:02:25
+ * @LastEditTime: 2025-08-29 15:11:43
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/custonAsCom/dragChart/components/chartConfig/form/toolbox.vue
@@ -15,7 +15,16 @@
       size="mini"
       ref="form"
     >
-      <el-form-item label="图例">
+      <el-form-item
+        label="图例"
+        v-if="
+          curEdit.type !== 'roseChart' &&
+          curEdit.type !== 'sankeyDiagram' &&
+          curEdit.type !== 'funnelPlot2' &&
+          curEdit.type !== 'boxPlot' &&
+          curEdit.type !== 'Heatmap'
+        "
+      >
         <div
           slot="label"
           style="
@@ -28,7 +37,16 @@
           <el-switch v-model="formLabelAlign.enableLegend"></el-switch>
         </div>
       </el-form-item>
-      <el-form-item label="位置">
+      <el-form-item
+        label="位置"
+        v-if="
+          curEdit.type !== 'roseChart' &&
+          curEdit.type !== 'sankeyDiagram' &&
+          curEdit.type !== 'funnelPlot2' &&
+          curEdit.type !== 'boxPlot' &&
+          curEdit.type !== 'Heatmap'
+        "
+      >
         <div
           slot="label"
           style="
@@ -100,7 +118,18 @@
           ></el-color-picker>
         </div>
       </el-form-item>
-      <el-form-item label="数据颜色">
+      <el-form-item
+        label="数据颜色"
+        v-if="
+          curEdit.type !== 'pie' &&
+          curEdit.type !== 'doughnut' &&
+          curEdit.type !== 'roseChart' &&
+          curEdit.type !== 'sankeyDiagram' &&
+          curEdit.type !== 'funnelPlot2' &&
+          curEdit.type !== 'boxPlot' &&
+          curEdit.type !== 'Heatmap'
+        "
+      >
         <div
           slot="label"
           style="display: flex; align-items: center; justify-content: left"
@@ -344,7 +373,11 @@ export default {
                 },
               ],
       };
-      if (this.curEdit.type === "bar" || this.curEdit.type === "line") {
+      if (
+        this.curEdit.type === "bar" ||
+        this.curEdit.type === "line" ||
+        this.curEdit.type === "lineHighlight"
+      ) {
         handleBarChartLogic(
           item,
           {
@@ -399,7 +432,10 @@ export default {
           isFilter,
           this.curEdit.type
         );
-      } else if (this.curEdit.type === "pie") {
+      } else if (
+        this.curEdit.type === "pie" ||
+        this.curEdit.type === "doughnut"
+      ) {
         handlePieChartLogic(
           item,
           {