@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,553 +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": 116.57705688476562,
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
- "date": {
154
- "label": "Date",
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": "date"
167
- }
168
- },
169
- "legend": {
170
- "hide": false,
171
- "behavior": "isolate",
172
- "axisAlign": true,
173
- "singleRow": true,
174
- "colorCode": "",
175
- "reverseLabelOrder": false,
176
- "description": "",
177
- "dynamicLegend": false,
178
- "dynamicLegendDefaultText": "Show All",
179
- "dynamicLegendItemLimit": 5,
180
- "dynamicLegendItemLimitMessage": "Dynamic Legend Item Limit Hit.",
181
- "dynamicLegendChartMessage": "Select Options from the Legend",
182
- "label": "",
183
- "lineMode": false,
184
- "verticalSorted": false,
185
- "highlightOnHover": false,
186
- "hideSuppressedLabels": false,
187
- "hideSuppressionLink": false,
188
- "seriesHighlight": [],
189
- "style": "circles",
190
- "subStyle": "linear blocks",
191
- "tickRotation": "",
192
- "hideBorder": {
193
- "side": false,
194
- "topBottom": true
195
- },
196
- "position": "right"
197
- },
198
- "brush": {
199
- "height": 25,
200
- "active": false
201
- },
202
- "exclusions": {
203
- "active": true,
204
- "keys": [],
205
- "dateStart": "2023-01-02",
206
- "dateEnd": "2023-01-11"
207
- },
208
- "palette": "qualitative-bold",
209
- "isPaletteReversed": false,
210
- "twoColor": {
211
- "palette": "monochrome-1",
212
- "isPaletteReversed": false
213
- },
214
- "labels": false,
215
- "dataFormat": {
216
- "commas": false,
217
- "prefix": "",
218
- "suffix": "",
219
- "abbreviated": false,
220
- "bottomSuffix": "",
221
- "bottomPrefix": "",
222
- "bottomAbbreviated": false
223
- },
224
- "confidenceKeys": {
225
- "upper": "upper",
226
- "lower": "lower"
227
- },
228
- "visual": {
229
- "border": true,
230
- "accent": true,
231
- "background": true,
232
- "verticalHoverLine": false,
233
- "horizontalHoverLine": false
234
- },
235
- "useLogScale": false,
236
- "filterBehavior": "Filter Change",
237
- "highlightedBarValues": [],
238
- "series": [
239
- {
240
- "dataKey": "value",
241
- "type": "Line",
242
- "axis": "Left",
243
- "tooltip": true,
244
- "dynamicCategory": "category"
245
- }
246
- ],
247
- "tooltips": {
248
- "opacity": 90,
249
- "singleSeries": false,
250
- "dateDisplayFormat": ""
251
- },
252
- "forestPlot": {
253
- "startAt": 0,
254
- "colors": {
255
- "line": "",
256
- "shape": ""
257
- },
258
- "lineOfNoEffect": {
259
- "show": true
260
- },
261
- "type": "",
262
- "pooledResult": {
263
- "diamondHeight": 5,
264
- "column": ""
265
- },
266
- "estimateField": "",
267
- "estimateRadius": "",
268
- "shape": "square",
269
- "rowHeight": 20,
270
- "description": {
271
- "show": true,
272
- "text": "description",
273
- "location": 0
274
- },
275
- "result": {
276
- "show": true,
277
- "text": "result",
278
- "location": 100
279
- },
280
- "radius": {
281
- "min": 2,
282
- "max": 10,
283
- "scalingColumn": ""
284
- },
285
- "regression": {
286
- "lower": 0,
287
- "upper": 0,
288
- "estimateField": 0
289
- },
290
- "leftWidthOffset": 0,
291
- "rightWidthOffset": 0,
292
- "showZeroLine": false,
293
- "leftLabel": "",
294
- "rightLabel": ""
295
- },
296
- "area": {
297
- "isStacked": false
298
- },
299
- "sankey": {
300
- "title": {
301
- "defaultColor": "black"
302
- },
303
- "iterations": 1,
304
- "rxValue": 0.9,
305
- "overallSize": {
306
- "width": 900,
307
- "height": 700
308
- },
309
- "margin": {
310
- "margin_y": 25,
311
- "margin_x": 0
312
- },
313
- "nodeSize": {
314
- "nodeWidth": 26,
315
- "nodeHeight": 40
316
- },
317
- "nodePadding": 55,
318
- "nodeFontColor": "black",
319
- "nodeColor": {
320
- "default": "#ff8500",
321
- "inactive": "#808080"
322
- },
323
- "linkColor": {
324
- "default": "#ffc900",
325
- "inactive": "#D3D3D3"
326
- },
327
- "opacity": {
328
- "nodeOpacityDefault": 1,
329
- "nodeOpacityInactive": 0.1,
330
- "LinkOpacityDefault": 1,
331
- "LinkOpacityInactive": 0.1
332
- },
333
- "storyNodeFontColor": "#006778",
334
- "storyNodeText": [],
335
- "nodeValueStyle": {
336
- "textBefore": "(",
337
- "textAfter": ")"
338
- },
339
- "data": []
340
- },
341
- "visualizationType": "Line",
342
- "data": [
343
- {
344
- "date": "2023-01-01",
345
- "category": "male",
346
- "value": 67,
347
- "lower": 65,
348
- "upper": 69,
349
- "male_lower": 65,
350
- "male_upper": 69,
351
- "male_formatted": "CI (65, 69)"
352
- },
353
- {
354
- "date": "2023-01-01",
355
- "category": "female",
356
- "value": 77,
357
- "lower": 73,
358
- "upper": 81,
359
- "female_lower": 73,
360
- "female_upper": 81,
361
- "female_formatted": "CI (73, 81)"
362
- },
363
- {
364
- "date": "2023-01-02",
365
- "category": "male",
366
- "value": 11,
367
- "lower": 10,
368
- "upper": 13,
369
- "male_lower": 10,
370
- "male_upper": 13,
371
- "male_formatted": "CI (10, 13)"
372
- },
373
- {
374
- "date": "2023-01-02",
375
- "category": "female",
376
- "value": 21,
377
- "lower": 18,
378
- "upper": 24,
379
- "female_lower": 18,
380
- "female_upper": 24,
381
- "female_formatted": "CI (18, 24)"
382
- },
383
- {
384
- "date": "2023-01-03",
385
- "category": "male",
386
- "value": 94,
387
- "lower": 92,
388
- "upper": 96,
389
- "male_lower": 92,
390
- "male_upper": 96,
391
- "male_formatted": "CI (92, 96)"
392
- },
393
- {
394
- "date": "2023-01-03",
395
- "category": "female",
396
- "value": 104,
397
- "lower": 100,
398
- "upper": 108,
399
- "female_lower": 100,
400
- "female_upper": 108,
401
- "female_formatted": "CI (100, 108)"
402
- },
403
- {
404
- "date": "2023-01-04",
405
- "category": "male",
406
- "value": 95,
407
- "lower": 93,
408
- "upper": 97,
409
- "male_lower": 93,
410
- "male_upper": 97,
411
- "male_formatted": "CI (93, 97)"
412
- },
413
- {
414
- "date": "2023-01-04",
415
- "category": "female",
416
- "value": 105,
417
- "lower": 101,
418
- "upper": 109,
419
- "female_lower": 101,
420
- "female_upper": 109,
421
- "female_formatted": "CI (101, 109)"
422
- },
423
- {
424
- "date": "2023-01-05",
425
- "category": "male",
426
- "value": 79,
427
- "lower": 77,
428
- "upper": 81,
429
- "male_lower": 77,
430
- "male_upper": 81,
431
- "male_formatted": "CI (77, 81)"
432
- },
433
- {
434
- "date": "2023-01-05",
435
- "category": "female",
436
- "value": 89,
437
- "lower": 85,
438
- "upper": 93,
439
- "female_lower": 85,
440
- "female_upper": 93,
441
- "female_formatted": "CI (85, 93)"
442
- },
443
- {
444
- "date": "2023-01-06",
445
- "category": "male",
446
- "value": 2,
447
- "lower": 1,
448
- "upper": 3,
449
- "male_lower": 1,
450
- "male_upper": 3,
451
- "male_formatted": "CI (1, 3)"
452
- },
453
- {
454
- "date": "2023-01-06",
455
- "category": "female",
456
- "value": 12,
457
- "lower": 9,
458
- "upper": 15,
459
- "female_lower": 9,
460
- "female_upper": 15,
461
- "female_formatted": "CI (9, 15)"
462
- },
463
- {
464
- "date": "2023-01-07",
465
- "category": "male",
466
- "value": 36,
467
- "lower": 34,
468
- "upper": 38,
469
- "male_lower": 34,
470
- "male_upper": 38,
471
- "male_formatted": "CI (34, 38)"
472
- },
473
- {
474
- "date": "2023-01-07",
475
- "category": "female",
476
- "value": 46,
477
- "lower": 42,
478
- "upper": 50,
479
- "female_lower": 42,
480
- "female_upper": 50,
481
- "female_formatted": "CI (42, 50)"
482
- },
483
- {
484
- "date": "2023-01-08",
485
- "category": "male",
486
- "value": 9,
487
- "lower": 7,
488
- "upper": 11,
489
- "male_lower": 7,
490
- "male_upper": 11,
491
- "male_formatted": "CI (7, 11)"
492
- },
493
- {
494
- "date": "2023-01-08",
495
- "category": "female",
496
- "value": 19,
497
- "lower": 16,
498
- "upper": 22,
499
- "female_lower": 16,
500
- "female_upper": 22,
501
- "female_formatted": "CI (16, 22)"
502
- },
503
- {
504
- "date": "2023-01-09",
505
- "category": "male",
506
- "value": 3,
507
- "lower": 2,
508
- "upper": 4,
509
- "male_lower": 2,
510
- "male_upper": 4,
511
- "male_formatted": "CI (2, 4)"
512
- },
513
- {
514
- "date": "2023-01-09",
515
- "category": "female",
516
- "value": 13,
517
- "lower": 10,
518
- "upper": 16,
519
- "female_lower": 10,
520
- "female_upper": 16,
521
- "female_formatted": "CI (10, 16)"
522
- },
523
- {
524
- "date": "2023-01-10",
525
- "category": "male",
526
- "value": 64,
527
- "lower": 62,
528
- "upper": 66,
529
- "male_lower": 62,
530
- "male_upper": 66,
531
- "male_formatted": "CI (62, 66)"
532
- },
533
- {
534
- "date": "2023-01-10",
535
- "category": "female",
536
- "value": 74,
537
- "lower": 70,
538
- "upper": 78,
539
- "female_lower": 70,
540
- "female_upper": 78,
541
- "female_formatted": "CI (70, 78)"
542
- }
543
- ],
544
- "dataFileName": "valid-forecast-data.csv",
545
- "dataFileSourceType": "file",
546
- "dataDescription": {
547
- "horizontal": false,
548
- "series": false
549
- },
550
- "version": "4.24.10",
551
- "dynamicMarginTop": 0,
552
- "regions": []
553
- }