File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 60059
    
  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: 60059
    
  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
Favorite Movie
applets
WHY WOMEN LIKES TO SHOW THEIR FLASH UNLIKE MEN.
suite method
Hi