图谱可视化对标业内实践:枢纽技能按连接度大小编码、时序Timebar生长曲线柱图(点击跳转)、技术栈类别hull气泡轮廓、画布全屏、边悬停tooltip与点击直达JD证据、双击渐进披露(岗位子图/技能反查聚焦),修复gt-bar类名冲突,前端单测87例全过

This commit is contained in:
FinStab
2026-08-28 12:19:49 +08:00
parent 6d91df1a91
commit 6312dd5f4a
4 changed files with 272 additions and 49 deletions
+9
View File
@@ -235,5 +235,14 @@ eq(dg.added.length, 1, "摘要:当季新增事件");
eq(dg.exited.length, 1, "摘要:当季退出事件");
eq(dg.boosted.length, 0, "摘要:非当季事件不计入");
/* graph.js 纯逻辑:凸包(技术栈类别气泡轮廓) */
const gf3 = loadGraphFns(["convexHull"]);
const sq = [{ x: 0, y: 0 }, { x: 10, y: 0 }, { x: 10, y: 10 }, { x: 0, y: 10 }, { x: 5, y: 5 }];
eq(gf3.convexHull(sq).length, 4, "凸包:内部点被剔除");
eq(gf3.convexHull([{ x: 0, y: 0 }, { x: 5, y: 5 }]).length, 2, "凸包:两点原样返回");
eq(gf3.convexHull([{ x: 0, y: 0 }, { x: 5, y: 0 }, { x: 10, y: 0 }]).length, 2, "凸包:共线点只留端点");
const hullPt = gf3.convexHull(sq);
eq(hullPt.some((p) => p.x === 5 && p.y === 5), false, "凸包:中心点不在顶点中");
console.log(`\n${pass} passed, ${fail} failed`);
process.exit(fail ? 1 : 0);