angularjs - 无法使用 Neovis.js 从 Neo4j 以角度呈现图形
问题描述
我是 Neo4j 的新手,我正在尝试使用 Neovis.js 库在角度组件中可视化 Neo4j 图形。它也没有在控制台中显示任何错误,也没有在屏幕上呈现任何内容。这是我在 component.ts 文件中的代码
Init() {
let config = {
container_id: "viz",
server_url: "bolt://localhost:7687",
server_user: "neo4j",
server_password: "",
labels: {
//"Character": "name",
"Character": {
"caption": "name",
"size": "pagerank",
"community": "community"
//"sizeCypher": "MATCH (n) WHERE id(n) = {id} MATCH (n)-[r]-() RETURN sum(r.weight) AS c"
}
},
relationships: {
"INTERACTS": {
"thickness": "weight",
"caption": false
}
},
initial_cypher: "Match (n) return (n)"
};
var viz = new NeoVis(config);
viz.render();
}
html代码:-
<head (load)="Init()">
<title>Neovis.js Simple Example</title>
<style type="text/css">
html, body {
font: 16pt arial;
}
#viz {
width: 900px;
height: 700px;
border: 1px solid lightgray;
font: 22pt arial;
}
</style>
</head>
解决方案
推荐阅读
- docker - 使用 chai 进行卷曲呼叫失败
- node.js - vue如何从node读取js文件
- python - 检查 csv 列中的所有项目,除了一个 [python pandas]
- javascript - 如何使用 javascript 将矩阵拆分为 4 个子矩阵?
- asp.net - 如何使用 linq 获取 Max() 值
- php - 如何从 WC_Subscription 实例对象中获取用户 ID
- php - 如何在 Bitpay 中找到 x 身份和 x 签名(文档)
- go - 是否可以从 Go 进程应用 Linux 内核 SECCOMP 配置文件?
- python - Google Scholar 上的网页抓取不断返回一个空列表
- sql - 用 PARTITION 从单个表中对多列求和