@cdc/chart 4.25.8 → 4.25.11

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 (145) hide show
  1. package/.claude/settings.local.json +9 -0
  2. package/dist/{cdcchart-1a1724a1.es.js → cdcchart-dgT_1dIT.es.js} +136 -151
  3. package/dist/cdcchart.js +44236 -40355
  4. package/examples/feature/__data__/planet-example-data.json +0 -30
  5. package/examples/feature/boxplot/valid-boxplot.csv +38 -17
  6. package/examples/grouped-bar-test.json +400 -0
  7. package/examples/private/DEV-11825.json +573 -0
  8. package/examples/private/d.json +382 -0
  9. package/examples/private/example-2.json +49784 -0
  10. package/examples/private/f2.json +1 -0
  11. package/examples/private/f4.json +1577 -0
  12. package/examples/private/forecast.json +1180 -0
  13. package/examples/private/lollipop.json +468 -0
  14. package/examples/private/na.json +913 -0
  15. package/examples/private/new.json +48756 -0
  16. package/examples/private/pie-chart-legend.json +904 -0
  17. package/examples/private/test-data.csv +28 -0
  18. package/examples/suppressed_tooltip.json +480 -0
  19. package/index.html +2 -133
  20. package/package.json +25 -7
  21. package/src/CdcChart.tsx +9 -13
  22. package/src/CdcChartComponent.tsx +403 -92
  23. package/src/_stories/Chart.Anchors.stories.tsx +2 -2
  24. package/src/_stories/Chart.BoxPlot.stories.tsx +1 -1
  25. package/src/_stories/Chart.CI.stories.tsx +1 -1
  26. package/src/_stories/Chart.Combo.stories.tsx +18 -0
  27. package/src/_stories/Chart.CustomColors.stories.tsx +1 -1
  28. package/src/_stories/Chart.DynamicSeries.stories.tsx +2 -2
  29. package/src/_stories/Chart.Filters.stories.tsx +2 -2
  30. package/src/_stories/Chart.Forecast.stories.tsx +36 -0
  31. package/src/_stories/Chart.HTMLInDataTable.stories.tsx +520 -0
  32. package/src/_stories/Chart.Legend.Gradient.stories.tsx +2 -2
  33. package/src/_stories/Chart.Patterns.stories.tsx +20 -0
  34. package/src/_stories/Chart.PreserveDecimals.stories.tsx +220 -0
  35. package/src/_stories/Chart.ScatterPlot.stories.tsx +1 -1
  36. package/src/_stories/Chart.SmallMultiples.stories.tsx +47 -0
  37. package/src/_stories/Chart.stories.tsx +8 -5
  38. package/src/_stories/Chart.tooltip.stories.tsx +1 -1
  39. package/src/_stories/ChartAnnotation.stories.tsx +7 -4
  40. package/src/_stories/ChartAxisLabels.stories.tsx +2 -2
  41. package/src/_stories/ChartAxisTitles.stories.tsx +2 -2
  42. package/src/_stories/ChartBar.Editor.stories.tsx +3580 -0
  43. package/src/_stories/ChartEditor.Editor.stories.tsx +658 -0
  44. package/src/_stories/ChartEditor.stories.tsx +59 -60
  45. package/src/_stories/ChartLine.Suppression.stories.tsx +1 -1
  46. package/src/_stories/ChartLine.Symbols.stories.tsx +1 -1
  47. package/src/_stories/ChartPrefixSuffix.stories.tsx +2 -2
  48. package/src/_stories/_mock/combo.json +451 -0
  49. package/src/_stories/_mock/editor-test-configs.json +376 -0
  50. package/src/_stories/_mock/editor-test-datasets.json +477 -0
  51. package/src/_stories/_mock/editor-tests/bar-chart-editor-test.json +255 -0
  52. package/src/_stories/_mock/editor-tests/bar-chart-general-test.json +267 -0
  53. package/src/_stories/_mock/editor-tests/bar-chart-test.json +237 -0
  54. package/src/_stories/_mock/forecast_combo_with_gaps.json +913 -0
  55. package/src/_stories/_mock/pie_config.json +257 -62
  56. package/src/_stories/_mock/small_multiples/small_multiples_bars.json +1944 -0
  57. package/src/_stories/_mock/small_multiples/small_multiples_big_data_bars.json +1114 -0
  58. package/src/_stories/_mock/small_multiples/small_multiples_lines.json +2646 -0
  59. package/src/_stories/_mock/small_multiples/small_multiples_lines_colors.json +1305 -0
  60. package/src/_stories/_mock/small_multiples/small_multiples_stacked_bars.json +1936 -0
  61. package/src/_stories/_mock/stacked-pattern-test.json +520 -0
  62. package/src/components/Annotations/components/AnnotationDraggable.tsx +1 -0
  63. package/src/components/Annotations/components/AnnotationDropdown.tsx +1 -1
  64. package/src/components/Annotations/components/findNearestDatum.ts +6 -41
  65. package/src/components/AreaChart/components/AreaChart.Stacked.jsx +10 -6
  66. package/src/components/AreaChart/index.tsx +1 -2
  67. package/src/components/BarChart/components/BarChart.Horizontal.tsx +161 -22
  68. package/src/components/BarChart/components/BarChart.StackedHorizontal.tsx +138 -5
  69. package/src/components/BarChart/components/BarChart.StackedVertical.tsx +215 -73
  70. package/src/components/BarChart/components/BarChart.Vertical.tsx +155 -22
  71. package/src/components/BarChart/helpers/index.ts +43 -4
  72. package/src/components/BarChart/helpers/lollipopColors.ts +27 -0
  73. package/src/components/BarChart/helpers/useBarChart.ts +25 -3
  74. package/src/components/BoxPlot/BoxPlot.Vertical.tsx +2 -1
  75. package/src/components/BoxPlot/helpers/index.ts +3 -3
  76. package/src/components/Brush/BrushChart.tsx +1 -1
  77. package/src/components/DeviationBar.jsx +9 -6
  78. package/src/components/EditorPanel/EditorPanel.tsx +563 -229
  79. package/src/components/EditorPanel/EditorPanelContext.ts +3 -0
  80. package/src/components/EditorPanel/components/Panels/Panel.Annotate.tsx +96 -111
  81. package/src/components/EditorPanel/components/Panels/Panel.General.tsx +19 -1
  82. package/src/components/EditorPanel/components/Panels/Panel.PatternSettings.tsx +461 -0
  83. package/src/components/EditorPanel/components/Panels/Panel.Series.tsx +80 -67
  84. package/src/components/EditorPanel/components/Panels/Panel.SmallMultiples.tsx +422 -0
  85. package/src/components/EditorPanel/components/Panels/Panel.Visual.tsx +188 -139
  86. package/src/components/EditorPanel/components/Panels/index.tsx +5 -1
  87. package/src/components/EditorPanel/components/Panels/panelVisual.styles.css +0 -8
  88. package/src/components/EditorPanel/editor-panel.scss +0 -20
  89. package/src/components/EditorPanel/helpers/updateFieldRankByValue.ts +49 -48
  90. package/src/components/EditorPanel/useEditorPermissions.ts +7 -15
  91. package/src/components/Forecasting/Forecasting.tsx +175 -27
  92. package/src/components/ForestPlot/ForestPlot.tsx +11 -7
  93. package/src/components/ForestPlot/ForestPlotProps.ts +1 -1
  94. package/src/components/Legend/Legend.Component.tsx +114 -14
  95. package/src/components/Legend/helpers/createFormatLabels.tsx +230 -171
  96. package/src/components/Legend/helpers/getLegendClasses.ts +0 -1
  97. package/src/components/LegendWrapper.tsx +1 -1
  98. package/src/components/LineChart/LineChartProps.ts +0 -3
  99. package/src/components/LineChart/components/LineChart.Circle.tsx +2 -2
  100. package/src/components/LineChart/helpers.ts +1 -1
  101. package/src/components/LineChart/index.tsx +38 -15
  102. package/src/components/LinearChart.tsx +96 -84
  103. package/src/components/PairedBarChart.jsx +6 -4
  104. package/src/components/PieChart/PieChart.tsx +170 -54
  105. package/src/components/Regions/components/Regions.tsx +3 -24
  106. package/src/components/Sankey/components/Sankey.tsx +7 -1
  107. package/src/components/Sankey/types/index.ts +1 -1
  108. package/src/components/ScatterPlot/ScatterPlot.jsx +32 -4
  109. package/src/components/SmallMultiples/SmallMultipleTile.tsx +198 -0
  110. package/src/components/SmallMultiples/SmallMultiples.css +32 -0
  111. package/src/components/SmallMultiples/SmallMultiples.tsx +271 -0
  112. package/src/components/SmallMultiples/index.ts +2 -0
  113. package/src/data/initial-state.js +327 -293
  114. package/src/helpers/buildForecastPaletteMappings.ts +112 -0
  115. package/src/helpers/buildForecastPaletteOptions.ts +71 -0
  116. package/src/helpers/getColorScale.ts +82 -8
  117. package/src/{hooks/useMinMax.ts → helpers/getMinMax.ts} +14 -7
  118. package/src/helpers/getNewRuntime.ts +1 -1
  119. package/src/helpers/getTransformedData.ts +1 -1
  120. package/src/helpers/getYAxisAutoPadding.ts +53 -0
  121. package/src/helpers/smallMultiplesHelpers.ts +529 -0
  122. package/src/hooks/useChartHoverAnalytics.tsx +44 -0
  123. package/src/hooks/useProgrammaticTooltip.ts +96 -0
  124. package/src/hooks/useReduceData.ts +105 -70
  125. package/src/hooks/useScales.ts +88 -34
  126. package/src/hooks/useSmallMultipleSynchronization.ts +59 -0
  127. package/src/hooks/useTooltip.tsx +116 -29
  128. package/src/index.jsx +0 -2
  129. package/src/scss/main.scss +13 -80
  130. package/src/store/chart.actions.ts +2 -0
  131. package/src/store/chart.reducer.ts +5 -1
  132. package/src/test/CdcChart.test.jsx +8 -3
  133. package/src/types/ChartConfig.ts +53 -11
  134. package/src/types/ChartContext.ts +4 -0
  135. package/vite.config.js +1 -1
  136. package/vitest.config.ts +16 -0
  137. package/src/_stories/_mock/pie_data.json +0 -218
  138. package/src/components/AreaChart/components/AreaChart.jsx +0 -109
  139. package/src/coreStyles_chart.scss +0 -3
  140. package/src/helpers/configHelpers.ts +0 -28
  141. package/src/helpers/generateColorsArray.ts +0 -8
  142. package/src/helpers/sort.ts +0 -7
  143. package/src/hooks/useActiveElement.js +0 -19
  144. package/src/hooks/useChartClasses.js +0 -41
  145. package/src/hooks/useColorPalette.js +0 -76
@@ -0,0 +1,28 @@
1
+ Date,Cases,Deaths,Hospitalizations,Footnote
2
+ 2024-01-01,1250,45,320,"Data collected from <strong>primary sources</strong>
3
+ Preliminary data subject to change"
4
+ 2024-02-01,1450,52,385,"Includes <em>confirmed</em> and probable cases"
5
+ 2024-03-01,1680,58,425,"Note: Data updated on <a href='#'>March 15, 2024</a>
6
+ May include backlog of cases from previous month"
7
+ 2024-04-01,1320,48,350,"<sup>*</sup>Holiday weekend affected reporting
8
+ Data normalized for comparison"
9
+ 2024-05-01,980,35,275,"See methodology at <a href='https://example.com'>example.com</a>"
10
+ 2024-06-01,750,28,210,"<strong>Note:</strong> New testing protocols implemented
11
+ Results may not be directly comparable to prior months"
12
+ 2024-07-01,620,22,180,"Summer decline observed
13
+ Typical seasonal pattern per <em>historical data</em>"
14
+ 2024-08-01,890,31,245,"<sup>†</sup>Estimated values based on incomplete reporting"
15
+ 2024-09-01,1150,42,310,"Data source: <strong>State Health Departments</strong>
16
+ Reported as of September 30, 2024"
17
+ 2024-10-01,1425,50,370,"Includes revisions from <em>prior reporting periods</em>
18
+ See details below"
19
+ 2024-11-01,1680,55,415,"<strong>Important:</strong> Reporting delays due to system maintenance
20
+ Data may be updated"
21
+ 2024-12-01,1890,62,465,"Year-end summary includes <sup>1</sup>adjustments
22
+ <a href='#notes'>See detailed notes</a>"
23
+ 2025-01-01,2150,68,520,"<strong>New Year</strong> reporting period
24
+ Data collection ongoing"
25
+ 2025-02-01,1980,61,485,"Preliminary <em>February</em> data
26
+ Subject to revision"
27
+ 2025-03-01,1725,54,430,"Latest available data as of <strong>March 10, 2025</strong>
28
+ Updates posted weekly at <a href='https://example.com/updates'>Updates Page</a>"
@@ -0,0 +1,480 @@
1
+ {
2
+ "errors": [],
3
+ "currentViewport": "lg",
4
+ "id": 1,
5
+ "category": "Charts",
6
+ "label": "Bar",
7
+ "type": "chart",
8
+ "subType": "Bar",
9
+ "orientation": "vertical",
10
+ "barThickness": "0.37",
11
+ "visualizationSubType": "regular",
12
+ "xAxis": {
13
+ "sortDates": false,
14
+ "anchors": [],
15
+ "type": "date",
16
+ "showTargetLabel": true,
17
+ "targetLabel": "Target",
18
+ "hideAxis": false,
19
+ "hideLabel": false,
20
+ "hideTicks": false,
21
+ "size": 75,
22
+ "tickRotation": 0,
23
+ "min": "",
24
+ "max": "",
25
+ "labelColor": "#333",
26
+ "tickLabelColor": "#333",
27
+ "tickColor": "#333",
28
+ "numTicks": "",
29
+ "labelOffset": 0,
30
+ "axisPadding": 200,
31
+ "target": 0,
32
+ "maxTickRotation": 45,
33
+ "padding": 5,
34
+ "showYearsOnce": false,
35
+ "sortByRecentDate": false,
36
+ "brushActive": true,
37
+ "dataKey": "Date",
38
+ "dateParseFormat": "%m/%d/%Y",
39
+ "dateDisplayFormat": "%m/%Y",
40
+ "axisBBox": 29.860000610351562,
41
+ "tickWidthMax": 63
42
+ },
43
+ "icon": {
44
+ "key": null,
45
+ "ref": null,
46
+ "props": {},
47
+ "_owner": null
48
+ },
49
+ "content": "Use bars to show comparisons between data categories.",
50
+ "visualizationType": "Bar",
51
+ "datasets": {},
52
+ "activeVizButtonID": 1,
53
+ "data": [
54
+ {
55
+ "Date": "1/15/2016",
56
+ "Data 1": "ABC",
57
+ "Data 2": "110",
58
+ "Data 3": "100",
59
+ "Data 4": "XYZ",
60
+ "Monthly-Goal": "100"
61
+ },
62
+ {
63
+ "Date": "2/15/2016",
64
+ "Data 1": "100",
65
+ "Data 2": "110",
66
+ "Data 3": "100",
67
+ "Data 4": "",
68
+ "Monthly-Goal": "100"
69
+ },
70
+ {
71
+ "Date": "3/15/2016",
72
+ "Data 1": "80",
73
+ "Data 2": "90",
74
+ "Data 3": "0",
75
+ "Data 4": "120",
76
+ "Monthly-Goal": "110"
77
+ },
78
+ {
79
+ "Date": "4/15/2016",
80
+ "Data 1": "80",
81
+ "Data 2": "MRC",
82
+ "Data 3": "110",
83
+ "Data 4": "0",
84
+ "Monthly-Goal": "110"
85
+ },
86
+ {
87
+ "Date": "5/15/2016",
88
+ "Data 1": "70",
89
+ "Data 2": "90",
90
+ "Data 3": "110",
91
+ "Data 4": "130",
92
+ "Monthly-Goal": "120"
93
+ },
94
+ {
95
+ "Date": "6/15/2016",
96
+ "Data 1": "XYZ",
97
+ "Data 2": "120",
98
+ "Data 3": "120",
99
+ "Data 4": "ABC",
100
+ "Monthly-Goal": "120"
101
+ },
102
+ {
103
+ "Date": "7/15/2016",
104
+ "Data 1": "110",
105
+ "Data 2": "ABC",
106
+ "Data 3": "ABC",
107
+ "Data 4": "130",
108
+ "Monthly-Goal": "130"
109
+ },
110
+ {
111
+ "Date": "8/15/2016",
112
+ "Data 1": "110",
113
+ "Data 2": "130",
114
+ "Data 3": "ABC",
115
+ "Data 4": "140",
116
+ "Monthly-Goal": "130"
117
+ },
118
+ {
119
+ "Date": "9/15/2016",
120
+ "Data 1": "120",
121
+ "Data 2": "130",
122
+ "Data 3": "120",
123
+ "Data 4": "XYZ",
124
+ "Monthly-Goal": "140"
125
+ }
126
+ ],
127
+ "dataFileName": "https://wwwdev.cdc.gov/wcms/cailin/result-7.csv",
128
+ "dataFileSourceType": "url",
129
+ "dataDescription": {
130
+ "horizontal": false,
131
+ "series": true,
132
+ "singleRow": true
133
+ },
134
+ "annotations": [],
135
+ "debugSvg": false,
136
+ "chartMessage": {
137
+ "noData": "No Data Available"
138
+ },
139
+ "title": "<em>4.25.07</em> Suppressed & Isolated Bar Chart",
140
+ "showTitle": true,
141
+ "showDownloadMediaButton": false,
142
+ "theme": "theme-blue",
143
+ "animate": false,
144
+ "lineDatapointStyle": "hover",
145
+ "lineDatapointColor": "Same as Line",
146
+ "barHasBorder": "true",
147
+ "isLollipopChart": false,
148
+ "lollipopShape": "circle",
149
+ "lollipopColorStyle": "two-tone",
150
+ "barStyle": "",
151
+ "roundingStyle": "standard",
152
+ "tipRounding": "top",
153
+ "isResponsiveTicks": false,
154
+ "general": {
155
+ "annotationDropdownText": "Annotations",
156
+ "showMissingDataLabel": false,
157
+ "showSuppressedSymbol": false,
158
+ "showZeroValueData": false,
159
+ "hideNullValue": true
160
+ },
161
+ "padding": {
162
+ "left": 5,
163
+ "right": 5
164
+ },
165
+ "preliminaryData": [
166
+ {
167
+ "type": "suppression",
168
+ "seriesKeys": [],
169
+ "label": "Suppressed",
170
+ "column": "",
171
+ "value": "ABC",
172
+ "style": "",
173
+ "displayTooltip": true,
174
+ "displayLegend": true,
175
+ "displayTable": true,
176
+ "symbol": "Double Asterisk",
177
+ "iconCode": "**",
178
+ "lineCode": "",
179
+ "hideBarSymbol": false,
180
+ "hideLineStyle": false,
181
+ "circleSize": 6,
182
+ "displayGray": true
183
+ },
184
+ {
185
+ "type": "suppression",
186
+ "seriesKeys": [],
187
+ "label": "Suppressed",
188
+ "column": "",
189
+ "value": "XYZ",
190
+ "style": "",
191
+ "displayTooltip": true,
192
+ "displayLegend": true,
193
+ "displayTable": true,
194
+ "symbol": "Dagger",
195
+ "iconCode": "†",
196
+ "lineCode": "",
197
+ "hideBarSymbol": false,
198
+ "hideLineStyle": false,
199
+ "circleSize": 6,
200
+ "displayGray": true
201
+ }
202
+ ],
203
+ "yAxis": {
204
+ "hideAxis": false,
205
+ "displayNumbersOnBar": false,
206
+ "hideLabel": false,
207
+ "hideTicks": false,
208
+ "size": 50,
209
+ "gridLines": false,
210
+ "enablePadding": false,
211
+ "min": "",
212
+ "max": "",
213
+ "labelColor": "#333",
214
+ "tickLabelColor": "#333",
215
+ "tickColor": "#333",
216
+ "rightHideAxis": false,
217
+ "rightAxisSize": 0,
218
+ "rightLabel": "",
219
+ "rightLabelOffsetSize": 0,
220
+ "rightAxisLabelColor": "#333",
221
+ "rightAxisTickLabelColor": "#333",
222
+ "rightAxisTickColor": "#333",
223
+ "numTicks": "",
224
+ "axisPadding": 0,
225
+ "scalePadding": 10,
226
+ "tickRotation": 0,
227
+ "anchors": [],
228
+ "shoMissingDataLabel": true,
229
+ "showMissingDataLine": true,
230
+ "categories": []
231
+ },
232
+ "boxplot": {
233
+ "plots": [],
234
+ "borders": "true",
235
+ "plotOutlierValues": false,
236
+ "plotNonOutlierValues": true,
237
+ "labels": {
238
+ "q1": "Lower Quartile",
239
+ "q2": "q2",
240
+ "q3": "Upper Quartile",
241
+ "q4": "q4",
242
+ "minimum": "Minimum",
243
+ "maximum": "Maximum",
244
+ "mean": "Mean",
245
+ "median": "Median",
246
+ "sd": "Standard Deviation",
247
+ "iqr": "Interquartile Range",
248
+ "count": "Count",
249
+ "outliers": "Outliers",
250
+ "values": "Values",
251
+ "lowerBounds": "Lower Bounds",
252
+ "upperBounds": "Upper Bounds"
253
+ }
254
+ },
255
+ "topAxis": {
256
+ "hasLine": false
257
+ },
258
+ "isLegendValue": false,
259
+ "barHeight": 25,
260
+ "barSpace": 15,
261
+ "heights": {
262
+ "vertical": 300,
263
+ "horizontal": 750
264
+ },
265
+ "table": {
266
+ "label": "Data Table",
267
+ "expanded": false,
268
+ "limitHeight": false,
269
+ "height": "",
270
+ "caption": "",
271
+ "showDownloadUrl": false,
272
+ "showDataTableLink": true,
273
+ "showDownloadLinkBelow": true,
274
+ "indexLabel": "",
275
+ "download": true,
276
+ "showVertical": true,
277
+ "dateDisplayFormat": "",
278
+ "showMissingDataLabel": true,
279
+ "showSuppressedSymbol": true,
280
+ "show": true
281
+ },
282
+ "color": "pinkpurple",
283
+ "columns": {},
284
+ "legend": {
285
+ "hide": false,
286
+ "behavior": "isolate",
287
+ "axisAlign": true,
288
+ "singleRow": true,
289
+ "colorCode": "",
290
+ "reverseLabelOrder": false,
291
+ "description": "",
292
+ "dynamicLegend": false,
293
+ "dynamicLegendDefaultText": "Show All",
294
+ "dynamicLegendItemLimit": 5,
295
+ "dynamicLegendItemLimitMessage": "Dynamic Legend Item Limit Hit.",
296
+ "dynamicLegendChartMessage": "Select Options from the Legend",
297
+ "label": "",
298
+ "lineMode": false,
299
+ "verticalSorted": false,
300
+ "highlightOnHover": false,
301
+ "hideSuppressedLabels": false,
302
+ "hideSuppressionLink": false,
303
+ "seriesHighlight": [],
304
+ "style": "circles",
305
+ "subStyle": "linear blocks",
306
+ "groupBy": "",
307
+ "shape": "circle",
308
+ "tickRotation": "",
309
+ "order": "dataColumn",
310
+ "hideBorder": {
311
+ "side": false,
312
+ "topBottom": true
313
+ },
314
+ "position": "right",
315
+ "orderedValues": [],
316
+ "unified": true
317
+ },
318
+ "exclusions": {
319
+ "active": true,
320
+ "keys": [],
321
+ "dateStart": "2016-01-01",
322
+ "dateEnd": "2016-05-01"
323
+ },
324
+ "palette": "qualitative-bold",
325
+ "isPaletteReversed": false,
326
+ "twoColor": {
327
+ "palette": "monochrome-1",
328
+ "isPaletteReversed": false
329
+ },
330
+ "labels": true,
331
+ "dataFormat": {
332
+ "commas": false,
333
+ "prefix": "",
334
+ "suffix": "",
335
+ "abbreviated": false,
336
+ "bottomSuffix": "",
337
+ "bottomPrefix": "",
338
+ "bottomAbbreviated": false
339
+ },
340
+ "filters": [],
341
+ "confidenceKeys": {},
342
+ "visual": {
343
+ "border": true,
344
+ "accent": true,
345
+ "background": true,
346
+ "verticalHoverLine": false,
347
+ "horizontalHoverLine": false,
348
+ "lineDatapointSymbol": "none",
349
+ "maximumShapeAmount": 7
350
+ },
351
+ "useLogScale": false,
352
+ "filterBehavior": "Filter Change",
353
+ "highlightedBarValues": [],
354
+ "series": [
355
+ {
356
+ "dataKey": "Data 1",
357
+ "type": "Bar",
358
+ "axis": "Left",
359
+ "tooltip": true
360
+ },
361
+ {
362
+ "dataKey": "Data 2",
363
+ "type": "Bar",
364
+ "axis": "Left",
365
+ "tooltip": true
366
+ },
367
+ {
368
+ "dataKey": "Data 3",
369
+ "type": "Bar",
370
+ "axis": "Left",
371
+ "tooltip": true
372
+ },
373
+ {
374
+ "dataKey": "Data 4",
375
+ "type": "Bar",
376
+ "axis": "Left",
377
+ "tooltip": true
378
+ }
379
+ ],
380
+ "tooltips": {
381
+ "opacity": 90,
382
+ "singleSeries": false,
383
+ "dateDisplayFormat": ""
384
+ },
385
+ "forestPlot": {
386
+ "startAt": 0,
387
+ "colors": {
388
+ "line": "",
389
+ "shape": ""
390
+ },
391
+ "lineOfNoEffect": {
392
+ "show": true
393
+ },
394
+ "type": "",
395
+ "pooledResult": {
396
+ "diamondHeight": 5,
397
+ "column": ""
398
+ },
399
+ "estimateField": "",
400
+ "estimateRadius": "",
401
+ "shape": "square",
402
+ "rowHeight": 20,
403
+ "description": {
404
+ "show": true,
405
+ "text": "description",
406
+ "location": 0
407
+ },
408
+ "result": {
409
+ "show": true,
410
+ "text": "result",
411
+ "location": 100
412
+ },
413
+ "radius": {
414
+ "min": 2,
415
+ "max": 10,
416
+ "scalingColumn": ""
417
+ },
418
+ "regression": {
419
+ "lower": 0,
420
+ "upper": 0,
421
+ "estimateField": 0
422
+ },
423
+ "leftWidthOffset": 0,
424
+ "rightWidthOffset": 0,
425
+ "showZeroLine": false,
426
+ "leftLabel": "",
427
+ "rightLabel": ""
428
+ },
429
+ "area": {
430
+ "isStacked": false
431
+ },
432
+ "sankey": {
433
+ "title": {
434
+ "defaultColor": "black"
435
+ },
436
+ "iterations": 1,
437
+ "rxValue": 0.9,
438
+ "overallSize": {
439
+ "width": 900,
440
+ "height": 700
441
+ },
442
+ "margin": {
443
+ "margin_y": 25,
444
+ "margin_x": 0
445
+ },
446
+ "nodeSize": {
447
+ "nodeWidth": 26,
448
+ "nodeHeight": 40
449
+ },
450
+ "nodePadding": 55,
451
+ "nodeFontColor": "black",
452
+ "nodeColor": {
453
+ "default": "#ff8500",
454
+ "inactive": "#808080"
455
+ },
456
+ "linkColor": {
457
+ "default": "#ffc900",
458
+ "inactive": "#D3D3D3"
459
+ },
460
+ "opacity": {
461
+ "nodeOpacityDefault": 1,
462
+ "nodeOpacityInactive": 0.1,
463
+ "LinkOpacityDefault": 1,
464
+ "LinkOpacityInactive": 0.1
465
+ },
466
+ "storyNodeFontColor": "#006778",
467
+ "storyNodeText": [],
468
+ "nodeValueStyle": {
469
+ "textBefore": "(",
470
+ "textAfter": ")"
471
+ },
472
+ "data": []
473
+ },
474
+ "version": "4.25.7",
475
+ "migrations": {
476
+ "addColorMigration": true
477
+ },
478
+ "dynamicMarginTop": 0,
479
+ "allowLineToBarGraph": "__​undefined__"
480
+ }
package/index.html CHANGED
@@ -22,146 +22,15 @@
22
22
  </head>
23
23
 
24
24
  <body>
25
- <!-- SANKEY EXAMPLE -->
26
- <!-- <div class="container d-flex flex-wrap body-wrapper bg-white" style="width: 750px">
27
- <main class="col-lg-9 order-lg-2" role="main" aria-label="Main Content Area">
28
- <div class="row">
29
- <div class="col-md-12"> -->
30
- <!-- <div class="react-container" data-config="/examples/feature/sankey/sankey-example-data.json"></div> -->
31
- <!-- </div>
32
- </div>
33
- </main>
34
- </div> -->
35
-
36
- <!--
37
- EXAMPLES:
38
- chart/examples/features: different chart types and tests
39
- chart/examples/private: an ignored git folder used for addl. troubleshooting.
40
- chart/examples/gallery: examples pulled from the cdc data visualization gallery
41
- chart/examples/__data__: a folder for storing re-usable fictional datasets
42
-
43
- GALLERY EXAMPLES ARE FOUND HERE:
44
- https://www.cdc.gov/wcms/4.0/cdc-wp/data-presentation/examples/example-data-map-cities-states.html
45
-
46
- -->
47
25
 
48
26
  <!-- GENERIC CHART TYPES -->
49
- <!-- <div class="react-container" data-config="/examples/private/ari-other-conditions-1.json"></div> -->
50
- <!-- <div class="react-container" data-config="/examples/private/Viral-Respiratory-Deaths-Age.json"></div> -->
51
- <!-- <div class="react-container" data-config="/examples/cases-year.json"></div>-->
52
- <!-- <div class="react-container" data-config="/examples/test.json"></div> -->
53
- <!-- <div class="react-container" data-config="/examples/feature/line/line-chart.json"></div> -->
54
- <!-- <div class="react-container" data-config="/examples/dev-8332.json"></div> -->
55
- <!-- <div class="react-container" data-config="/examples/feature/annotations/index.json"></div> -->
56
- <!-- <div class="react-container" data-config="/examples/feature/filters/url-filter.json"></div> -->
57
- <!-- <div class="react-container" data-config="/examples/feature/bar/additional-column-tooltip.json"></div> -->
58
- <!-- <div class="react-container" data-config="https://cdc.gov/poxvirus/mpox/modules/data-viz/mpx-trends_1.json"></div> -->
59
- <!-- <div class="react-container" data-config="/examples/feature/area/area-chart-date-apple.json"></div> -->
60
- <!-- <div class="react-container" data-config="/examples/feature/forest-plot/linear.json"></div> -->
61
- <!-- <div class="react-container" data-config="/examples/feature/forest-plot/logarithmic.json"></div> -->
62
- <!-- <div class="react-container" data-config="/examples/feature/forest-plot/forest-plot.json"></div> -->
63
- <!-- <div class="react-container" data-config="/examples/feature/pie/planet-pie-example-config.json"></div> -->
64
- <!-- <div class="react-container" data-config=https://www.cdc.gov/wcms/4.0/cdc-wp/data-presentation/examples/Line_Chart_Viz.json></div> -->
65
- <!-- <div class="react-container" data-config=/examples/feature/regions/index.json></div> -->
66
- <!-- <div class="react-container" data-config=https://www.cdc.gov/wcms/4.0/cdc-wp/data-presentation/examples/Line_Chart_Regions_Viz.json></div> -->
67
- <!-- <div class="react-container" data-config=https://www.cdc.gov/wcms/4.0/cdc-wp/data-presentation/examples/Line_Chart_Regions_Viz.json></div> -->
68
- <!-- <div class="react-container" data-config="/examples/feature/forecasting/forecasting.json"></div> -->
69
- <!-- <div class="react-container" data-config="/examples/feature/forecasting/combo-forecasting.json"></div> -->
70
- <!-- <div class="react-container" data-config="/examples/feature/forecasting/effective_reproduction.json"></div> -->
71
- <!-- <div class="react-container" data-config="/examples/feature/area/area-chart-date.json"></div> -->
72
- <!-- <div class="react-container" data-config="/examples/feature/area/area-chart-category.json"></div> -->
73
- <!-- <div class="react-container" data-config="/examples/scatterplot-image-download.json"></div> -->
74
- <!-- <div class="react-container" data-config="/examples/feature/deviation/planet-deviation-config.json"></div> -->
75
- <!-- <div class="react-container" data-config="/examples/private/test.json"></div> -->
76
- <!-- <div class="react-container" data-config="/examples/feature/combo/planet-combo-example-config.json"></div> -->
77
- <!-- <div class="react-container" data-config="/examples/feature/combo/right-issues.json"></div> -->
78
- <!-- <div class="react-container" data-config="/examples/dev-9822.json"></div> -->
79
-
80
- <!-- BAR -->
81
- <!-- <div class="react-container" data-config="/examples/feature/bar/planet-example-config.json"></div> -->
82
- <!-- <div class="react-container" data-config="/examples/feature/bar/planet-chart-horizontal-example-config.json"></div> -->
83
- <!-- <div class="react-container" data-config="/examples/feature/bar/example-bar-chart.json"></div> -->
84
- <!-- <div class="react-container" data-config="/examples/feature/bar/horizontal-chart-max-increase.json"></div> -->
85
- <!-- <div class="react-container" data-config="/examples/feature/bar/horizontal-chart.json"></div> -->
86
- <!-- <div class="react-container" data-config="/examples/feature/bar/horizontal-stacked-bar-chart.json"></div> -->
87
- <!-- <div class="react-container" data-config="/examples/feature/bar/planet-chart-horizontal-example-config.json"></div> -->
88
-
89
- <!-- TESTS DATA TABLE SORTING -->
90
- <!-- Bar Chart with Confidence Intervals (bottom of page) -->
91
- <!-- <div class="react-container" data-config="https://www.cdc.gov/wcms/4.0/cdc-wp/data-presentation/examples/Example_Bar_CI.json"></div> -->
92
- <!-- TPOXX Patient Data -->
93
- <!-- <div class="react-container" data-config="https://www.cdc.gov/poxvirus/mpox/modules/data-viz/tpoxx_weekly_race_eth.json"></div> -->
94
- <!-- <div class="react-container" data-config="https://www.cdc.gov/poxvirus/mpox/modules/data-viz/mpx-tpoxx-age-gender.json"></div> -->
95
- <!-- Non-Variola Orthopoxvirus (NVO) Laboratory Testing by Demographics -->
96
- <!-- <div class="react-container" data-config="https://wwwdev-cdc.msappproxy.net/poxvirus/mpox/modules/data-viz/lab-data.json"></div> -->
97
- <!-- <div class="react-container" data-config="https://wwwdev-cdc.msappproxy.net/poxvirus/mpox/modules/data-viz/lab-data-age.json"></div> -->
98
- <!-- PROBLEM WITH THEIR PAGE CONFIG or CONFLICT with -->
99
- <!-- CORS ERROR pulling data on Covid Flu RSV page at https://wwwdev-cdc.msappproxy.net/respiratory-viruses/index.html-->
100
- <!-- <div class="react-container" data-config="https://wwwdev-cdc.msappproxy.net/respiratory-viruses/modules/emergency-dept-visits_live.json"></div> -->
101
- <!-- MPOX -->
102
- <!-- <div class="react-container" data-config="https://www.cdc.gov/poxvirus/mpox/modules/data-viz/mpox-demographics-monthly.json"></div> -->
103
- <!-- <div class="react-container" data-config="/https://www.cdc.gov/poxvirus/mpox/modules/data-viz/mpx-age-sex1.json"></div> -->
104
-
105
- <!-- TESTS DATE EXCLUSIONS -->
106
- <!-- <div class="react-container" data-config="/examples/feature/boxplot/boxplot.json"></div> -->
107
- <!-- <div class="react-container" data-config="/examples/feature/tests-case-rate/case-rate-example-config.json"></div> -->
108
-
109
- <!-- TESTS BIG SMALL-->
110
- <!-- <div class="react-container" data-config="/examples/feature/tests-big-small/big-small-test-line.json"></div> -->
111
- <!-- <div class="react-container" data-config="/examples/feature/tests-big-small/big-small-test-bar.json"></div> -->
112
- <!-- <div class="react-container" data-config="/examples/feature/tests-big-small/big-small-test-negative.json"></div> -->
113
- <!-- <div class="react-container" data-config="/examples/feature/tests-big-small/line-chart-max-increase.json"></div> -->
114
-
115
- <!-- TESTS NONNUMERICS -->
116
- <!-- <div
117
- class="react-container"
118
- data-config="/examples/feature/tests-non-numerics/planet-pie-example-config-nonnumeric.json"
119
- ></div> -->
120
- <div class="react-container" data-config="/examples/feature/tests-non-numerics/example-combo-bar-nonnumeric.json">
121
- </div>
122
- <!-- <div class="react-container" data-config="/examples/feature/tests-non-numerics/example-bar-chart-nonnumeric.json"></div> -->
123
- <!-- <div class="react-container" data-config="/examples/sparkline.json"></div> -->
124
- <!-- <div
125
- class="react-container"
126
- data-config="/examples/feature/tests-non-numerics/sparkline-chart-nonnumeric.json"
127
- ></div> -->
128
- <!-- <div class="react-container" data-config="/examples/region-issue.json"></div> -->
129
- <!-- <div class="react-container" data-config="/examples/feature/tests-non-numerics/stacked-vertical-bar-example-nonnumerics.json"></div> -->
130
-
131
- <!-- TESTS CUTOFF -->
132
- <!-- <div class="react-container" data-config="/examples/feature/tests-cutoff/cutoff-example-config.json"></div> -->
133
-
134
- <!-- TESTS COVID -->
135
- <!-- <div class="react-container" data-config="/examples/feature/tests-covid/covid-confidence-example-config.json"></div> -->
136
- <!-- <div class="react-container" data-config="/examples/feature/tests-covid/covid-example-config.json"></div> -->
137
-
138
- <!--
139
- GALLERY EXAMPLES BELOW THIS LINE...
140
- https://www.cdc.gov/wcms/4.0/cdc-wp/data-presentation/examples/example-data-map-cities-states.html
141
-
142
- -->
143
-
144
- <!-- GENERIC CHART TYPES -->
145
- <!-- <div class="react-container" data-config="/examples/gallery/paired-bar/paired-bar-chart.json"></div> -->
146
- <!-- <div class="react-container" data-config="/examples/feature/line/line-chart.json"></div> -->
147
- <!-- <div class="react-container" data-config="/examples/feature/annotations/index.json"></div> -->
27
+ <div class="react-container" data-config="/examples/feature/combo/planet-combo-example-config.json"></div>
148
28
 
149
- <!-- HORIZONTAL BAR CHARTS -->
150
- <!-- <div class="react-container" data-config="/examples/gallery/bar-chart-horizontal/horizontal-bar-chart-with-numbers-on-bar.json"></div> -->
151
- <!-- <div class="react-container" data-config="/examples/gallery/bar-chart-horizontal/horizontal-bar-chart.json"></div> -->
152
- <!-- <div class="react-container" data-config="/examples/gallery/bar-chart-horizontal/horizontal-stacked.json"></div> -->
153
29
 
154
- <!-- VERTICAL BAR CHARTS -->
155
- <!-- <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/vertical-bar-chart-categorical.json"></div> -->
157
- <!-- <div class="react-container" data-config="/examples/gallery/bar-chart-vertical/vertical-bar-chart-stacked.json"></div> -->
158
- <!-- <div class="react-container" data-config="/examples/gallery/bar-chart-vertical/vertical-bar-chart-confidence.json"></div> -->
159
- <!-- <div class="react-container" data-config="/examples/gallery/bar-chart-vertical/vertical-bar-chart.json"></div> -->
160
- <!-- <div class="react-container" data-config="https://www.cdc.gov/respiratory-viruses/modules/respiratory-virus-activity/emergency-dept-visits_live.json"></div> -->
161
30
 
162
31
  <noscript>You need to enable JavaScript to run this app.</noscript>
163
32
 
164
33
  <script type="module" src="./src/index.jsx"></script>
165
34
  </body>
166
35
 
167
- </html>
36
+ </html>