unread,
Sep 29, 2007, 6:19:52 PM9/29/07
to Flex Visual Graph Library
I'm trying to use flexvizgraphlib to show relationship among the
nodes. At first, flexvizgraphlib shows relation by using default nodes
and edge settings. And next, if user clicks a node, flexvizgraphlib
downloads new xml file which contains the data to draw the other nodes
and edges. I successfully added new nodes and linked them. However,
the problem is I can't make it as visible.
I just changed few things from RelationNavigatorDemo.mxml. Here is the
address of my source code.
http://www.ukseong.com/temp/RelationNavigatorDemo.mxml
What I'm trying to do is in around 184th line.
Thank you for the help.
unread,
Oct 1, 2007, 1:42:05 PM10/1/07
to flexviz...@googlegroups.com, Flex Visual Graph Library
Hi Ukseong,
Hmm if I understand you correctly, you would like to dynamically download
additional node data from XML files adding them to the graph when you
double-click
on a parent node of the new nodes. Correct?
Dynmic downloading of graph data (nodes or edges) is not really supported
right now, and would require some tricky/heavy modifications.
If you really managed to do it but only have trouble to get them visible,
check in the VisualGraph class. There are a few data structures that keep
track
of currently visual nodes and edges. They are mainly manipulated when the
degree
of separation changes, but may be modified for other reasons.
Be aware that invisible nodes typically do not have an UIComponent
associated
with them to avoid a performance hit, so by making a node visible, it's
associated
UIComponent may need to be created first.
Hope this helps,
Daniel
--
Daniel Lang - la...@un.org - DM/OCSS/ITSD/QARMS - +1 917 367 5338
ukseong <uks...@gmail.com>
Sent by: flexviz...@googlegroups.com
29/09/2007 12:19 PM
Please respond to
flexviz...@googlegroups.com
To
Flex Visual Graph Library <flexviz...@googlegroups.com>
cc
Subject
How can I add new nodes?
unread,
Oct 1, 2007, 3:42:00 PM10/1/07
to Flex Visual Graph Library
Hello,
at first, thank you for you help. Thanks to your advice, I can make
the edges visible.
http://www.ukseong.com/RND/bin/RelationNavigatorDemo.swf?nostr=vizgraph
(click 'data' node)
However, as you mentioned before, flex gave me some errors which is
related with UIComponent. You said I have to associate them, but um..
I tried
VisualGraph.view(uicomponent variable)
this, but it just made the situation worse. Please let me know how can
I associate UIComponent and the nodes.
Here is my new source code.
http://www.ukseong.com/temp/RelationNavigatorDemo2.mxml
thank you for your help again.
Ukseong Moon
On Oct 1, 8:42 pm, Daniel Lang <la...@un.org> wrote:
> Hi Ukseong,
>
> Hmm if I understand you correctly, you would like to dynamically download
> additional node data from XML files adding them to the graph when you
> double-click
> on a parent node of the new nodes. Correct?
>
> Dynmic downloading of graph data (nodes or edges) is not really supported
> right now, and would require some tricky/heavy modifications.
>
> If you really managed to do it but only have trouble to get them visible,
> check in the VisualGraph class. There are a few data structures that keep
> track
> of currently visual nodes and edges. They are mainly manipulated when the
> degree
> of separation changes, but may be modified for other reasons.
>
> Be aware that invisible nodes typically do not have an UIComponent
> associated
> with them to avoid a performance hit, so by making a node visible, it's
> associated
> UIComponent may need to be created first.
>
> Hope this helps,
> Daniel
> --
> Daniel Lang - la...@un.org - DM/OCSS/ITSD/QARMS - +1 917 367 5338
>
> ukseong <ukse...@gmail.com>
unread,
Oct 1, 2007, 4:10:44 PM10/1/07
to flexviz...@googlegroups.com, Flex Visual Graph Library
Hi,
I just looked.
VisualGraph has a method called "setNodeVisibility()", this method should
do all that is required to make a node visible or invisible, including the
creation
of the UIComponent.
Currently this is a private method, but I guess it should not do too much
harm to make it public instead. You have to check though to make sure
it is safe to call it in all situations.
What you tried:
VisualGraph.view(uicomponent variable)
cannot work, first of all "view" is a property of VisualNode, not
VisualGraph
and it is implemented via getter and setter, so you actually would need
to assign the view, like:
mycurrentnode.view = new UIComponent();
However, it is very much recommended to not do it like that, but either
use setNodeVisibility() or createVNodeComponent(). Thus any defined
itemRenderers are taken as the UIComponent to create.
Hope it is more clear now.
Cheers,
ukseong <uks...@gmail.com>
Sent by: flexviz...@googlegroups.com
01/10/2007 09:42 AM
Please respond to
flexviz...@googlegroups.com
Subject
Re: How can I add new nodes?
unread,
Oct 1, 2007, 5:59:52 PM10/1/07
to Flex Visual Graph Library
Hi,
Two questions/problems concerning node creation:
a) I've created a 'master' (and invisible node) with its edge linked
to the visible 1st node, but the layout calculates the bounding global
size including this master node, so i got a 'top
padding' (hierarchical view). How (and where) can I avoid this node to
be include in bounding box calculations?
b) I'm getting this error when i try to set visibilityLimitActive
property to false, to see all nodes:
'Error: Invisible root node, this is probably due to wrong
initialisation of nodes or wrong defaults'
Thanks in advance,
Fer
unread,
Oct 1, 2007, 6:07:48 PM10/1/07
to flexviz...@googlegroups.com, Flex Visual Graph Library
Hi Fernando,
yes, as of now graphLayout does not consider invisible root nodes
a valid situation, so it thinks it is an internal error.
I understand what you are trying to do is to enhance functionality by
curing symptoms. The real cause is more that neither forest nor
non-connected
graphs are currenty not supported in any way.
This is the case for your artificially invisible root node in terms of
changing
the global visibility setting, as well as in terms of the layout fitting
calculations.
There is no way to exclude the invisible root node from the calculation to
avoid the unwanted top margin.
A solution would need to be more general, i.e. to support more generalised
graphs,
like forests and/or generally non-connected graphs.
The problem with this is, that all currently supported layout algorithms
only work on
trees. One idea would be to identify all the connected components of the
graph
and run a tree-layout algorithm on all of them. But then you still need to
arrange
the resulting layouts somehow on the available space, which I currently
have
no idea how to do it.
Sorry,
"quintero...@gmail.com" <quintero...@gmail.com>
Sent by: flexviz...@googlegroups.com
01/10/2007 11:59 AM
Please respond to
flexviz...@googlegroups.com
Subject
Re: How can I add new nodes?
unread,
Oct 1, 2007, 9:10:10 PM10/1/07
to Flex Visual Graph Library
Hello,
I think I don't need to make 'setNodeVisibility" as public. I can
execute that while I'm creating new node by set
'newNodesDefaultVisible" as true.
I already did that, and I tracked where the error occurs. And the
compiler said the problem is at 79th line of
"PrimitiveIconRenderer.as". this part.
/* set the tool tip */
this.toolTip = this.data.data.@name;
I think 'this.data.data.@name' is something unable to access or not
even exist. And I can't know what tis 'tooltip' thing is. And I can't
understand why it does not occur any problem in first time. That line
occurs problem just when I'm trying to create new nodes.
thank you for your help.
Ukseong Moon
> ukseong <ukse...@gmail.com>
unread,
Oct 1, 2007, 9:20:40 PM10/1/07
to flexviz...@googlegroups.com
Dear Moon,
"this" is the IconRenderer, in this case IIRC a VBox which is
derived from UIComponent.
A VBox has a property "toolTip" that can be accessed.
If the IconRenderer is correctly instantiated through
VisualGraph.createVNodeComponent()
the "data" property of the UIComponent is set to its
VisualNode object (so that the UIComponent has a reference
back to its associated VisualNode).
This is the first "data".
Now any instance of VisualNode in turn has a "data" property
which is initialised to point to the XML object with which data
the node was initialised with. This happens in VisualGraph.createVNode()
(i.e. the Node.data is passed to the VisualNode constructor).
This is the second "data".
@name is the XML property "name".
I suspect you are not initialising the VisualNode
correctly OR your XML code for the corresponding node does
not have a "name" property.
The IconRenderer could be implemented a bit more failsafe
probably...
ukseong <uks...@gmail.com>
Sent by: flexviz...@googlegroups.com
01/10/2007 03:10 PM
Please respond to
flexviz...@googlegroups.com
Subject
unread,
Oct 1, 2007, 9:24:18 PM10/1/07
to Flex Visual Graph Library
Reply all
Reply to author
Forward