@cdc/chart 4.25.6 → 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.
- package/dist/cdcchart.js +52667 -32246
- package/package.json +3 -2
- package/src/CdcChartComponent.tsx +13 -9
- package/src/_stories/Chart.BoxPlot.stories.tsx +35 -0
- package/src/_stories/Chart.stories.tsx +0 -7
- package/src/_stories/Chart.tooltip.stories.tsx +35 -275
- package/src/_stories/_mock/bar-chart-suppressed.json +2 -80
- package/src/_stories/_mock/boxplot_multiseries.json +252 -166
- package/src/components/AreaChart/components/AreaChart.Stacked.jsx +1 -1
- package/src/components/AreaChart/components/AreaChart.jsx +4 -8
- package/src/components/BarChart/components/BarChart.Horizontal.tsx +34 -2
- package/src/components/BarChart/components/BarChart.Vertical.tsx +15 -0
- package/src/components/BoxPlot/BoxPlot.Horizontal.tsx +131 -0
- package/src/components/BoxPlot/{BoxPlot.tsx → BoxPlot.Vertical.tsx} +4 -4
- package/src/components/BoxPlot/helpers/index.ts +32 -12
- package/src/components/BrushChart.tsx +1 -1
- package/src/components/EditorPanel/EditorPanel.tsx +19 -14
- package/src/components/EditorPanel/components/Panels/Panel.General.tsx +2 -2
- package/src/components/Forecasting/{Forecasting.jsx → Forecasting.tsx} +32 -12
- package/src/components/Legend/LegendGroup/LegendGroup.tsx +1 -0
- package/src/components/Legend/helpers/index.ts +2 -2
- package/src/components/LineChart/helpers.ts +7 -7
- package/src/components/LinearChart.tsx +127 -72
- package/src/data/initial-state.js +1 -5
- package/src/helpers/countNumOfTicks.ts +4 -19
- package/src/helpers/filterAndShiftLinearDateTicks.ts +58 -0
- package/src/helpers/getBridgedData.ts +13 -0
- package/src/helpers/tests/getBridgedData.test.ts +64 -0
- package/src/hooks/useScales.ts +42 -42
- package/src/hooks/useTooltip.tsx +3 -2
- package/src/scss/main.scss +2 -4
- package/src/store/chart.actions.ts +2 -2
- package/src/store/chart.reducer.ts +4 -12
- package/src/types/ChartConfig.ts +1 -6
- package/src/components/BoxPlot/index.tsx +0 -3
- /package/src/components/Brush/{BrushController..tsx → BrushController.tsx} +0 -0
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
"isResponsiveTicks": false,
|
|
25
25
|
"general": {
|
|
26
26
|
"annotationDropdownText": "Annotations",
|
|
27
|
-
"showDownloadButton": false,
|
|
28
27
|
"showMissingDataLabel": true,
|
|
29
28
|
"showSuppressedSymbol": true,
|
|
30
29
|
"showZeroValueData": true,
|
|
@@ -65,94 +64,220 @@
|
|
|
65
64
|
"categories": [],
|
|
66
65
|
"dataKey": "value",
|
|
67
66
|
"isLegendValue": false,
|
|
68
|
-
"label": "Observations"
|
|
67
|
+
"label": "Observations",
|
|
68
|
+
"labelPlacement": "On Date/Category Axis",
|
|
69
|
+
"type": "__undefined__"
|
|
69
70
|
},
|
|
70
71
|
"boxplot": {
|
|
71
72
|
"plots": [
|
|
72
73
|
{
|
|
73
74
|
"columnCategory": "category one",
|
|
74
|
-
"columnMax":
|
|
75
|
-
"columnThirdQuartile":
|
|
76
|
-
"columnMedian": "
|
|
77
|
-
"columnFirstQuartile":
|
|
78
|
-
"columnMin":
|
|
79
|
-
"columnCount":
|
|
80
|
-
"columnSd": "
|
|
81
|
-
"columnMean": "
|
|
82
|
-
"columnIqr":
|
|
83
|
-
"
|
|
84
|
-
"
|
|
75
|
+
"columnMax": 123,
|
|
76
|
+
"columnThirdQuartile": 111,
|
|
77
|
+
"columnMedian": "99",
|
|
78
|
+
"columnFirstQuartile": 50,
|
|
79
|
+
"columnMin": 0,
|
|
80
|
+
"columnCount": 3,
|
|
81
|
+
"columnSd": "65",
|
|
82
|
+
"columnMean": "74",
|
|
83
|
+
"columnIqr": 62,
|
|
84
|
+
"values": [0, 123, 99],
|
|
85
|
+
"columnLowerBounds": -42.75,
|
|
86
|
+
"columnUpperBounds": 203.25,
|
|
85
87
|
"columnOutliers": [],
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
"columnNonOutliers": [0, 123, 99]
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"columnCategory": "category one",
|
|
92
|
+
"columnMax": 23,
|
|
93
|
+
"columnThirdQuartile": 21,
|
|
94
|
+
"columnMedian": "19",
|
|
95
|
+
"columnFirstQuartile": 10,
|
|
96
|
+
"columnMin": 0,
|
|
97
|
+
"columnCount": 3,
|
|
98
|
+
"columnSd": "12",
|
|
99
|
+
"columnMean": "14",
|
|
100
|
+
"columnIqr": 12,
|
|
101
|
+
"values": [0, 19, 23],
|
|
102
|
+
"columnLowerBounds": -7.75,
|
|
103
|
+
"columnUpperBounds": 38.25,
|
|
104
|
+
"columnOutliers": [],
|
|
105
|
+
"columnNonOutliers": [0, 19, 23]
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"columnCategory": "category one",
|
|
109
|
+
"columnMax": 115,
|
|
110
|
+
"columnThirdQuartile": 80,
|
|
111
|
+
"columnMedian": "44",
|
|
112
|
+
"columnFirstQuartile": 22,
|
|
113
|
+
"columnMin": 0,
|
|
114
|
+
"columnCount": 3,
|
|
115
|
+
"columnSd": "58",
|
|
116
|
+
"columnMean": "53",
|
|
117
|
+
"columnIqr": 58,
|
|
118
|
+
"values": [0, 115, 44],
|
|
119
|
+
"columnLowerBounds": -64.25,
|
|
120
|
+
"columnUpperBounds": 165.75,
|
|
121
|
+
"columnOutliers": [],
|
|
122
|
+
"columnNonOutliers": [0, 115, 44]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"columnCategory": "category two",
|
|
126
|
+
"columnMax": 55,
|
|
127
|
+
"columnThirdQuartile": 35,
|
|
128
|
+
"columnMedian": "14",
|
|
129
|
+
"columnFirstQuartile": 7,
|
|
130
|
+
"columnMin": 0,
|
|
131
|
+
"columnCount": 3,
|
|
132
|
+
"columnSd": "29",
|
|
133
|
+
"columnMean": "23",
|
|
134
|
+
"columnIqr": 28,
|
|
135
|
+
"values": [0, 14, 55],
|
|
136
|
+
"columnLowerBounds": -34.25,
|
|
137
|
+
"columnUpperBounds": 75.75,
|
|
138
|
+
"columnOutliers": [],
|
|
139
|
+
"columnNonOutliers": [0, 14, 55]
|
|
91
140
|
},
|
|
92
141
|
{
|
|
93
142
|
"columnCategory": "category two",
|
|
94
143
|
"columnMax": 19,
|
|
95
|
-
"columnThirdQuartile":
|
|
96
|
-
"columnMedian": "
|
|
97
|
-
"columnFirstQuartile":
|
|
144
|
+
"columnThirdQuartile": 16,
|
|
145
|
+
"columnMedian": "12",
|
|
146
|
+
"columnFirstQuartile": 11,
|
|
98
147
|
"columnMin": 10,
|
|
99
|
-
"columnCount":
|
|
100
|
-
"columnSd": "
|
|
101
|
-
"columnMean": "
|
|
102
|
-
"columnIqr":
|
|
103
|
-
"
|
|
104
|
-
"
|
|
148
|
+
"columnCount": 3,
|
|
149
|
+
"columnSd": "5",
|
|
150
|
+
"columnMean": "14",
|
|
151
|
+
"columnIqr": 5,
|
|
152
|
+
"values": [10, 12, 19],
|
|
153
|
+
"columnLowerBounds": 4.25,
|
|
154
|
+
"columnUpperBounds": 22.25,
|
|
105
155
|
"columnOutliers": [],
|
|
106
|
-
"
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
156
|
+
"columnNonOutliers": [10, 12, 19]
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"columnCategory": "category two",
|
|
160
|
+
"columnMax": 135,
|
|
161
|
+
"columnThirdQuartile": 133,
|
|
162
|
+
"columnMedian": "130",
|
|
163
|
+
"columnFirstQuartile": 82,
|
|
164
|
+
"columnMin": 33,
|
|
165
|
+
"columnCount": 3,
|
|
166
|
+
"columnSd": "58",
|
|
167
|
+
"columnMean": "99",
|
|
168
|
+
"columnIqr": 51,
|
|
169
|
+
"values": [130, 135, 33],
|
|
170
|
+
"columnLowerBounds": 5,
|
|
171
|
+
"columnUpperBounds": 209,
|
|
172
|
+
"columnOutliers": [],
|
|
173
|
+
"columnNonOutliers": [130, 135, 33]
|
|
111
174
|
},
|
|
112
175
|
{
|
|
113
176
|
"columnCategory": "category three",
|
|
114
|
-
"columnMax":
|
|
115
|
-
"columnThirdQuartile":
|
|
116
|
-
"columnMedian": "
|
|
117
|
-
"columnFirstQuartile":
|
|
177
|
+
"columnMax": 12,
|
|
178
|
+
"columnThirdQuartile": 11,
|
|
179
|
+
"columnMedian": "10",
|
|
180
|
+
"columnFirstQuartile": 9,
|
|
181
|
+
"columnMin": 8,
|
|
182
|
+
"columnCount": 3,
|
|
183
|
+
"columnSd": "2",
|
|
184
|
+
"columnMean": "10",
|
|
185
|
+
"columnIqr": 2,
|
|
186
|
+
"values": [10, 12, 8],
|
|
187
|
+
"columnLowerBounds": 6,
|
|
188
|
+
"columnUpperBounds": 14,
|
|
189
|
+
"columnOutliers": [],
|
|
190
|
+
"columnNonOutliers": [10, 12, 8]
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"columnCategory": "category three",
|
|
194
|
+
"columnMax": 36,
|
|
195
|
+
"columnThirdQuartile": 36,
|
|
196
|
+
"columnMedian": "35",
|
|
197
|
+
"columnFirstQuartile": 33,
|
|
118
198
|
"columnMin": 30,
|
|
119
|
-
"columnCount":
|
|
120
|
-
"columnSd": "
|
|
121
|
-
"columnMean": "
|
|
122
|
-
"columnIqr":
|
|
123
|
-
"
|
|
124
|
-
"
|
|
199
|
+
"columnCount": 3,
|
|
200
|
+
"columnSd": "3",
|
|
201
|
+
"columnMean": "34",
|
|
202
|
+
"columnIqr": 3,
|
|
203
|
+
"values": [30, 35, 36],
|
|
204
|
+
"columnLowerBounds": 28,
|
|
205
|
+
"columnUpperBounds": 40,
|
|
125
206
|
"columnOutliers": [],
|
|
126
|
-
"
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
207
|
+
"columnNonOutliers": [30, 35, 36]
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"columnCategory": "category three",
|
|
211
|
+
"columnMax": 145,
|
|
212
|
+
"columnThirdQuartile": 143,
|
|
213
|
+
"columnMedian": "140",
|
|
214
|
+
"columnFirstQuartile": 72,
|
|
215
|
+
"columnMin": 3,
|
|
216
|
+
"columnCount": 3,
|
|
217
|
+
"columnSd": "81",
|
|
218
|
+
"columnMean": "96",
|
|
219
|
+
"columnIqr": 71,
|
|
220
|
+
"values": [140, 145, 3],
|
|
221
|
+
"columnLowerBounds": -35,
|
|
222
|
+
"columnUpperBounds": 249,
|
|
223
|
+
"columnOutliers": [],
|
|
224
|
+
"columnNonOutliers": [140, 145, 3]
|
|
131
225
|
},
|
|
132
226
|
{
|
|
133
227
|
"columnCategory": "category four",
|
|
134
|
-
"columnMax":
|
|
135
|
-
"columnThirdQuartile":
|
|
136
|
-
"columnMedian": "
|
|
137
|
-
"columnFirstQuartile":
|
|
138
|
-
"columnMin":
|
|
139
|
-
"columnCount":
|
|
140
|
-
"columnSd": "
|
|
141
|
-
"columnMean": "
|
|
142
|
-
"columnIqr":
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
228
|
+
"columnMax": 13,
|
|
229
|
+
"columnThirdQuartile": 11,
|
|
230
|
+
"columnMedian": "9",
|
|
231
|
+
"columnFirstQuartile": 7,
|
|
232
|
+
"columnMin": 5,
|
|
233
|
+
"columnCount": 3,
|
|
234
|
+
"columnSd": "4",
|
|
235
|
+
"columnMean": "9",
|
|
236
|
+
"columnIqr": 4,
|
|
237
|
+
"values": [13, 5, 9],
|
|
238
|
+
"columnLowerBounds": 1,
|
|
239
|
+
"columnUpperBounds": 17,
|
|
240
|
+
"columnOutliers": [],
|
|
241
|
+
"columnNonOutliers": [13, 5, 9]
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"columnCategory": "category four",
|
|
245
|
+
"columnMax": 46,
|
|
246
|
+
"columnThirdQuartile": 43,
|
|
247
|
+
"columnMedian": "40",
|
|
248
|
+
"columnFirstQuartile": 35,
|
|
249
|
+
"columnMin": 30,
|
|
250
|
+
"columnCount": 3,
|
|
251
|
+
"columnSd": "8",
|
|
252
|
+
"columnMean": "39",
|
|
253
|
+
"columnIqr": 8,
|
|
254
|
+
"values": [30, 40, 46],
|
|
255
|
+
"columnLowerBounds": 23,
|
|
256
|
+
"columnUpperBounds": 55,
|
|
257
|
+
"columnOutliers": [],
|
|
258
|
+
"columnNonOutliers": [30, 40, 46]
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"columnCategory": "category four",
|
|
262
|
+
"columnMax": 123,
|
|
263
|
+
"columnThirdQuartile": 122,
|
|
264
|
+
"columnMedian": "121",
|
|
265
|
+
"columnFirstQuartile": 61,
|
|
266
|
+
"columnMin": 0,
|
|
267
|
+
"columnCount": 3,
|
|
268
|
+
"columnSd": "70",
|
|
269
|
+
"columnMean": "81",
|
|
270
|
+
"columnIqr": 62,
|
|
271
|
+
"values": [0, 121, 123],
|
|
272
|
+
"columnLowerBounds": -31.75,
|
|
273
|
+
"columnUpperBounds": 214.25,
|
|
274
|
+
"columnOutliers": [],
|
|
275
|
+
"columnNonOutliers": [0, 121, 123]
|
|
151
276
|
}
|
|
152
277
|
],
|
|
153
278
|
"borders": "true",
|
|
154
|
-
"plotOutlierValues":
|
|
155
|
-
"plotNonOutlierValues":
|
|
279
|
+
"plotOutlierValues": true,
|
|
280
|
+
"plotNonOutlierValues": false,
|
|
156
281
|
"labels": {
|
|
157
282
|
"q1": "Lower Quartile",
|
|
158
283
|
"q2": "q2",
|
|
@@ -170,7 +295,20 @@
|
|
|
170
295
|
"lowerBounds": "Lower Bounds",
|
|
171
296
|
"upperBounds": "Upper Bounds"
|
|
172
297
|
},
|
|
173
|
-
"categories": [
|
|
298
|
+
"categories": [
|
|
299
|
+
"Radius - Category one",
|
|
300
|
+
"Value - Category one",
|
|
301
|
+
"Price - Category one",
|
|
302
|
+
"Radius - Category two",
|
|
303
|
+
"Value - Category two",
|
|
304
|
+
"Price - Category two",
|
|
305
|
+
"Radius - Category three",
|
|
306
|
+
"Value - Category three",
|
|
307
|
+
"Price - Category three",
|
|
308
|
+
"Radius - Category four",
|
|
309
|
+
"Value - Category four",
|
|
310
|
+
"Price - Category four"
|
|
311
|
+
],
|
|
174
312
|
"tableData": [
|
|
175
313
|
{
|
|
176
314
|
"columnCategory": "category one",
|
|
@@ -246,7 +384,7 @@
|
|
|
246
384
|
"hasLine": false
|
|
247
385
|
},
|
|
248
386
|
"isLegendValue": false,
|
|
249
|
-
"barThickness": "0.
|
|
387
|
+
"barThickness": "0.33",
|
|
250
388
|
"barHeight": 25,
|
|
251
389
|
"barSpace": 15,
|
|
252
390
|
"heights": {
|
|
@@ -276,11 +414,12 @@
|
|
|
276
414
|
"maxTickRotation": 0,
|
|
277
415
|
"padding": 5,
|
|
278
416
|
"showYearsOnce": false,
|
|
417
|
+
"sortByRecentDate": false,
|
|
279
418
|
"isLegendValue": false,
|
|
280
419
|
"dataKey": "Group_Category",
|
|
281
420
|
"label": "Groups",
|
|
282
|
-
"axisBBox":
|
|
283
|
-
"tickWidthMax":
|
|
421
|
+
"axisBBox": 62.779998779296875,
|
|
422
|
+
"tickWidthMax": 105
|
|
284
423
|
},
|
|
285
424
|
"table": {
|
|
286
425
|
"label": "Data Table",
|
|
@@ -324,12 +463,17 @@
|
|
|
324
463
|
"seriesHighlight": [],
|
|
325
464
|
"style": "circles",
|
|
326
465
|
"subStyle": "linear blocks",
|
|
466
|
+
"groupBy": "",
|
|
467
|
+
"shape": "circle",
|
|
327
468
|
"tickRotation": "",
|
|
469
|
+
"order": "dataColumn",
|
|
328
470
|
"hideBorder": {
|
|
329
471
|
"side": false,
|
|
330
472
|
"topBottom": true
|
|
331
473
|
},
|
|
332
|
-
"position": "right"
|
|
474
|
+
"position": "right",
|
|
475
|
+
"orderedValues": [],
|
|
476
|
+
"unified": true
|
|
333
477
|
},
|
|
334
478
|
"brush": {
|
|
335
479
|
"height": 25,
|
|
@@ -339,7 +483,7 @@
|
|
|
339
483
|
"active": false,
|
|
340
484
|
"keys": []
|
|
341
485
|
},
|
|
342
|
-
"palette": "
|
|
486
|
+
"palette": "qualitative4",
|
|
343
487
|
"isPaletteReversed": false,
|
|
344
488
|
"twoColor": {
|
|
345
489
|
"palette": "monochrome-1",
|
|
@@ -362,23 +506,31 @@
|
|
|
362
506
|
"accent": true,
|
|
363
507
|
"background": true,
|
|
364
508
|
"verticalHoverLine": false,
|
|
365
|
-
"horizontalHoverLine": false
|
|
509
|
+
"horizontalHoverLine": false,
|
|
510
|
+
"lineDatapointSymbol": "none",
|
|
511
|
+
"maximumShapeAmount": 7
|
|
366
512
|
},
|
|
367
513
|
"useLogScale": false,
|
|
368
514
|
"filterBehavior": "Filter Change",
|
|
369
515
|
"highlightedBarValues": [],
|
|
370
516
|
"series": [
|
|
517
|
+
{
|
|
518
|
+
"dataKey": "Radius",
|
|
519
|
+
"type": "Box Plot",
|
|
520
|
+
"axis": "Left",
|
|
521
|
+
"tooltip": true
|
|
522
|
+
},
|
|
371
523
|
{
|
|
372
524
|
"dataKey": "Value",
|
|
373
|
-
"type": "
|
|
374
|
-
"
|
|
375
|
-
"
|
|
525
|
+
"type": "Box Plot",
|
|
526
|
+
"axis": "Left",
|
|
527
|
+
"tooltip": true
|
|
376
528
|
},
|
|
377
529
|
{
|
|
378
530
|
"dataKey": "Price",
|
|
379
|
-
"type": "
|
|
380
|
-
"
|
|
381
|
-
"
|
|
531
|
+
"type": "Box Plot",
|
|
532
|
+
"axis": "Left",
|
|
533
|
+
"tooltip": true
|
|
382
534
|
}
|
|
383
535
|
],
|
|
384
536
|
"tooltips": {
|
|
@@ -476,7 +628,6 @@
|
|
|
476
628
|
"data": []
|
|
477
629
|
},
|
|
478
630
|
"height": 300,
|
|
479
|
-
|
|
480
631
|
"visualizationType": "Box Plot",
|
|
481
632
|
"description": "Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups.",
|
|
482
633
|
"dataDescription": {
|
|
@@ -487,45 +638,31 @@
|
|
|
487
638
|
"valueKey": "value"
|
|
488
639
|
},
|
|
489
640
|
"data": [
|
|
490
|
-
{
|
|
491
|
-
"Group_Category": "category one",
|
|
492
|
-
"Value": "21",
|
|
493
|
-
"Price": "100",
|
|
494
|
-
"Month": "January",
|
|
495
|
-
"Radius": "10"
|
|
496
|
-
},
|
|
497
641
|
{
|
|
498
642
|
"Group_Category": "category one",
|
|
499
643
|
"Value": "19",
|
|
500
|
-
"Price": "
|
|
644
|
+
"Price": "0",
|
|
501
645
|
"Month": "January",
|
|
502
|
-
"Radius": "
|
|
646
|
+
"Radius": "99"
|
|
503
647
|
},
|
|
504
648
|
{
|
|
505
649
|
"Group_Category": "category one",
|
|
506
650
|
"Value": "23",
|
|
507
|
-
"Price": "
|
|
651
|
+
"Price": "44",
|
|
508
652
|
"Month": "February",
|
|
509
|
-
"Radius": "
|
|
653
|
+
"Radius": "0"
|
|
510
654
|
},
|
|
511
655
|
{
|
|
512
656
|
"Group_Category": "category one",
|
|
513
|
-
"Value": "
|
|
657
|
+
"Value": "0",
|
|
514
658
|
"Price": "115",
|
|
515
659
|
"Month": "February",
|
|
516
|
-
"Radius": "
|
|
517
|
-
},
|
|
518
|
-
{
|
|
519
|
-
"Group_Category": "category two",
|
|
520
|
-
"Value": "18",
|
|
521
|
-
"Price": "120",
|
|
522
|
-
"Month": "March",
|
|
523
|
-
"Radius": "9"
|
|
660
|
+
"Radius": "123"
|
|
524
661
|
},
|
|
525
662
|
{
|
|
526
663
|
"Group_Category": "category two",
|
|
527
664
|
"Value": "10",
|
|
528
|
-
"Price": "
|
|
665
|
+
"Price": "33",
|
|
529
666
|
"Month": "March",
|
|
530
667
|
"Radius": "14"
|
|
531
668
|
},
|
|
@@ -534,14 +671,14 @@
|
|
|
534
671
|
"Value": "12",
|
|
535
672
|
"Price": "130",
|
|
536
673
|
"Month": "April",
|
|
537
|
-
"Radius": "
|
|
674
|
+
"Radius": "0"
|
|
538
675
|
},
|
|
539
676
|
{
|
|
540
677
|
"Group_Category": "category two",
|
|
541
678
|
"Value": "19",
|
|
542
679
|
"Price": "135",
|
|
543
680
|
"Month": "April",
|
|
544
|
-
"Radius": "
|
|
681
|
+
"Radius": "55"
|
|
545
682
|
},
|
|
546
683
|
{
|
|
547
684
|
"Group_Category": "category three",
|
|
@@ -560,88 +697,37 @@
|
|
|
560
697
|
{
|
|
561
698
|
"Group_Category": "category three",
|
|
562
699
|
"Value": "36",
|
|
563
|
-
"Price": "
|
|
700
|
+
"Price": "3",
|
|
564
701
|
"Month": "June",
|
|
565
702
|
"Radius": "12"
|
|
566
703
|
},
|
|
567
704
|
{
|
|
568
|
-
"Group_Category": "category
|
|
705
|
+
"Group_Category": "category four",
|
|
569
706
|
"Value": "46",
|
|
570
|
-
"Price": "
|
|
707
|
+
"Price": "0",
|
|
571
708
|
"Month": "June",
|
|
572
709
|
"Radius": "13"
|
|
573
710
|
},
|
|
574
711
|
{
|
|
575
712
|
"Group_Category": "category four",
|
|
576
713
|
"Value": "30",
|
|
577
|
-
"Price": "
|
|
714
|
+
"Price": "123",
|
|
578
715
|
"Month": "July",
|
|
579
716
|
"Radius": "5"
|
|
580
717
|
},
|
|
581
718
|
{
|
|
582
719
|
"Group_Category": "category four",
|
|
583
720
|
"Value": "40",
|
|
584
|
-
"Price": "
|
|
721
|
+
"Price": "121",
|
|
585
722
|
"Month": "July",
|
|
586
723
|
"Radius": "9"
|
|
587
|
-
},
|
|
588
|
-
{
|
|
589
|
-
"Group_Category": "category four",
|
|
590
|
-
"Value": "50",
|
|
591
|
-
"Price": "170",
|
|
592
|
-
"Month": "August",
|
|
593
|
-
"Radius": "14"
|
|
594
|
-
},
|
|
595
|
-
{
|
|
596
|
-
"Group_Category": "category four",
|
|
597
|
-
"Value": "50",
|
|
598
|
-
"Price": "175",
|
|
599
|
-
"Month": "August",
|
|
600
|
-
"Radius": "15"
|
|
601
|
-
},
|
|
602
|
-
{
|
|
603
|
-
"Group_Category": "category four",
|
|
604
|
-
"Value": "85",
|
|
605
|
-
"Price": "180",
|
|
606
|
-
"Month": "September",
|
|
607
|
-
"Radius": "7"
|
|
608
|
-
},
|
|
609
|
-
{
|
|
610
|
-
"Group_Category": "category four",
|
|
611
|
-
"Value": "82",
|
|
612
|
-
"Price": "185",
|
|
613
|
-
"Month": "September",
|
|
614
|
-
"Radius": "8"
|
|
615
|
-
},
|
|
616
|
-
{
|
|
617
|
-
"Group_Category": "category four",
|
|
618
|
-
"Value": "43",
|
|
619
|
-
"Price": "190",
|
|
620
|
-
"Month": "October",
|
|
621
|
-
"Radius": "10"
|
|
622
|
-
},
|
|
623
|
-
{
|
|
624
|
-
"Group_Category": "category four",
|
|
625
|
-
"Value": "42",
|
|
626
|
-
"Price": "195",
|
|
627
|
-
"Month": "October",
|
|
628
|
-
"Radius": "12"
|
|
629
|
-
},
|
|
630
|
-
{
|
|
631
|
-
"Group_Category": "category four",
|
|
632
|
-
"Value": "41",
|
|
633
|
-
"Price": "200",
|
|
634
|
-
"Month": "November",
|
|
635
|
-
"Radius": "11"
|
|
636
|
-
},
|
|
637
|
-
{
|
|
638
|
-
"Group_Category": "category four",
|
|
639
|
-
"Value": "21",
|
|
640
|
-
"Price": "205",
|
|
641
|
-
"Month": "November",
|
|
642
|
-
"Radius": "9"
|
|
643
724
|
}
|
|
644
725
|
],
|
|
645
|
-
"version": "4.
|
|
646
|
-
"dynamicMarginTop": 0
|
|
726
|
+
"version": "4.25.4",
|
|
727
|
+
"dynamicMarginTop": 0,
|
|
728
|
+
"filters": [],
|
|
729
|
+
"allowLineToBarGraph": "__undefined__",
|
|
730
|
+
"migrations": {
|
|
731
|
+
"addColorMigration": true
|
|
732
|
+
}
|
|
647
733
|
}
|
|
@@ -11,7 +11,7 @@ import { Bar, AreaStack } from '@visx/shape'
|
|
|
11
11
|
import { Group } from '@visx/group'
|
|
12
12
|
import { approvedCurveTypes } from '@cdc/core/helpers/lineChartHelpers'
|
|
13
13
|
|
|
14
|
-
const AreaChartStacked = ({ xScale, yScale, yMax, xMax, handleTooltipMouseOver, handleTooltipMouseOff
|
|
14
|
+
const AreaChartStacked = ({ xScale, yScale, yMax, xMax, handleTooltipMouseOver, handleTooltipMouseOff }) => {
|
|
15
15
|
// import data from context
|
|
16
16
|
let { transformedData, config, seriesHighlight, colorScale, rawData } = useContext(ConfigContext)
|
|
17
17
|
const data = config.brush?.active && config.brush.data?.length ? config.brush.data : transformedData
|
|
@@ -9,24 +9,20 @@ import { isDateScale } from '@cdc/core/helpers/cove/date'
|
|
|
9
9
|
import * as allCurves from '@visx/curve'
|
|
10
10
|
import { AreaClosed, LinePath, Bar } from '@visx/shape'
|
|
11
11
|
import { Group } from '@visx/group'
|
|
12
|
-
import { bisector } from 'd3-array'
|
|
13
12
|
|
|
14
13
|
const AreaChart = props => {
|
|
15
|
-
const { xScale, yScale, yMax, xMax, handleTooltipMouseOver, handleTooltipMouseOff
|
|
14
|
+
const { xScale, yScale, yMax, xMax, handleTooltipMouseOver, handleTooltipMouseOff } = props
|
|
16
15
|
// import data from context
|
|
17
16
|
let {
|
|
18
|
-
transformedData,
|
|
17
|
+
transformedData: data,
|
|
19
18
|
config,
|
|
20
19
|
handleLineType,
|
|
21
20
|
parseDate,
|
|
22
|
-
|
|
23
|
-
formatNumber,
|
|
21
|
+
|
|
24
22
|
seriesHighlight,
|
|
25
23
|
colorScale,
|
|
26
|
-
rawData
|
|
27
|
-
brushConfig
|
|
24
|
+
rawData
|
|
28
25
|
} = useContext(ConfigContext)
|
|
29
|
-
const data = config.brush?.active && brushConfig.data?.length ? brushConfig.data : transformedData
|
|
30
26
|
|
|
31
27
|
if (!data) return
|
|
32
28
|
|