This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes How do i generate dynamic graph in html Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "How do i generate dynamic graph in html" Watch "How do i generate dynamic graph in html" New topic
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!





[Thumbnail for org_chart_with_multi_parent.jpg]

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60077
    
  65

You'll need to find a graphing or charting package that can produce what you want.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by 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: 60077
    
  65

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do i generate dynamic graph in html
 
Similar Threads
Hi
suite method
WHY WOMEN LIKES TO SHOW THEIR FLASH UNLIKE MEN.
applets
Favorite Movie