force-graph-vis
Version:
基于D3.js的知识图谱可视化解决方案
32 lines (28 loc) • 699 B
TypeScript
// 圈选元素
import { GraphDataNode, GraphDataLink } from '../common';
declare namespace Selector {
/**
* @function graphSelector
* @description 图谱选择器
*/
interface graphSelector {
(
nodeSelector: GraphDataNode | ((d: GraphDataNode) => boolean),
linkSelector: GraphDataLink | ((GraphDataLink) => boolean | 'source' | 'target' | 'all')
): void;
}
/**
* @function findLinkedRoute
* @description 查到关联节点
*/
interface findLinkedRoute {
(
d: GraphDataNode,
type: 'source' | 'target',
deepCnt: number,
nodeArr: GraphDataNode[],
linkArr: GraphDataLink[]
): void;
}
}
export default Selector;