英文:
Cuba-platform : Gantt Chart segments overlap
问题
我目前正在开发一个基于Cuba平台7.2的基于Web的项目管理应用程序。
我想添加一个甘特视图,所以我获取了基于amCharts的Charts插件。
我面临的问题是,对于一个项目(图表中的一行),我可以有时间线上重叠的任务。结果是,这些任务在甘特图中彼此重叠,使分析变得不太容易。
我想知道是否有一种方法可以堆叠与一行相关联的段,而不是让它们都对齐和重叠?
非常感谢您的帮助和时间!
英文:
I'm currently developing a web-based project management app, based on Cuba-platform 7.2.
I wanted to add a Gantt view, so I get Charts plugin derived from amCharts.
The issue I'm facing is that for a project (one line of the chart), I can have tasks overlapping from a timeline point of view. As a result, those tasks overlap each other in the Gantt chart, making it not very easy to analyze.
I was wondering if there would be a way to stack segments associated to a line, instead of having them all aligned and overlapping ?
I thank you very much for your help and time !
答案1
得分: 1
以下是您要翻译的内容:
很难在不检查图表配置和数据示例的情况下提供解决方案,因此我可以提出两个选择:
- 用
duration
替换startDate
和endDate
。第一个段可以有一个可选的start
值。在这种情况下,段将堆叠在一起,例如:
- 由于您不需要在时间轴上反映真实的段位置,您可以将 Gantt 图表 替换为 堆叠条形图,例如,您可以获得以下结果:
英文:
It's hard to provide a solution without inspecting chart configuration and data samples, so I can suggest two options:
- Replace
startDate
andendDate
withduration
. The first segment can have an optionalstart
value. In this case, segments will be stacked to each other, e.g.:
- Since you don't need to reflect the real segment positions on the timeline, you can replace Gantt Chart with Stacked Bar Chart, e.g. you can get the following result:
答案2
得分: 0
首先,非常感谢您的时间!我将尝试在描述我的实体和所需结果时更清楚明确。我拥有多个“项目”实体,每个实体都有一个“任务”实体列表。每个“任务”实体都有一个开始日期和结束日期。
为了填充甘特图,dataContainer 是所有“项目”实体的集合,我使用每个“项目”的“任务”实体集合作为 segmentsField。
问题在于,同一“项目”的“任务”实体在时间线上可能会重叠(例如,任务 1 将从三月持续到七月,任务 2 将从五月持续到十月)。
因此,目前我得到的结果如下所示:
我目前的结果:https://i.stack.imgur.com/px1FZ.png
我希望的结果:https://i.stack.imgur.com/DEt7P.png
当然,如果我有多个项目,每个项目都会按相同的方式显示。您认为这可能吗?
作为一个替代方案,我考虑将甘特图链接到包含所有“任务”实体的 DataContainer,但我没有找到如何将根实体定义为其自身的“segmentField”。也许这对于这个图表来说使用得太“奇特”了...
英文:
first of all thank you very much for your time !
I will try to be clearer in the description of my entities, and the result I would like to get.
I have several "Project" entities each one having a list of "Task" entities. Each "Task" entity has a startDate and an endDate.
In order to populate my Gantt chart, the dataContainer is a Collection of all "Project" entities, and I use the "Task" entities set of each "Project" as segmentsField.
The problem is that "Task" entities of a "Project" may overlap each other from a timeline point of view (for example Task 1 will run from March to July and Task 2 from May to October).
So for now, the result I get looks like the following :
What I have for now : https://i.stack.imgur.com/px1FZ.png
What I would like : https://i.stack.imgur.com/DEt7P.png
Of course, if I have multiple projects, the same display would follow for each.
Do you think it is possible ?
As an alternate solution, I was thinking of linking the Gannt chart to a DataContainer of all the "Task" entities, but I didn't find out how to define the root entity as its own "segmentField". Maybe it is too "exotic" usage of this chart...
答案3
得分: 0
谢谢你的回答,glebfox。
作为解决方案,我最终决定为每个项目创建一个甘特图,在每个项目中,我使用一个服务来提供一个包含任务列表的瞬态实体列表,每个任务只包含一个段落(每个任务1个段落),以便每个任务都在单独的一行上。
英文:
thank you glebfox for your answer.
As a solution, I finally decided to create one Gantt by project, and for each one, I use a Service to provide a list of transcient entities containing a list Task with only one segment (1 by task), so that each one is on a single line.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论