ganttelastic甘特图:如何在一行显示多个任务?
许多用户希望GanttElastic甘特图插件能够在一行显示多个任务,而非默认的单行单任务模式。本文将探讨实现这一目标的多种方案。
用户尝试过将start和duration属性设为数组,但未能成功。其代码片段展示了单任务配置及数组尝试失败的例子:
tasks = [
{
id: 1,
label: '卢本伟',
number: '',
spe: '',
start: Date.now() - (24 * 8 * 60 * 60 * 1000), // 开始时间
duration: 1 * 24 * 60 * 60 * 1000, // 持续时间
progress: 100,
type: 'project'
}
];
// 失败尝试
{
...
start: [Date.now() - (24 * 5 * 60 * 60 * 1000), Date.now() - (24 * 8 * 60 * 60 * 1000)],
duration: [1 * 24 * 60 * 60 * 1000, 8 * 24 * 60 * 60 * 1000]
}遗憾的是,GanttElastic本身并不直接支持单行多任务显示。其设计理念是每个任务对应甘特图上的一行。 要实现此功能,可考虑以下方案:
直接修改start和duration属性为数组并不能达到预期效果。 需要采用其他方法来实现单行显示多个任务。

以上就是GanttElastic甘特图如何实现单行显示多个任务?的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号