@cdc/dashboard 4.24.12 → 4.25.2-25

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 (60) hide show
  1. package/dist/cdcdashboard.js +74365 -72646
  2. package/examples/all-components.json +529 -4607
  3. package/examples/dashboard-gallery.json +397 -397
  4. package/examples/private/DEV-10120.json +1294 -0
  5. package/examples/private/DEV-10527.json +564 -0
  6. package/examples/private/DEV-10586.json +54319 -0
  7. package/examples/private/DEV-10856.json +54319 -0
  8. package/examples/private/DEV-9989.json +229 -0
  9. package/examples/private/art-dashboard.json +2 -2
  10. package/examples/private/bird-flu-2.json +440 -0
  11. package/examples/private/bird-flu.json +413 -0
  12. package/examples/private/dashboard-config-ehdi.json +29915 -0
  13. package/examples/private/dashboard-map-filter.json +815 -0
  14. package/examples/private/dashboard-margins.js +15 -0
  15. package/examples/private/dataset.json +1452 -0
  16. package/examples/private/dev-10856-2.json +1348 -0
  17. package/examples/private/ehdi-data.json +29502 -0
  18. package/examples/private/exposure-source-h5-data.csv +26 -0
  19. package/examples/private/feelings.json +1 -0
  20. package/examples/private/nhis.json +1792 -0
  21. package/examples/private/workforce.json +2041 -0
  22. package/index.html +5 -8
  23. package/package.json +9 -9
  24. package/src/CdcDashboard.tsx +5 -8
  25. package/src/CdcDashboardComponent.tsx +70 -60
  26. package/src/_stories/Dashboard.stories.tsx +63 -0
  27. package/src/_stories/_mock/dashboard-filter-asc.json +551 -0
  28. package/src/_stories/_mock/data-bite-dash-test.json +1 -0
  29. package/src/_stories/_mock/data-bite-dash-test_1.json +1 -0
  30. package/src/_stories/_mock/data-bite-dash-test_1_1.json +1 -0
  31. package/src/_stories/_mock/data-bite-dash-test_1_1_1.json +1 -0
  32. package/src/components/CollapsibleVisualizationRow.tsx +3 -3
  33. package/src/components/Column.tsx +12 -1
  34. package/src/components/DashboardFilters/DashboardFilters.tsx +14 -9
  35. package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +23 -8
  36. package/src/components/DashboardFilters/DashboardFiltersEditor/components/DeleteFilterModal.tsx +13 -3
  37. package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.tsx +130 -41
  38. package/src/components/DashboardFilters/DashboardFiltersEditor/components/NestedDropDownDashboard.tsx +10 -7
  39. package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +11 -12
  40. package/src/components/DashboardFilters/dashboardfilter.styles.css +2 -2
  41. package/src/components/ExpandCollapseButtons.tsx +1 -1
  42. package/src/components/Header/Header.tsx +1 -2
  43. package/src/components/MultiConfigTabs/MultiConfigTabs.tsx +2 -2
  44. package/src/components/MultiConfigTabs/MultiTabs.tsx +1 -1
  45. package/src/components/VisualizationRow.tsx +13 -3
  46. package/src/components/Widget.tsx +9 -3
  47. package/src/helpers/addValuesToDashboardFilters.ts +6 -5
  48. package/src/helpers/apiFilterHelpers.ts +11 -6
  49. package/src/helpers/changeFilterActive.ts +17 -4
  50. package/src/helpers/getFilteredData.ts +13 -4
  51. package/src/helpers/getUpdateConfig.ts +11 -4
  52. package/src/helpers/loadAPIFilters.ts +6 -4
  53. package/src/helpers/tests/updatesChildFilters.test.ts +56 -0
  54. package/src/helpers/updateChildFilters.ts +50 -0
  55. package/src/index.tsx +1 -0
  56. package/src/scss/main.scss +1 -15
  57. package/src/store/dashboard.actions.ts +2 -2
  58. package/src/store/dashboard.reducer.ts +60 -29
  59. package/src/types/DashboardConfig.ts +2 -0
  60. package/src/types/SharedFilter.ts +1 -1
@@ -0,0 +1,551 @@
1
+ {
2
+ "dashboard": {
3
+ "theme": "theme-blue",
4
+ "title": "Amount Filtered by Location and Type ",
5
+ "sharedFilters": [
6
+ {
7
+ "values": [
8
+ "Alaska",
9
+ "Alabama",
10
+ "Arkansas",
11
+ "American Samoa",
12
+ "Arizona"
13
+ ],
14
+ "columnName": "Location",
15
+ "showDropdown": true,
16
+ "usedBy": [
17
+ "data-bite1628875468150",
18
+ "chart1628875631849",
19
+ "data-bite1628876561387",
20
+ "data-bite1628877031319"
21
+ ],
22
+ "tier": 1,
23
+ "type": "datafilter",
24
+ "order": "asc",
25
+ "orderedValues": [
26
+ "American Samoa",
27
+ "Alaska",
28
+ "Alabama",
29
+ "Arizona",
30
+ "Arkansas"
31
+ ]
32
+ },
33
+ {
34
+ "values": [
35
+ "Federal",
36
+ "Local",
37
+ "State"
38
+ ],
39
+ "columnName": "Type",
40
+ "showDropdown": true,
41
+ "usedBy": [
42
+ "data-bite1628875468150",
43
+ "chart1628875631849",
44
+ "data-bite1628876561387",
45
+ "data-bite1628877031319"
46
+ ],
47
+ "tier": 1
48
+ }
49
+ ]
50
+ },
51
+ "rows": [
52
+ {
53
+ "columns": [
54
+ {
55
+ "width": 12,
56
+ "widget": "legacySharedFilters"
57
+ }
58
+ ]
59
+ },
60
+ {
61
+ "columns": [
62
+ {
63
+ "width": 6,
64
+ "widget": "data-bite1628875468150"
65
+ },
66
+ {
67
+ "width": 6,
68
+ "widget": "chart1628875631849"
69
+ },
70
+ {
71
+ "width": null
72
+ }
73
+ ]
74
+ },
75
+ {
76
+ "columns": [
77
+ {
78
+ "width": 6,
79
+ "widget": "data-bite1628877031319"
80
+ },
81
+ {
82
+ "width": 6,
83
+ "widget": "data-bite1628876561387"
84
+ },
85
+ {
86
+ "width": null
87
+ }
88
+ ]
89
+ }
90
+ ],
91
+ "visualizations": {
92
+ "data-bite1628875468150": {
93
+ "type": "data-bite",
94
+ "dataBite": "",
95
+ "dataFunction": "Mean (Average)",
96
+ "dataColumn": "Amount",
97
+ "bitePosition": "Left",
98
+ "biteFontSize": 24,
99
+ "fontSize": "medium",
100
+ "biteBody": "<span style=\"font-size: 20px;\">Average Amount 2019-2021</span> <br>Reflects the average of the dashboard level filter selections within the timeframe available in the data. In this case 2019-2021. \n This number is calculated within the Data Bite module.\n",
101
+ "imageData": {
102
+ "display": "none",
103
+ "url": "",
104
+ "alt": "",
105
+ "options": []
106
+ },
107
+ "dataFormat": {
108
+ "roundToPlace": 0,
109
+ "commas": true,
110
+ "prefix": "",
111
+ "suffix": ""
112
+ },
113
+ "biteStyle": "graphic",
114
+ "filters": [],
115
+ "subtext": "Citation for Source ",
116
+ "title": "",
117
+ "theme": "theme-orange",
118
+ "shadow": true,
119
+ "visual": {
120
+ "border": false,
121
+ "accent": false,
122
+ "background": false,
123
+ "hideBackgroundColor": false,
124
+ "borderColorTheme": false
125
+ },
126
+ "general": {
127
+ "isCompactStyle": false
128
+ },
129
+ "imageUrl": "",
130
+ "prefix": "",
131
+ "suffix": "",
132
+ "uid": "data-bite1628875468150",
133
+ "visualizationType": "data-bite",
134
+ "dataKey": "dashboard_aggregate_example_no_add_fullname.csv",
135
+ "version": "4.25.1",
136
+ "migrations": {
137
+ "addColorMigration": true
138
+ }
139
+ },
140
+ "chart1628875631849": {
141
+ "type": "chart",
142
+ "title": "",
143
+ "theme": "theme-blue",
144
+ "fontSize": "large",
145
+ "height": "200",
146
+ "padding": {
147
+ "left": 5,
148
+ "right": 5
149
+ },
150
+ "yAxis": {
151
+ "size": "80",
152
+ "gridLines": false,
153
+ "label": "Amount",
154
+ "numTicks": "4"
155
+ },
156
+ "barThickness": 0.35,
157
+ "xAxis": {
158
+ "size": "0",
159
+ "tickRotation": 0,
160
+ "dataKey": "Year",
161
+ "label": ""
162
+ },
163
+ "table": {
164
+ "label": "Data Table",
165
+ "expanded": false,
166
+ "show": false
167
+ },
168
+ "legend": {
169
+ "behavior": "isolate",
170
+ "position": "right",
171
+ "hide": true
172
+ },
173
+ "palette": "qualitative-bold",
174
+ "labels": true,
175
+ "dataFormat": {},
176
+ "confidenceKeys": {},
177
+ "uid": "chart1628875631849",
178
+ "visualizationType": "Bar",
179
+ "series": [
180
+ {
181
+ "dataKey": "Amount",
182
+ "type": "Bar"
183
+ }
184
+ ],
185
+ "dataKey": "dashboard_aggregate_example_no_add_fullname.csv"
186
+ },
187
+ "data-bite1628876561387": {
188
+ "type": "data-bite",
189
+ "dataBite": "",
190
+ "dataFunction": "Max",
191
+ "dataColumn": "Amount",
192
+ "bitePosition": "Right",
193
+ "biteFontSize": "58",
194
+ "fontSize": "medium",
195
+ "imageUrl": "",
196
+ "biteBody": "<span style=\"font-size: 24px;\"> Peak Amount</span> <br>Reflects the maximum point of data within the dashboard level filter selections within the timeframe set in the data. In this case 2019-2021. \nThis number is calculated within the Data Bite module.\n",
197
+ "prefix": "",
198
+ "suffix": "",
199
+ "dataFormat": {
200
+ "roundToPlace": 0,
201
+ "commas": true,
202
+ "prefix": "",
203
+ "suffix": ""
204
+ },
205
+ "biteStyle": "title",
206
+ "filters": [],
207
+ "subtext": "Source",
208
+ "title": "",
209
+ "theme": "theme-blue",
210
+ "shadow": true,
211
+ "uid": "data-bite1628876561387",
212
+ "visualizationType": "data-bite",
213
+ "dataKey": "dashboard_aggregate_example_no_add_fullname.csv"
214
+ },
215
+ "data-bite1628877031319": {
216
+ "type": "data-bite",
217
+ "dataBite": "",
218
+ "dataFunction": "Sum",
219
+ "dataColumn": "Amount",
220
+ "bitePosition": "Right",
221
+ "biteFontSize": "58",
222
+ "fontSize": "medium",
223
+ "imageUrl": "",
224
+ "biteBody": "<span style=\"font-size: 24px;\">State Total</span> <br>Reflects the Sum total of the dashboard level filter selections within the timeframe set in the data. In this case 2019-2021. \n This number is calculated within the Data Bite module.\n",
225
+ "prefix": "",
226
+ "suffix": "",
227
+ "dataFormat": {
228
+ "roundToPlace": 0,
229
+ "commas": true,
230
+ "prefix": "",
231
+ "suffix": ""
232
+ },
233
+ "biteStyle": "title",
234
+ "filters": [
235
+ {
236
+ "id": 1738001923264
237
+ }
238
+ ],
239
+ "subtext": "Source ",
240
+ "title": "",
241
+ "theme": "theme-amber",
242
+ "shadow": true,
243
+ "uid": "data-bite1628877031319",
244
+ "visualizationType": "data-bite",
245
+ "dataKey": "dashboard_aggregate_example_no_add_fullname.csv"
246
+ },
247
+ "legacySharedFilters": {
248
+ "type": "dashboardFilters",
249
+ "visualizationType": "dashboardFilters",
250
+ "sharedFilterIndexes": [
251
+ 0,
252
+ 1
253
+ ],
254
+ "filterBehavior": "Filter Change",
255
+ "uid": "legacySharedFilters"
256
+ }
257
+ },
258
+ "table": {
259
+ "label": "Data Table",
260
+ "show": true
261
+ },
262
+ "data": [],
263
+ "dataFileName": "",
264
+ "dataFileSourceType": "",
265
+ "type": "dashboard",
266
+ "uuid": 1628875999137,
267
+ "runtime": {},
268
+ "datasets": {
269
+ "dashboard_aggregate_example_no_add_fullname.csv": {
270
+ "data": [
271
+ {
272
+ "Location": "Alaska",
273
+ "Year": "2019",
274
+ "Type": "Federal",
275
+ "Amount": "1377"
276
+ },
277
+ {
278
+ "Location": "Alaska",
279
+ "Year": "2019",
280
+ "Type": "Local",
281
+ "Amount": "1613"
282
+ },
283
+ {
284
+ "Location": "Alaska",
285
+ "Year": "2019",
286
+ "Type": "State",
287
+ "Amount": "1495"
288
+ },
289
+ {
290
+ "Location": "Alaska",
291
+ "Year": "2020",
292
+ "Type": "Federal",
293
+ "Amount": "1377"
294
+ },
295
+ {
296
+ "Location": "Alaska",
297
+ "Year": "2020",
298
+ "Type": "Local",
299
+ "Amount": "1613"
300
+ },
301
+ {
302
+ "Location": "Alaska",
303
+ "Year": "2020",
304
+ "Type": "State",
305
+ "Amount": "1495"
306
+ },
307
+ {
308
+ "Location": "Alaska",
309
+ "Year": "2021",
310
+ "Type": "Federal",
311
+ "Amount": "1436"
312
+ },
313
+ {
314
+ "Location": "Alaska",
315
+ "Year": "2021",
316
+ "Type": "Local",
317
+ "Amount": "1672"
318
+ },
319
+ {
320
+ "Location": "Alaska",
321
+ "Year": "2021",
322
+ "Type": "State",
323
+ "Amount": "1554"
324
+ },
325
+ {
326
+ "Location": "Alabama",
327
+ "Year": "2019",
328
+ "Type": "Federal",
329
+ "Amount": "1375"
330
+ },
331
+ {
332
+ "Location": "Alabama",
333
+ "Year": "2019",
334
+ "Type": "Local",
335
+ "Amount": "1611"
336
+ },
337
+ {
338
+ "Location": "Alabama",
339
+ "Year": "2019",
340
+ "Type": "State",
341
+ "Amount": "1493"
342
+ },
343
+ {
344
+ "Location": "Alabama",
345
+ "Year": "2020",
346
+ "Type": "Federal",
347
+ "Amount": "1375"
348
+ },
349
+ {
350
+ "Location": "Alabama",
351
+ "Year": "2020",
352
+ "Type": "Local",
353
+ "Amount": "1611"
354
+ },
355
+ {
356
+ "Location": "Alabama",
357
+ "Year": "2020",
358
+ "Type": "State",
359
+ "Amount": "1493"
360
+ },
361
+ {
362
+ "Location": "Alabama",
363
+ "Year": "2021",
364
+ "Type": "Federal",
365
+ "Amount": "1434"
366
+ },
367
+ {
368
+ "Location": "Alabama",
369
+ "Year": "2021",
370
+ "Type": "Local",
371
+ "Amount": "1670"
372
+ },
373
+ {
374
+ "Location": "Alabama",
375
+ "Year": "2021",
376
+ "Type": "State",
377
+ "Amount": "1552"
378
+ },
379
+ {
380
+ "Location": "Arkansas",
381
+ "Year": "2019",
382
+ "Type": "Federal",
383
+ "Amount": "1398"
384
+ },
385
+ {
386
+ "Location": "Arkansas",
387
+ "Year": "2019",
388
+ "Type": "Local",
389
+ "Amount": "1634"
390
+ },
391
+ {
392
+ "Location": "Arkansas",
393
+ "Year": "2019",
394
+ "Type": "State",
395
+ "Amount": "1516"
396
+ },
397
+ {
398
+ "Location": "Arkansas",
399
+ "Year": "2020",
400
+ "Type": "Federal",
401
+ "Amount": "1398"
402
+ },
403
+ {
404
+ "Location": "Arkansas",
405
+ "Year": "2020",
406
+ "Type": "Local",
407
+ "Amount": "1634"
408
+ },
409
+ {
410
+ "Location": "Arkansas",
411
+ "Year": "2020",
412
+ "Type": "State",
413
+ "Amount": "1516"
414
+ },
415
+ {
416
+ "Location": "Arkansas",
417
+ "Year": "2021",
418
+ "Type": "Federal",
419
+ "Amount": "1457"
420
+ },
421
+ {
422
+ "Location": "Arkansas",
423
+ "Year": "2021",
424
+ "Type": "Local",
425
+ "Amount": "1693"
426
+ },
427
+ {
428
+ "Location": "Arkansas",
429
+ "Year": "2021",
430
+ "Type": "State",
431
+ "Amount": "1575"
432
+ },
433
+ {
434
+ "Location": "American Samoa",
435
+ "Year": "2019",
436
+ "Type": "Federal",
437
+ "Amount": "1388"
438
+ },
439
+ {
440
+ "Location": "American Samoa",
441
+ "Year": "2019",
442
+ "Type": "Local",
443
+ "Amount": "1624"
444
+ },
445
+ {
446
+ "Location": "American Samoa",
447
+ "Year": "2019",
448
+ "Type": "State",
449
+ "Amount": "1506"
450
+ },
451
+ {
452
+ "Location": "American Samoa",
453
+ "Year": "2020",
454
+ "Type": "Federal",
455
+ "Amount": "1388"
456
+ },
457
+ {
458
+ "Location": "American Samoa",
459
+ "Year": "2020",
460
+ "Type": "Local",
461
+ "Amount": "1624"
462
+ },
463
+ {
464
+ "Location": "American Samoa",
465
+ "Year": "2020",
466
+ "Type": "State",
467
+ "Amount": "1506"
468
+ },
469
+ {
470
+ "Location": "American Samoa",
471
+ "Year": "2021",
472
+ "Type": "Federal",
473
+ "Amount": "1447"
474
+ },
475
+ {
476
+ "Location": "American Samoa",
477
+ "Year": "2021",
478
+ "Type": "Local",
479
+ "Amount": "1683"
480
+ },
481
+ {
482
+ "Location": "American Samoa",
483
+ "Year": "2021",
484
+ "Type": "State",
485
+ "Amount": "1565"
486
+ },
487
+ {
488
+ "Location": "Arizona",
489
+ "Year": "2019",
490
+ "Type": "Federal",
491
+ "Amount": "1401"
492
+ },
493
+ {
494
+ "Location": "Arizona",
495
+ "Year": "2019",
496
+ "Type": "Local",
497
+ "Amount": "1637"
498
+ },
499
+ {
500
+ "Location": "Arizona",
501
+ "Year": "2019",
502
+ "Type": "State",
503
+ "Amount": "1519"
504
+ },
505
+ {
506
+ "Location": "Arizona",
507
+ "Year": "2020",
508
+ "Type": "Federal",
509
+ "Amount": "1401"
510
+ },
511
+ {
512
+ "Location": "Arizona",
513
+ "Year": "2020",
514
+ "Type": "Local",
515
+ "Amount": "1637"
516
+ },
517
+ {
518
+ "Location": "Arizona",
519
+ "Year": "2020",
520
+ "Type": "State",
521
+ "Amount": "1519"
522
+ },
523
+ {
524
+ "Location": "Arizona",
525
+ "Year": "2021",
526
+ "Type": "Federal",
527
+ "Amount": "1460"
528
+ },
529
+ {
530
+ "Location": "Arizona",
531
+ "Year": "2021",
532
+ "Type": "Local",
533
+ "Amount": "1696"
534
+ },
535
+ {
536
+ "Location": "Arizona",
537
+ "Year": "2021",
538
+ "Type": "State",
539
+ "Amount": "1578"
540
+ }
541
+ ]
542
+ }
543
+ },
544
+ "dataUrl": "",
545
+ "dataDescription": {},
546
+ "formattedData": [],
547
+ "version": "4.25.1",
548
+ "migrations": {
549
+ "addColorMigration": true
550
+ }
551
+ }
@@ -0,0 +1 @@
1
+ {"dashboard":{"theme":"theme-blue","sharedFilters":[],"description":"Dash Description","title":"Dashboard Name"},"rows":[{"columns":[{"width":6,"widget":"data-bite1722537849962"},{"width":6,"widget":"data-bite1728059122204"}],"dataDescription":{"horizontal":false,"series":true,"singleRow":true},"dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}],"visualizations":{"data-bite1722537849962":{"type":"data-bite","dataBite":"","dataFunction":"Sum","dataColumn":"specimens tested","bitePosition":"Left","biteFontSize":24,"fontSize":"medium","biteBody":"specimens tested that would have detected influenza A(H5) or other novel influenza viruses","imageData":{"display":"none","url":"","alt":"","options":[]},"dataFormat":{"roundToPlace":0,"commas":true,"prefix":"","suffix":"+"},"biteStyle":"title","filters":[],"subtext":"","title":"Specimens tested","theme":"theme-blue","shadow":false,"visual":{"border":false,"accent":false,"background":false,"hideBackgroundColor":false,"borderColorTheme":false},"general":{"isCompactStyle":false},"filterBehavior":"Filter Change","openModal":true,"uid":"data-bite1722537849962","visualizationType":"data-bite","dataDescription":{"horizontal":false,"series":true,"singleRow":true},"version":"4.24.10","dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"},"data-bite1728059122204":{"type":"data-bite","dataBite":"","dataFunction":"Sum","dataColumn":"Human cases","bitePosition":"Left","biteFontSize":24,"fontSize":"medium","biteBody":"case detected through national flu surveillance","imageData":{"display":"none","url":"","alt":"","options":[]},"dataFormat":{"roundToPlace":0,"commas":true,"prefix":"","suffix":""},"biteStyle":"title","filters":[],"subtext":"","title":"Human cases","theme":"theme-blue","shadow":false,"visual":{"border":false,"accent":false,"background":false,"hideBackgroundColor":false,"borderColorTheme":false},"general":{"isCompactStyle":false},"filterBehavior":"Filter Change","openModal":true,"uid":"data-bite1728059122204","visualizationType":"data-bite","dataDescription":{"horizontal":false,"series":true,"singleRow":true},"version":"4.24.10","dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}},"table":{"label":"Data Table","show":false,"showDownloadUrl":false,"showVertical":true},"datasets":{"/bird-flu/modules/situation-summary/national-flu-surveillance.csv":{"dataFileSize":39,"dataFileName":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv","dataFileSourceType":"url","dataFileFormat":"OCTET-STREAM","preview":true,"dataUrl":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}},"type":"dashboard","version":"4.24.10","uuid":1722537847428}
@@ -0,0 +1 @@
1
+ {"dashboard":{"theme":"theme-blue","sharedFilters":[],"description":"Dash Description","title":""},"rows":[{"columns":[{"width":6,"widget":"data-bite1722537849962"},{"width":6,"widget":"data-bite1728059122204"}],"dataDescription":{"horizontal":false,"series":true,"singleRow":true},"dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}],"visualizations":{"data-bite1722537849962":{"type":"data-bite","dataBite":"","dataFunction":"Sum","dataColumn":"specimens tested","bitePosition":"Left","biteFontSize":24,"fontSize":"medium","biteBody":"specimens tested that would have detected influenza A(H5) or other novel influenza viruses","imageData":{"display":"none","url":"","alt":"","options":[]},"dataFormat":{"roundToPlace":0,"commas":true,"prefix":"","suffix":"+"},"biteStyle":"title","filters":[],"subtext":"","title":"Specimens tested","theme":"theme-blue","shadow":false,"visual":{"border":false,"accent":false,"background":false,"hideBackgroundColor":false,"borderColorTheme":false},"general":{"isCompactStyle":false},"filterBehavior":"Filter Change","openModal":true,"uid":"data-bite1722537849962","visualizationType":"data-bite","dataDescription":{"horizontal":false,"series":true,"singleRow":true},"version":"4.24.10","dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"},"data-bite1728059122204":{"type":"data-bite","dataBite":"","dataFunction":"Sum","dataColumn":"Human cases","bitePosition":"Left","biteFontSize":24,"fontSize":"medium","biteBody":"case detected through national flu surveillance","imageData":{"display":"none","url":"","alt":"","options":[]},"dataFormat":{"roundToPlace":0,"commas":true,"prefix":"","suffix":""},"biteStyle":"title","filters":[],"subtext":"","title":"Human cases","theme":"theme-blue","shadow":false,"visual":{"border":false,"accent":false,"background":false,"hideBackgroundColor":false,"borderColorTheme":false},"general":{"isCompactStyle":false},"filterBehavior":"Filter Change","openModal":true,"uid":"data-bite1728059122204","visualizationType":"data-bite","dataDescription":{"horizontal":false,"series":true,"singleRow":true},"version":"4.24.10","dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}},"table":{"label":"Data Table","show":false,"showDownloadUrl":false,"showVertical":true},"datasets":{"/bird-flu/modules/situation-summary/national-flu-surveillance.csv":{"dataFileSize":39,"dataFileName":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv","dataFileSourceType":"url","dataFileFormat":"OCTET-STREAM","preview":true,"dataUrl":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}},"type":"dashboard","version":"4.24.10","uuid":1722537847428}
@@ -0,0 +1 @@
1
+ {"dashboard":{"theme":"theme-blue","sharedFilters":[],"description":"","title":"Title no description"},"rows":[{"columns":[{"width":6,"widget":"data-bite1722537849962"},{"width":6,"widget":"data-bite1728059122204"}],"dataDescription":{"horizontal":false,"series":true,"singleRow":true},"dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}],"visualizations":{"data-bite1722537849962":{"type":"data-bite","dataBite":"","dataFunction":"Sum","dataColumn":"specimens tested","bitePosition":"Left","biteFontSize":24,"fontSize":"medium","biteBody":"specimens tested that would have detected influenza A(H5) or other novel influenza viruses","imageData":{"display":"none","url":"","alt":"","options":[]},"dataFormat":{"roundToPlace":0,"commas":true,"prefix":"","suffix":"+"},"biteStyle":"title","filters":[],"subtext":"","title":"Specimens tested","theme":"theme-blue","shadow":false,"visual":{"border":false,"accent":false,"background":false,"hideBackgroundColor":false,"borderColorTheme":false},"general":{"isCompactStyle":false},"filterBehavior":"Filter Change","openModal":true,"uid":"data-bite1722537849962","visualizationType":"data-bite","dataDescription":{"horizontal":false,"series":true,"singleRow":true},"version":"4.24.10","dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"},"data-bite1728059122204":{"type":"data-bite","dataBite":"","dataFunction":"Sum","dataColumn":"Human cases","bitePosition":"Left","biteFontSize":24,"fontSize":"medium","biteBody":"case detected through national flu surveillance","imageData":{"display":"none","url":"","alt":"","options":[]},"dataFormat":{"roundToPlace":0,"commas":true,"prefix":"","suffix":""},"biteStyle":"title","filters":[],"subtext":"","title":"Human cases","theme":"theme-blue","shadow":false,"visual":{"border":false,"accent":false,"background":false,"hideBackgroundColor":false,"borderColorTheme":false},"general":{"isCompactStyle":false},"filterBehavior":"Filter Change","openModal":true,"uid":"data-bite1728059122204","visualizationType":"data-bite","dataDescription":{"horizontal":false,"series":true,"singleRow":true},"version":"4.24.10","dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}},"table":{"label":"Data Table","show":false,"showDownloadUrl":false,"showVertical":true},"datasets":{"/bird-flu/modules/situation-summary/national-flu-surveillance.csv":{"dataFileSize":39,"dataFileName":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv","dataFileSourceType":"url","dataFileFormat":"OCTET-STREAM","preview":true,"dataUrl":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}},"type":"dashboard","version":"4.24.10","uuid":1722537847428}
@@ -0,0 +1 @@
1
+ {"dashboard":{"theme":"theme-blue","sharedFilters":[],"description":"","title":""},"rows":[{"columns":[{"width":6,"widget":"data-bite1722537849962"},{"width":6,"widget":"data-bite1728059122204"}],"dataDescription":{"horizontal":false,"series":true,"singleRow":true},"dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}],"visualizations":{"data-bite1722537849962":{"type":"data-bite","dataBite":"","dataFunction":"Sum","dataColumn":"specimens tested","bitePosition":"Left","biteFontSize":24,"fontSize":"medium","biteBody":"specimens tested that would have detected influenza A(H5) or other novel influenza viruses","imageData":{"display":"none","url":"","alt":"","options":[]},"dataFormat":{"roundToPlace":0,"commas":true,"prefix":"","suffix":"+"},"biteStyle":"title","filters":[],"subtext":"","title":"Specimens tested","theme":"theme-blue","shadow":false,"visual":{"border":false,"accent":false,"background":false,"hideBackgroundColor":false,"borderColorTheme":false},"general":{"isCompactStyle":false},"filterBehavior":"Filter Change","openModal":true,"uid":"data-bite1722537849962","visualizationType":"data-bite","dataDescription":{"horizontal":false,"series":true,"singleRow":true},"version":"4.24.10","dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"},"data-bite1728059122204":{"type":"data-bite","dataBite":"","dataFunction":"Sum","dataColumn":"Human cases","bitePosition":"Left","biteFontSize":24,"fontSize":"medium","biteBody":"case detected through national flu surveillance","imageData":{"display":"none","url":"","alt":"","options":[]},"dataFormat":{"roundToPlace":0,"commas":true,"prefix":"","suffix":""},"biteStyle":"title","filters":[],"subtext":"","title":"Human cases","theme":"theme-blue","shadow":false,"visual":{"border":false,"accent":false,"background":false,"hideBackgroundColor":false,"borderColorTheme":false},"general":{"isCompactStyle":false},"filterBehavior":"Filter Change","openModal":true,"uid":"data-bite1728059122204","visualizationType":"data-bite","dataDescription":{"horizontal":false,"series":true,"singleRow":true},"version":"4.24.10","dataKey":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}},"table":{"label":"Data Table","show":false,"showDownloadUrl":false,"showVertical":true},"datasets":{"/bird-flu/modules/situation-summary/national-flu-surveillance.csv":{"dataFileSize":39,"dataFileName":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv","dataFileSourceType":"url","dataFileFormat":"OCTET-STREAM","preview":true,"dataUrl":"/bird-flu/modules/situation-summary/national-flu-surveillance.csv"}},"type":"dashboard","version":"4.24.10","uuid":1722537847428}
@@ -1,5 +1,6 @@
1
1
  import React, { useState, useEffect } from 'react'
2
2
  import Icon from '../../../core/components/ui/Icon'
3
+ import { appFontSize } from '@cdc/core/helpers/cove/fontSettings'
3
4
 
4
5
  type CollapsableVizRow = {
5
6
  allExpanded: boolean
@@ -16,8 +17,7 @@ const CollapsibleVisualizationRow: React.FC<CollapsableVizRow> = ({
16
17
  children
17
18
  }) => {
18
19
  const [isExpanded, setIsExpanded] = useState(allExpanded)
19
- const fontSizes = { small: 16, medium: 18, large: 20 }
20
- const titleFontSize = ['xs', 'xxs'].includes(currentViewport) ? '13px' : `${fontSizes[fontSize]}px`
20
+ const titleFontSize = ['xs', 'xxs'].includes(currentViewport) ? '13px' : `${appFontSize}px`
21
21
 
22
22
  useEffect(() => {
23
23
  setIsExpanded(allExpanded)
@@ -28,7 +28,7 @@ const CollapsibleVisualizationRow: React.FC<CollapsableVizRow> = ({
28
28
  <div
29
29
  style={{ fontSize: titleFontSize }}
30
30
  role='button'
31
- className={`multi-visualiation-heading${isExpanded ? '' : ' collapsed'} h4`}
31
+ className={`multi-visualiation-heading${isExpanded ? '' : ' collapsed'} h4 my-0`}
32
32
  onClick={() => {
33
33
  setIsExpanded(!isExpanded)
34
34
  }}
@@ -37,10 +37,21 @@ const Column = ({ data, rowIdx, colIdx }) => {
37
37
  classNames.push('column--populated')
38
38
  }
39
39
 
40
+ const handleTitle = config => {
41
+ if (!config) return
42
+ if (config.type === 'map') return config.general.title
43
+ if (config.type === 'markup-include') return config.contentEditor?.title
44
+ return config.title
45
+ }
46
+
40
47
  return (
41
48
  <div className={classNames.join(' ')} ref={drop}>
42
49
  {widget ? (
43
- <Widget widgetConfig={{ rowIdx, colIdx, ...widget }} type={widget.visualizationType ?? widget.general?.geoType} />
50
+ <Widget
51
+ title={handleTitle(widget)}
52
+ widgetConfig={{ rowIdx, colIdx, ...widget }}
53
+ type={widget.visualizationType ?? widget.general?.geoType}
54
+ />
44
55
  ) : (
45
56
  <p className='builder-column__text'>
46
57
  Drag and drop <br /> visualization