瀏覽代碼

Merge branch 'master' of http://192.168.50.233:3000/rui.jiang/performance-test

liujiejie 3 月之前
父節點
當前提交
5c83f8cea6

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

@@ -101,7 +101,28 @@ export function handleScatterChartLogic(
         data: scatterData, // 生成的散点图数据
         tooltip: {
           trigger: "item", // 鼠标悬停触发
+          formatter: function (params) {
+            // params.value 对应 [x, y] 数组
+            const x = params.value[0];
+            const y = params.value[1];
+            return `
+      <strong>${params.seriesName}</strong><br/>
+      X: ${x}<br/>
+      Y: ${y}
+    `;
+          },
         },
+
+        symbolSize: 5, // 设置点大小
+        itemStyle: {
+          color: "#1890ff", // 设置固定点颜色,例如蓝色
+        },
+        emphasis: {
+          itemStyle: {
+            color: "red", // 鼠标悬停高亮
+          },
+        },
+
         // itemStyle: {
         //   shadowBlur: 3,
         //   shadowColor: "rgba(25, 100, 150, 0.3)",