Click here to Skip to main content
15,881,204 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am doing C# Winform application where I have created Organisation chart in which
1. I display all role as nodes which comes from tables.
2. All parent and child nodes are displayed as square box.
3. This will be displayed at certain level but if level increases this will not be displayed on screen.For this i resizes boxes but cannot be succeded.
What may be problem or what i have to do to solve problem.
Thanks in advance
Posted
Comments
Sergey Alexandrovich Kryukov 6-Aug-14 14:08pm    
Please, just think logically about it: what would be the use of such "question"? What help could you possibly expect, based on your information?
This is you who can tell us what is the problem; only then we can help you, if you also provide all essential information with adequate level of detail.
—SA

1 solution

Please see my comment to this question. It's not really informative, so I can only give you the most general ideas.

Such problems are solved using the following approached: 1) scrolling and panning which would allow you to reach any part of your diagram no matter how far it stretches out of the scree; 2) zooming out of the diagram so you could see it all no matter how big it is.

Most likely, the two features pointed out above should be complemented by some features which would allow you to move diagram blocks to different location, and all the connectors should follow its target blocks (nodes). It could be done interactively, by selecting and moving the nodes by the user, or it could be done automatically. First problem is easier to solve, but both problems are difficult enough.

In both cases, the connector can strongly intercept each other, so you may need to optimize its look. You can do it manually, so you would need to introduce the points on the connectors which you can drag, breaking the line at some angle at those points or not. Most diagramming programs I saw so far have some problems with this feature. One good example is ArgoUML. Please look at it, to have an idea how this problem could be solved nicely:
http://en.wikipedia.org/wiki/ArgoUML[^],
http://argouml.tigris.org/[^].

Another approach would be automatic so-called "line routing". I saw few applications with this feature and never ever saw one which solved this problems with satisfactory quality. Same goes about fully automatic layout of all the diagram. Even if some better application with such features do exist, but I am unaware of them, my statement should give you the idea on the difficulty of such problem. Therefore, I would not advise your to go anywhere above the interactive layout operations.

Finally, there is one totally different approach. Perhaps your data structure allows for some limited subclass of the class of all arbitrary graphs, because it is somehow specialized and simplified by your application requirements. Then it might be possible that some fully automatic layout algorithm exist which would allow you not to grow the width of the diagram; but stretch is only down, with a fixed or smaller width. This situation is not very likely though.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900