0

除了与时间线视图中的项目进行实际时间映射之外,有没有一种方法可以让项目按照时间戳的顺序按时间顺序排列。此功能将帮助我消除时间戳差异较大的项目之间的差距。

例如 E1:1 E2:6 E3:9

当前时间线视图将其表示为

[1 - E1] 2 3 4 5 [6 - E2] 7 8 [9 - E3]

我想要的是时间顺序

[1 - E1] [2 - E2] [3 - E3]

4

1 回答 1

0

您可以通过使用时间线的 hiddenDates 选项来实现您的要求

{
 "option": "hiddenDates",
 "type": "object|Array",
 "default": "none",
 "description": "This option allows you to hide specific timespans from the time axis. The dates can be supplied as an object: {start: '2014-03-21 00:00:00', end: '2014-03-28 00:00:00', [repeat:'daily']} or as an Array of these objects. The repeat argument is optional. The possible values are (case-sensitive): daily, weekly, monthly, yearly. To hide a weekend, pick any Saturday as start and the following Monday as end and set repeat to weekly."
}

在您的情况下,您可以将 hiddenDates 指定为

var options = {hiddenDates: [{start: '2', end:'6'},{start:'7',end: '9'}]}

如果这不能回答您的问题,我可以提供一个带有解决方案的jsfiddle

最好的问候,贝廷。

于 2018-12-27T08:45:28.513 回答