#49 feat: gráficos de provenance (proveedores-organizaciones y territorios) en el resumen público

This commit is contained in:
2026-08-15 17:27:53 -05:00
parent efa666dcb3
commit 4ecfb64118
13 changed files with 725 additions and 14 deletions

View File

@@ -51,17 +51,20 @@ export function computeColumnLayout (nodes, edges, options = {}) {
export function toCytoscapeElements ({ nodes, edges }) {
return [
...nodes.map(node => ({
data: {
id: node.id,
kind: node.kind,
label: node.label,
image: node.image || null,
entity: node.entity || null,
},
classes: [node.kind],
position: { x: node.x, y: node.y },
})),
...nodes.map(node => {
const classes = node.image ? [node.kind, 'has-image'] : [node.kind]
return {
data: {
id: node.id,
kind: node.kind,
label: node.label,
image: node.image || null,
entity: node.entity || null,
},
classes,
position: { x: node.x, y: node.y },
}
}),
...edges.map(edge => ({
data: {
id: `edge:${edge.from}:${edge.to}`,