MCPcopy Index your code
hub / github.com/crazyyanchao/knowledge-graph

github.com/crazyyanchao/knowledge-graph @1.0.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.0.2 ↗ · + Follow
744 symbols 1,426 edges 15 files 35 documented · 5%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

使用d3.js可视化知识图谱

=============================

data目录

  • bg.jpg可视化背景图片数据
  • CircularPartition.json节点圆形分区图工具栏需要加载的数据
  • test.json可视化需要展示的数据格式

images

  • 此目录存储节点属性图片数据

js

  • d3.js version-3.2.8

src

  • JS以及其它HTML等源码

index.html

  • 知识图谱可视化入口文件

访问地址

  • http://localhost:7476/knowledge-graph/hello/search

启动部署文件

  • ./knowledge-graph-web

CSV文件导入接口

  • http://localhost:7476/knowledge-graph/hello/dataSource/loadCsv
  • data.lab.knowledgegraph.service.DataServiceImplTest
//默认标签‘Person’,可自定义
{
    "label": "Person"
}
  • CSV文件分为节点和关系分别存放在不同文件,文件位置:knowledge-graph\neo-import-csv
  • 修改文件内容之后直接调用接口即可

清除图库数据

MATCH (n) 
OPTIONAL MATCH (n)-[r]->() DELETE n,r

NEO4J启动脚本

  • start.bat
bin\neo4j.bat console

图 图 图 图

Core symbols most depended-on inside this repo

d3_functor
called by 31
src/main/resources/static/js/d3.js
rescale
called by 15
src/main/resources/static/js/d3.js
d3_time_formatPad
called by 15
src/main/resources/static/js/d3.js
angle
called by 14
src/main/resources/static/js/d3.js
interpolate
called by 12
src/main/resources/static/js/d3.js
d3_svg_lineDot4
called by 12
src/main/resources/static/js/d3.js
d3_layout_treeVisitAfter
called by 9
src/main/resources/static/js/d3.js
d3_selection
called by 8
src/main/resources/static/js/d3.js

Shape

Function 618
Method 116
Class 10

Languages

TypeScript83%
Java17%

Modules by API surface

src/main/resources/static/js/d3.js514 symbols
src/main/java/data/lab/knowledgegraph/model/UserJson.java75 symbols
src/main/resources/static/js/jquery-2.2.4.min.js73 symbols
src/main/resources/static/js/graph.js26 symbols
src/main/java/data/lab/knowledgegraph/utils/FileOperate.java14 symbols
src/main/java/data/lab/knowledgegraph/controller/HelloController.java9 symbols
src/main/java/data/lab/knowledgegraph/service/DataServiceImpl.java8 symbols
src/main/java/data/lab/knowledgegraph/register/Neo4jProperties.java7 symbols
src/test/java/data/lab/knowledgegraph/service/DataServiceImplTest.java3 symbols
src/test/java/data/lab/knowledgegraph/controller/HelloControllerTest.java3 symbols
src/main/resources/static/js/inter.js3 symbols
src/main/java/data/lab/knowledgegraph/utils/SearchSentenceProcess.java3 symbols

For agents

$ claude mcp add knowledge-graph \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact