mirror of
https://git.alemi.dev/fedicharter.git
synced 2024-11-23 00:44:48 +01:00
fix: now it's an array of arrays
This commit is contained in:
parent
f859314548
commit
6b4318f1cf
1 changed files with 5 additions and 5 deletions
10
dist/index.html
vendored
10
dist/index.html
vendored
|
@ -46,13 +46,13 @@
|
||||||
'#2E8757',
|
'#2E8757',
|
||||||
'#05979A',
|
'#05979A',
|
||||||
]
|
]
|
||||||
for (const i in graph.nodes) {
|
for (const i in graph[0]) {
|
||||||
if (graph.nodes[i].label === domain) { graph.nodes[i].color = '#BF616A' }
|
if (graph[0][i].title === domain) { graph[0][i].color = '#BF616A' }
|
||||||
else { graph.nodes[i].color = palette[Math.floor(Math.random() * palette.length)] }
|
else { graph[0][i].color = palette[Math.floor(Math.random() * palette.length)] }
|
||||||
}
|
}
|
||||||
|
|
||||||
const nodes = new vis.DataSet(graph.nodes);
|
const nodes = new vis.DataSet(graph[0]);
|
||||||
const edges = new vis.DataSet(graph.vertices);
|
const edges = new vis.DataSet(graph[1]);
|
||||||
|
|
||||||
// create a network
|
// create a network
|
||||||
const container = document.getElementById("netgraph");
|
const container = document.getElementById("netgraph");
|
||||||
|
|
Loading…
Reference in a new issue