@cdc/dashboard 4.24.1 → 4.24.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 (53) hide show
  1. package/dist/cdcdashboard.js +117195 -108041
  2. package/examples/{private/DEV-6574.json → DEV-6574.json} +8 -8
  3. package/examples/filters/Alabama.json +72 -0
  4. package/examples/zika.json +2274 -0
  5. package/index.html +5 -3
  6. package/package.json +9 -9
  7. package/src/CdcDashboard.tsx +124 -991
  8. package/src/CdcDashboardComponent.tsx +903 -0
  9. package/src/_stories/Dashboard.stories.tsx +2 -2
  10. package/src/components/Column.tsx +15 -12
  11. package/src/components/Header/Header.tsx +18 -4
  12. package/src/components/MultiConfigTabs/MultiConfigTabs.tsx +106 -0
  13. package/src/components/MultiConfigTabs/MultiTabs.tsx +30 -0
  14. package/src/components/MultiConfigTabs/index.tsx +8 -0
  15. package/src/components/MultiConfigTabs/multiconfigtabs.styles.css +32 -0
  16. package/src/components/Widget.tsx +25 -9
  17. package/src/helpers/generateValuesForFilter.ts +1 -1
  18. package/src/helpers/getUpdateConfig.ts +6 -2
  19. package/src/helpers/processData.ts +13 -0
  20. package/src/helpers/processDataLegacy.ts +14 -0
  21. package/src/{index.jsx → index.tsx} +2 -2
  22. package/src/scss/editor-panel.scss +14 -11
  23. package/src/scss/grid.scss +4 -6
  24. package/src/scss/main.scss +2 -8
  25. package/src/store/dashboard.actions.ts +10 -4
  26. package/src/store/dashboard.reducer.ts +74 -3
  27. package/src/types/ConfigRow.ts +6 -0
  28. package/src/types/Dashboard.ts +11 -0
  29. package/src/types/{Config.ts → DashboardConfig.ts} +8 -14
  30. package/src/types/InitialState.ts +10 -0
  31. package/src/types/MultiDashboard.ts +11 -0
  32. package/examples/private/DEV-5189-2.json +0 -935
  33. package/examples/private/DEV-5189.json +0 -1266
  34. package/examples/private/dash-scaling.json +0 -45325
  35. package/examples/private/epi-chart.json +0 -813
  36. package/examples/private/epi-dash.json +0 -457
  37. package/examples/private/epi-new.json +0 -994
  38. package/examples/private/filters/Alabama.json +0 -4217
  39. package/examples/private/new-epi-csv.json +0 -358
  40. package/examples/private/new-epi.json +0 -358
  41. package/examples/private/no-lines.json +0 -8432
  42. package/examples/private/tick-bold-data.json +0 -82325
  43. package/examples/private/tick-bold.json +0 -164678
  44. package/examples/private/visits.json +0 -9985
  45. /package/examples/{private/filters → filters}/Alaska.json +0 -0
  46. /package/examples/{private/filters → filters}/Arkansas.json +0 -0
  47. /package/examples/{private/filters → filters}/California.json +0 -0
  48. /package/examples/{private/filters → filters}/Colorado.json +0 -0
  49. /package/examples/{private/filters → filters}/Connecticut.json +0 -0
  50. /package/examples/{private/filters → filters}/Delaware.json +0 -0
  51. /package/examples/{private/filters → filters}/DistrictofColumbia.json +0 -0
  52. /package/examples/{private/filters → filters}/Florida.json +0 -0
  53. /package/examples/{private/filters → filters}/States.json +0 -0
@@ -1,457 +0,0 @@
1
- {
2
- "dashboard": {
3
- "theme": "theme-blue"
4
- },
5
- "rows": [
6
- [
7
- {
8
- "width": 12,
9
- "widget": "chart1704810417861"
10
- },
11
- {},
12
- {}
13
- ]
14
- ],
15
- "visualizations": {
16
- "chart1704810417861": {
17
- "type": "chart",
18
- "debugSvg": false,
19
- "chartMessage": {
20
- "noData": "No Data Available"
21
- },
22
- "title": "Number of people with active epilepsy in the US (2021 NHIS)",
23
- "showTitle": true,
24
- "showDownloadMediaButton": false,
25
- "theme": "theme-blue",
26
- "animate": false,
27
- "fontSize": "medium",
28
- "lineDatapointStyle": "hover",
29
- "lineDatapointColor": "Same as Line",
30
- "barHasBorder": "true",
31
- "isLollipopChart": false,
32
- "lollipopShape": "circle",
33
- "lollipopColorStyle": "two-tone",
34
- "visualizationSubType": "regular",
35
- "barStyle": "",
36
- "roundingStyle": "standard",
37
- "tipRounding": "top",
38
- "isResponsiveTicks": false,
39
- "general": {
40
- "showDownloadButton": false
41
- },
42
- "padding": {
43
- "left": 5,
44
- "right": 5
45
- },
46
- "suppressedData": [],
47
- "yAxis": {
48
- "hideAxis": false,
49
- "displayNumbersOnBar": false,
50
- "hideLabel": false,
51
- "hideTicks": false,
52
- "size": 50,
53
- "gridLines": false,
54
- "enablePadding": false,
55
- "min": "",
56
- "max": "",
57
- "labelColor": "#333",
58
- "tickLabelColor": "#333",
59
- "tickColor": "#333",
60
- "rightHideAxis": true,
61
- "rightAxisSize": 0,
62
- "rightLabel": "",
63
- "rightLabelOffsetSize": 0,
64
- "rightAxisLabelColor": "#333",
65
- "rightAxisTickLabelColor": "#333",
66
- "rightAxisTickColor": "#333",
67
- "numTicks": "",
68
- "axisPadding": 0,
69
- "tickRotation": 0,
70
- "anchors": []
71
- },
72
- "boxplot": {
73
- "plots": [],
74
- "borders": "true",
75
- "firstQuartilePercentage": 25,
76
- "thirdQuartilePercentage": 75,
77
- "boxWidthPercentage": 40,
78
- "plotOutlierValues": false,
79
- "plotNonOutlierValues": true,
80
- "legend": {
81
- "showHowToReadText": false,
82
- "howToReadText": ""
83
- },
84
- "labels": {
85
- "q1": "Lower Quartile",
86
- "q2": "q2",
87
- "q3": "Upper Quartile",
88
- "q4": "q4",
89
- "minimum": "Minimum",
90
- "maximum": "Maximum",
91
- "mean": "Mean",
92
- "median": "Median",
93
- "sd": "Standard Deviation",
94
- "iqr": "Interquartile Range",
95
- "total": "Total",
96
- "outliers": "Outliers",
97
- "values": "Values",
98
- "lowerBounds": "Lower Bounds",
99
- "upperBounds": "Upper Bounds"
100
- }
101
- },
102
- "topAxis": {
103
- "hasLine": false
104
- },
105
- "isLegendValue": true,
106
- "barThickness": 0.35,
107
- "barHeight": 25,
108
- "barSpace": 15,
109
- "heights": {
110
- "vertical": 300,
111
- "horizontal": 750
112
- },
113
- "xAxis": {
114
- "sortDates": false,
115
- "anchors": [],
116
- "type": "categorical",
117
- "showTargetLabel": true,
118
- "targetLabel": "Target",
119
- "hideAxis": false,
120
- "hideLabel": false,
121
- "hideTicks": false,
122
- "size": 75,
123
- "tickRotation": 0,
124
- "min": "",
125
- "max": "",
126
- "labelColor": "#333",
127
- "tickLabelColor": "#333",
128
- "tickColor": "#333",
129
- "numTicks": "",
130
- "labelOffset": 65,
131
- "axisPadding": 0,
132
- "target": 0,
133
- "maxTickRotation": 0,
134
- "dataKey": "Subgroup",
135
- "label": "Subgroup",
136
- "tickWidthMax": 47
137
- },
138
- "table": {
139
- "label": "Data Table",
140
- "expanded": true,
141
- "limitHeight": false,
142
- "height": "",
143
- "caption": "",
144
- "showDownloadUrl": false,
145
- "showDataTableLink": false,
146
- "indexLabel": "",
147
- "download": false,
148
- "showVertical": true,
149
- "show": false,
150
- "showDownloadImgButton": false
151
- },
152
- "orientation": "vertical",
153
- "color": "pinkpurple",
154
- "columns": {},
155
- "legend": {
156
- "hide": false,
157
- "behavior": "isolate",
158
- "singleRow": false,
159
- "colorCode": "",
160
- "reverseLabelOrder": false,
161
- "description": "",
162
- "dynamicLegend": false,
163
- "dynamicLegendDefaultText": "Show All",
164
- "dynamicLegendItemLimit": 5,
165
- "dynamicLegendItemLimitMessage": "Dynamic Legend Item Limit Hit.",
166
- "dynamicLegendChartMessage": "Select Options from the Legend",
167
- "lineMode": false,
168
- "verticalSorted": false,
169
- "highlightOnHover": false
170
- },
171
- "brush": {
172
- "height": 25,
173
- "data": [
174
- {
175
- "Population": "",
176
- "Subgroup": "18-44",
177
- "Estimate": "1161000"
178
- },
179
- {
180
- "Population": "",
181
- "Subgroup": "45-64",
182
- "Estimate": "1061000"
183
- },
184
- {
185
- "Population": "",
186
- "Subgroup": ">=65",
187
- "Estimate": "643000"
188
- }
189
- ],
190
- "active": false
191
- },
192
- "exclusions": {
193
- "active": false,
194
- "keys": []
195
- },
196
- "palette": "sequential-bluereverse",
197
- "isPaletteReversed": true,
198
- "twoColor": {
199
- "palette": "monochrome-1",
200
- "isPaletteReversed": false
201
- },
202
- "labels": false,
203
- "dataFormat": {
204
- "commas": true,
205
- "prefix": "",
206
- "suffix": "",
207
- "abbreviated": false,
208
- "bottomSuffix": "",
209
- "bottomPrefix": "",
210
- "bottomAbbreviated": false
211
- },
212
- "confidenceKeys": {},
213
- "visual": {
214
- "border": true,
215
- "accent": true,
216
- "background": true,
217
- "verticalHoverLine": false,
218
- "horizontalHoverLine": false
219
- },
220
- "useLogScale": false,
221
- "filterBehavior": "Filter Change",
222
- "highlightedBarValues": [],
223
- "series": [
224
- {
225
- "dataKey": "Estimate",
226
- "type": "Bar",
227
- "axis": "Left",
228
- "tooltip": true
229
- }
230
- ],
231
- "tooltips": {
232
- "opacity": 90,
233
- "singleSeries": false
234
- },
235
- "forestPlot": {
236
- "startAt": 0,
237
- "colors": {
238
- "line": "",
239
- "shape": ""
240
- },
241
- "lineOfNoEffect": {
242
- "show": true
243
- },
244
- "type": "",
245
- "pooledResult": {
246
- "diamondHeight": 5,
247
- "column": ""
248
- },
249
- "estimateField": "",
250
- "estimateRadius": "",
251
- "shape": "",
252
- "rowHeight": 20,
253
- "description": {
254
- "show": true,
255
- "text": "description",
256
- "location": 0
257
- },
258
- "result": {
259
- "show": true,
260
- "text": "result",
261
- "location": 100
262
- },
263
- "radius": {
264
- "min": 1,
265
- "max": 8,
266
- "scalingColumn": ""
267
- },
268
- "regression": {
269
- "lower": 0,
270
- "upper": 0,
271
- "estimateField": 0
272
- },
273
- "leftWidthOffset": 0,
274
- "rightWidthOffset": 0,
275
- "showZeroLine": false,
276
- "hideDateCategoryCol": false,
277
- "leftLabel": "",
278
- "rightLabel": ""
279
- },
280
- "area": {
281
- "isStacked": false
282
- },
283
- "openModal": false,
284
- "uid": "chart1704810417861",
285
- "visualizationType": "Bar",
286
- "dataDescription": {
287
- "horizontal": false,
288
- "series": false
289
- },
290
- "dataKey": "dashboard_aggregate_active_epilepsy.csv",
291
- "editing": false,
292
- "originalFormattedData": [
293
- {
294
- "Population": "Age group (years)",
295
- "Subgroup": "18-44",
296
- "Estimate": "1,161,000"
297
- },
298
- {
299
- "Population": "Age group (years)",
300
- "Subgroup": "45-64",
301
- "Estimate": "1,061,000"
302
- },
303
- {
304
- "Population": "Age group (years)",
305
- "Subgroup": ">=65",
306
- "Estimate": "643,000"
307
- },
308
- {
309
- "Population": "Sex",
310
- "Subgroup": "Men",
311
- "Estimate": "1,214,000"
312
- },
313
- {
314
- "Population": "Sex",
315
- "Subgroup": "Women",
316
- "Estimate": "1,651,000"
317
- },
318
- {
319
- "Population": "Race/Ethnicity",
320
- "Subgroup": "Hispanic",
321
- "Estimate": "382,000"
322
- },
323
- {
324
- "Population": "Race/Ethnicity",
325
- "Subgroup": "Non-Hispanic White",
326
- "Estimate": "1,870,000"
327
- },
328
- {
329
- "Population": "Race/Ethnicity",
330
- "Subgroup": "Non-Hispanic Black",
331
- "Estimate": "473,000"
332
- },
333
- {
334
- "Population": "Race/Ethnicity",
335
- "Subgroup": "Non-Hispanic other",
336
- "Estimate": "140,000"
337
- },
338
- {
339
- "Population": "Educational level",
340
- "Subgroup": "<High School or GED*",
341
- "Estimate": "448,000"
342
- },
343
- {
344
- "Population": "Educational level",
345
- "Subgroup": "High School or GED*",
346
- "Estimate": "1,020,000"
347
- },
348
- {
349
- "Population": "Educational level",
350
- "Subgroup": ">= some college",
351
- "Estimate": "1,366,000"
352
- }
353
- ],
354
- "validated": 4.23,
355
- "description": "GED* = General Educational Diploma",
356
- "filters": [
357
- {
358
- "values": [
359
- "Age group (years)",
360
- "Educational level",
361
- "Race/Ethnicity",
362
- "Sex"
363
- ],
364
- "active": "Age group (years)",
365
- "filterStyle": "dropdown",
366
- "columnName": "Population",
367
- "label": "Subgroup",
368
- "order": "asc"
369
- }
370
- ],
371
- "dynamicMarginTop": 0,
372
- "footnotes": "",
373
- "introText": "",
374
- "superTitle": ""
375
- }
376
- },
377
- "table": {
378
- "label": "Data Table",
379
- "show": true,
380
- "showDownloadUrl": false,
381
- "showVertical": true
382
- },
383
- "newViz": true,
384
- "datasets": {
385
- "dashboard_aggregate_active_epilepsy.csv": {
386
- "data": [
387
- {
388
- "Population": "Age group (years)",
389
- "Subgroup": "18-44",
390
- "Estimate": "1,161,000"
391
- },
392
- {
393
- "Population": "Age group (years)",
394
- "Subgroup": "45-64",
395
- "Estimate": "1,061,000"
396
- },
397
- {
398
- "Population": "Age group (years)",
399
- "Subgroup": ">=65",
400
- "Estimate": "643,000"
401
- },
402
- {
403
- "Population": "Sex",
404
- "Subgroup": "Men",
405
- "Estimate": "1,214,000"
406
- },
407
- {
408
- "Population": "Sex",
409
- "Subgroup": "Women",
410
- "Estimate": "1,651,000"
411
- },
412
- {
413
- "Population": "Race/Ethnicity",
414
- "Subgroup": "Hispanic",
415
- "Estimate": "382,000"
416
- },
417
- {
418
- "Population": "Race/Ethnicity",
419
- "Subgroup": "Non-Hispanic White",
420
- "Estimate": "1,870,000"
421
- },
422
- {
423
- "Population": "Race/Ethnicity",
424
- "Subgroup": "Non-Hispanic Black",
425
- "Estimate": "473,000"
426
- },
427
- {
428
- "Population": "Race/Ethnicity",
429
- "Subgroup": "Non-Hispanic other",
430
- "Estimate": "140,000"
431
- },
432
- {
433
- "Population": "Educational level",
434
- "Subgroup": "<High School or GED*",
435
- "Estimate": "448,000"
436
- },
437
- {
438
- "Population": "Educational level",
439
- "Subgroup": "High School or GED*",
440
- "Estimate": "1,020,000"
441
- },
442
- {
443
- "Population": "Educational level",
444
- "Subgroup": ">= some college",
445
- "Estimate": "1,366,000"
446
- }
447
- ],
448
- "dataFileSize": 502,
449
- "dataFileName": "dashboard_aggregate_active_epilepsy.csv",
450
- "dataFileSourceType": "file",
451
- "dataFileFormat": "CSV",
452
- "preview": true
453
- }
454
- },
455
- "type": "dashboard",
456
- "runtime": {}
457
- }