You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+37-5Lines changed: 37 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,15 @@ Inspired by Github's contribution chart.
8
8
Based on [D3.js Calendar Heatmap](https://github.com/DKirwan/calendar-heatmap) by [Darragh Kirwan](https://github.com/DKirwan)
9
9
Aaand [Calendar View](https://bl.ocks.org/mbostock/4063318) by [Mike Bostock](https://github.com/mbostock)
10
10
11
-
[](https://rawgit.com/g1eb/angular-calendar-heatmap/master/example.html)
12
-
13
11
## Demo
14
-
15
12
Click <ahref="https://rawgit.com/g1eb/angular-calendar-heatmap/master/example.html"target="_blank">here</a> for a live demo.
16
13
14
+
### Year overview
15
+
[](https://rawgit.com/g1eb/angular-calendar-heatmap/master/example.html)
16
+
17
+
### Daily overview
18
+
[](https://rawgit.com/g1eb/angular-calendar-heatmap/master/example.html)
19
+
17
20
## Installation
18
21
19
22
1) Install 'angular-calendar-heatmap' with bower
@@ -44,19 +47,48 @@ angular.module('myApp', [
44
47
|:------------- |:-------------|:-----:|:-----:|
45
48
| data | Time series data | none | yes |
46
49
| color | Theme hex color | #45ff00 | no |
47
-
| handler | Handler function is fired on click | none | no |
50
+
| handler | Handler function is fired on click of a time entry in daily overview | none | no |
48
51
49
52
### Example data
50
53
51
54
Time series data for each day going 1 year back.
52
55
Each day has a total time tracked (in seconds).
53
-
Details, if provided, are shown in a tooltip.
56
+
Details, if provided, are shown in a tooltip as well as in daily overview.
54
57
55
58
```
56
59
var data = [{
57
60
"date": "2016-01-01",
58
61
"total": 17164,
59
62
"details": [{
63
+
"name": "Project 1",
64
+
"date": "2016-01-01 12:30:45",
65
+
"value": 9192
66
+
}, {
67
+
"name": "Project 2",
68
+
"date": "2016-01-01 13:37:00",
69
+
"value": 6753
70
+
},
71
+
.....
72
+
{
73
+
"name": "Project N",
74
+
"date": "2016-01-01 17:52:41",
75
+
"value": 1219
76
+
}]
77
+
}]
78
+
```
79
+
80
+
### Optimization
81
+
82
+
In some cases details array could be large and in order to fit the data into the tooltip a short summary is generated with distinct projects and their total tracked time for that date.
83
+
In terms of optimization summary data can be computed server-side and passed in using the ``summary'' attribute.
84
+
And in addition to the data structure described above this would result in a summary dictionary with distinct project names and total values of tracked time in seconds, e.g.:
0 commit comments