mirror of
https://git.alemi.dev/fedicharter.git
synced 2024-11-12 20:09:21 +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',
|
||||
'#05979A',
|
||||
]
|
||||
for (const i in graph.nodes) {
|
||||
if (graph.nodes[i].label === domain) { graph.nodes[i].color = '#BF616A' }
|
||||
else { graph.nodes[i].color = palette[Math.floor(Math.random() * palette.length)] }
|
||||
for (const i in graph[0]) {
|
||||
if (graph[0][i].title === domain) { graph[0][i].color = '#BF616A' }
|
||||
else { graph[0][i].color = palette[Math.floor(Math.random() * palette.length)] }
|
||||
}
|
||||
|
||||
const nodes = new vis.DataSet(graph.nodes);
|
||||
const edges = new vis.DataSet(graph.vertices);
|
||||
const nodes = new vis.DataSet(graph[0]);
|
||||
const edges = new vis.DataSet(graph[1]);
|
||||
|
||||
// create a network
|
||||
const container = document.getElementById("netgraph");
|
||||
|
|
Loading…
Reference in a new issue