@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,443 +0,0 @@
1
- {
2
- "annotations": [],
3
- "type": "chart",
4
- "debugSvg": false,
5
- "chartMessage": {
6
- "noData": "No Data Available"
7
- },
8
- "title": "",
9
- "showTitle": true,
10
- "showDownloadMediaButton": false,
11
- "theme": "theme-blue",
12
- "animate": false,
13
- "fontSize": "medium",
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": "flat",
22
- "roundingStyle": "standard",
23
- "tipRounding": "top",
24
- "isResponsiveTicks": false,
25
- "general": {
26
- "annotationDropdownText": "Annotations",
27
- "showDownloadButton": false,
28
- "showMissingDataLabel": true,
29
- "showSuppressedSymbol": true,
30
- "showZeroValueData": true,
31
- "hideNullValue": true
32
- },
33
- "padding": {
34
- "left": 5,
35
- "right": 5
36
- },
37
- "preliminaryData": [],
38
- "yAxis": {
39
- "hideAxis": false,
40
- "displayNumbersOnBar": false,
41
- "hideLabel": false,
42
- "hideTicks": false,
43
- "size": 50,
44
- "gridLines": false,
45
- "enablePadding": false,
46
- "min": "",
47
- "max": "",
48
- "labelColor": "#333",
49
- "tickLabelColor": "#333",
50
- "tickColor": "#333",
51
- "rightHideAxis": true,
52
- "rightAxisSize": 0,
53
- "rightLabel": "",
54
- "rightLabelOffsetSize": 0,
55
- "rightAxisLabelColor": "#333",
56
- "rightAxisTickLabelColor": "#333",
57
- "rightAxisTickColor": "#333",
58
- "numTicks": "",
59
- "axisPadding": 0,
60
- "scalePadding": 10,
61
- "tickRotation": 0,
62
- "anchors": [],
63
- "shoMissingDataLabel": true,
64
- "showMissingDataLine": true,
65
- "categories": []
66
- },
67
- "boxplot": {
68
- "plots": [],
69
- "borders": "true",
70
- "plotOutlierValues": false,
71
- "plotNonOutlierValues": true,
72
- "labels": {
73
- "q1": "Lower Quartile",
74
- "q2": "q2",
75
- "q3": "Upper Quartile",
76
- "q4": "q4",
77
- "minimum": "Minimum",
78
- "maximum": "Maximum",
79
- "mean": "Mean",
80
- "median": "Median",
81
- "sd": "Standard Deviation",
82
- "iqr": "Interquartile Range",
83
- "count": "Count",
84
- "outliers": "Outliers",
85
- "values": "Values",
86
- "lowerBounds": "Lower Bounds",
87
- "upperBounds": "Upper Bounds"
88
- }
89
- },
90
- "topAxis": {
91
- "hasLine": false
92
- },
93
- "isLegendValue": false,
94
- "barThickness": 0.35,
95
- "barHeight": 25,
96
- "barSpace": 15,
97
- "heights": {
98
- "vertical": 300,
99
- "horizontal": 750
100
- },
101
- "xAxis": {
102
- "sortDates": false,
103
- "anchors": [],
104
- "type": "categorical",
105
- "showTargetLabel": true,
106
- "targetLabel": "Target",
107
- "hideAxis": false,
108
- "hideLabel": false,
109
- "hideTicks": false,
110
- "size": 75,
111
- "tickRotation": "45",
112
- "min": "",
113
- "max": "",
114
- "labelColor": "#333",
115
- "tickLabelColor": "#333",
116
- "tickColor": "#333",
117
- "numTicks": "",
118
- "labelOffset": 0,
119
- "axisPadding": 200,
120
- "target": 0,
121
- "maxTickRotation": 0,
122
- "padding": "0",
123
- "showYearsOnce": false,
124
- "sortByRecentDate": false,
125
- "dataKey": "date",
126
- "axisBBox": 114.42626953125,
127
- "tickWidthMax": 93,
128
- "dateParseFormat": "%Y-%m-%d",
129
- "dateDisplayFormat": "%Y-%m-%d",
130
- "manual": false,
131
- "label": "Date"
132
- },
133
- "table": {
134
- "label": "Data Table",
135
- "expanded": true,
136
- "limitHeight": false,
137
- "height": "",
138
- "caption": "",
139
- "showDownloadUrl": false,
140
- "showDataTableLink": true,
141
- "showDownloadLinkBelow": true,
142
- "indexLabel": "",
143
- "download": true,
144
- "showVertical": true,
145
- "dateDisplayFormat": "%Y-%m-%d",
146
- "showMissingDataLabel": true,
147
- "showSuppressedSymbol": true,
148
- "show": true
149
- },
150
- "orientation": "vertical",
151
- "color": "pinkpurple",
152
- "columns": {
153
- "male_ci": {
154
- "label": "Male (CI)",
155
- "dataTable": true,
156
- "tooltips": false,
157
- "prefix": "",
158
- "suffix": "",
159
- "forestPlot": false,
160
- "startingPoint": "0",
161
- "forestPlotAlignRight": false,
162
- "roundToPlace": 0,
163
- "commas": false,
164
- "showInViz": false,
165
- "forestPlotStartingPoint": 0,
166
- "name": "male_ci"
167
- },
168
- "female_ci": {
169
- "label": "Female (CI)",
170
- "dataTable": true,
171
- "tooltips": false,
172
- "prefix": "",
173
- "suffix": "",
174
- "forestPlot": false,
175
- "startingPoint": "0",
176
- "forestPlotAlignRight": false,
177
- "roundToPlace": 0,
178
- "commas": false,
179
- "showInViz": false,
180
- "forestPlotStartingPoint": 0,
181
- "name": "female_ci"
182
- },
183
- "male": {
184
- "label": "male",
185
- "dataTable": false,
186
- "tooltips": false,
187
- "prefix": "",
188
- "suffix": "",
189
- "forestPlot": false,
190
- "startingPoint": "0",
191
- "forestPlotAlignRight": false,
192
- "roundToPlace": 0,
193
- "commas": false,
194
- "showInViz": false,
195
- "forestPlotStartingPoint": 0,
196
- "name": "male"
197
- },
198
- "female": {
199
- "label": "female",
200
- "dataTable": false,
201
- "tooltips": false,
202
- "prefix": "",
203
- "suffix": "",
204
- "forestPlot": false,
205
- "startingPoint": "0",
206
- "forestPlotAlignRight": false,
207
- "roundToPlace": 0,
208
- "commas": false,
209
- "showInViz": false,
210
- "forestPlotStartingPoint": 0,
211
- "name": "female"
212
- },
213
- "date": {
214
- "label": "Date",
215
- "dataTable": true,
216
- "tooltips": false,
217
- "prefix": "",
218
- "suffix": "",
219
- "forestPlot": false,
220
- "startingPoint": "0",
221
- "forestPlotAlignRight": false,
222
- "roundToPlace": 0,
223
- "commas": false,
224
- "showInViz": false,
225
- "forestPlotStartingPoint": 0,
226
- "name": "date"
227
- }
228
- },
229
- "legend": {
230
- "hide": false,
231
- "behavior": "isolate",
232
- "axisAlign": true,
233
- "singleRow": true,
234
- "colorCode": "",
235
- "reverseLabelOrder": false,
236
- "description": "",
237
- "dynamicLegend": false,
238
- "dynamicLegendDefaultText": "Show All",
239
- "dynamicLegendItemLimit": 5,
240
- "dynamicLegendItemLimitMessage": "Dynamic Legend Item Limit Hit.",
241
- "dynamicLegendChartMessage": "Select Options from the Legend",
242
- "label": "",
243
- "lineMode": false,
244
- "verticalSorted": false,
245
- "highlightOnHover": false,
246
- "hideSuppressedLabels": false,
247
- "hideSuppressionLink": false,
248
- "seriesHighlight": [],
249
- "style": "circles",
250
- "subStyle": "linear blocks",
251
- "tickRotation": "",
252
- "hideBorder": {
253
- "side": false,
254
- "topBottom": true
255
- },
256
- "position": "right"
257
- },
258
- "brush": {
259
- "height": 25,
260
- "active": false
261
- },
262
- "exclusions": {
263
- "active": true,
264
- "keys": [],
265
- "dateStart": "2023-01-02",
266
- "dateEnd": "2023-01-11"
267
- },
268
- "palette": "qualitative-bold",
269
- "isPaletteReversed": false,
270
- "twoColor": {
271
- "palette": "monochrome-1",
272
- "isPaletteReversed": false
273
- },
274
- "labels": false,
275
- "dataFormat": {
276
- "commas": false,
277
- "prefix": "",
278
- "suffix": "",
279
- "abbreviated": false,
280
- "bottomSuffix": "",
281
- "bottomPrefix": "",
282
- "bottomAbbreviated": false
283
- },
284
- "confidenceKeys": {
285
- "upper": "upper",
286
- "lower": "lower"
287
- },
288
- "visual": {
289
- "border": true,
290
- "accent": true,
291
- "background": true,
292
- "verticalHoverLine": false,
293
- "horizontalHoverLine": false
294
- },
295
- "useLogScale": false,
296
- "filterBehavior": "Filter Change",
297
- "highlightedBarValues": [],
298
- "series": [
299
- {
300
- "dataKey": "value",
301
- "type": "Bar",
302
- "axis": "Left",
303
- "tooltip": true,
304
- "dynamicCategory": "category"
305
- }
306
- ],
307
- "tooltips": {
308
- "opacity": 90,
309
- "singleSeries": false,
310
- "dateDisplayFormat": ""
311
- },
312
- "forestPlot": {
313
- "startAt": 0,
314
- "colors": {
315
- "line": "",
316
- "shape": ""
317
- },
318
- "lineOfNoEffect": {
319
- "show": true
320
- },
321
- "type": "",
322
- "pooledResult": {
323
- "diamondHeight": 5,
324
- "column": ""
325
- },
326
- "estimateField": "",
327
- "estimateRadius": "",
328
- "shape": "square",
329
- "rowHeight": 20,
330
- "description": {
331
- "show": true,
332
- "text": "description",
333
- "location": 0
334
- },
335
- "result": {
336
- "show": true,
337
- "text": "result",
338
- "location": 100
339
- },
340
- "radius": {
341
- "min": 2,
342
- "max": 10,
343
- "scalingColumn": ""
344
- },
345
- "regression": {
346
- "lower": 0,
347
- "upper": 0,
348
- "estimateField": 0
349
- },
350
- "leftWidthOffset": 0,
351
- "rightWidthOffset": 0,
352
- "showZeroLine": false,
353
- "leftLabel": "",
354
- "rightLabel": ""
355
- },
356
- "area": {
357
- "isStacked": false
358
- },
359
- "sankey": {
360
- "title": {
361
- "defaultColor": "black"
362
- },
363
- "iterations": 1,
364
- "rxValue": 0.9,
365
- "overallSize": {
366
- "width": 900,
367
- "height": 700
368
- },
369
- "margin": {
370
- "margin_y": 25,
371
- "margin_x": 0
372
- },
373
- "nodeSize": {
374
- "nodeWidth": 26,
375
- "nodeHeight": 40
376
- },
377
- "nodePadding": 55,
378
- "nodeFontColor": "black",
379
- "nodeColor": {
380
- "default": "#ff8500",
381
- "inactive": "#808080"
382
- },
383
- "linkColor": {
384
- "default": "#ffc900",
385
- "inactive": "#D3D3D3"
386
- },
387
- "opacity": {
388
- "nodeOpacityDefault": 1,
389
- "nodeOpacityInactive": 0.1,
390
- "LinkOpacityDefault": 1,
391
- "LinkOpacityInactive": 0.1
392
- },
393
- "storyNodeFontColor": "#006778",
394
- "storyNodeText": [],
395
- "nodeValueStyle": {
396
- "textBefore": "(",
397
- "textAfter": ")"
398
- },
399
- "data": []
400
- },
401
- "visualizationType": "Bar",
402
- "data": [
403
- {
404
- "date": "2023-01-01",
405
- "category": "demographic 1",
406
- "value": 67,
407
- "lower": 65,
408
- "upper": 69,
409
- "demographic_1_lower": 65,
410
- "demographic_1_upper": 69,
411
- "demographic_1_formatted": "CI (65, 69)"
412
- },
413
- {
414
- "date": "2023-01-01",
415
- "category": "demographic 2",
416
- "value": 77,
417
- "lower": 73,
418
- "upper": 81,
419
- "demographic_2_lower": 73,
420
- "demographic_2_upper": 81,
421
- "demographic_2_formatted": "CI (73, 81)"
422
- },
423
- {
424
- "date": "2023-01-01",
425
- "category": "demographic 3",
426
- "value": 50,
427
- "lower": 48,
428
- "upper": 52,
429
- "demographic_3_lower": 48,
430
- "demographic_3_upper": 52,
431
- "demographic_3_formatted": "CI (48, 52)"
432
- }
433
- ],
434
- "dataFileName": "valid-forecast-data.csv",
435
- "dataFileSourceType": "file",
436
- "dataDescription": {
437
- "horizontal": false,
438
- "series": false
439
- },
440
- "version": "4.24.12",
441
- "dynamicMarginTop": 0,
442
- "regions": []
443
- }