@cdc/chart 4.23.8 → 4.23.10-alpha
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 +43990 -44283
- package/examples/feature/__data__/area-chart-date-apple.json +1 -5073
- package/examples/feature/area/area-chart-date-apple.json +73 -10316
- package/examples/feature/area/area-chart-date-city-temperature.json +204 -80
- package/examples/{private/confidence_interval_test.json → feature/area/area-chart-stacked.json} +65 -74
- package/examples/feature/bar/lollipop.json +156 -0
- package/examples/feature/combo/planet-combo-example-config.json +99 -9
- package/examples/feature/filters/bar-filter.json +5027 -0
- package/examples/feature/legend-highlights/highlights.json +567 -0
- package/examples/private/TESTING.json +0 -0
- package/examples/private/forest-plot.json +356 -0
- package/examples/private/{tooltip-issue.json → full.json} +25288 -25239
- package/examples/private/missing-color.json +333 -0
- package/index.html +30 -8
- package/package.json +3 -2
- package/src/{CdcChart.jsx → CdcChart.tsx} +81 -74
- package/src/_stories/Chart.stories.tsx +188 -0
- package/src/components/AreaChart.Stacked.jsx +73 -0
- package/src/components/AreaChart.jsx +24 -26
- package/src/components/BarChart.StackedVertical.jsx +2 -0
- package/src/components/DeviationBar.jsx +67 -13
- package/src/components/EditorPanel.jsx +493 -454
- package/src/components/Forecasting.jsx +5 -5
- package/src/components/ForestPlotSettings.jsx +5 -6
- package/src/components/Legend.jsx +18 -9
- package/src/components/LineChart.Circle.tsx +102 -0
- package/src/components/{LineChart.jsx → LineChart.tsx} +9 -48
- package/src/components/LinearChart.jsx +460 -443
- package/src/components/PieChart.jsx +54 -25
- package/src/components/Series.jsx +63 -17
- package/src/components/SparkLine.jsx +7 -19
- package/src/data/initial-state.js +10 -1
- package/src/hooks/useBarChart.js +1 -1
- package/src/hooks/useEditorPermissions.js +87 -24
- package/src/hooks/useLegendClasses.js +14 -11
- package/src/hooks/useReduceData.js +6 -1
- package/src/hooks/useScales.js +4 -4
- package/src/hooks/useTooltip.jsx +21 -8
- package/src/scss/legend.scss +206 -0
- package/src/scss/main.scss +25 -24
- package/src/components/DataTable.jsx +0 -374
- /package/src/{components → hooks}/useIntersectionObserver.jsx +0 -0
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "chart",
|
|
3
|
+
"debugSvg": false,
|
|
4
|
+
"chartMessage": {
|
|
5
|
+
"noData": "No Data Available"
|
|
6
|
+
},
|
|
7
|
+
"title": "Forest Plot Title",
|
|
8
|
+
"showTitle": true,
|
|
9
|
+
"showDownloadMediaButton": false,
|
|
10
|
+
"showChartBrush": false,
|
|
11
|
+
"theme": "theme-blue",
|
|
12
|
+
"animate": false,
|
|
13
|
+
"fontSize": "medium",
|
|
14
|
+
"lineDatapointStyle": "hover",
|
|
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
|
+
"yAxis": {
|
|
32
|
+
"hideAxis": false,
|
|
33
|
+
"displayNumbersOnBar": false,
|
|
34
|
+
"hideLabel": false,
|
|
35
|
+
"hideTicks": false,
|
|
36
|
+
"size": 50,
|
|
37
|
+
"gridLines": false,
|
|
38
|
+
"enablePadding": false,
|
|
39
|
+
"min": "",
|
|
40
|
+
"max": "",
|
|
41
|
+
"labelColor": "#333",
|
|
42
|
+
"tickLabelColor": "#333",
|
|
43
|
+
"tickColor": "#333",
|
|
44
|
+
"rightHideAxis": true,
|
|
45
|
+
"rightAxisSize": 0,
|
|
46
|
+
"rightLabel": "",
|
|
47
|
+
"rightLabelOffsetSize": 0,
|
|
48
|
+
"rightAxisLabelColor": "#333",
|
|
49
|
+
"rightAxisTickLabelColor": "#333",
|
|
50
|
+
"rightAxisTickColor": "#333",
|
|
51
|
+
"numTicks": "",
|
|
52
|
+
"axisPadding": 0,
|
|
53
|
+
"tickRotation": 0,
|
|
54
|
+
"anchors": []
|
|
55
|
+
},
|
|
56
|
+
"boxplot": {
|
|
57
|
+
"plots": [],
|
|
58
|
+
"borders": "true",
|
|
59
|
+
"firstQuartilePercentage": 25,
|
|
60
|
+
"thirdQuartilePercentage": 75,
|
|
61
|
+
"boxWidthPercentage": 40,
|
|
62
|
+
"plotOutlierValues": false,
|
|
63
|
+
"plotNonOutlierValues": true,
|
|
64
|
+
"legend": {
|
|
65
|
+
"showHowToReadText": false,
|
|
66
|
+
"howToReadText": ""
|
|
67
|
+
},
|
|
68
|
+
"labels": {
|
|
69
|
+
"q1": "Lower Quartile",
|
|
70
|
+
"q2": "q2",
|
|
71
|
+
"q3": "Upper Quartile",
|
|
72
|
+
"q4": "q4",
|
|
73
|
+
"minimum": "Minimum",
|
|
74
|
+
"maximum": "Maximum",
|
|
75
|
+
"mean": "Mean",
|
|
76
|
+
"median": "Median",
|
|
77
|
+
"sd": "Standard Deviation",
|
|
78
|
+
"iqr": "Interquartile Range",
|
|
79
|
+
"total": "Total",
|
|
80
|
+
"outliers": "Outliers",
|
|
81
|
+
"values": "Values",
|
|
82
|
+
"lowerBounds": "Lower Bounds",
|
|
83
|
+
"upperBounds": "Upper Bounds"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"topAxis": {
|
|
87
|
+
"hasLine": false
|
|
88
|
+
},
|
|
89
|
+
"isLegendValue": false,
|
|
90
|
+
"barThickness": 0.35,
|
|
91
|
+
"barHeight": 25,
|
|
92
|
+
"barSpace": 15,
|
|
93
|
+
"heights": {
|
|
94
|
+
"vertical": 300,
|
|
95
|
+
"horizontal": 750
|
|
96
|
+
},
|
|
97
|
+
"xAxis": {
|
|
98
|
+
"sortDates": false,
|
|
99
|
+
"anchors": [],
|
|
100
|
+
"type": "categorical",
|
|
101
|
+
"showTargetLabel": true,
|
|
102
|
+
"targetLabel": "Target",
|
|
103
|
+
"hideAxis": false,
|
|
104
|
+
"hideLabel": false,
|
|
105
|
+
"hideTicks": false,
|
|
106
|
+
"size": 0,
|
|
107
|
+
"tickRotation": 0,
|
|
108
|
+
"min": "",
|
|
109
|
+
"max": "",
|
|
110
|
+
"labelColor": "#333",
|
|
111
|
+
"tickLabelColor": "#333",
|
|
112
|
+
"tickColor": "#333",
|
|
113
|
+
"numTicks": "",
|
|
114
|
+
"labelOffset": 65,
|
|
115
|
+
"axisPadding": 0,
|
|
116
|
+
"target": 0,
|
|
117
|
+
"maxTickRotation": 0,
|
|
118
|
+
"dataKey": "Study"
|
|
119
|
+
},
|
|
120
|
+
"table": {
|
|
121
|
+
"label": "Data Table",
|
|
122
|
+
"expanded": true,
|
|
123
|
+
"limitHeight": false,
|
|
124
|
+
"height": "",
|
|
125
|
+
"caption": "",
|
|
126
|
+
"showDownloadUrl": false,
|
|
127
|
+
"showDataTableLink": true,
|
|
128
|
+
"indexLabel": "Study",
|
|
129
|
+
"download": false,
|
|
130
|
+
"showVertical": true,
|
|
131
|
+
"show": true
|
|
132
|
+
},
|
|
133
|
+
"orientation": "horizontal",
|
|
134
|
+
"color": "pinkpurple",
|
|
135
|
+
"columns": {
|
|
136
|
+
"additionalColumn1": {
|
|
137
|
+
"label": "Intervention Group (n/N)",
|
|
138
|
+
"dataTable": true,
|
|
139
|
+
"tooltips": true,
|
|
140
|
+
"prefix": "",
|
|
141
|
+
"suffix": "",
|
|
142
|
+
"forestPlot": false,
|
|
143
|
+
"startingPoint": "0",
|
|
144
|
+
"forestPlotAlignRight": false,
|
|
145
|
+
"name": "Intervention Group (n/N) "
|
|
146
|
+
},
|
|
147
|
+
"additionalColumn2": {
|
|
148
|
+
"label": "Control Group (n/N)",
|
|
149
|
+
"dataTable": true,
|
|
150
|
+
"tooltips": true,
|
|
151
|
+
"prefix": "",
|
|
152
|
+
"suffix": "",
|
|
153
|
+
"forestPlot": false,
|
|
154
|
+
"startingPoint": "0",
|
|
155
|
+
"forestPlotAlignRight": false,
|
|
156
|
+
"name": "Control Group (n/N)",
|
|
157
|
+
"forestPlotStartingPoint": "0"
|
|
158
|
+
},
|
|
159
|
+
"additionalColumn3": {
|
|
160
|
+
"label": "Weight",
|
|
161
|
+
"dataTable": true,
|
|
162
|
+
"tooltips": true,
|
|
163
|
+
"prefix": "",
|
|
164
|
+
"suffix": "",
|
|
165
|
+
"forestPlot": false,
|
|
166
|
+
"startingPoint": "0",
|
|
167
|
+
"forestPlotAlignRight": false,
|
|
168
|
+
"name": "Weight"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"legend": {
|
|
172
|
+
"behavior": "isolate",
|
|
173
|
+
"singleRow": false,
|
|
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
|
+
"lineMode": false,
|
|
183
|
+
"verticalSorted": false,
|
|
184
|
+
"hide": true
|
|
185
|
+
},
|
|
186
|
+
"exclusions": {
|
|
187
|
+
"active": false,
|
|
188
|
+
"keys": []
|
|
189
|
+
},
|
|
190
|
+
"palette": "qualitative-bold",
|
|
191
|
+
"isPaletteReversed": false,
|
|
192
|
+
"twoColor": {
|
|
193
|
+
"palette": "monochrome-1",
|
|
194
|
+
"isPaletteReversed": false
|
|
195
|
+
},
|
|
196
|
+
"labels": false,
|
|
197
|
+
"dataFormat": {
|
|
198
|
+
"commas": false,
|
|
199
|
+
"prefix": "",
|
|
200
|
+
"suffix": "",
|
|
201
|
+
"abbreviated": false,
|
|
202
|
+
"bottomSuffix": "",
|
|
203
|
+
"bottomPrefix": "",
|
|
204
|
+
"bottomAbbreviated": false
|
|
205
|
+
},
|
|
206
|
+
"confidenceKeys": {},
|
|
207
|
+
"visual": {
|
|
208
|
+
"border": true,
|
|
209
|
+
"accent": true,
|
|
210
|
+
"background": true,
|
|
211
|
+
"verticalHoverLine": false,
|
|
212
|
+
"horizontalHoverLine": false
|
|
213
|
+
},
|
|
214
|
+
"useLogScale": false,
|
|
215
|
+
"filterBehavior": "Filter Change",
|
|
216
|
+
"highlightedBarValues": [],
|
|
217
|
+
"series": [],
|
|
218
|
+
"tooltips": {
|
|
219
|
+
"opacity": 90
|
|
220
|
+
},
|
|
221
|
+
"forestPlot": {
|
|
222
|
+
"startAt": 0,
|
|
223
|
+
"width": "auto",
|
|
224
|
+
"colors": {
|
|
225
|
+
"line": "",
|
|
226
|
+
"shape": ""
|
|
227
|
+
},
|
|
228
|
+
"estimateField": "Weight",
|
|
229
|
+
"estimateRadius": "",
|
|
230
|
+
"lowerCiField": "",
|
|
231
|
+
"upperCiField": "",
|
|
232
|
+
"shape": "circle",
|
|
233
|
+
"rowHeight": 20,
|
|
234
|
+
"showZeroLine": false,
|
|
235
|
+
"description": {
|
|
236
|
+
"show": true,
|
|
237
|
+
"text": "description",
|
|
238
|
+
"location": 0
|
|
239
|
+
},
|
|
240
|
+
"result": {
|
|
241
|
+
"show": true,
|
|
242
|
+
"text": "result",
|
|
243
|
+
"location": 100
|
|
244
|
+
},
|
|
245
|
+
"radius": {
|
|
246
|
+
"min": 1,
|
|
247
|
+
"max": 8,
|
|
248
|
+
"scalingColumn": ""
|
|
249
|
+
},
|
|
250
|
+
"regression": {
|
|
251
|
+
"lower": 0,
|
|
252
|
+
"upper": 0,
|
|
253
|
+
"estimateField": 0,
|
|
254
|
+
"showBaseLine": false
|
|
255
|
+
},
|
|
256
|
+
"leftWidthOffset": "21",
|
|
257
|
+
"rightWidthOffset": "29",
|
|
258
|
+
"title": "Forest Plot Example",
|
|
259
|
+
"lower": "Lower 95 CI",
|
|
260
|
+
"upper": "Upper 95 CI"
|
|
261
|
+
},
|
|
262
|
+
"brush": {
|
|
263
|
+
"pattern_id": "brush_pattern",
|
|
264
|
+
"accent_color": "#ddd"
|
|
265
|
+
},
|
|
266
|
+
"area": {
|
|
267
|
+
"isStacked": false
|
|
268
|
+
},
|
|
269
|
+
"datasets": {},
|
|
270
|
+
"visualizationType": "Forest Plot",
|
|
271
|
+
"data": [
|
|
272
|
+
{
|
|
273
|
+
"Study": "Study 1",
|
|
274
|
+
"Intervention Group (n/N) ": "1/131",
|
|
275
|
+
"Control Group (n/N)": "2/133",
|
|
276
|
+
"Weight": "17.8",
|
|
277
|
+
"Relative Risk (fixed)": "0.5",
|
|
278
|
+
"Lower 95 CI": "0.05",
|
|
279
|
+
"Upper 95 CI": "5.49"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"Study": "Study 2",
|
|
283
|
+
"Intervention Group (n/N) ": "7/279",
|
|
284
|
+
"Control Group (n/N)": "9/290",
|
|
285
|
+
"Weight": "77.7",
|
|
286
|
+
"Relative Risk (fixed)": "0.84",
|
|
287
|
+
"Lower 95 CI": "0.36",
|
|
288
|
+
"Upper 95 CI": "1.93"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"Study": "Study 3",
|
|
292
|
+
"Intervention Group (n/N) ": "3/102",
|
|
293
|
+
"Control Group (n/N)": "1/101",
|
|
294
|
+
"Weight": "4.5",
|
|
295
|
+
"Relative Risk (fixed)": "3",
|
|
296
|
+
"Lower 95 CI": "0.12",
|
|
297
|
+
"Upper 95 CI": "72.77"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"Study": "Total",
|
|
301
|
+
"Intervention Group (n/N) ": "512",
|
|
302
|
+
"Control Group (n/N)": "542",
|
|
303
|
+
"Weight": "100",
|
|
304
|
+
"Relative Risk (fixed)": "0.87",
|
|
305
|
+
"Lower 95 CI": "0.41",
|
|
306
|
+
"Upper 95 CI": "1.87"
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"dataFileName": "forest-plot-a.csv",
|
|
310
|
+
"dataFileSourceType": "file",
|
|
311
|
+
"dataDescription": {
|
|
312
|
+
"horizontal": false,
|
|
313
|
+
"series": false
|
|
314
|
+
},
|
|
315
|
+
"validated": 4.23,
|
|
316
|
+
"description": "Info such as <em>p</em> value, heterogeneity in plot subtext",
|
|
317
|
+
"dynamicMarginTop": 0,
|
|
318
|
+
"formattedData": [
|
|
319
|
+
{
|
|
320
|
+
"Study": "Study 1",
|
|
321
|
+
"Intervention Group (n/N) ": "1/131",
|
|
322
|
+
"Control Group (n/N)": "2/133",
|
|
323
|
+
"Weight": "17.8",
|
|
324
|
+
"Relative Risk (fixed)": "0.5",
|
|
325
|
+
"Lower 95 CI": "0.05",
|
|
326
|
+
"Upper 95 CI": "5.49"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"Study": "Study 2",
|
|
330
|
+
"Intervention Group (n/N) ": "7/279",
|
|
331
|
+
"Control Group (n/N)": "9/290",
|
|
332
|
+
"Weight": "77.7",
|
|
333
|
+
"Relative Risk (fixed)": "0.84",
|
|
334
|
+
"Lower 95 CI": "0.36",
|
|
335
|
+
"Upper 95 CI": "1.93"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"Study": "Study 3",
|
|
339
|
+
"Intervention Group (n/N) ": "3/102",
|
|
340
|
+
"Control Group (n/N)": "1/101",
|
|
341
|
+
"Weight": "4.5",
|
|
342
|
+
"Relative Risk (fixed)": "3",
|
|
343
|
+
"Lower 95 CI": "0.12",
|
|
344
|
+
"Upper 95 CI": "72.77"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"Study": "Total",
|
|
348
|
+
"Intervention Group (n/N) ": "512",
|
|
349
|
+
"Control Group (n/N)": "542",
|
|
350
|
+
"Weight": "100",
|
|
351
|
+
"Relative Risk (fixed)": "0.87",
|
|
352
|
+
"Lower 95 CI": "0.41",
|
|
353
|
+
"Upper 95 CI": "1.87"
|
|
354
|
+
}
|
|
355
|
+
]
|
|
356
|
+
}
|