Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

Re arrange Graph Nodes in GraphML based on node attribute

0 votes
My dataset contains a parent child relationship between any two Nodes.I have another Attribute "Creationdate".
 
Below is a sample copy of my INPUT XML
 
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
   <family-tree appNo="600">
     <Node-Definitions>
  <d id="1" type="APP" nodeId ="600" creationDate = "03-12-2012"/> 
  <d id="2" type="APP" nodeId ="601" creationDate = "03-12-2011"/> 
  <d id="3" type="APP" nodeId ="602" creationDate = "07-10-2011"/> 
  <d id="4" type="APP" nodeId ="603" creationDate = "08-04-2011"/> 
  <d id="5" type="APP" nodeId ="604" creationDate = "01-01-2010"/> 
      </Node-Definitions>
      <relations>
  <r id="2" parent="1" child="2" /> 
  <r id="4" parent="5" child="4" /> 
  <r id="3" parent="1" child="2" /> 
  <r id="3" parent="2" child="3" /> 
  <r id="3" parent="5" child="3" /> 
      </relations>
   </family-tree>
 
For my first Iteration of Display, there is an OUTPUT graphML that represent Parent- child relationship between two entities/Nodes.
Now I want to rearrange these nodes based on the "creationDate". 
 
My processes flow is as below:
Input is .XML ----> apply Xsl(using yFiles Processor) to Xml ----> output is .Graphml.
 
Question:
 
It would be ideal, if you could provide a solution, which is compatible with the XSL.
if NOT then what are the other possible Options, to rearrange the graph Nodes based on the Attribute "CreationDate"?
 
Also if possible can you provide us with a sample code too.
in Help by (200 points)
edited by

2 Answers

0 votes

Also if possible can you provide us with a sample code too.

Sorry, but this is the yEd forum. yEd is a diagram/graph editor end user application. If you are actually working with yFiles for Java, please direct your questions to the yWorks support team.

by [yWorks] (160k points)
0 votes
For using yEd's arrangement features, it doesn't matter from which format the graph is imported. yEd contains layout algorithms for general trees and a dedicated one for family trees that might fit your needs.

If you can describe in more detail how the creationDate values should affect the layout, we might be able to help you with precise configuration settings for one of the algorithms.
by [yWorks] (26.8k points)
Legal Disclosure | Privacy Policy
...