@cdc/chart 4.25.6-2 → 4.25.7

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 (54) hide show
  1. package/dist/cdcchart.js +52634 -30848
  2. package/package.json +3 -2
  3. package/src/CdcChartComponent.tsx +13 -9
  4. package/src/_stories/Chart.BoxPlot.stories.tsx +35 -0
  5. package/src/_stories/Chart.stories.tsx +0 -7
  6. package/src/_stories/Chart.tooltip.stories.tsx +35 -275
  7. package/src/_stories/_mock/bar-chart-suppressed.json +2 -80
  8. package/src/_stories/_mock/boxplot_multiseries.json +252 -166
  9. package/src/components/AreaChart/components/AreaChart.Stacked.jsx +1 -1
  10. package/src/components/AreaChart/components/AreaChart.jsx +4 -8
  11. package/src/components/BarChart/components/BarChart.Horizontal.tsx +34 -2
  12. package/src/components/BarChart/components/BarChart.Vertical.tsx +15 -0
  13. package/src/components/BoxPlot/BoxPlot.Horizontal.tsx +131 -0
  14. package/src/components/BoxPlot/{BoxPlot.tsx → BoxPlot.Vertical.tsx} +4 -4
  15. package/src/components/BoxPlot/helpers/index.ts +32 -12
  16. package/src/components/BrushChart.tsx +1 -1
  17. package/src/components/EditorPanel/EditorPanel.tsx +3 -3
  18. package/src/components/EditorPanel/components/Panels/Panel.General.tsx +2 -2
  19. package/src/components/Forecasting/{Forecasting.jsx → Forecasting.tsx} +32 -12
  20. package/src/components/Legend/LegendGroup/LegendGroup.tsx +1 -0
  21. package/src/components/Legend/helpers/index.ts +2 -2
  22. package/src/components/LinearChart.tsx +63 -15
  23. package/src/data/initial-state.js +1 -5
  24. package/src/helpers/filterAndShiftLinearDateTicks.ts +58 -0
  25. package/src/helpers/getBridgedData.ts +13 -0
  26. package/src/helpers/tests/getBridgedData.test.ts +64 -0
  27. package/src/hooks/useScales.ts +42 -42
  28. package/src/hooks/useTooltip.tsx +3 -2
  29. package/src/scss/main.scss +2 -8
  30. package/src/store/chart.actions.ts +2 -2
  31. package/src/store/chart.reducer.ts +4 -12
  32. package/src/types/ChartConfig.ts +0 -5
  33. package/examples/private/0527.json +0 -1
  34. package/examples/private/DEV-8850-2.json +0 -493
  35. package/examples/private/DEV-9822.json +0 -574
  36. package/examples/private/DEV-9840.json +0 -553
  37. package/examples/private/DEV-9850-3.json +0 -461
  38. package/examples/private/chart.json +0 -1084
  39. package/examples/private/ci_formatted.json +0 -202
  40. package/examples/private/ci_issue.json +0 -3016
  41. package/examples/private/completed.json +0 -634
  42. package/examples/private/dem-data-long.csv +0 -20
  43. package/examples/private/dem-data-long.json +0 -36
  44. package/examples/private/demographic_data.csv +0 -157
  45. package/examples/private/demographic_data.json +0 -2654
  46. package/examples/private/demographic_dynamic.json +0 -443
  47. package/examples/private/demographic_standard.json +0 -560
  48. package/examples/private/ehdi.json +0 -29939
  49. package/examples/private/line-issue.json +0 -497
  50. package/examples/private/not-loading.json +0 -360
  51. package/examples/private/test.json +0 -493
  52. package/examples/private/testing-pie.json +0 -436
  53. package/src/components/BoxPlot/index.tsx +0 -3
  54. /package/src/components/Brush/{BrushController..tsx → BrushController.tsx} +0 -0
@@ -1,436 +0,0 @@
1
- {
2
- "annotations": [],
3
- "type": "chart",
4
- "debugSvg": false,
5
- "chartMessage": {
6
- "noData": "No Data Available"
7
- },
8
- "title": "",
9
- "showTitle": false,
10
- "showDownloadMediaButton": false,
11
- "theme": "theme-blue",
12
- "animate": false,
13
- "fontSize": "small",
14
- "lineDatapointStyle": "hover",
15
- "lineDatapointColor": "Same as Line",
16
- "barHasBorder": "false",
17
- "isLollipopChart": false,
18
- "lollipopShape": "circle",
19
- "lollipopColorStyle": "two-tone",
20
- "visualizationSubType": "regular",
21
- "barStyle": "",
22
- "roundingStyle": "standard",
23
- "tipRounding": "top",
24
- "isResponsiveTicks": false,
25
- "general": {
26
- "annotationDropdownText": "Annotations",
27
- "showMissingDataLabel": true,
28
- "showSuppressedSymbol": true,
29
- "showZeroValueData": true,
30
- "hideNullValue": true,
31
- "showDownloadButton": false,
32
- "showZeroValueDataLabel": true
33
- },
34
- "padding": {
35
- "left": 5,
36
- "right": 5
37
- },
38
- "preliminaryData": [],
39
- "yAxis": {
40
- "hideAxis": false,
41
- "displayNumbersOnBar": false,
42
- "hideLabel": false,
43
- "hideTicks": false,
44
- "size": 50,
45
- "gridLines": false,
46
- "enablePadding": false,
47
- "min": "",
48
- "max": "",
49
- "labelColor": "#333",
50
- "tickLabelColor": "#333",
51
- "tickColor": "#333",
52
- "rightHideAxis": true,
53
- "rightAxisSize": 0,
54
- "rightLabel": "",
55
- "rightLabelOffsetSize": 0,
56
- "rightAxisLabelColor": "#333",
57
- "rightAxisTickLabelColor": "#333",
58
- "rightAxisTickColor": "#333",
59
- "numTicks": "",
60
- "axisPadding": 0,
61
- "scalePadding": 10,
62
- "tickRotation": 0,
63
- "anchors": [],
64
- "shoMissingDataLabel": true,
65
- "showMissingDataLine": true,
66
- "categories": [],
67
- "dataKey": "Number of adults",
68
- "labelPlacement": "On Date/Category Axis",
69
- "maxValue": 62
70
- },
71
- "boxplot": {
72
- "plots": [],
73
- "borders": "true",
74
- "plotOutlierValues": false,
75
- "plotNonOutlierValues": true,
76
- "labels": {
77
- "q1": "Lower Quartile",
78
- "q2": "q2",
79
- "q3": "Upper Quartile",
80
- "q4": "q4",
81
- "minimum": "Minimum",
82
- "maximum": "Maximum",
83
- "mean": "Mean",
84
- "median": "Median",
85
- "sd": "Standard Deviation",
86
- "iqr": "Interquartile Range",
87
- "total": "Total",
88
- "outliers": "Outliers",
89
- "values": "Values",
90
- "lowerBounds": "Lower Bounds",
91
- "upperBounds": "Upper Bounds",
92
- "count": "Count"
93
- },
94
- "firstQuartilePercentage": 25,
95
- "thirdQuartilePercentage": 75,
96
- "boxWidthPercentage": 40,
97
- "legend": {
98
- "showHowToReadText": false,
99
- "howToReadText": ""
100
- }
101
- },
102
- "topAxis": {
103
- "hasLine": false
104
- },
105
- "isLegendValue": false,
106
- "barThickness": 0.35,
107
- "barHeight": "40",
108
- "barSpace": "50",
109
- "heights": {
110
- "vertical": 300,
111
- "horizontal": 180
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": 0,
131
- "axisPadding": 200,
132
- "target": 0,
133
- "maxTickRotation": 0,
134
- "padding": 5,
135
- "showYearsOnce": false,
136
- "sortByRecentDate": false,
137
- "dataKey": "Subgroup",
138
- "tickWidthMax": 46
139
- },
140
- "table": {
141
- "label": "Data Table",
142
- "expanded": false,
143
- "limitHeight": false,
144
- "height": "",
145
- "caption": "",
146
- "showDownloadUrl": false,
147
- "showDataTableLink": true,
148
- "showDownloadLinkBelow": true,
149
- "indexLabel": "",
150
- "download": true,
151
- "showVertical": true,
152
- "dateDisplayFormat": "",
153
- "showMissingDataLabel": true,
154
- "showSuppressedSymbol": true,
155
- "show": true,
156
- "showDownloadImgButton": false,
157
- "collapsible": true
158
- },
159
- "orientation": "Pie",
160
- "color": "pinkpurple",
161
- "columns": {
162
- "95% Confidence interval": {
163
- "label": "95% Confidence interval",
164
- "dataTable": true,
165
- "tooltips": false,
166
- "prefix": "",
167
- "suffix": "",
168
- "forestPlot": false,
169
- "startingPoint": "0",
170
- "forestPlotAlignRight": false,
171
- "roundToPlace": 0,
172
- "commas": false,
173
- "showInViz": false,
174
- "forestPlotStartingPoint": 0,
175
- "name": "95% Confidence interval",
176
- "order": 4
177
- },
178
- "Percent": {
179
- "label": "Percent",
180
- "dataTable": true,
181
- "tooltips": false,
182
- "prefix": "",
183
- "suffix": "%",
184
- "forestPlot": false,
185
- "startingPoint": "0",
186
- "forestPlotAlignRight": false,
187
- "roundToPlace": "1",
188
- "commas": false,
189
- "showInViz": false,
190
- "forestPlotStartingPoint": 0,
191
- "name": "Percent",
192
- "order": 3
193
- },
194
- "Number of adults": {
195
- "label": "Number of adults",
196
- "dataTable": true,
197
- "tooltips": false,
198
- "prefix": "",
199
- "suffix": "",
200
- "forestPlot": false,
201
- "startingPoint": "0",
202
- "forestPlotAlignRight": false,
203
- "roundToPlace": 0,
204
- "commas": true,
205
- "showInViz": false,
206
- "forestPlotStartingPoint": 0,
207
- "name": "Number of adults"
208
- }
209
- },
210
- "legend": {
211
- "hide": false,
212
- "behavior": "isolate",
213
- "axisAlign": true,
214
- "singleRow": true,
215
- "colorCode": "",
216
- "reverseLabelOrder": false,
217
- "description": "",
218
- "dynamicLegend": false,
219
- "dynamicLegendDefaultText": "Show All",
220
- "dynamicLegendItemLimit": 5,
221
- "dynamicLegendItemLimitMessage": "Dynamic Legend Item Limit Hit.",
222
- "dynamicLegendChartMessage": "Select Options from the Legend",
223
- "label": "",
224
- "lineMode": false,
225
- "verticalSorted": false,
226
- "highlightOnHover": false,
227
- "hideSuppressedLabels": false,
228
- "hideSuppressionLink": false,
229
- "seriesHighlight": [],
230
- "style": "circles",
231
- "subStyle": "linear blocks",
232
- "groupBy": "",
233
- "shape": "circle",
234
- "tickRotation": "",
235
- "hideBorder": {
236
- "side": false,
237
- "topBottom": true
238
- },
239
- "position": "right"
240
- },
241
- "brush": {
242
- "height": 25,
243
- "active": false
244
- },
245
- "exclusions": {
246
- "active": false,
247
- "keys": []
248
- },
249
- "palette": "sequential-bluereverse",
250
- "isPaletteReversed": true,
251
- "twoColor": {
252
- "palette": "monochrome-1",
253
- "isPaletteReversed": false
254
- },
255
- "labels": false,
256
- "dataFormat": {
257
- "commas": false,
258
- "prefix": "",
259
- "suffix": "",
260
- "abbreviated": false,
261
- "bottomSuffix": "",
262
- "bottomPrefix": "",
263
- "bottomAbbreviated": false,
264
- "roundTo": ""
265
- },
266
- "confidenceKeys": {},
267
- "visual": {
268
- "border": true,
269
- "accent": true,
270
- "background": true,
271
- "verticalHoverLine": false,
272
- "horizontalHoverLine": false,
273
- "lineDatapointSymbol": "none",
274
- "maximumShapeAmount": 7
275
- },
276
- "useLogScale": false,
277
- "filterBehavior": "Filter Change",
278
- "highlightedBarValues": [],
279
- "series": [
280
- {
281
- "dataKey": "Percent",
282
- "type": "Bar",
283
- "axis": "Left",
284
- "tooltip": true
285
- }
286
- ],
287
- "tooltips": {
288
- "opacity": 90,
289
- "singleSeries": false,
290
- "dateDisplayFormat": ""
291
- },
292
- "forestPlot": {
293
- "startAt": 0,
294
- "colors": {
295
- "line": "",
296
- "shape": ""
297
- },
298
- "lineOfNoEffect": {
299
- "show": true
300
- },
301
- "type": "",
302
- "pooledResult": {
303
- "diamondHeight": 5,
304
- "column": ""
305
- },
306
- "estimateField": "",
307
- "estimateRadius": "",
308
- "shape": "square",
309
- "rowHeight": 20,
310
- "description": {
311
- "show": true,
312
- "text": "description",
313
- "location": 0
314
- },
315
- "result": {
316
- "show": true,
317
- "text": "result",
318
- "location": 100
319
- },
320
- "radius": {
321
- "min": 2,
322
- "max": 10,
323
- "scalingColumn": ""
324
- },
325
- "regression": {
326
- "lower": 0,
327
- "upper": 0,
328
- "estimateField": 0
329
- },
330
- "leftWidthOffset": 0,
331
- "rightWidthOffset": 0,
332
- "showZeroLine": false,
333
- "leftLabel": "",
334
- "rightLabel": ""
335
- },
336
- "area": {
337
- "isStacked": false
338
- },
339
- "sankey": {
340
- "title": {
341
- "defaultColor": "black"
342
- },
343
- "iterations": 1,
344
- "rxValue": 0.9,
345
- "overallSize": {
346
- "width": 900,
347
- "height": 700
348
- },
349
- "margin": {
350
- "margin_y": 25,
351
- "margin_x": 0
352
- },
353
- "nodeSize": {
354
- "nodeWidth": 26,
355
- "nodeHeight": 40
356
- },
357
- "nodePadding": 55,
358
- "nodeFontColor": "black",
359
- "nodeColor": {
360
- "default": "#ff8500",
361
- "inactive": "#808080"
362
- },
363
- "linkColor": {
364
- "default": "#ffc900",
365
- "inactive": "#D3D3D3"
366
- },
367
- "opacity": {
368
- "nodeOpacityDefault": 1,
369
- "nodeOpacityInactive": 0.1,
370
- "LinkOpacityDefault": 1,
371
- "LinkOpacityInactive": 0.1
372
- },
373
- "storyNodeFontColor": "#006778",
374
- "storyNodeText": [],
375
- "nodeValueStyle": {
376
- "textBefore": "(",
377
- "textAfter": ")"
378
- },
379
- "data": []
380
- },
381
- "datasets": {},
382
- "visualizationType": "Pie",
383
- "data": [
384
- {
385
- "Subgroup": "Yes",
386
- "Number of adults": "1201537",
387
- "Percent": "38.4",
388
- "95% Confidence interval": "34.8 - 42.1"
389
- },
390
- {
391
- "Subgroup": "No",
392
- "Number of adults": "1927950",
393
- "Percent": "61.6",
394
- "95% Confidence interval": "57.9 - 65.2"
395
- }
396
- ],
397
- "dataFileName": "disability-status.csv",
398
- "dataFileSourceType": "file",
399
- "dataDescription": {
400
- "horizontal": false,
401
- "series": false
402
- },
403
- "version": "4.25.1",
404
- "footnotes": "<sup>a</sup> The final recode variable created for Washington Group Adult Composite Disability Indicator. Disability is defined by the reported level of difficulty (no difficulty, some difficulty, a lot of difficulty, or cannot do at all) in six functioning domains: seeing (even if wearing glasses), hearing (even if wearing hearing aids), mobility (walking or climbing stairs), communication (understanding or being understood by others), cognition (remembering or concentrating), and self-care (such as washing all over or dressing). Sample adults who responded \"a lot of difficulty\" or \"cannot do at all\" to at least one question were considered to have a disability.<br/><br/>\n\n<sup>b</sup> Active epilepsy was defined as adults who answered that a doctor or health professional had ever told them they had a seizure disorder or epilepsy and also reported taking medication, having had one or more seizures in the past year, or both.",
405
- "dynamicMarginTop": 0,
406
- "filters": [],
407
- "migrations": {
408
- "addColorMigration": true
409
- },
410
- "id": 13,
411
- "category": "Charts",
412
- "label": "Pie",
413
- "subType": "Pie",
414
- "icon": {
415
- "key": null,
416
- "ref": null,
417
- "props": {},
418
- "_owner": null
419
- },
420
- "content": "Present the numerical proportions of a data series.",
421
- "activeVizButtonID": 13,
422
- "formattedData": [
423
- {
424
- "Subgroup": "Yes",
425
- "Number of adults": "1201537",
426
- "Percent": "38.4",
427
- "95% Confidence interval": "34.8 - 42.1"
428
- },
429
- {
430
- "Subgroup": "No",
431
- "Number of adults": "1927950",
432
- "Percent": "61.6",
433
- "95% Confidence interval": "57.9 - 65.2"
434
- }
435
- ]
436
- }
@@ -1,3 +0,0 @@
1
- import BoxPlot from './BoxPlot'
2
-
3
- export default BoxPlot