Menu

Edge length (radial/ballon layout)

andrew lau
2012-07-23
2013-05-29
  • andrew lau

    andrew lau - 2012-07-23

    Can I change the length of ballon layout?
    I want each edge have different length according to its weight value.
    I am just wondering if it is possible to do the following thing in radial layout:

    https://docs.google.com/open?id=0B9KO8mEpneF8LW5JcGNCUUd2U0k

    If possible, can anyone tell me the idea of how to start working on it? thanks.

     
  • andrew lau

    andrew lau - 2012-07-23

    I tried to modify the balloon layout like the following and it does't work:

    GraphBalloonLayout<myNode,myEdge> radialLayout;
    Point2D pn=new Point2D.Double(500+500*(length)*Math.sin(360*i/numNode*Math.PI/180), 500-500*(length)*Math.cos(360*i/numNode*Math.PI/180));
    radialLayout.setLocation(node, pn);
    

    I have no ideas how to fix

     

Log in to post a comment.