Browse Source

- added labels for edges and titles for nodes and edges in gephi import

kamadaKawai
Alex de Mulder 9 years ago
parent
commit
d0197226c0
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      lib/network/gephiParser.js

+ 3
- 0
lib/network/gephiParser.js View File

@ -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;
}

Loading…
Cancel
Save