Bruce Hopkins

unread,

Dec 12, 2007, 7:27:14 PM12/12/07

to flexviz...@googlegroups.com

Hi,

Does anyone have any exmaple code on creating Nodes and Edges manually? From what I can see, I only see code that passes in XML to the graph.

Thanks,

Bruce

Ary

unread,

Dec 13, 2007, 12:35:39 PM12/13/07

to Flex Visual Graph Library

Here's a sample from a code I'm working on :

var graph:IGraph = new Graph(selectedRequestID, false, null, null);
var root:INode;

var nodesMapById:Map = new Map();
for each (var nodeData:MyDataVO in impGraph.dataProvider) {
var node:INode;
if ((node = graph.nodeByStringId(nodeData.refID))==null) {
node = graph.createNode(nodeData.refID, nodeData);
}
nodesMapById.put(nodeData.refID, node);
}
if (root == null) {
root = INode(nodesMapById.first());
}
for each (var edge:EdgeDataVO in impGraph.edges) {
var fromNode:INode = INode(nodesMapById.getValue(edge.from));
var toNode:INode = INode(nodesMapById.getValue(edge.to));
var edgeData:Object = new Object();
graph.link(fromNode, toNode, edgeData);
}
// at this point the graph and root node are ready
var result:Object = new Object();
result.graph = graph;
result.root = root;
return result;

This is how I construct the graph and not by XML parsing

Ary.

Andrew D. Goodfellow

unread,

Mar 5, 2008, 5:08:47 AM3/5/08

to flexviz...@googlegroups.com

Hey everyone,

So I've dug around in the code a little and it appears that once I've got a VisualGraph built from a Graph the functionality isn't there to visualize runtime added nodes to the Graph via Graph.createNode and Graph.link. Is that being worked on currently? I love this library and I need that functionality pretty quickly but I don't want to stomp on anyones toes or waste cycles if it's already being done.

Just give me a shout and let me know. If not I'll probably try to implement myself and perhaps submit it back for your scrutiny.

-Andy

JB

unread,

Mar 5, 2008, 8:43:40 PM3/5/08

to Flex Visual Graph Library

Andy,

You wouldn't be stomping on any toes from the project team perpective
- sorry but we don't have anything in the works for this. Unless
someone else has something out there?...

Otherwise, if you do pursue, please share and it would be useful to
add to the lib.

Sorry to not be more helpful...

JB

jesusd...@gmail.com

unread,

Mar 5, 2008, 8:46:36 PM3/5/08

to Flex Visual Graph Library

It would be awesome to see your contribution Andy :)

Andrew D. Goodfellow

unread,

Mar 5, 2008, 9:35:25 PM3/5/08

to flexviz...@googlegroups.com

Ok cool, I actually kinda started hacking at it last night. If anyone else is doing anything related please let me know.

-Andy

Keith Sutton

unread,

Mar 6, 2008, 2:50:53 AM3/6/08

to Flex Visual Graph Library

I am just starting down that path as well. I did this with SpringGraph
and was going to check to see how re-useable it was.

On Mar 5, 12:35 pm, "Andrew D. Goodfellow" <agoodfel...@gmail.com>
wrote:

> Ok cool, I actually kinda started hacking at it last night. If anyone else
> is doing anything related please let me know.
>

Seth

unread,

Mar 12, 2008, 10:53:58 AM3/12/08

to Flex Visual Graph Library

Maybe it would be interesting for you: now i'm trying to add feature
of changing Node attributes in runtime (name is first i need)....later
maybe do some workaround with description attribute

On 5 Бер, 22:35, "Andrew D. Goodfellow" <agoodfel...@gmail.com> wrote:
> Ok cool, I actually kinda started hacking at it last night. If anyone else
> is doing anything related please let me know.
>
> -Andy
>

Ilya Romanenko

unread,

Mar 13, 2008, 2:07:31 PM3/13/08

to Flex Visual Graph Library

Andrew D. Goodfellow this feature is very important for me too - is
there any result's so far?
Now I'm interested in deleting nodes too - so I start digging it now

> Ok cool, I actually kinda started hacking at it last night. If anyone else
> is doing anything related please let me know.
>
> -Andy
>

Ilya Romanenko

unread,

Mar 13, 2008, 4:37:15 PM3/13/08

to Flex Visual Graph Library

As i see deleting worked fine out-of-box :)
But creating nodes in runtime is still problem - it seems difficult
but i would looking on it...

Andrew D. Goodfellow

unread,

Mar 14, 2008, 3:07:03 AM3/14/08

to flexviz...@googlegroups.com

Hi Ilya,

I'm still working on it. I'll give it more time tomorrow. I think I'm still a ways off from having anything useful though. This is just a small piece of a rather large application I'm working on during my off time.

-Andy

Ілля Романенко

unread,

Mar 14, 2008, 8:34:15 AM3/14/08

to flexviz...@googlegroups.com

Ok - thanks for your reply

Daniel

unread,

Mar 21, 2008, 8:17:41 PM3/21/08

to Flex Visual Graph Library

Thanks all for your willingness to help. This is obviously
a very important feature. You have seen from my various posts
today, where some of the challenges are.

I am looking forward to your ideas and code how to
resolve these and I will be more than happy to include
everything into the main trunk that helps us with this
issue.

Thanks to you all,
Daniel

On 14 Mrz., 03:34, "Ілля Романенко" <ilyaromane...@googlemail.com>
wrote:

> Ok - thanks for your reply
>

> 2008/3/14, Andrew D. Goodfellow <agoodfel...@gmail.com>:

>
>
>
> > Hi Ilya,
>
> > I'm still working on it. I'll give it more time tomorrow. I think I'm
> > still a ways off from having anything useful though. This is just a small
> > piece of a rather large application I'm working on during my off time.
>
> > -Andy
>

> > 2008/3/13 Ilya Romanenko <IlyaRomane...@googlemail.com>:

Reply all

Reply to author

Forward