Problem with direction of edge

255 views
Skip to first unread message

Thomas Markus

unread,
Feb 15, 2010, 4:08:24 AM2/15/10
to JavaScript Information Visualization Toolkit
Hi,

I'm trying to debug an isue that I'm having with rgraph related to the
direction of edges using the 'arrow' edge type.

Screenshot:
http://www.phil.uu.nl/~tmarkus/tmp/problem_direction_edge.png

Problem:
The JSON seems to suggest that the direction of all the edges should
be the same, but as you can see in the screenshot, it is not.

Any advice is greatly appreciated.

Regards,
Thomas


JSON DATA:

---

[{ "id": "dbpedia-DOT-org-SLASH-resource-SLASH-Python-UNDERSCORE--
BRACKETOPEN-programming-UNDERSCORE-language-BRACKETCLOSE-",
"name": "Python",
"data": [
{ "key" : "weight",
"value": "7" }
],
"adjacencies": [ {
"nodeTo": "www-DOT-lt4el-DOT-eu-SLASH-CSnCS-HASH-
ObjectOrientedProgrammingLanguage",
"data": {
"weight": "7",
"label": "is a",
"edge_id": "0" }
},
] } ,


{ "id": "www-DOT-lt4el-DOT-eu-SLASH-CSnCS-HASH-Java",
"name": "JAVA",
"data": [
{ "key" : "weight",
"value": "7" }
],
"adjacencies": [ {
"nodeTo": "www-DOT-lt4el-DOT-eu-SLASH-CSnCS-HASH-
ObjectOrientedProgrammingLanguage",
"data": {
"weight": "7",
"label": "is a",
"edge_id": "1" }
},
] } ,


{ "id": "www-DOT-lt4el-DOT-eu-SLASH-CSnCS-HASH-PHP",
"name": "PHP",
"data": [
{ "key" : "weight",
"value": "7" }
],
"adjacencies": [ {
"nodeTo": "www-DOT-lt4el-DOT-eu-SLASH-CSnCS-HASH-
ObjectOrientedProgrammingLanguage",
"data": {
"weight": "7",
"label": "is a",
"edge_id": "2" }
},
] } ,


{ "id": "www-DOT-lt4el-DOT-eu-SLASH-CSnCS-HASH-JavaScript",
"name": "JavaScript",
"data": [
{ "key" : "weight",
"value": "7" }
],
"adjacencies": [ {
"nodeTo": "www-DOT-lt4el-DOT-eu-SLASH-CSnCS-HASH-
ObjectOrientedProgrammingLanguage",
"data": {
"weight": "7",
"label": "is a",
"edge_id": "3" }
},
] } ,


{ "id": "www-DOT-lt4el-DOT-eu-SLASH-CSnCS-HASH-
ObjectOrientedProgrammingLanguage",
"name": "object-oriented programming language",
"data": [
{ "key" : "weight",
"value": "7" }
],
"adjacencies": [ ] } ,


{ "id": "www-DOT-lt4el-DOT-eu-SLASH-CSnCS-HASH-CPlusPlus",
"name": "C++",
"data": [
{ "key" : "weight",
"value": "7" }
],
"adjacencies": [ {
"nodeTo": "www-DOT-lt4el-DOT-eu-SLASH-CSnCS-HASH-
ObjectOrientedProgrammingLanguage",
"data": {
"weight": "7",
"label": "is a",
"edge_id": "4" }
},
] } ,


];

---

Danica Damljanovic

unread,
Mar 30, 2010, 3:42:15 PM3/30/10
to javascript-information...@googlegroups.com
Hi

I am having the same problem. Is this maybe solved?

Cheers,
Danica

> --
> You received this message because you are subscribed to the Google Groups "JavaScript Information Visualization Toolkit" group.
> To post to this group, send email to javascript-information...@googlegroups.com.
> To unsubscribe from this group, send email to javascript-information-visua...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/javascript-information-visualization-toolkit?hl=en.
>
>

--
Best,
Danica Damljanovic
--
Research Associate
GATE team http://gate.ac.uk
Natural Language Processing Group
University of Sheffield
http://www.dcs.shef.ac.uk/~danica

Nico Garcia Belmonte

unread,
Mar 30, 2010, 6:12:20 PM3/30/10
to javascript-information...@googlegroups.com
Hi,

The JSON data provided is outdated. The "data" argument should be an object, not an array:

http://thejit.org/docs/files/Loader-js.html#Loader


Also, the "data" property of you adjacencies object must have a "$direction" parameter that is an array specifying the ids for the direction of the edge.

For example,

data: {
  $direction: ["idfrom", "idTo"]
I would never die for my beliefs because I might be wrong.

Bertrand Russell

Thomas Markus

unread,
Apr 7, 2010, 10:33:09 AM4/7/10
to JavaScript Information Visualization Toolkit
This resolves my issue.

Thanks!
Thomas

On Mar 31, 12:12 am, Nico Garcia Belmonte <phil...@gmail.com> wrote:
> Hi,
>
> The JSON data provided is outdated. The "data" argument should be an object,
> not an array:
>
> http://thejit.org/docs/files/Loader-js.html#Loader
>
> Also, the "data" property of you adjacencies object must have a "$direction"
> parameter that is an array specifying the ids for the direction of the edge.
>
> For example,
>
> data: {
>   $direction: ["idfrom", "idTo"]
>
> }
>
> On Tue, Mar 30, 2010 at 9:42 PM, Danica Damljanovic <
>
>
>
>
>
> danica.damljano...@gmail.com> wrote:
> > Hi
>
> > I am having the same problem. Is this maybe solved?
>
> > Cheers,
> > Danica
>
> > On 15 February 2010 10:08, Thomas Markus <goo...@thomasmarkus.nl> wrote:
> > > Hi,
>
> > > I'm trying to debug an isue that I'm having with rgraph related to the
> > > direction of edges using the 'arrow' edge type.
>
> > > Screenshot:

> > >http://www.phil.uu.nl/~tmarkus/tmp/problem_direction_edge.png<http://www.phil.uu.nl/%7Etmarkus/tmp/problem_direction_edge.png>

> > javascript-information-visua...@googlegroups.com<j avascript-information-visualization-toolkit%2Bunsu...@googlegroups.com>


> > .
> > > For more options, visit this group at

> >http://groups.google.com/group/javascript-information-visualization-t...


> > .
>
> > --
> > Best,
> > Danica Damljanovic
> > --
> > Research Associate

> > GATE teamhttp://gate.ac.uk


> > Natural Language Processing Group
> > University of Sheffield

> >http://www.dcs.shef.ac.uk/~danica<http://www.dcs.shef.ac.uk/%7Edanica>


>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "JavaScript Information Visualization Toolkit" group.
> > To post to this group, send email to
> > javascript-information...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > javascript-information-visua...@googlegroups.com<j avascript-information-visualization-toolkit%2Bunsu...@googlegroups.com>


> > .
> > For more options, visit this group at

> >http://groups.google.com/group/javascript-information-visualization-t...

Reply all
Reply to author
Forward
0 new messages