implementation

75 views
Skip to first unread message

rajesh

unread,
Jun 9, 2009, 10:14:10 AM6/9/09
to Ontology Online
Hi,
TouchGraph looks awesome.. but no where gave the implementation.
can you give me the brief on how can i define the touchgraph and how
data i have to pass? what kind of data i have to pass? i am new to the
javascript.. so please give sample code also...

thanks & Regards
Rajesh

David Decraene

unread,
Jun 9, 2009, 10:22:28 AM6/9/09
to Ontology Online
Hi Rajesh,

you might want to have a look at the source of the page to examine the
script. The touchgraph I am using uses jOWL (loads data from owl
files), and jQuery, and hence requires knowledge of both to operate.
Being new to javascript I am suspecting it will not be an easy task
for you however.

Here is the main code:
var touchGraph = TouchGraph($("#touchgraph"), {
frameRate : 100,
onCreateNode : function($node, id, data){
var concept = $node.get(0).id;
var $label = $("<div class='label'/>").text(jOWL(concept).label
()).appendTo($node);
$node.click(function(){
var c = jOWL(concept);
if(c) touchGraph.addjOWLChildren(c, 8);
});
}
});
touchGraph.loadImages($("#preload img"));

jOWL.load('data/wine.owl', function(){
touchGraph.parsejOWL(jOWL("whitebordeaux"));
touchGraph.start();
}, {reason : true });


Greetings
David

David Cabanillas

unread,
Feb 7, 2013, 10:44:46 AM2/7/13
to ontolog...@googlegroups.com
I have a related problem with:

SCRIPT5007: The value of the property 'TouchGraph' is null or undefined, not a Function object 
index2.html, line 39 character 2

The line said:
<script type="text/javascript" src="scripts/TouchGraph.js"></script>

Where I can achieve the "scripts/TouchGraph.js"?
Thanks.

El dimarts 9 de juny de 2009 16:22:28 UTC+2, David Decraene va escriure:
Reply all
Reply to author
Forward
0 new messages