如果节点增加,如何显示组织结构图 [英] How to display Organisation Chart if node increases

查看:77
本文介绍了如果节点增加,如何显示组织结构图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做C#Winform应用程序,我在其中创建了组织结构图,其中

1.我将所有角色显示为来自表格的节点。

2.所有父母和子节点显示为方框。

3.这将显示在某个级别,但如果级别增加,这将不会显示在屏幕上。为此,我调整框大小但不能成功。

可能是什么问题或我必须做些什么来解决问题。

提前谢谢

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

推荐答案

请看我对这个问题的评论。这不是真正的信息,所以我只能给你最一般的想法。



使用以下方法解决这些问题:1)滚动和平移,这将允许你到达你的图表的任何部分,无论它从scree伸出多远; 2)缩小图表,这样无论它有多大都可以看到它。



最有可能的是,上面提到的两个特征应该由一些补充允许您将图块移动到不同位置的功能,所有连接器应遵循其目标块(节点)。它可以通过用户选择和移动节点以交互方式完成,也可以自动完成。第一个问题更容易解决,但这两个问题都很难解决。



在这两种情况下,连接器都可以相互强力拦截,因此您可能需要优化其外观。您可以手动执行此操作,因此您需要在连接器上引入可以拖动的点,在这些点处以某个角度断开线。到目前为止,我看到的大多数图表程序都存在一些问题。一个很好的例子是ArgoUML。请仔细阅读,了解如何很好地解决这个问题:

http:// en .wikipedia.org / wiki / ArgoUML [ ^ ] ,

http://argouml.tigris.org/ [ ^ ]。



另一种方法是自动所谓的线路选择。我看到很少有这个功能的应用程序,从来没有看到一个以令人满意的质量解决这个问题。所有图表的全自动布局都是一样的。即使有一些更好的具有这些功能的应用程序确实存在,但我不知道它们,我的陈述应该给你关于这个问题的难度的想法。因此,我不建议你去交互式布局操作之上的任何地方。



最后,有一种完全不同的方法。也许您的数据结构允许所有任意图形的类的某些有限子类,因为它在某种程度上是专门的并且由您的应用程序要求简化。那么可能存在一些全自动布局算法,它可以让你不增加图的宽度;但拉伸只是向下,具有固定或更小的宽度。但这种情况不太可能。



-SA
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


这篇关于如果节点增加,如何显示组织结构图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆