@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,358 +0,0 @@
1
- {
2
- "dashboard": {
3
- "theme": "theme-blue"
4
- },
5
- "rows": [
6
- [
7
- {
8
- "width": 12,
9
- "widget": "chart1704908994676"
10
- },
11
- {},
12
- {}
13
- ]
14
- ],
15
- "visualizations": {
16
- "chart1704908994676": {
17
- "type": "chart",
18
- "debugSvg": false,
19
- "chartMessage": {
20
- "noData": "No Data Available"
21
- },
22
- "title": "",
23
- "showTitle": true,
24
- "showDownloadMediaButton": false,
25
- "showChartBrush": false,
26
- "theme": "theme-blue",
27
- "animate": false,
28
- "fontSize": "medium",
29
- "lineDatapointStyle": "hover",
30
- "barHasBorder": "false",
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
- "yAxis": {
47
- "hideAxis": false,
48
- "displayNumbersOnBar": false,
49
- "hideLabel": false,
50
- "hideTicks": false,
51
- "size": 50,
52
- "gridLines": false,
53
- "enablePadding": false,
54
- "min": "",
55
- "max": "",
56
- "labelColor": "#333",
57
- "tickLabelColor": "#333",
58
- "tickColor": "#333",
59
- "rightHideAxis": true,
60
- "rightAxisSize": 0,
61
- "rightLabel": "",
62
- "rightLabelOffsetSize": 0,
63
- "rightAxisLabelColor": "#333",
64
- "rightAxisTickLabelColor": "#333",
65
- "rightAxisTickColor": "#333",
66
- "numTicks": "",
67
- "axisPadding": 0,
68
- "tickRotation": 0,
69
- "anchors": []
70
- },
71
- "boxplot": {
72
- "plots": [],
73
- "borders": "true",
74
- "firstQuartilePercentage": 25,
75
- "thirdQuartilePercentage": 75,
76
- "boxWidthPercentage": 40,
77
- "plotOutlierValues": false,
78
- "plotNonOutlierValues": true,
79
- "legend": {
80
- "showHowToReadText": false,
81
- "howToReadText": ""
82
- },
83
- "labels": {
84
- "q1": "Lower Quartile",
85
- "q2": "q2",
86
- "q3": "Upper Quartile",
87
- "q4": "q4",
88
- "minimum": "Minimum",
89
- "maximum": "Maximum",
90
- "mean": "Mean",
91
- "median": "Median",
92
- "sd": "Standard Deviation",
93
- "iqr": "Interquartile Range",
94
- "total": "Total",
95
- "outliers": "Outliers",
96
- "values": "Values",
97
- "lowerBounds": "Lower Bounds",
98
- "upperBounds": "Upper Bounds"
99
- }
100
- },
101
- "topAxis": {
102
- "hasLine": false
103
- },
104
- "isLegendValue": false,
105
- "barThickness": 0.35,
106
- "barHeight": 25,
107
- "barSpace": 15,
108
- "heights": {
109
- "vertical": 300,
110
- "horizontal": 750
111
- },
112
- "xAxis": {
113
- "sortDates": false,
114
- "anchors": [],
115
- "type": "categorical",
116
- "showTargetLabel": true,
117
- "targetLabel": "Target",
118
- "hideAxis": false,
119
- "hideLabel": false,
120
- "hideTicks": false,
121
- "size": 75,
122
- "tickRotation": 0,
123
- "min": "",
124
- "max": "",
125
- "labelColor": "#333",
126
- "tickLabelColor": "#333",
127
- "tickColor": "#333",
128
- "numTicks": "",
129
- "labelOffset": 65,
130
- "axisPadding": 0,
131
- "target": 0,
132
- "maxTickRotation": 0,
133
- "dataKey": "Subgroup"
134
- },
135
- "table": {
136
- "label": "Data Table",
137
- "expanded": true,
138
- "limitHeight": false,
139
- "height": "",
140
- "caption": "",
141
- "showDownloadUrl": false,
142
- "showDataTableLink": true,
143
- "indexLabel": "",
144
- "download": false,
145
- "showVertical": true,
146
- "show": false
147
- },
148
- "orientation": "vertical",
149
- "color": "pinkpurple",
150
- "columns": {},
151
- "legend": {
152
- "behavior": "isolate",
153
- "singleRow": false,
154
- "colorCode": "",
155
- "reverseLabelOrder": false,
156
- "description": "",
157
- "dynamicLegend": false,
158
- "dynamicLegendDefaultText": "Show All",
159
- "dynamicLegendItemLimit": 5,
160
- "dynamicLegendItemLimitMessage": "Dynamic Legend Item Limit Hit.",
161
- "dynamicLegendChartMessage": "Select Options from the Legend",
162
- "lineMode": false,
163
- "verticalSorted": false
164
- },
165
- "exclusions": {
166
- "active": false,
167
- "keys": []
168
- },
169
- "palette": "qualitative-bold",
170
- "isPaletteReversed": false,
171
- "twoColor": {
172
- "palette": "monochrome-1",
173
- "isPaletteReversed": false
174
- },
175
- "labels": false,
176
- "dataFormat": {
177
- "commas": false,
178
- "prefix": "",
179
- "suffix": "",
180
- "abbreviated": false,
181
- "bottomSuffix": "",
182
- "bottomPrefix": "",
183
- "bottomAbbreviated": false
184
- },
185
- "confidenceKeys": {},
186
- "visual": {
187
- "border": true,
188
- "accent": true,
189
- "background": true,
190
- "verticalHoverLine": false,
191
- "horizontalHoverLine": false
192
- },
193
- "useLogScale": false,
194
- "filterBehavior": "Filter Change",
195
- "highlightedBarValues": [],
196
- "series": [
197
- {
198
- "dataKey": "Estimate",
199
- "type": "Bar",
200
- "axis": "Left",
201
- "tooltip": true
202
- }
203
- ],
204
- "tooltips": {
205
- "opacity": 90
206
- },
207
- "forestPlot": {
208
- "startAt": 0,
209
- "width": "auto",
210
- "colors": {
211
- "line": "",
212
- "shape": ""
213
- },
214
- "estimateField": "",
215
- "estimateRadius": "",
216
- "lowerCiField": "",
217
- "upperCiField": "",
218
- "shape": "",
219
- "rowHeight": 20,
220
- "showZeroLine": false,
221
- "description": {
222
- "show": true,
223
- "text": "description",
224
- "location": 0
225
- },
226
- "result": {
227
- "show": true,
228
- "text": "result",
229
- "location": 100
230
- },
231
- "radius": {
232
- "min": 1,
233
- "max": 8,
234
- "scalingColumn": ""
235
- },
236
- "regression": {
237
- "lower": 0,
238
- "upper": 0,
239
- "estimateField": 0
240
- },
241
- "leftWidthOffset": 0,
242
- "rightWidthOffset": 0
243
- },
244
- "brush": {
245
- "pattern_id": "brush_pattern",
246
- "accent_color": "#ddd"
247
- },
248
- "area": {
249
- "isStacked": false
250
- },
251
- "openModal": false,
252
- "uid": "chart1704908994676",
253
- "visualizationType": "Bar",
254
- "dataKey": "epi-data.json",
255
- "dataDescription": {
256
- "horizontal": false,
257
- "series": false
258
- },
259
- "editing": false,
260
- "validated": 4.23,
261
- "dynamicMarginTop": 0,
262
- "filters": [
263
- {
264
- "values": [
265
- "Age group (years)",
266
- "Educational level",
267
- "Race/Ethnicity",
268
- "Sex"
269
- ],
270
- "active": "Age group (years)",
271
- "filterStyle": "dropdown",
272
- "order": "asc",
273
- "columnName": "Population"
274
- }
275
- ]
276
- }
277
- },
278
- "table": {
279
- "label": "Data Table",
280
- "show": true,
281
- "showDownloadUrl": false,
282
- "showVertical": true
283
- },
284
- "newViz": true,
285
- "datasets": {
286
- "epi-data.json": {
287
- "data": [
288
- {
289
- "Population": "Age group (years)",
290
- "Subgroup": "18-44",
291
- "Estimate": "1,161,000"
292
- },
293
- {
294
- "Population": "Age group (years)",
295
- "Subgroup": "45-64",
296
- "Estimate": "1,061,000"
297
- },
298
- {
299
- "Population": "Age group (years)",
300
- "Subgroup": ">=65",
301
- "Estimate": "643,000"
302
- },
303
- {
304
- "Population": "Sex",
305
- "Subgroup": "Men",
306
- "Estimate": "1,214,000"
307
- },
308
- {
309
- "Population": "Sex",
310
- "Subgroup": "Women",
311
- "Estimate": "1,651,000"
312
- },
313
- {
314
- "Population": "Race/Ethnicity",
315
- "Subgroup": "Hispanic",
316
- "Estimate": "382,000"
317
- },
318
- {
319
- "Population": "Race/Ethnicity",
320
- "Subgroup": "Non-Hispanic White",
321
- "Estimate": "1,870,000"
322
- },
323
- {
324
- "Population": "Race/Ethnicity",
325
- "Subgroup": "Non-Hispanic Black",
326
- "Estimate": "473,000"
327
- },
328
- {
329
- "Population": "Race/Ethnicity",
330
- "Subgroup": "Non-Hispanic other",
331
- "Estimate": "140,000"
332
- },
333
- {
334
- "Population": "Educational level",
335
- "Subgroup": "<High School or GED*",
336
- "Estimate": "448,000"
337
- },
338
- {
339
- "Population": "Educational level",
340
- "Subgroup": "High School or GED*",
341
- "Estimate": "1,020,000"
342
- },
343
- {
344
- "Population": "Educational level",
345
- "Subgroup": ">= some college",
346
- "Estimate": "1,366,000"
347
- }
348
- ],
349
- "dataFileSize": 1242,
350
- "dataFileName": "epi-data.json",
351
- "dataFileSourceType": "file",
352
- "dataFileFormat": "JSON",
353
- "preview": true
354
- }
355
- },
356
- "type": "dashboard",
357
- "runtime": {}
358
- }