@liggi/figkit 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ { "type": "bars", "style": "report", "title": "The new reply check catches more, but the ranges still overlap",
2
+ "note": "Share of unsafe replies caught, on the same test set", "unit": "%", "max": 100,
3
+ "range": "likely range (95%)", "each": "replies",
4
+ "bars": [ { "label": "Current check", "value": 64, "low": 53, "high": 74, "n": 72 },
5
+ { "label": "New check", "value": 78, "low": 67, "high": 86, "n": 72, "tone": "accent" } ],
6
+ "source": "Invented example data" }
@@ -0,0 +1,6 @@
1
+ { "type": "dots", "style": "report", "title": "Most builds finish in four minutes; a few take over ten",
2
+ "note": "One dot per build: minutes from push to result", "unit": " min", "summary": "median", "zero": true, "each": "builds",
3
+ "groups": [ { "label": "Main branch", "values": [3.8,4.1,3.6,4.4,3.9,4.0,4.2,3.7,4.6,3.9,4.3,11.8,4.0,3.5,4.1,4.8,3.9,4.2,12.6,4.0,3.8,4.4,4.1,3.7,4.5,3.9,10.4,4.2] },
4
+ { "label": "Pull requests", "values": [4.9,5.2,4.6,5.8,5.1,4.8,6.2,5.0,5.5,4.7,5.3,5.9,5.0,4.9,6.4,5.2,5.6,4.8,5.1,5.4], "tone": "accent" } ],
5
+ "mark": { "group": "Main branch", "value": 12.6, "label": "12.6 min, cache miss" },
6
+ "source": "Invented example data" }
@@ -0,0 +1,40 @@
1
+ {
2
+ "type": "groups",
3
+ "style": "report",
4
+ "title": "Only the new carrier got slower in December",
5
+ "note": "Median days from dispatch to doorstep",
6
+ "unit": " days",
7
+ "series": [
8
+ "Old carrier",
9
+ "New carrier"
10
+ ],
11
+ "groups": [
12
+ {
13
+ "label": "October",
14
+ "values": [
15
+ 2.1,
16
+ 2.0
17
+ ]
18
+ },
19
+ {
20
+ "label": "November",
21
+ "values": [
22
+ 2.2,
23
+ 2.1
24
+ ]
25
+ },
26
+ {
27
+ "label": "December",
28
+ "values": [
29
+ 2.4,
30
+ 3.6
31
+ ]
32
+ }
33
+ ],
34
+ "accent": {
35
+ "series": "New carrier",
36
+ "group": "December",
37
+ "tone": "bad"
38
+ },
39
+ "source": "Invented example data"
40
+ }
@@ -0,0 +1,231 @@
1
+ {
2
+ "type": "heatmap",
3
+ "style": "report",
4
+ "title": "The help desk is busiest midweek mornings",
5
+ "note": "Tickets opened per hour",
6
+ "rows": [
7
+ "Mon",
8
+ "Tue",
9
+ "Wed",
10
+ "Thu",
11
+ "Fri",
12
+ "Sat",
13
+ "Sun"
14
+ ],
15
+ "columns": [
16
+ "12am",
17
+ "1am",
18
+ "2am",
19
+ "3am",
20
+ "4am",
21
+ "5am",
22
+ "6am",
23
+ "7am",
24
+ "8am",
25
+ "9am",
26
+ "10am",
27
+ "11am",
28
+ "12pm",
29
+ "1pm",
30
+ "2pm",
31
+ "3pm",
32
+ "4pm",
33
+ "5pm",
34
+ "6pm",
35
+ "7pm",
36
+ "8pm",
37
+ "9pm",
38
+ "10pm",
39
+ "11pm"
40
+ ],
41
+ "values": [
42
+ [
43
+ 3,
44
+ 2,
45
+ 1,
46
+ 1,
47
+ 1,
48
+ 2,
49
+ 6,
50
+ 14,
51
+ 22,
52
+ 25,
53
+ 27,
54
+ 28,
55
+ 30,
56
+ 29,
57
+ 28,
58
+ 27,
59
+ 26,
60
+ 24,
61
+ 20,
62
+ 16,
63
+ 12,
64
+ 9,
65
+ 6,
66
+ 4
67
+ ],
68
+ [
69
+ 3,
70
+ 2,
71
+ 1,
72
+ 1,
73
+ 1,
74
+ 2,
75
+ 6,
76
+ 15,
77
+ 23,
78
+ 26,
79
+ 28,
80
+ 29,
81
+ 32,
82
+ 30,
83
+ 29,
84
+ 28,
85
+ 27,
86
+ 25,
87
+ 21,
88
+ 17,
89
+ 13,
90
+ 9,
91
+ 6,
92
+ 4
93
+ ],
94
+ [
95
+ 3,
96
+ 2,
97
+ 1,
98
+ 1,
99
+ 1,
100
+ 2,
101
+ 6,
102
+ 15,
103
+ 24,
104
+ 27,
105
+ 29,
106
+ 30,
107
+ 32,
108
+ 31,
109
+ 30,
110
+ 29,
111
+ 28,
112
+ 26,
113
+ 22,
114
+ 17,
115
+ 13,
116
+ 10,
117
+ 6,
118
+ 4
119
+ ],
120
+ [
121
+ 3,
122
+ 2,
123
+ 1,
124
+ 1,
125
+ 1,
126
+ 2,
127
+ 6,
128
+ 14,
129
+ 22,
130
+ 26,
131
+ 28,
132
+ 29,
133
+ 31,
134
+ 30,
135
+ 29,
136
+ 28,
137
+ 27,
138
+ 24,
139
+ 20,
140
+ 16,
141
+ 12,
142
+ 9,
143
+ 6,
144
+ 4
145
+ ],
146
+ [
147
+ 3,
148
+ 2,
149
+ 1,
150
+ 1,
151
+ 1,
152
+ 2,
153
+ 5,
154
+ 13,
155
+ 20,
156
+ 22,
157
+ 24,
158
+ 25,
159
+ 27,
160
+ 26,
161
+ 25,
162
+ 24,
163
+ 23,
164
+ 22,
165
+ 18,
166
+ 14,
167
+ 11,
168
+ 8,
169
+ 5,
170
+ 4
171
+ ],
172
+ [
173
+ 2,
174
+ 1,
175
+ 1,
176
+ 1,
177
+ 1,
178
+ 1,
179
+ 4,
180
+ 8,
181
+ 13,
182
+ 15,
183
+ 16,
184
+ 17,
185
+ 18,
186
+ 17,
187
+ 17,
188
+ 16,
189
+ 16,
190
+ 14,
191
+ 12,
192
+ 10,
193
+ 7,
194
+ 5,
195
+ 4,
196
+ 2
197
+ ],
198
+ [
199
+ 2,
200
+ 1,
201
+ 1,
202
+ 1,
203
+ 1,
204
+ 1,
205
+ 3,
206
+ 8,
207
+ 12,
208
+ 14,
209
+ 15,
210
+ 15,
211
+ 16,
212
+ 16,
213
+ 15,
214
+ 15,
215
+ 14,
216
+ 13,
217
+ 11,
218
+ 9,
219
+ 7,
220
+ 5,
221
+ 3,
222
+ 2
223
+ ]
224
+ ],
225
+ "mark": {
226
+ "row": "Wed",
227
+ "column": "12pm",
228
+ "label": "Busiest: Wed noon"
229
+ },
230
+ "source": "Invented example data"
231
+ }
@@ -0,0 +1,234 @@
1
+ {
2
+ "type": "lines",
3
+ "style": "report",
4
+ "title": "Weekday orders peak at noon",
5
+ "note": "Orders per hour",
6
+ "series": [
7
+ {
8
+ "label": "Weekdays",
9
+ "points": [
10
+ {
11
+ "x": 0,
12
+ "y": 3
13
+ },
14
+ {
15
+ "x": 1,
16
+ "y": 2
17
+ },
18
+ {
19
+ "x": 2,
20
+ "y": 1
21
+ },
22
+ {
23
+ "x": 3,
24
+ "y": 1
25
+ },
26
+ {
27
+ "x": 4,
28
+ "y": 1
29
+ },
30
+ {
31
+ "x": 5,
32
+ "y": 2
33
+ },
34
+ {
35
+ "x": 6,
36
+ "y": 6
37
+ },
38
+ {
39
+ "x": 7,
40
+ "y": 14
41
+ },
42
+ {
43
+ "x": 8,
44
+ "y": 22
45
+ },
46
+ {
47
+ "x": 9,
48
+ "y": 25
49
+ },
50
+ {
51
+ "x": 10,
52
+ "y": 27
53
+ },
54
+ {
55
+ "x": 11,
56
+ "y": 28
57
+ },
58
+ {
59
+ "x": 12,
60
+ "y": 30
61
+ },
62
+ {
63
+ "x": 13,
64
+ "y": 29
65
+ },
66
+ {
67
+ "x": 14,
68
+ "y": 28
69
+ },
70
+ {
71
+ "x": 15,
72
+ "y": 27
73
+ },
74
+ {
75
+ "x": 16,
76
+ "y": 26
77
+ },
78
+ {
79
+ "x": 17,
80
+ "y": 24
81
+ },
82
+ {
83
+ "x": 18,
84
+ "y": 20
85
+ },
86
+ {
87
+ "x": 19,
88
+ "y": 16
89
+ },
90
+ {
91
+ "x": 20,
92
+ "y": 12
93
+ },
94
+ {
95
+ "x": 21,
96
+ "y": 9
97
+ },
98
+ {
99
+ "x": 22,
100
+ "y": 6
101
+ },
102
+ {
103
+ "x": 23,
104
+ "y": 4
105
+ }
106
+ ]
107
+ },
108
+ {
109
+ "label": "Weekends",
110
+ "points": [
111
+ {
112
+ "x": 0,
113
+ "y": 4
114
+ },
115
+ {
116
+ "x": 1,
117
+ "y": 3
118
+ },
119
+ {
120
+ "x": 2,
121
+ "y": 2
122
+ },
123
+ {
124
+ "x": 3,
125
+ "y": 1
126
+ },
127
+ {
128
+ "x": 4,
129
+ "y": 1
130
+ },
131
+ {
132
+ "x": 5,
133
+ "y": 1
134
+ },
135
+ {
136
+ "x": 6,
137
+ "y": 2
138
+ },
139
+ {
140
+ "x": 7,
141
+ "y": 4
142
+ },
143
+ {
144
+ "x": 8,
145
+ "y": 8
146
+ },
147
+ {
148
+ "x": 9,
149
+ "y": 13
150
+ },
151
+ {
152
+ "x": 10,
153
+ "y": 17
154
+ },
155
+ {
156
+ "x": 11,
157
+ "y": 20
158
+ },
159
+ {
160
+ "x": 12,
161
+ "y": 22
162
+ },
163
+ {
164
+ "x": 13,
165
+ "y": 22
166
+ },
167
+ {
168
+ "x": 14,
169
+ "y": 21
170
+ },
171
+ {
172
+ "x": 15,
173
+ "y": 20
174
+ },
175
+ {
176
+ "x": 16,
177
+ "y": 19
178
+ },
179
+ {
180
+ "x": 17,
181
+ "y": 18
182
+ },
183
+ {
184
+ "x": 18,
185
+ "y": 17
186
+ },
187
+ {
188
+ "x": 19,
189
+ "y": 15
190
+ },
191
+ {
192
+ "x": 20,
193
+ "y": 13
194
+ },
195
+ {
196
+ "x": 21,
197
+ "y": 10
198
+ },
199
+ {
200
+ "x": 22,
201
+ "y": 8
202
+ },
203
+ {
204
+ "x": 23,
205
+ "y": 6
206
+ }
207
+ ]
208
+ }
209
+ ],
210
+ "accent": "Weekdays",
211
+ "mark": {
212
+ "x": 12,
213
+ "label": "30 at noon"
214
+ },
215
+ "xTicks": [
216
+ {
217
+ "x": 0,
218
+ "label": "12am"
219
+ },
220
+ {
221
+ "x": 6,
222
+ "label": "6am"
223
+ },
224
+ {
225
+ "x": 12,
226
+ "label": "12pm"
227
+ },
228
+ {
229
+ "x": 18,
230
+ "label": "6pm"
231
+ }
232
+ ],
233
+ "source": "Invented example data"
234
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "type": "panels",
3
+ "style": "report",
4
+ "chart": "groups",
5
+ "title": "The cheaper plan answers almost as fast as the premium one",
6
+ "note": "Share of tickets answered within an hour",
7
+ "unit": "%",
8
+ "max": 100,
9
+ "series": [
10
+ "Basic",
11
+ "Standard",
12
+ "Premium"
13
+ ],
14
+ "accent": {
15
+ "series": "Standard"
16
+ },
17
+ "panels": [
18
+ {
19
+ "label": "Email",
20
+ "groups": [
21
+ {
22
+ "label": "Weekdays",
23
+ "values": [
24
+ 61,
25
+ 84,
26
+ 89
27
+ ]
28
+ },
29
+ {
30
+ "label": "Weekends",
31
+ "values": [
32
+ 38,
33
+ 70,
34
+ 74
35
+ ]
36
+ }
37
+ ]
38
+ },
39
+ {
40
+ "label": "Chat",
41
+ "groups": [
42
+ {
43
+ "label": "Weekdays",
44
+ "values": [
45
+ 72,
46
+ 91,
47
+ 94
48
+ ]
49
+ },
50
+ {
51
+ "label": "Weekends",
52
+ "values": [
53
+ 55,
54
+ 83,
55
+ 86
56
+ ]
57
+ }
58
+ ]
59
+ }
60
+ ],
61
+ "source": "Invented example data"
62
+ }
@@ -0,0 +1,6 @@
1
+ { "type": "scatter", "style": "report", "title": "Bigger pull requests wait longer for review",
2
+ "note": "One dot per merged pull request", "x": { "label": "Lines changed", "log": true }, "y": { "label": "Time to first review", "time": "hours", "zero": true },
3
+ "points": [ {"x":12,"y":1.5},{"x":30,"y":2.1},{"x":8,"y":0.6},{"x":45,"y":3.2},{"x":120,"y":5.5},{"x":260,"y":9.1},{"x":75,"y":2.8},
4
+ {"x":18,"y":1.1},{"x":540,"y":22.0,"label":"Search rewrite","tone":"accent"},{"x":95,"y":6.0},{"x":160,"y":4.2},{"x":22,"y":3.9},
5
+ {"x":64,"y":2.2},{"x":310,"y":12.5},{"x":40,"y":1.8},{"x":5,"y":0.4},{"x":210,"y":7.7},{"x":880,"y":30.5},{"x":15,"y":0.9},{"x":130,"y":3.6} ],
6
+ "source": "Invented example data" }
@@ -0,0 +1,67 @@
1
+ {
2
+ "type": "sequence",
3
+ "title": "The shopper has an order number before the receipt is sent",
4
+ "participants": [
5
+ {
6
+ "id": "app",
7
+ "name": "Shop app",
8
+ "kind": "browser"
9
+ },
10
+ {
11
+ "id": "api",
12
+ "name": "Checkout API"
13
+ },
14
+ {
15
+ "id": "pay",
16
+ "name": "Card processor"
17
+ },
18
+ {
19
+ "id": "mail",
20
+ "name": "Email queue"
21
+ }
22
+ ],
23
+ "messages": [
24
+ {
25
+ "from": "app",
26
+ "to": "api",
27
+ "label": "Place order"
28
+ },
29
+ {
30
+ "from": "api",
31
+ "to": "api",
32
+ "label": "Check stock and price"
33
+ },
34
+ {
35
+ "from": "api",
36
+ "to": "pay",
37
+ "label": "Charge the card",
38
+ "tone": "accent"
39
+ },
40
+ {
41
+ "from": "pay",
42
+ "to": "api",
43
+ "label": "Approved or declined",
44
+ "reply": true,
45
+ "tone": "accent"
46
+ },
47
+ {
48
+ "from": "api",
49
+ "to": "app",
50
+ "label": "Order number",
51
+ "reply": true
52
+ },
53
+ {
54
+ "from": "api",
55
+ "to": "mail",
56
+ "label": "Send the receipt",
57
+ "note": "within a minute"
58
+ }
59
+ ],
60
+ "repeats": [
61
+ {
62
+ "from": 3,
63
+ "to": 4,
64
+ "label": "Up to 3 tries"
65
+ }
66
+ ]
67
+ }
@@ -0,0 +1,6 @@
1
+ { "type": "series", "style": "report", "title": "The weekly pass rate dipped in week 6, beyond its usual range",
2
+ "note": "Share of test runs that passed, each week", "unit": "%", "zero": false, "range": "likely range (95%)",
3
+ "points": [ {"x":1,"y":91,"low":86,"high":94}, {"x":2,"y":93,"low":88,"high":96}, {"x":3,"y":90,"low":85,"high":94},
4
+ {"x":4,"y":92,"low":87,"high":95}, {"x":5,"y":91,"low":86,"high":95}, {"x":6,"y":79,"low":72,"high":85},
5
+ {"x":7,"y":89,"low":84,"high":93}, {"x":8,"y":92,"low":87,"high":95} ],
6
+ "mark": { "x": 6, "label": "79%, week 6" }, "source": "Invented example data" }
@@ -0,0 +1,4 @@
1
+ { "type": "units", "style": "report", "title": "11 of the 29 flagged days were real problems",
2
+ "note": "One square per day the monitor flagged in October", "total": 29,
3
+ "parts": [ { "label": "real problems", "count": 11 } ], "rest": "false alarms",
4
+ "source": "Invented example data" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liggi/figkit",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Explanatory figures for agents and people: write a little HTML or a chart spec, get a laid-out PNG and a list of what is wrong with it.",
5
5
  "license": "MIT",
6
6
  "type": "module",