From d0197226c02469677f8988aba927cacb26785a0e Mon Sep 17 00:00:00 2001 From: Alex de Mulder Date: Sat, 15 Aug 2015 13:28:52 +0200 Subject: [PATCH] - added labels for edges and titles for nodes and edges in gephi import --- lib/network/gephiParser.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/network/gephiParser.js b/lib/network/gephiParser.js index a7deb34e..0e492964 100644 --- a/lib/network/gephiParser.js +++ b/lib/network/gephiParser.js @@ -27,6 +27,8 @@ function parseGephi(gephiJSON, optionsObj) { edge['from'] = gEdge.source; edge['to'] = gEdge.target; edge['attributes'] = gEdge.attributes; + edge['label'] = gEdge.label; + edge['title'] = gEdge.attributes !== undefined ? gEdge.attributes.title : undefined; // edge['value'] = gEdge.attributes !== undefined ? gEdge.attributes.Weight : undefined; // edge['width'] = edge['value'] !== undefined ? undefined : edgegEdge.size; if (gEdge.color && options.inheritColor === false) { @@ -44,6 +46,7 @@ function parseGephi(gephiJSON, optionsObj) { node['x'] = gNode.x; node['y'] = gNode.y; node['label'] = gNode.label; + node['title'] = gNode.attributes !== undefined ? gNode.attributes.title : undefined; if (options.nodes.parseColor === true) { node['color'] = gNode.color; }