This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

mxGraph  RSS feed

 
Raj Aditya
Greenhorn
Posts: 21
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Guys I am new to Advanced java. I am working with mxGraphs to plot a big graph . The code which I am posting below plots a graph with rectangular edges but I want to plot a graph with circular edges. Can Someone please help?

              
 
Raj Aditya
Greenhorn
Posts: 21
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry a small edit in my post. It is rectangular nodes not edges
 
Paul Clapham
Sheriff
Posts: 22685
43
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not familiar with mxGraph, but it seems to me that mxgraph circular edges leads to several potential solutions. If not, then don't hesitate to post back and tell us why none of those links were what you meant.
 
Raj Aditya
Greenhorn
Posts: 21
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using the link you provided and from the understanding gained, I made the changes in the code but output is still the same.Code is shown below

 
Tim Moores
Saloon Keeper
Posts: 3953
94
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What did you change that you thought would help with this?

Also, Paul posted a search link - which one of the results did you try to follow?
 
Raj Aditya
Greenhorn
Posts: 21
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here I added the statements Object parent = graph.getDefaultParent();
                       mxCircleLayout layout = new mxCircleLayout(graph,100);
                        layout.execute(parent);
Basically last 2 statements were missing before. So I thought that the default layout would be a rectangular one but by adding the second one it would change to a circle of radius 100.

I followed the link https://jgraph.github.io/mxgraph/docs/js-api/files/layout/mxCircleLayout-js.html and http://www.massapi.com/method/com/mxgraph/layout/mxCircleLayout.execute.html
 
Raj Aditya
Greenhorn
Posts: 21
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also there is a small problem with insertvertex function. That is the syntax for node of any shape.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!