-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample.go
More file actions
56 lines (53 loc) · 1.27 KB
/
sample.go
File metadata and controls
56 lines (53 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package main
import "time"
const DateFormat = "2006-01-02"
func sampleData(from time.Time) []Swimlane {
return []Swimlane{
{
Name: "Backend",
Items: []Bar{
{
Start: from.Format(DateFormat),
End: from.Add(time.Hour * 24 * 14).Format(DateFormat),
GanttBarConfig: GanttBarConfig{
Id: "item-3",
Label: "Milestone support",
HasHandles: true,
},
},
{
Start: from.Add(time.Hour * 24 * 20).Format(DateFormat),
End: from.Add(time.Hour * 24 * 34).Format(DateFormat),
GanttBarConfig: GanttBarConfig{
Id: "item-4",
Label: "Move across lanes",
HasHandles: true,
},
},
},
},
{
Name: "Frontend",
Items: []Bar{
{
Start: from.Add(time.Hour * 24 * 5).Format(DateFormat),
End: from.Add(time.Hour * 24 * 14).Format(DateFormat),
GanttBarConfig: GanttBarConfig{
Id: "item-1",
Label: "Context menu",
HasHandles: true,
},
},
{
Start: from.Add(time.Hour * 24 * 21).Format(DateFormat),
End: from.Add(time.Hour * 24 * 36).Format(DateFormat),
GanttBarConfig: GanttBarConfig{
Id: "item-2",
Label: "Adjust daterange",
HasHandles: true,
},
},
},
},
}
}