Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong type of data-field on edges #2

Closed
SebastianOpriel opened this issue Sep 8, 2016 · 2 comments
Closed

Wrong type of data-field on edges #2

SebastianOpriel opened this issue Sep 8, 2016 · 2 comments
Assignees

Comments

@SebastianOpriel
Copy link

Hey,
i tried to export a graph which has several fields in the data-object.

The exported XML contains the nodes with the correct data fields, eg.:

<node id="a">
  <data type="data" key="label">George</data>
</node>

When i assigned such a label to an edge it is exported in an other format like:

<edge id="abc" source="a" target="b">
  <data key="label">[object Object]</data>
</edge>

The [object Object] should be also "George", but actually it isn't.

I assigned the data via (where selected is either a node or an edge):

var content = "George";
selected.data('label', content);

best regards
Bastian

@SebastianOpriel
Copy link
Author

Solved it by myself:
changed line 99 from
edge += '<data key="' + key + '">' + eleData[key] + '</data>';
to
edge += '<data key="' + key + '">' + eleData[key].value + '</data>';

best regards
Bastian

@metincansiper
Copy link
Collaborator

@bastianleirpo I think that this problem is fixed in the PR #7. I am closing the issue. Please let me know if your problem is not totally solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants