Author
How do i generate dynamic graph in html
Tien Nguyen Doan
Greenhorn
Joined: Mar 29, 2009
Posts: 8
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
Org chart with multi parent
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
You'll need to find a graphing or charting package that can produce what you want.
[Smart Questions ] [JSP FAQ ] [Books by Bear ] [Bear's FrontMan ] [About Bear ]
Tien Nguyen Doan
Greenhorn
Joined: Mar 29, 2009
Posts: 8
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
Joined: Jan 10, 2002
Posts: 56554
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
Joined: Mar 29, 2009
Posts: 8
Thank you, I'll find a new way to resolve this problem.
subject: How do i generate dynamic graph in html