@cdc/core 4.25.11 → 4.26.2

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.
Files changed (147) hide show
  1. package/.claude/agents/qa-test-developer.md +126 -0
  2. package/CLAUDE.local.md +67 -0
  3. package/_stories/Gallery.Charts.stories.tsx +300 -0
  4. package/_stories/Gallery.DataBite.stories.tsx +79 -0
  5. package/_stories/Gallery.Maps.stories.tsx +239 -0
  6. package/_stories/Gallery.WaffleChart.stories.tsx +187 -0
  7. package/_stories/PageART.stories.tsx +193 -0
  8. package/_stories/PageBRFSS.stories.tsx +294 -0
  9. package/_stories/PageCancerRegistries.stories.tsx +199 -0
  10. package/_stories/PageEasternEquineEncephalitis.stories.tsx +216 -0
  11. package/_stories/PageExcessiveAlcoholUse.stories.tsx +201 -0
  12. package/_stories/PageMaternalMortality.stories.tsx +193 -0
  13. package/_stories/PageOralHealth.stories.tsx +201 -0
  14. package/_stories/PageRespiratory.stories.tsx +332 -0
  15. package/_stories/PageSmokingTobacco.stories.tsx +200 -0
  16. package/_stories/PageStateDiabetesProfiles.stories.tsx +201 -0
  17. package/_stories/PageWastewater.stories.tsx +477 -0
  18. package/_stories/VegaImport.stories.tsx +401 -0
  19. package/_stories/vega-fixtures/bars-with-line.json +444 -0
  20. package/_stories/vega-fixtures/bars.json +58 -0
  21. package/_stories/vega-fixtures/combo-bar-rolling-mean.json +88 -0
  22. package/_stories/vega-fixtures/combo.json +68 -0
  23. package/_stories/vega-fixtures/grouped-horizontal-bars.json +83 -0
  24. package/_stories/vega-fixtures/grouped-horizontal-bars2.json +231 -0
  25. package/_stories/vega-fixtures/horizontal-bar.json +427 -0
  26. package/_stories/vega-fixtures/horizontal-bars-with-bad-colors.json +197 -0
  27. package/_stories/vega-fixtures/horizontal-bars2.json +58 -0
  28. package/_stories/vega-fixtures/lines.json +227 -0
  29. package/_stories/vega-fixtures/measles-bars.json +348 -0
  30. package/_stories/vega-fixtures/measles-map.json +11101 -0
  31. package/_stories/vega-fixtures/measles-stacked-bars.json +2147 -0
  32. package/_stories/vega-fixtures/multi-dataset.json +255 -0
  33. package/_stories/vega-fixtures/no-data.json +14 -0
  34. package/_stories/vega-fixtures/pie-chart.json +94 -0
  35. package/_stories/vega-fixtures/repeat-spec.json +47 -0
  36. package/_stories/vega-fixtures/stacked-area.json +222 -0
  37. package/_stories/vega-fixtures/stacked-bar-with-rect.json +3412 -0
  38. package/_stories/vega-fixtures/stacked-bars-with-line.json +364 -0
  39. package/_stories/vega-fixtures/stacked-bars.json +212 -0
  40. package/_stories/vega-fixtures/stacked-horizontal-bars.json +140 -0
  41. package/_stories/vega-fixtures/warning-combo.json +59 -0
  42. package/_stories/vega-fixtures/warning-scatter-and-line.json +1182 -0
  43. package/assets/icon-chart-area.svg +1 -0
  44. package/assets/icon-chart-radar.svg +23 -0
  45. package/assets/icon-magnifying-glass.svg +5 -0
  46. package/assets/icon-warming-stripes.svg +13 -0
  47. package/assets/logo2.svg +31 -0
  48. package/components/AdvancedEditor/AdvancedEditor.tsx +4 -0
  49. package/components/AdvancedEditor/EmbedEditor.tsx +513 -0
  50. package/components/ComboBox/ComboBox.tsx +345 -0
  51. package/components/ComboBox/combobox.styles.css +185 -0
  52. package/components/ComboBox/index.ts +1 -0
  53. package/components/CustomColorsEditor/CustomColorsEditor.tsx +3 -10
  54. package/components/DataTable/DataTable.tsx +132 -58
  55. package/components/DataTable/data-table.css +216 -215
  56. package/components/DataTable/helpers/getSeriesName.ts +6 -0
  57. package/components/DataTable/helpers/mapCellMatrix.tsx +14 -6
  58. package/components/EditorPanel/ColumnsEditor.tsx +37 -19
  59. package/components/EditorPanel/DataTableEditor.tsx +51 -25
  60. package/components/EditorPanel/EditorPanel.styles.css +16 -0
  61. package/components/EditorPanel/EditorPanel.tsx +144 -0
  62. package/components/EditorPanel/EditorPanelDispatch.tsx +75 -0
  63. package/components/EditorPanel/FieldSetWrapper.tsx +66 -23
  64. package/components/EditorPanel/Inputs.tsx +33 -7
  65. package/components/EditorPanel/VizFilterEditor/NestedDropdownEditor.tsx +14 -6
  66. package/components/EditorPanel/VizFilterEditor/VizFilterEditor.tsx +240 -175
  67. package/components/EditorPanel/VizFilterEditor/components/FilterOrder.tsx +33 -29
  68. package/components/EditorPanel/sections/VisualSection.tsx +169 -0
  69. package/components/Filters/Filters.tsx +31 -5
  70. package/components/Filters/helpers/getNestedOptions.ts +2 -1
  71. package/components/Filters/helpers/handleSorting.ts +1 -1
  72. package/components/Layout/components/Sidebar/components/sidebar.styles.scss +84 -2
  73. package/components/Layout/components/Visualization/index.tsx +27 -1
  74. package/components/Layout/components/Visualization/visualizations.scss +7 -0
  75. package/components/Legend/Legend.Gradient.tsx +1 -1
  76. package/components/MediaControls.tsx +53 -28
  77. package/components/_stories/CustomColorsEditor.stories.tsx +37 -0
  78. package/components/_stories/DataTable.stories.tsx +1 -0
  79. package/components/ui/Icon.tsx +3 -1
  80. package/components/ui/Title/index.tsx +30 -2
  81. package/components/ui/Title/title.styles.css +42 -0
  82. package/data/colorPalettes.ts +18 -5
  83. package/data/mapColorPalettes.ts +10 -0
  84. package/devTemplate/dev.js +235 -0
  85. package/devTemplate/index.html +30 -0
  86. package/devTemplate/preview.html +1503 -0
  87. package/devTemplate/sidebar.css +151 -0
  88. package/dist/cove-main.css +2803 -4448
  89. package/dist/cove-main.css.map +1 -1
  90. package/generateViteConfig.js +118 -2
  91. package/helpers/DataTransform.ts +1 -5
  92. package/helpers/addValuesToFilters.ts +6 -1
  93. package/helpers/cove/date.ts +33 -1
  94. package/helpers/cove/string.ts +29 -0
  95. package/helpers/coveUpdateWorker.ts +21 -12
  96. package/helpers/embed/embedCodeGenerator.ts +80 -0
  97. package/helpers/embed/embedHelper.js +158 -0
  98. package/helpers/embed/filterUtils.ts +121 -0
  99. package/helpers/embed/index.ts +21 -0
  100. package/helpers/embed/urlValidation.ts +119 -0
  101. package/helpers/filterVizData.ts +6 -1
  102. package/helpers/getFileExtension.ts +0 -6
  103. package/helpers/getUniqueValues.ts +19 -0
  104. package/helpers/hashObj.ts +25 -0
  105. package/helpers/isRightAlignedTableValue.js +5 -0
  106. package/helpers/metrics/helpers.ts +1 -0
  107. package/helpers/metrics/types.ts +3 -0
  108. package/helpers/palettes/colorDistributions.ts +1 -1
  109. package/helpers/palettes/utils.ts +12 -12
  110. package/helpers/parseCsvWithQuotes.ts +15 -14
  111. package/helpers/pivotData.ts +2 -2
  112. package/helpers/prepareScreenshot.ts +288 -0
  113. package/helpers/queryStringUtils.ts +29 -0
  114. package/helpers/testing.ts +44 -0
  115. package/helpers/tests/DataTransform.test.ts +125 -0
  116. package/helpers/tests/date.test.ts +64 -0
  117. package/helpers/tests/prepareScreenshot.test.ts +414 -0
  118. package/helpers/tests/queryStringUtils.test.ts +381 -0
  119. package/helpers/tests/testStandaloneBuild.ts +23 -5
  120. package/helpers/useDataVizClasses.ts +0 -1
  121. package/helpers/vegaConfig.ts +1 -1
  122. package/helpers/vegaConfigImport.ts +160 -0
  123. package/helpers/ver/4.26.1.ts +80 -0
  124. package/helpers/ver/4.26.2.ts +84 -0
  125. package/helpers/ver/tests/4.26.1.test.ts +105 -0
  126. package/helpers/ver/tests/4.26.2.test.ts +298 -0
  127. package/helpers/viewports.ts +2 -0
  128. package/hooks/useDataColumns.ts +63 -0
  129. package/hooks/useFilterManagement.ts +94 -0
  130. package/hooks/useLegendSeparators.ts +26 -0
  131. package/hooks/useListManagement.ts +192 -0
  132. package/package.json +29 -33
  133. package/styles/_button-section.scss +0 -3
  134. package/styles/v2/components/editor.scss +9 -9
  135. package/styles/v2/utils/_grid.scss +8 -3
  136. package/types/Annotation.ts +10 -11
  137. package/types/Axis.ts +1 -0
  138. package/types/ForecastingSeriesKey.ts +1 -0
  139. package/types/General.ts +2 -0
  140. package/types/MarkupInclude.ts +1 -0
  141. package/types/Palette.ts +21 -0
  142. package/types/Series.ts +3 -0
  143. package/types/Table.ts +1 -0
  144. package/types/Visualization.ts +7 -0
  145. package/types/VizFilter.ts +1 -0
  146. package/LICENSE +0 -201
  147. package/_stories/StoryRenderingTests.stories.tsx +0 -164
@@ -0,0 +1,427 @@
1
+ {
2
+ "$schema": "https://vega.github.io/schema/vega/v5.json",
3
+ "description": "A top-k bar chart ranking film directors by revenue.",
4
+ "width": 500,
5
+ "height": 410,
6
+ "padding": 5,
7
+ "autosize": "fit",
8
+ "signals": [
9
+ {
10
+ "name": "k",
11
+ "value": 20,
12
+ "bind": {
13
+ "input": "range",
14
+ "min": 10,
15
+ "max": 30,
16
+ "step": 1
17
+ }
18
+ },
19
+ {
20
+ "name": "op",
21
+ "value": "average",
22
+ "bind": {
23
+ "input": "select",
24
+ "options": [
25
+ "average",
26
+ "median",
27
+ "sum"
28
+ ]
29
+ }
30
+ },
31
+ {
32
+ "name": "label",
33
+ "value": {
34
+ "average": "Average",
35
+ "median": "Median",
36
+ "sum": "Total"
37
+ }
38
+ }
39
+ ],
40
+ "title": {
41
+ "text": "top directors",
42
+ "anchor": "start",
43
+ "frame": "group"
44
+ },
45
+ "marks": [
46
+ {
47
+ "type": "rect",
48
+ "from": {
49
+ "data": "directors"
50
+ },
51
+ "encode": {
52
+ "update": {
53
+ "x": {
54
+ "scale": "x",
55
+ "value": 0
56
+ },
57
+ "x2": {
58
+ "scale": "x",
59
+ "field": "Gross"
60
+ },
61
+ "y": {
62
+ "scale": "y",
63
+ "field": "Director"
64
+ },
65
+ "height": {
66
+ "scale": "y",
67
+ "band": 1
68
+ }
69
+ }
70
+ }
71
+ }
72
+ ],
73
+ "scales": [
74
+ {
75
+ "name": "x",
76
+ "type": "linear",
77
+ "domain": {
78
+ "data": "directors",
79
+ "field": "Gross"
80
+ },
81
+ "range": "width",
82
+ "nice": true
83
+ },
84
+ {
85
+ "name": "y",
86
+ "type": "band",
87
+ "domain": {
88
+ "data": "directors",
89
+ "field": "Director",
90
+ "sort": {
91
+ "op": "max",
92
+ "field": "Gross",
93
+ "order": "descending"
94
+ }
95
+ },
96
+ "range": "height",
97
+ "padding": 0.1
98
+ }
99
+ ],
100
+ "axes": [
101
+ {
102
+ "scale": "x",
103
+ "orient": "bottom",
104
+ "format": "$,d",
105
+ "tickCount": 5
106
+ },
107
+ {
108
+ "scale": "y",
109
+ "orient": "left"
110
+ }
111
+ ],
112
+ "data": [
113
+ {
114
+ "name": "directors",
115
+ "values": [
116
+ {
117
+ "Title": "Following",
118
+ "US Gross": 44705,
119
+ "Worldwide Gross": 44705,
120
+ "US DVD Sales": null,
121
+ "Production Budget": 6000,
122
+ "Release Date": "Apr 04 1999",
123
+ "MPAA Rating": "R",
124
+ "Running Time min": null,
125
+ "Distributor": "Zeitgeist",
126
+ "Source": null,
127
+ "Major Genre": null,
128
+ "Creative Type": null,
129
+ "Director": "Christopher Nolan",
130
+ "Rotten Tomatoes Rating": null,
131
+ "IMDB Rating": 7.7,
132
+ "IMDB Votes": 15133
133
+ },
134
+ {
135
+ "Title": "Pirates",
136
+ "US Gross": 1641825,
137
+ "Worldwide Gross": 6341825,
138
+ "US DVD Sales": null,
139
+ "Production Budget": 40000000,
140
+ "Release Date": "Jul 01 1986",
141
+ "MPAA Rating": "R",
142
+ "Running Time min": null,
143
+ "Distributor": null,
144
+ "Source": null,
145
+ "Major Genre": null,
146
+ "Creative Type": null,
147
+ "Director": "Roman Polanski",
148
+ "Rotten Tomatoes Rating": 25,
149
+ "IMDB Rating": 5.8,
150
+ "IMDB Votes": 3275
151
+ },
152
+ {
153
+ "Title": "Tora, Tora, Tora",
154
+ "US Gross": 29548291,
155
+ "Worldwide Gross": 29548291,
156
+ "US DVD Sales": null,
157
+ "Production Budget": 25000000,
158
+ "Release Date": "Sep 23 1970",
159
+ "MPAA Rating": null,
160
+ "Running Time min": null,
161
+ "Distributor": null,
162
+ "Source": null,
163
+ "Major Genre": null,
164
+ "Creative Type": null,
165
+ "Director": "Richard Fleischer",
166
+ "Rotten Tomatoes Rating": null,
167
+ "IMDB Rating": null,
168
+ "IMDB Votes": null
169
+ },
170
+ {
171
+ "Title": "Darling Lili",
172
+ "US Gross": 5000000,
173
+ "Worldwide Gross": 5000000,
174
+ "US DVD Sales": null,
175
+ "Production Budget": 22000000,
176
+ "Release Date": "Jan 01 1970",
177
+ "MPAA Rating": null,
178
+ "Running Time min": null,
179
+ "Distributor": null,
180
+ "Source": null,
181
+ "Major Genre": null,
182
+ "Creative Type": null,
183
+ "Director": "Blake Edwards",
184
+ "Rotten Tomatoes Rating": null,
185
+ "IMDB Rating": 6.1,
186
+ "IMDB Votes": 858
187
+ },
188
+ {
189
+ "Title": "12 Angry Men",
190
+ "US Gross": 0,
191
+ "Worldwide Gross": 0,
192
+ "US DVD Sales": null,
193
+ "Production Budget": 340000,
194
+ "Release Date": "Apr 13 1957",
195
+ "MPAA Rating": null,
196
+ "Running Time min": null,
197
+ "Distributor": "United Artists",
198
+ "Source": "Original Screenplay",
199
+ "Major Genre": "Drama",
200
+ "Creative Type": null,
201
+ "Director": "Sidney Lumet",
202
+ "Rotten Tomatoes Rating": null,
203
+ "IMDB Rating": 8.9,
204
+ "IMDB Votes": 119101
205
+ },
206
+ {
207
+ "Title": "Twelve Monkeys",
208
+ "US Gross": 57141459,
209
+ "Worldwide Gross": 168841459,
210
+ "US DVD Sales": null,
211
+ "Production Budget": 29000000,
212
+ "Release Date": "Dec 27 1995",
213
+ "MPAA Rating": "R",
214
+ "Running Time min": null,
215
+ "Distributor": "Universal",
216
+ "Source": "Based on Short Film",
217
+ "Major Genre": "Drama",
218
+ "Creative Type": "Science Fiction",
219
+ "Director": "Terry Gilliam",
220
+ "Rotten Tomatoes Rating": null,
221
+ "IMDB Rating": 8.1,
222
+ "IMDB Votes": 169858
223
+ },
224
+ {
225
+ "Title": 1941,
226
+ "US Gross": 34175000,
227
+ "Worldwide Gross": 94875000,
228
+ "US DVD Sales": null,
229
+ "Production Budget": 32000000,
230
+ "Release Date": "Dec 14 1979",
231
+ "MPAA Rating": null,
232
+ "Running Time min": null,
233
+ "Distributor": "Universal",
234
+ "Source": "Original Screenplay",
235
+ "Major Genre": "Comedy",
236
+ "Creative Type": "Historical Fiction",
237
+ "Director": "Steven Spielberg",
238
+ "Rotten Tomatoes Rating": 33,
239
+ "IMDB Rating": 5.6,
240
+ "IMDB Votes": 13364
241
+ },
242
+ {
243
+ "Title": "2001: A Space Odyssey",
244
+ "US Gross": 56700000,
245
+ "Worldwide Gross": 68700000,
246
+ "US DVD Sales": null,
247
+ "Production Budget": 10500000,
248
+ "Release Date": "Apr 02 1968",
249
+ "MPAA Rating": null,
250
+ "Running Time min": null,
251
+ "Distributor": null,
252
+ "Source": "Original Screenplay",
253
+ "Major Genre": null,
254
+ "Creative Type": "Science Fiction",
255
+ "Director": "Stanley Kubrick",
256
+ "Rotten Tomatoes Rating": 96,
257
+ "IMDB Rating": 8.4,
258
+ "IMDB Votes": 160342
259
+ },
260
+ {
261
+ "Title": "20,000 Leagues Under the Sea",
262
+ "US Gross": 28200000,
263
+ "Worldwide Gross": 28200000,
264
+ "US DVD Sales": null,
265
+ "Production Budget": 5000000,
266
+ "Release Date": "Dec 23 1954",
267
+ "MPAA Rating": null,
268
+ "Running Time min": null,
269
+ "Distributor": "Walt Disney Pictures",
270
+ "Source": "Based on Book/Short Story",
271
+ "Major Genre": "Adventure",
272
+ "Creative Type": null,
273
+ "Director": "Richard Fleischer",
274
+ "Rotten Tomatoes Rating": 92,
275
+ "IMDB Rating": null,
276
+ "IMDB Votes": null
277
+ },
278
+ {
279
+ "Title": "24 7: Twenty Four Seven",
280
+ "US Gross": 72544,
281
+ "Worldwide Gross": 72544,
282
+ "US DVD Sales": null,
283
+ "Production Budget": 2000000,
284
+ "Release Date": "Apr 15 1998",
285
+ "MPAA Rating": "R",
286
+ "Running Time min": null,
287
+ "Distributor": "October Films",
288
+ "Source": "Original Screenplay",
289
+ "Major Genre": "Comedy",
290
+ "Creative Type": null,
291
+ "Director": "Shane Meadows",
292
+ "Rotten Tomatoes Rating": null,
293
+ "IMDB Rating": 6.9,
294
+ "IMDB Votes": 1417
295
+ },
296
+ {
297
+ "Title": "Twin Falls Idaho",
298
+ "US Gross": 985341,
299
+ "Worldwide Gross": 1027228,
300
+ "US DVD Sales": null,
301
+ "Production Budget": 500000,
302
+ "Release Date": "Jul 30 1999",
303
+ "MPAA Rating": "R",
304
+ "Running Time min": null,
305
+ "Distributor": "Sony Pictures Classics",
306
+ "Source": "Original Screenplay",
307
+ "Major Genre": "Drama",
308
+ "Creative Type": "Contemporary Fiction",
309
+ "Director": "Michael Polish",
310
+ "Rotten Tomatoes Rating": 77,
311
+ "IMDB Rating": 7.1,
312
+ "IMDB Votes": 2810
313
+ },
314
+ {
315
+ "Title": "3 Men and a Baby",
316
+ "US Gross": 167780960,
317
+ "Worldwide Gross": 167780960,
318
+ "US DVD Sales": null,
319
+ "Production Budget": 15000000,
320
+ "Release Date": "Nov 25 1987",
321
+ "MPAA Rating": null,
322
+ "Running Time min": null,
323
+ "Distributor": "Walt Disney Pictures",
324
+ "Source": "Remake",
325
+ "Major Genre": "Comedy",
326
+ "Creative Type": "Contemporary Fiction",
327
+ "Director": "Leonard Nimoy",
328
+ "Rotten Tomatoes Rating": null,
329
+ "IMDB Rating": 5.7,
330
+ "IMDB Votes": 16764
331
+ },
332
+ {
333
+ "Title": "Four Rooms",
334
+ "US Gross": 4301000,
335
+ "Worldwide Gross": 4301000,
336
+ "US DVD Sales": null,
337
+ "Production Budget": 4000000,
338
+ "Release Date": "Dec 25 1995",
339
+ "MPAA Rating": "R",
340
+ "Running Time min": null,
341
+ "Distributor": "Miramax",
342
+ "Source": "Original Screenplay",
343
+ "Major Genre": "Comedy",
344
+ "Creative Type": "Contemporary Fiction",
345
+ "Director": "Robert Rodriguez",
346
+ "Rotten Tomatoes Rating": 14,
347
+ "IMDB Rating": 6.4,
348
+ "IMDB Votes": 34328
349
+ },
350
+ {
351
+ "Title": "The Four Seasons",
352
+ "US Gross": 42488161,
353
+ "Worldwide Gross": 42488161,
354
+ "US DVD Sales": null,
355
+ "Production Budget": 6500000,
356
+ "Release Date": "May 22 1981",
357
+ "MPAA Rating": null,
358
+ "Running Time min": null,
359
+ "Distributor": "Universal",
360
+ "Source": "Original Screenplay",
361
+ "Major Genre": "Comedy",
362
+ "Creative Type": "Contemporary Fiction",
363
+ "Director": "Alan Alda",
364
+ "Rotten Tomatoes Rating": 71,
365
+ "IMDB Rating": 7,
366
+ "IMDB Votes": 1814
367
+ },
368
+ {
369
+ "Title": "Four Weddings and a Funeral",
370
+ "US Gross": 52700832,
371
+ "Worldwide Gross": 242895809,
372
+ "US DVD Sales": null,
373
+ "Production Budget": 4500000,
374
+ "Release Date": "Mar 09 1994",
375
+ "MPAA Rating": "R",
376
+ "Running Time min": null,
377
+ "Distributor": "Gramercy",
378
+ "Source": "Original Screenplay",
379
+ "Major Genre": "Romantic Comedy",
380
+ "Creative Type": "Contemporary Fiction",
381
+ "Director": "Mike Newell",
382
+ "Rotten Tomatoes Rating": 96,
383
+ "IMDB Rating": 7.1,
384
+ "IMDB Votes": 39003
385
+ }
386
+ ],
387
+ "transform": [
388
+ {
389
+ "type": "filter",
390
+ "expr": "datum.Director != null && datum['Worldwide Gross'] != null"
391
+ },
392
+ {
393
+ "type": "aggregate",
394
+ "groupby": [
395
+ "Director"
396
+ ],
397
+ "ops": [
398
+ "average"
399
+ ],
400
+ "fields": [
401
+ "Worldwide Gross"
402
+ ],
403
+ "as": [
404
+ "Gross"
405
+ ]
406
+ },
407
+ {
408
+ "type": "window",
409
+ "sort": {
410
+ "field": "Gross",
411
+ "order": "descending"
412
+ },
413
+ "ops": [
414
+ "row_number"
415
+ ],
416
+ "as": [
417
+ "rank"
418
+ ]
419
+ },
420
+ {
421
+ "type": "filter",
422
+ "expr": "datum.rank <= k"
423
+ }
424
+ ]
425
+ }
426
+ ]
427
+ }
@@ -0,0 +1,197 @@
1
+ {
2
+ "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
3
+ "data": {
4
+ "name": "barChartData",
5
+ "values": {
6
+ "function": "VegaAggregations.VegaBarChartAggregations"
7
+ }
8
+ },
9
+ "mark": "bar",
10
+ "encoding": {
11
+ "x": {
12
+ "field": "value",
13
+ "type": "quantitative",
14
+ "title": "Total Number of Cases",
15
+ "scale": {
16
+ "domain": {
17
+ "unionWith": [
18
+ 0,
19
+ 7
20
+ ]
21
+ }
22
+ },
23
+ "axis": {
24
+ "format": ",d",
25
+ "tickMinStep": 1,
26
+ "tickCount": 5
27
+ },
28
+ "format": ",d"
29
+ },
30
+ "y": {
31
+ "field": "label",
32
+ "type": "nominal",
33
+ "title": "Age Group",
34
+ "sort": "descending"
35
+ },
36
+ "color": {
37
+ "field": "label",
38
+ "type": "nominal",
39
+ "title": "Age Group",
40
+ "scale": {
41
+ "range": [
42
+ "#E8D166",
43
+ "#A78F19",
44
+ "#11B8B8",
45
+ "#008080",
46
+ "#005252",
47
+ "#013B3B",
48
+ "#E669B9",
49
+ "#9D3F9D",
50
+ "#5C255C"
51
+ ]
52
+ },
53
+ "legend": null
54
+ }
55
+ },
56
+ "height": "container",
57
+ "width": "container",
58
+ "datasets": {
59
+ "barChartData": [
60
+ {
61
+ "value": 5,
62
+ "columnName": "cumulativeCasesAgeGroupBin1",
63
+ "label": "0-10",
64
+ "date": "2025-05-30"
65
+ },
66
+ {
67
+ "value": 114,
68
+ "columnName": "cumulativeCasesAgeGroupBin2",
69
+ "label": "11-20",
70
+ "date": "2025-05-30"
71
+ },
72
+ {
73
+ "value": 1743,
74
+ "columnName": "cumulativeCasesAgeGroupBin3",
75
+ "label": "21-30",
76
+ "date": "2025-05-30"
77
+ },
78
+ {
79
+ "value": 2554,
80
+ "columnName": "cumulativeCasesAgeGroupBin4",
81
+ "label": "31-40",
82
+ "date": "2025-05-30"
83
+ },
84
+ {
85
+ "value": 1144,
86
+ "columnName": "cumulativeCasesAgeGroupBin5",
87
+ "label": "41-50",
88
+ "date": "2025-05-30"
89
+ },
90
+ {
91
+ "value": 457,
92
+ "columnName": "cumulativeCasesAgeGroupBin6",
93
+ "label": "51-60",
94
+ "date": "2025-05-30"
95
+ },
96
+ {
97
+ "value": 81,
98
+ "columnName": "cumulativeCasesAgeGroupBin7",
99
+ "label": "61-70",
100
+ "date": "2025-05-30"
101
+ },
102
+ {
103
+ "value": 9,
104
+ "columnName": "cumulativeCasesAgeGroupBin8",
105
+ "label": "71-84",
106
+ "date": "2025-05-30"
107
+ },
108
+ {
109
+ "value": 1,
110
+ "columnName": "cumulativeCasesAgeGroupBin9",
111
+ "label": "85+",
112
+ "date": "2025-05-30"
113
+ }
114
+ ]
115
+ },
116
+ "config": {
117
+ "background": "#FFFFFF",
118
+ "bar": {
119
+ "fill": "#2D72D2"
120
+ },
121
+ "arc": {
122
+ "fill": "#2D72D2"
123
+ },
124
+ "area": {
125
+ "fill": "#2D72D2"
126
+ },
127
+ "rect": {
128
+ "fill": "#2D72D2"
129
+ },
130
+ "circle": {
131
+ "fill": "#2D72D2"
132
+ },
133
+ "point": {
134
+ "stroke": "#2D72D2"
135
+ },
136
+ "line": {
137
+ "stroke": "#2D72D2"
138
+ },
139
+ "font": "Source-Sans-Pro",
140
+ "padding": 20,
141
+ "mark": {
142
+ "opacity": 0.75,
143
+ "tooltip": true
144
+ },
145
+ "title": {
146
+ "color": "#111418",
147
+ "fontSize": 14,
148
+ "fontWeight": 600,
149
+ "anchor": "start",
150
+ "subtitleColor": "#5F6B7C",
151
+ "subtitleFontSize": 12,
152
+ "subtitlePadding": 7
153
+ },
154
+ "axis": {
155
+ "labelFontSize": 12,
156
+ "titleFontSize": 14,
157
+ "titleFontWeight": 400,
158
+ "titlePadding": 10,
159
+ "titleColor": "#111418",
160
+ "labelColor": "#738091",
161
+ "gridColor": "#DCE0E5",
162
+ "gridOpacity": 1,
163
+ "domainColor": "#5F6B7C",
164
+ "tickColor": "#5F6B7C"
165
+ },
166
+ "legend": {
167
+ "titleColor": "#111418",
168
+ "labelColor": "#111418",
169
+ "titleFontSize": 12,
170
+ "labelFontSize": 12,
171
+ "titleFontWeight": 600
172
+ },
173
+ "view": {
174
+ "stroke": "transparent"
175
+ },
176
+ "text": {
177
+ "color": "#111418",
178
+ "fontSize": 12,
179
+ "fontWeight": 400
180
+ },
181
+ "range": {
182
+ "category": [
183
+ "#2D72D2",
184
+ "#DB2C6F",
185
+ "#8EB125",
186
+ "#9D3F9D",
187
+ "#00A396",
188
+ "#D1980B",
189
+ "#D33D17",
190
+ "#7961DB",
191
+ "#29A634",
192
+ "#946638",
193
+ "#147EB3"
194
+ ]
195
+ }
196
+ }
197
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "$schema": "https://vega.github.io/schema/vega-lite/v6.json",
3
+ "description": "A simple bar chart with embedded data.",
4
+ "data": {
5
+ "values": [
6
+ {
7
+ "a": "A",
8
+ "b": 28
9
+ },
10
+ {
11
+ "a": "B",
12
+ "b": 55
13
+ },
14
+ {
15
+ "a": "C",
16
+ "b": 43
17
+ },
18
+ {
19
+ "a": "D",
20
+ "b": 91
21
+ },
22
+ {
23
+ "a": "E",
24
+ "b": 81
25
+ },
26
+ {
27
+ "a": "F",
28
+ "b": 53
29
+ },
30
+ {
31
+ "a": "G",
32
+ "b": 19
33
+ },
34
+ {
35
+ "a": "H",
36
+ "b": 87
37
+ },
38
+ {
39
+ "a": "I",
40
+ "b": 52
41
+ }
42
+ ]
43
+ },
44
+ "mark": "bar",
45
+ "encoding": {
46
+ "y": {
47
+ "field": "a",
48
+ "type": "nominal",
49
+ "axis": {
50
+ "labelAngle": 0
51
+ }
52
+ },
53
+ "x": {
54
+ "field": "b",
55
+ "type": "quantitative"
56
+ }
57
+ }
58
+ }