@cdc/chart 4.24.5 → 4.24.9
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 +44197 -38258
- package/examples/cases-year.json +13379 -0
- package/examples/feature/annotations/index.json +542 -0
- package/examples/gallery/bar-chart-vertical/combo-line-chart.json +76 -15
- package/examples/gallery/bar-chart-vertical/vertical-bar-chart-stacked.json +5 -5
- package/examples/xaxis.json +493 -0
- package/index.html +20 -10
- package/package.json +5 -4
- package/src/CdcChart.tsx +462 -172
- package/src/_stories/Chart.Legend.Gradient.tsx +19 -0
- package/src/_stories/Chart.stories.tsx +18 -171
- package/src/_stories/ChartAnnotation.stories.tsx +32 -0
- package/src/_stories/_mock/annotation_category_mock.json +473 -0
- package/src/_stories/_mock/annotation_date-linear_mock.json +530 -0
- package/{examples/feature/line/line-chart.json → src/_stories/_mock/annotation_date-time_mock.json} +150 -69
- package/src/_stories/_mock/legend.gradient_mock.json +236 -0
- package/src/_stories/_mock/line_chart_two_points_new_chart.json +128 -0
- package/src/_stories/_mock/line_chart_two_points_regression_test.json +127 -0
- package/src/_stories/_mock/lollipop.json +171 -0
- package/src/components/Annotations/components/AnnotationDraggable.styles.css +31 -0
- package/src/components/Annotations/components/AnnotationDraggable.tsx +207 -0
- package/src/components/Annotations/components/AnnotationDropdown.styles.css +14 -0
- package/src/components/Annotations/components/AnnotationDropdown.tsx +72 -0
- package/src/components/Annotations/components/AnnotationList.styles.css +45 -0
- package/src/components/Annotations/components/AnnotationList.tsx +42 -0
- package/src/components/Annotations/components/findNearestDatum.ts +138 -0
- package/src/components/Annotations/components/helpers/index.tsx +46 -0
- package/src/components/Annotations/index.tsx +13 -0
- package/src/components/AreaChart/components/AreaChart.Stacked.jsx +1 -1
- package/src/components/AreaChart/components/AreaChart.jsx +1 -1
- package/src/components/Axis/Categorical.Axis.tsx +145 -0
- package/src/components/BarChart/components/BarChart.Horizontal.tsx +47 -44
- package/src/components/BarChart/components/BarChart.StackedHorizontal.tsx +0 -1
- package/src/components/BarChart/components/BarChart.StackedVertical.tsx +11 -14
- package/src/components/BarChart/components/BarChart.Vertical.tsx +67 -30
- package/src/components/BarChart/helpers/index.ts +91 -0
- package/src/components/BrushChart.tsx +205 -0
- package/src/components/EditorPanel/EditorPanel.tsx +1794 -403
- package/src/components/EditorPanel/components/Panels/Panel.Annotate.tsx +320 -0
- package/src/components/EditorPanel/components/Panels/Panel.General.tsx +282 -18
- package/src/components/EditorPanel/components/Panels/Panel.Sankey.tsx +43 -8
- package/src/components/EditorPanel/components/Panels/Panel.Series.tsx +4 -4
- package/src/components/EditorPanel/components/Panels/Panel.Visual.tsx +4 -13
- package/src/components/EditorPanel/components/Panels/index.tsx +3 -1
- package/src/components/EditorPanel/components/panels.scss +4 -0
- package/src/components/EditorPanel/editor-panel.scss +35 -3
- package/src/components/EditorPanel/{useEditorPermissions.js → useEditorPermissions.ts} +105 -17
- package/src/components/Legend/Legend.Component.tsx +185 -194
- package/src/components/Legend/Legend.Suppression.tsx +146 -0
- package/src/components/Legend/Legend.tsx +21 -5
- package/src/components/Legend/helpers/createFormatLabels.tsx +1 -1
- package/src/components/Legend/helpers/index.ts +35 -0
- package/src/components/LegendWrapper.tsx +26 -0
- package/src/components/LineChart/LineChartProps.ts +1 -15
- package/src/components/LineChart/components/LineChart.BumpCircle.tsx +103 -0
- package/src/components/LineChart/components/LineChart.Circle.tsx +47 -8
- package/src/components/LineChart/helpers.ts +72 -14
- package/src/components/LineChart/index.tsx +117 -42
- package/src/components/LinearChart.jsx +179 -136
- package/src/components/LinearChart.tsx +1366 -0
- package/src/components/PairedBarChart.jsx +9 -9
- package/src/components/PieChart/PieChart.tsx +75 -18
- package/src/components/Sankey/index.tsx +89 -30
- package/src/components/ScatterPlot/ScatterPlot.jsx +22 -8
- package/src/components/Sparkline/components/SparkLine.tsx +2 -2
- package/src/components/ZoomBrush.tsx +90 -44
- package/src/data/initial-state.js +25 -7
- package/src/helpers/handleChartTabbing.ts +8 -0
- package/src/helpers/isConvertLineToBarGraph.ts +4 -0
- package/src/hooks/{useBarChart.js → useBarChart.ts} +2 -40
- package/src/hooks/useColorScale.ts +1 -1
- package/src/hooks/useLegendClasses.ts +68 -0
- package/src/hooks/useMinMax.ts +12 -7
- package/src/hooks/useScales.ts +58 -26
- package/src/hooks/useTooltip.tsx +135 -25
- package/src/scss/DataTable.scss +2 -1
- package/src/scss/main.scss +128 -28
- package/src/types/ChartConfig.ts +83 -10
- package/src/types/ChartContext.ts +14 -4
- package/tests-examples/helpers/testZeroValue.test.ts +30 -0
- package/LICENSE +0 -201
- package/src/components/BrushHandle.jsx +0 -17
- package/src/components/LineChart/index.scss +0 -1
- package/src/helpers/filterData.ts +0 -18
- package/src/helpers/tests/computeMarginBottom.test.ts +0 -21
- package/src/hooks/useLegendClasses.js +0 -31
- /package/src/hooks/{useReduceData.js → useReduceData.ts} +0 -0
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "chart",
|
|
3
|
+
"debugSvg": false,
|
|
4
|
+
"chartMessage": {
|
|
5
|
+
"noData": "No Data Available"
|
|
6
|
+
},
|
|
7
|
+
"title": "",
|
|
8
|
+
"showTitle": true,
|
|
9
|
+
"showDownloadMediaButton": false,
|
|
10
|
+
"theme": "theme-blue",
|
|
11
|
+
"animate": false,
|
|
12
|
+
"fontSize": "small",
|
|
13
|
+
"lineDatapointStyle": "hover",
|
|
14
|
+
"lineDatapointColor": "Same as Line",
|
|
15
|
+
"barHasBorder": "false",
|
|
16
|
+
"isLollipopChart": false,
|
|
17
|
+
"lollipopShape": "circle",
|
|
18
|
+
"lollipopColorStyle": "two-tone",
|
|
19
|
+
"visualizationSubType": "regular",
|
|
20
|
+
"barStyle": "",
|
|
21
|
+
"roundingStyle": "standard",
|
|
22
|
+
"tipRounding": "top",
|
|
23
|
+
"isResponsiveTicks": false,
|
|
24
|
+
"general": {
|
|
25
|
+
"showDownloadButton": false
|
|
26
|
+
},
|
|
27
|
+
"padding": {
|
|
28
|
+
"left": 5,
|
|
29
|
+
"right": 5
|
|
30
|
+
},
|
|
31
|
+
"suppressedData": [],
|
|
32
|
+
"preliminaryData": [],
|
|
33
|
+
"yAxis": {
|
|
34
|
+
"hideAxis": false,
|
|
35
|
+
"displayNumbersOnBar": false,
|
|
36
|
+
"hideLabel": false,
|
|
37
|
+
"hideTicks": false,
|
|
38
|
+
"size": "55",
|
|
39
|
+
"gridLines": true,
|
|
40
|
+
"enablePadding": true,
|
|
41
|
+
"min": "",
|
|
42
|
+
"max": "",
|
|
43
|
+
"labelColor": "#333",
|
|
44
|
+
"tickLabelColor": "#333",
|
|
45
|
+
"tickColor": "#333",
|
|
46
|
+
"rightHideAxis": true,
|
|
47
|
+
"rightAxisSize": 0,
|
|
48
|
+
"rightLabel": "",
|
|
49
|
+
"rightLabelOffsetSize": 0,
|
|
50
|
+
"rightAxisLabelColor": "#333",
|
|
51
|
+
"rightAxisTickLabelColor": "#333",
|
|
52
|
+
"rightAxisTickColor": "#333",
|
|
53
|
+
"numTicks": "",
|
|
54
|
+
"axisPadding": 0,
|
|
55
|
+
"scalePadding": 10,
|
|
56
|
+
"tickRotation": 0,
|
|
57
|
+
"anchors": [],
|
|
58
|
+
"label": "Percent of Beds Occupied (7-Day Average)"
|
|
59
|
+
},
|
|
60
|
+
"boxplot": {
|
|
61
|
+
"plots": [],
|
|
62
|
+
"borders": "true",
|
|
63
|
+
"firstQuartilePercentage": 25,
|
|
64
|
+
"thirdQuartilePercentage": 75,
|
|
65
|
+
"boxWidthPercentage": 40,
|
|
66
|
+
"plotOutlierValues": false,
|
|
67
|
+
"plotNonOutlierValues": true,
|
|
68
|
+
"legend": {
|
|
69
|
+
"showHowToReadText": false,
|
|
70
|
+
"howToReadText": ""
|
|
71
|
+
},
|
|
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
|
+
"total": "Total",
|
|
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": "350",
|
|
99
|
+
"horizontal": 750
|
|
100
|
+
},
|
|
101
|
+
"xAxis": {
|
|
102
|
+
"sortDates": false,
|
|
103
|
+
"anchors": [],
|
|
104
|
+
"type": "date",
|
|
105
|
+
"showTargetLabel": true,
|
|
106
|
+
"targetLabel": "Target",
|
|
107
|
+
"hideAxis": false,
|
|
108
|
+
"hideLabel": false,
|
|
109
|
+
"hideTicks": false,
|
|
110
|
+
"size": "110",
|
|
111
|
+
"tickRotation": "45",
|
|
112
|
+
"min": "",
|
|
113
|
+
"max": "",
|
|
114
|
+
"labelColor": "#333",
|
|
115
|
+
"tickLabelColor": "#333",
|
|
116
|
+
"tickColor": "#333",
|
|
117
|
+
"numTicks": "12",
|
|
118
|
+
"labelOffset": 65,
|
|
119
|
+
"axisPadding": 0,
|
|
120
|
+
"target": 0,
|
|
121
|
+
"maxTickRotation": 0,
|
|
122
|
+
"dataKey": "week_end",
|
|
123
|
+
"dateParseFormat": "%Y-%m-%d",
|
|
124
|
+
"dateDisplayFormat": "%m/%d/%Y",
|
|
125
|
+
"label": "Week Ending",
|
|
126
|
+
"tickWidthMax": 81,
|
|
127
|
+
"padding": 6
|
|
128
|
+
},
|
|
129
|
+
"table": {
|
|
130
|
+
"label": "Data Table",
|
|
131
|
+
"expanded": false,
|
|
132
|
+
"limitHeight": false,
|
|
133
|
+
"height": "",
|
|
134
|
+
"caption": "",
|
|
135
|
+
"showDownloadUrl": false,
|
|
136
|
+
"showDataTableLink": true,
|
|
137
|
+
"indexLabel": "Week Ending",
|
|
138
|
+
"download": true,
|
|
139
|
+
"showVertical": true,
|
|
140
|
+
"dateDisplayFormat": "",
|
|
141
|
+
"show": true
|
|
142
|
+
},
|
|
143
|
+
"orientation": "vertical",
|
|
144
|
+
"color": "pinkpurple",
|
|
145
|
+
"columns": {},
|
|
146
|
+
"legend": {
|
|
147
|
+
"hide": false,
|
|
148
|
+
"behavior": "isolate",
|
|
149
|
+
"axisAlign": true,
|
|
150
|
+
"singleRow": true,
|
|
151
|
+
"colorCode": "",
|
|
152
|
+
"reverseLabelOrder": false,
|
|
153
|
+
"description": "Select a virus to add or remove it from the graphic",
|
|
154
|
+
"dynamicLegend": false,
|
|
155
|
+
"dynamicLegendDefaultText": "Show All",
|
|
156
|
+
"dynamicLegendItemLimit": 5,
|
|
157
|
+
"dynamicLegendItemLimitMessage": "Dynamic Legend Item Limit Hit.",
|
|
158
|
+
"dynamicLegendChartMessage": "Select Options from the Legend",
|
|
159
|
+
"lineMode": false,
|
|
160
|
+
"verticalSorted": false,
|
|
161
|
+
"highlightOnHover": false,
|
|
162
|
+
"seriesHighlight": [],
|
|
163
|
+
"position": "bottom"
|
|
164
|
+
},
|
|
165
|
+
"brush": {
|
|
166
|
+
"height": 25,
|
|
167
|
+
"data": [],
|
|
168
|
+
"active": false,
|
|
169
|
+
"pattern_id": "brush_pattern",
|
|
170
|
+
"accent_color": "#ddd"
|
|
171
|
+
},
|
|
172
|
+
"exclusions": {
|
|
173
|
+
"active": false,
|
|
174
|
+
"keys": []
|
|
175
|
+
},
|
|
176
|
+
"palette": "qualitative-bold",
|
|
177
|
+
"isPaletteReversed": false,
|
|
178
|
+
"twoColor": {
|
|
179
|
+
"palette": "monochrome-1",
|
|
180
|
+
"isPaletteReversed": false
|
|
181
|
+
},
|
|
182
|
+
"labels": false,
|
|
183
|
+
"dataFormat": {
|
|
184
|
+
"commas": false,
|
|
185
|
+
"prefix": "",
|
|
186
|
+
"suffix": "%",
|
|
187
|
+
"abbreviated": true,
|
|
188
|
+
"bottomSuffix": "",
|
|
189
|
+
"bottomPrefix": "",
|
|
190
|
+
"bottomAbbreviated": false,
|
|
191
|
+
"roundTo": "1"
|
|
192
|
+
},
|
|
193
|
+
"confidenceKeys": {},
|
|
194
|
+
"visual": {
|
|
195
|
+
"border": true,
|
|
196
|
+
"accent": true,
|
|
197
|
+
"background": true,
|
|
198
|
+
"verticalHoverLine": true,
|
|
199
|
+
"horizontalHoverLine": false
|
|
200
|
+
},
|
|
201
|
+
"useLogScale": false,
|
|
202
|
+
"filterBehavior": "Filter Change",
|
|
203
|
+
"highlightedBarValues": [],
|
|
204
|
+
"series": [
|
|
205
|
+
{
|
|
206
|
+
"dataKey": "All Patients",
|
|
207
|
+
"type": "Line",
|
|
208
|
+
"axis": "Left",
|
|
209
|
+
"tooltip": true
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"dataKey": "COVID-19",
|
|
213
|
+
"type": "Line",
|
|
214
|
+
"axis": "Left",
|
|
215
|
+
"tooltip": true
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"dataKey": "Influenza",
|
|
219
|
+
"type": "Line",
|
|
220
|
+
"axis": "Left",
|
|
221
|
+
"tooltip": true
|
|
222
|
+
}
|
|
223
|
+
],
|
|
224
|
+
"tooltips": {
|
|
225
|
+
"opacity": 90,
|
|
226
|
+
"singleSeries": false,
|
|
227
|
+
"dateDisplayFormat": ""
|
|
228
|
+
},
|
|
229
|
+
"forestPlot": {
|
|
230
|
+
"startAt": 0,
|
|
231
|
+
"colors": {
|
|
232
|
+
"line": "",
|
|
233
|
+
"shape": ""
|
|
234
|
+
},
|
|
235
|
+
"lineOfNoEffect": {
|
|
236
|
+
"show": true
|
|
237
|
+
},
|
|
238
|
+
"type": "",
|
|
239
|
+
"pooledResult": {
|
|
240
|
+
"diamondHeight": 5,
|
|
241
|
+
"column": ""
|
|
242
|
+
},
|
|
243
|
+
"estimateField": "",
|
|
244
|
+
"estimateRadius": "",
|
|
245
|
+
"shape": "",
|
|
246
|
+
"rowHeight": 20,
|
|
247
|
+
"description": {
|
|
248
|
+
"show": true,
|
|
249
|
+
"text": "description",
|
|
250
|
+
"location": 0
|
|
251
|
+
},
|
|
252
|
+
"result": {
|
|
253
|
+
"show": true,
|
|
254
|
+
"text": "result",
|
|
255
|
+
"location": 100
|
|
256
|
+
},
|
|
257
|
+
"radius": {
|
|
258
|
+
"min": 1,
|
|
259
|
+
"max": 8,
|
|
260
|
+
"scalingColumn": ""
|
|
261
|
+
},
|
|
262
|
+
"regression": {
|
|
263
|
+
"lower": 0,
|
|
264
|
+
"upper": 0,
|
|
265
|
+
"estimateField": 0
|
|
266
|
+
},
|
|
267
|
+
"leftWidthOffset": 0,
|
|
268
|
+
"rightWidthOffset": 0,
|
|
269
|
+
"showZeroLine": false,
|
|
270
|
+
"leftLabel": "",
|
|
271
|
+
"rightLabel": "",
|
|
272
|
+
"hideDateCategoryCol": false,
|
|
273
|
+
"width": "auto",
|
|
274
|
+
"lowerCiField": "",
|
|
275
|
+
"upperCiField": ""
|
|
276
|
+
},
|
|
277
|
+
"area": {
|
|
278
|
+
"isStacked": false
|
|
279
|
+
},
|
|
280
|
+
"sankey": {
|
|
281
|
+
"title": {
|
|
282
|
+
"defaultColor": "black"
|
|
283
|
+
},
|
|
284
|
+
"iterations": 1,
|
|
285
|
+
"rxValue": 0.9,
|
|
286
|
+
"overallSize": {
|
|
287
|
+
"width": 900,
|
|
288
|
+
"height": 700
|
|
289
|
+
},
|
|
290
|
+
"margin": {
|
|
291
|
+
"margin_y": 25,
|
|
292
|
+
"margin_x": 0
|
|
293
|
+
},
|
|
294
|
+
"nodeSize": {
|
|
295
|
+
"nodeWidth": 26,
|
|
296
|
+
"nodeHeight": 40
|
|
297
|
+
},
|
|
298
|
+
"nodePadding": 55,
|
|
299
|
+
"nodeFontColor": "black",
|
|
300
|
+
"nodeColor": {
|
|
301
|
+
"default": "#ff8500",
|
|
302
|
+
"inactive": "#808080"
|
|
303
|
+
},
|
|
304
|
+
"linkColor": {
|
|
305
|
+
"default": "#ffc900",
|
|
306
|
+
"inactive": "#D3D3D3"
|
|
307
|
+
},
|
|
308
|
+
"opacity": {
|
|
309
|
+
"nodeOpacityDefault": 1,
|
|
310
|
+
"nodeOpacityInactive": 0.1,
|
|
311
|
+
"LinkOpacityDefault": 1,
|
|
312
|
+
"LinkOpacityInactive": 0.1
|
|
313
|
+
},
|
|
314
|
+
"storyNodeFontColor": "#006778",
|
|
315
|
+
"storyNodeText": [],
|
|
316
|
+
"nodeValueStyle": {
|
|
317
|
+
"textBefore": "(",
|
|
318
|
+
"textAfter": ")"
|
|
319
|
+
},
|
|
320
|
+
"data": []
|
|
321
|
+
},
|
|
322
|
+
"showChartBrush": false,
|
|
323
|
+
"visualizationType": "Line",
|
|
324
|
+
"customColors": [
|
|
325
|
+
"#000000",
|
|
326
|
+
"#f06f19",
|
|
327
|
+
"#0a58d6",
|
|
328
|
+
"#890664",
|
|
329
|
+
"#000000",
|
|
330
|
+
"#0A6C75",
|
|
331
|
+
"#00a089",
|
|
332
|
+
"#87b6f9",
|
|
333
|
+
"#867a77",
|
|
334
|
+
"#000000"
|
|
335
|
+
],
|
|
336
|
+
"dataFileName": "/wcms/vizdata/Respitory_Viruses/NHSNHospitalCapacity.json",
|
|
337
|
+
"dataFileSourceType": "url",
|
|
338
|
+
"dataUrl": "/wcms/vizdata/Respitory_Viruses/NHSNHospitalCapacity.json",
|
|
339
|
+
"dataDescription": {
|
|
340
|
+
"horizontal": false,
|
|
341
|
+
"series": true,
|
|
342
|
+
"singleRow": false,
|
|
343
|
+
"seriesKey": "patient_type",
|
|
344
|
+
"xKey": "week_end",
|
|
345
|
+
"valueKeys": [
|
|
346
|
+
"percent_beds_occupied"
|
|
347
|
+
]
|
|
348
|
+
},
|
|
349
|
+
"validated": "4.24.3",
|
|
350
|
+
"filters": [
|
|
351
|
+
{
|
|
352
|
+
"values": [
|
|
353
|
+
"United States",
|
|
354
|
+
"Alabama",
|
|
355
|
+
"Alaska",
|
|
356
|
+
"Arizona",
|
|
357
|
+
"Arkansas",
|
|
358
|
+
"California",
|
|
359
|
+
"Colorado",
|
|
360
|
+
"Connecticut",
|
|
361
|
+
"Delaware",
|
|
362
|
+
"District of Columbia",
|
|
363
|
+
"Florida",
|
|
364
|
+
"Georgia",
|
|
365
|
+
"Hawaii",
|
|
366
|
+
"Idaho",
|
|
367
|
+
"Illinois",
|
|
368
|
+
"Indiana",
|
|
369
|
+
"Iowa",
|
|
370
|
+
"Kansas",
|
|
371
|
+
"Kentucky",
|
|
372
|
+
"Louisiana",
|
|
373
|
+
"Maine",
|
|
374
|
+
"Maryland",
|
|
375
|
+
"Massachusetts",
|
|
376
|
+
"Michigan",
|
|
377
|
+
"Minnesota",
|
|
378
|
+
"Mississippi",
|
|
379
|
+
"Missouri",
|
|
380
|
+
"Montana",
|
|
381
|
+
"Nebraska",
|
|
382
|
+
"Nevada",
|
|
383
|
+
"New Hampshire",
|
|
384
|
+
"New Jersey",
|
|
385
|
+
"New Mexico",
|
|
386
|
+
"New York",
|
|
387
|
+
"North Carolina",
|
|
388
|
+
"North Dakota",
|
|
389
|
+
"Ohio",
|
|
390
|
+
"Oklahoma",
|
|
391
|
+
"Oregon",
|
|
392
|
+
"Pennsylvania",
|
|
393
|
+
"Puerto Rico",
|
|
394
|
+
"Rhode Island",
|
|
395
|
+
"South Carolina",
|
|
396
|
+
"South Dakota",
|
|
397
|
+
"Tennessee",
|
|
398
|
+
"Texas",
|
|
399
|
+
"Utah",
|
|
400
|
+
"Vermont",
|
|
401
|
+
"Virgin Islands",
|
|
402
|
+
"Virginia",
|
|
403
|
+
"Washington",
|
|
404
|
+
"West Virginia",
|
|
405
|
+
"Wisconsin",
|
|
406
|
+
"Wyoming"
|
|
407
|
+
],
|
|
408
|
+
"active": "United States",
|
|
409
|
+
"filterStyle": "dropdown",
|
|
410
|
+
"order": "cust",
|
|
411
|
+
"columnName": "geography",
|
|
412
|
+
"orderedValues": [
|
|
413
|
+
"United States",
|
|
414
|
+
"Alabama",
|
|
415
|
+
"Alaska",
|
|
416
|
+
"Arizona",
|
|
417
|
+
"Arkansas",
|
|
418
|
+
"California",
|
|
419
|
+
"Colorado",
|
|
420
|
+
"Connecticut",
|
|
421
|
+
"Delaware",
|
|
422
|
+
"District of Columbia",
|
|
423
|
+
"Florida",
|
|
424
|
+
"Georgia",
|
|
425
|
+
"Hawaii",
|
|
426
|
+
"Idaho",
|
|
427
|
+
"Illinois",
|
|
428
|
+
"Indiana",
|
|
429
|
+
"Iowa",
|
|
430
|
+
"Kansas",
|
|
431
|
+
"Kentucky",
|
|
432
|
+
"Louisiana",
|
|
433
|
+
"Maine",
|
|
434
|
+
"Maryland",
|
|
435
|
+
"Massachusetts",
|
|
436
|
+
"Michigan",
|
|
437
|
+
"Minnesota",
|
|
438
|
+
"Mississippi",
|
|
439
|
+
"Missouri",
|
|
440
|
+
"Montana",
|
|
441
|
+
"Nebraska",
|
|
442
|
+
"Nevada",
|
|
443
|
+
"New Hampshire",
|
|
444
|
+
"New Jersey",
|
|
445
|
+
"New Mexico",
|
|
446
|
+
"New York",
|
|
447
|
+
"North Carolina",
|
|
448
|
+
"North Dakota",
|
|
449
|
+
"Ohio",
|
|
450
|
+
"Oklahoma",
|
|
451
|
+
"Oregon",
|
|
452
|
+
"Pennsylvania",
|
|
453
|
+
"Puerto Rico",
|
|
454
|
+
"Rhode Island",
|
|
455
|
+
"South Carolina",
|
|
456
|
+
"South Dakota",
|
|
457
|
+
"Tennessee",
|
|
458
|
+
"Texas",
|
|
459
|
+
"Utah",
|
|
460
|
+
"Vermont",
|
|
461
|
+
"Virgin Islands",
|
|
462
|
+
"Virginia",
|
|
463
|
+
"Washington",
|
|
464
|
+
"West Virginia",
|
|
465
|
+
"Wisconsin",
|
|
466
|
+
"Wyoming"
|
|
467
|
+
]
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"values": [
|
|
471
|
+
"ICU",
|
|
472
|
+
"Inpatient"
|
|
473
|
+
],
|
|
474
|
+
"active": "Inpatient",
|
|
475
|
+
"filterStyle": "dropdown",
|
|
476
|
+
"order": "asc",
|
|
477
|
+
"columnName": "bed_type"
|
|
478
|
+
}
|
|
479
|
+
],
|
|
480
|
+
"runtimeDataUrl": "https://wcms-wp-test.cdc.gov/wcms/vizdata/Respitory_Viruses/NHSNHospitalCapacity.json",
|
|
481
|
+
"dynamicMarginTop": 0,
|
|
482
|
+
"description": "<div class=\"text-left\">Data presented through: <span class=\"date_max\"></span>; Data as of: <span class=\"date_min\"></span></div><a href=\"https://data.cdc.gov/dataset/Respiratory-Virus-Response-RVR-United-States-Hospi/9t9r-e5a3\">Dataset on data.cdc.gov</a> | <a href=\"/wcms/vizdata/Respitory_Viruses/NHSNHospitalCapacity.json\">Link to Dataset</a>",
|
|
483
|
+
"footnotes": "",
|
|
484
|
+
"regions": [
|
|
485
|
+
{
|
|
486
|
+
"background": "#777777",
|
|
487
|
+
"from": "7",
|
|
488
|
+
"to": "2024-01-13",
|
|
489
|
+
"fromType": "Previous Days",
|
|
490
|
+
"toType": "Last Date"
|
|
491
|
+
}
|
|
492
|
+
]
|
|
493
|
+
}
|
package/index.html
CHANGED
|
@@ -17,7 +17,10 @@
|
|
|
17
17
|
margin-top: 3rem;
|
|
18
18
|
} */
|
|
19
19
|
</style>
|
|
20
|
-
<link
|
|
20
|
+
<link
|
|
21
|
+
rel="stylesheet prefetch"
|
|
22
|
+
href="https://www.cdc.gov/TemplatePackage/contrib/libs/bootstrap/latest/css/bootstrap.min.css?_=39423"
|
|
23
|
+
/>
|
|
21
24
|
<link rel="stylesheet prefetch" href="https://www.cdc.gov/TemplatePackage/4.0/assets/css/app.min.css?_=39423" />
|
|
22
25
|
</head>
|
|
23
26
|
|
|
@@ -46,8 +49,11 @@
|
|
|
46
49
|
-->
|
|
47
50
|
|
|
48
51
|
<!-- GENERIC CHART TYPES -->
|
|
52
|
+
<div class="react-container" data-config="/examples/cases-year.json"></div>
|
|
49
53
|
<!-- <div class="react-container" data-config="/examples/test.json"></div> -->
|
|
50
|
-
<!-- <div class="react-container" data-config="/examples/
|
|
54
|
+
<!-- <div class="react-container" data-config="/examples/feature/line/line-chart.json"></div> -->
|
|
55
|
+
<!-- <div class="react-container" data-config="/examples/dev-8332.json"></div> -->
|
|
56
|
+
<!-- <div class="react-container" data-config="/examples/feature/annotations/index.json"></div> -->
|
|
51
57
|
<!-- <div class="react-container" data-config="/examples/feature/filters/url-filter.json"></div> -->
|
|
52
58
|
<!-- <div class="react-container" data-config="/examples/feature/bar/additional-column-tooltip.json"></div> -->
|
|
53
59
|
<!-- <div class="react-container" data-config="https://cdc.gov/poxvirus/mpox/modules/data-viz/mpx-trends_1.json"></div> -->
|
|
@@ -56,13 +62,13 @@
|
|
|
56
62
|
<!-- <div class="react-container" data-config="/examples/feature/forest-plot/linear.json"></div> -->
|
|
57
63
|
<!-- <div class="react-container" data-config="/examples/feature/forest-plot/logarithmic.json"></div> -->
|
|
58
64
|
<!-- <div class="react-container" data-config="/examples/feature/forest-plot/forest-plot.json"></div> -->
|
|
59
|
-
|
|
65
|
+
<div class="react-container" data-config="/examples/feature/pie/planet-pie-example-config.json"></div>
|
|
60
66
|
<!-- <div class="react-container" data-config=https://www.cdc.gov/wcms/4.0/cdc-wp/data-presentation/examples/Line_Chart_Viz.json></div> -->
|
|
61
67
|
<!-- <div class="react-container" data-config=/examples/feature/regions/index.json></div> -->
|
|
62
68
|
<!-- <div class="react-container" data-config=https://www.cdc.gov/wcms/4.0/cdc-wp/data-presentation/examples/Line_Chart_Regions_Viz.json></div> -->
|
|
63
69
|
<!-- <div class="react-container" data-config=https://www.cdc.gov/wcms/4.0/cdc-wp/data-presentation/examples/Line_Chart_Regions_Viz.json></div> -->
|
|
64
70
|
<!-- <div class="react-container" data-config="/examples/feature/forecasting/forecasting.json"></div> -->
|
|
65
|
-
|
|
71
|
+
<div class="react-container" data-config="/examples/feature/forecasting/combo-forecasting.json"></div>
|
|
66
72
|
<!-- <div class="react-container" data-config="/examples/feature/forecasting/effective_reproduction.json"></div> -->
|
|
67
73
|
<!-- <div class="react-container" data-config="/examples/feature/area/area-chart-date.json"></div> -->
|
|
68
74
|
<!-- <div class="react-container" data-config="/examples/feature/area/area-chart-category.json"></div> -->
|
|
@@ -82,9 +88,6 @@
|
|
|
82
88
|
<!-- <div class="react-container" data-config="/examples/feature/bar/horizontal-stacked-bar-chart.json"></div> -->
|
|
83
89
|
<!-- <div class="react-container" data-config="/examples/feature/bar/planet-chart-horizontal-example-config.json"></div> -->
|
|
84
90
|
|
|
85
|
-
<!-- SPARKLINE -->
|
|
86
|
-
<!-- <div class="react-container" data-config="/examples/feature/dev-4261.json"></div> -->
|
|
87
|
-
|
|
88
91
|
<!-- TESTS DATA TABLE SORTING -->
|
|
89
92
|
<!-- Bar Chart with Confidence Intervals (bottom of page) -->
|
|
90
93
|
<!-- <div class="react-container" data-config="https://www.cdc.gov/wcms/4.0/cdc-wp/data-presentation/examples/Example_Bar_CI.json"></div> -->
|
|
@@ -113,10 +116,16 @@
|
|
|
113
116
|
|
|
114
117
|
<!-- TESTS NONNUMERICS -->
|
|
115
118
|
<!-- <div class="react-container" data-config="/examples/feature/tests-non-numerics/planet-pie-example-config-nonnumeric.json"></div> -->
|
|
116
|
-
|
|
119
|
+
<div
|
|
120
|
+
class="react-container"
|
|
121
|
+
data-config="/examples/feature/tests-non-numerics/example-combo-bar-nonnumeric.json"
|
|
122
|
+
></div>
|
|
117
123
|
<!-- <div class="react-container" data-config="/examples/feature/tests-non-numerics/example-bar-chart-nonnumeric.json"></div> -->
|
|
118
124
|
<!-- <div class="react-container" data-config="/examples/sparkline.json"></div> -->
|
|
119
|
-
<!-- <div
|
|
125
|
+
<!-- <div
|
|
126
|
+
class="react-container"
|
|
127
|
+
data-config="/examples/feature/tests-non-numerics/sparkline-chart-nonnumeric.json"
|
|
128
|
+
></div> -->
|
|
120
129
|
<!-- <div class="react-container" data-config="/examples/region-issue.json"></div> -->
|
|
121
130
|
<!-- <div class="react-container" data-config="/examples/feature/tests-non-numerics/stacked-vertical-bar-example-nonnumerics.json"></div> -->
|
|
122
131
|
|
|
@@ -136,6 +145,7 @@
|
|
|
136
145
|
<!-- GENERIC CHART TYPES -->
|
|
137
146
|
<!-- <div class="react-container" data-config="/examples/gallery/paired-bar/paired-bar-chart.json"></div> -->
|
|
138
147
|
<!-- <div class="react-container" data-config="/examples/feature/line/line-chart.json"></div> -->
|
|
148
|
+
<!-- <div class="react-container" data-config="/examples/feature/annotations/index.json"></div> -->
|
|
139
149
|
|
|
140
150
|
<!-- HORIZONTAL BAR CHARTS -->
|
|
141
151
|
<!-- <div class="react-container" data-config="/examples/gallery/bar-chart-horizontal/horizontal-bar-chart-with-numbers-on-bar.json"></div> -->
|
|
@@ -143,7 +153,7 @@
|
|
|
143
153
|
<!-- <div class="react-container" data-config="/examples/gallery/bar-chart-horizontal/horizontal-stacked.json"></div> -->
|
|
144
154
|
|
|
145
155
|
<!-- VERTICAL BAR CHARTS -->
|
|
146
|
-
<div class="react-container" data-config="/examples/gallery/bar-chart-vertical/combo-line-chart.json"></div>
|
|
156
|
+
<!-- <div class="react-container" data-config="/examples/gallery/bar-chart-vertical/combo-line-chart.json"></div> -->
|
|
147
157
|
<!-- <div class="react-container" data-config="/examples/gallery/bar-chart-vertical/vertical-bar-chart-categorical.json"></div> -->
|
|
148
158
|
<!-- <div class="react-container" data-config="/examples/gallery/bar-chart-vertical/vertical-bar-chart-stacked.json"></div> -->
|
|
149
159
|
<!-- <div class="react-container" data-config="/examples/gallery/bar-chart-vertical/vertical-bar-chart-confidence.json"></div> -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdc/chart",
|
|
3
|
-
"version": "4.24.
|
|
3
|
+
"version": "4.24.9",
|
|
4
4
|
"description": "React component for visualizing tabular data in various types of charts",
|
|
5
5
|
"moduleName": "CdcChart",
|
|
6
6
|
"main": "dist/cdcchart",
|
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
"preview": "vite preview",
|
|
12
12
|
"graph": "nx graph",
|
|
13
13
|
"prepublishOnly": "lerna run --scope @cdc/chart build",
|
|
14
|
-
"test": "vitest
|
|
15
|
-
"test
|
|
14
|
+
"test": "vitest run --reporter verbose",
|
|
15
|
+
"test-watch": "vitest watch --reporter verbose",
|
|
16
|
+
"test-watch:ui": "vitest --ui"
|
|
16
17
|
},
|
|
17
18
|
"repository": {
|
|
18
19
|
"type": "git",
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
"react": "^18.2.0",
|
|
61
62
|
"react-dom": "^18.2.0"
|
|
62
63
|
},
|
|
63
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "c4b0402afe6ed209a85b7078711549b9fd7dae7d",
|
|
64
65
|
"devDependencies": {
|
|
65
66
|
"@types/d3-sankey": "^0.12.4",
|
|
66
67
|
"resize-observer-polyfill": "^1.5.1"
|