Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do i generate dynamic graph in html

 
Tien Nguyen Doan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,
I want to build a java struts tag and render org chart that has multi-parents, childs,... look like this:



Please, view the attachment image!

Thank you so much!


org_chart_with_multi_parent.jpg
[Thumbnail for org_chart_with_multi_parent.jpg]
Org chart with multi parent
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64990
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to find a graphing or charting package that can produce what you want.
 
Tien Nguyen Doan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please explain your idea clearly?
In my opinion, I want to build a tree node look like this:
public class Node {
public int uniqueId;
public int parentId;
public String name;
public List<Node> children = new ArrayList<Node>();
public List<Node> parent = new ArrayList<Node>();
}

And Data table used to create chart as below:
UniqueId | ManagerId | Name

1 0 CEO
2 1 Director 1
3 1 Director 2
4 1 Director 3
5 3 Manager 1
5 4 Manager 1
6 2 Manager 2
7 2 Manager 3
8 2 Manager 4
9 5 Worker 1
10 5 Worker 2
11 6 Worker 3
11 7 Worker 3
11 8 Worker 3
12 6 Worker 4
12 7 Worker 4
12 8 Worker 4
13 6 Worker 5
13 7 Worker 5
13 8 Worker 5

But i don't know to render this chart to JSP by using struts tag?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64990
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't. There is nothing in JSP or Struts to do this. As I said, you'll need to find a product that can do this for you.

Or using technology like in the other questions on this same matter that you have posted (Flex, JavaFX, etc)
 
Tien Nguyen Doan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, I'll find a new way to resolve this problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic