@cdc/chart 4.25.6-1 → 4.25.6-2
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 +21085 -21544
- package/examples/private/0527.json +1 -0
- package/examples/private/DEV-8850-2.json +493 -0
- package/examples/private/DEV-9822.json +574 -0
- package/examples/private/DEV-9840.json +553 -0
- package/examples/private/DEV-9850-3.json +461 -0
- package/examples/private/chart.json +1084 -0
- package/examples/private/ci_formatted.json +202 -0
- package/examples/private/ci_issue.json +3016 -0
- package/examples/private/completed.json +634 -0
- package/examples/private/dem-data-long.csv +20 -0
- package/examples/private/dem-data-long.json +36 -0
- package/examples/private/demographic_data.csv +157 -0
- package/examples/private/demographic_data.json +2654 -0
- package/examples/private/demographic_dynamic.json +443 -0
- package/examples/private/demographic_standard.json +560 -0
- package/examples/private/ehdi.json +29939 -0
- package/examples/private/line-issue.json +497 -0
- package/examples/private/not-loading.json +360 -0
- package/examples/private/test.json +493 -0
- package/examples/private/testing-pie.json +436 -0
- package/package.json +2 -2
- package/src/components/LinearChart.tsx +2 -2
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
{
|
|
2
|
+
"annotations": [],
|
|
3
|
+
"type": "chart",
|
|
4
|
+
"debugSvg": false,
|
|
5
|
+
"chartMessage": {
|
|
6
|
+
"noData": "No Data Available"
|
|
7
|
+
},
|
|
8
|
+
"title": "",
|
|
9
|
+
"showTitle": false,
|
|
10
|
+
"showDownloadMediaButton": false,
|
|
11
|
+
"theme": "theme-blue",
|
|
12
|
+
"animate": false,
|
|
13
|
+
"fontSize": "small",
|
|
14
|
+
"lineDatapointStyle": "hover",
|
|
15
|
+
"lineDatapointColor": "Same as Line",
|
|
16
|
+
"barHasBorder": "false",
|
|
17
|
+
"isLollipopChart": false,
|
|
18
|
+
"lollipopShape": "circle",
|
|
19
|
+
"lollipopColorStyle": "two-tone",
|
|
20
|
+
"visualizationSubType": "regular",
|
|
21
|
+
"barStyle": "",
|
|
22
|
+
"roundingStyle": "standard",
|
|
23
|
+
"tipRounding": "top",
|
|
24
|
+
"isResponsiveTicks": false,
|
|
25
|
+
"general": {
|
|
26
|
+
"annotationDropdownText": "Annotations",
|
|
27
|
+
"showMissingDataLabel": true,
|
|
28
|
+
"showSuppressedSymbol": true,
|
|
29
|
+
"showZeroValueData": true,
|
|
30
|
+
"hideNullValue": true,
|
|
31
|
+
"showDownloadButton": false,
|
|
32
|
+
"showZeroValueDataLabel": true
|
|
33
|
+
},
|
|
34
|
+
"padding": {
|
|
35
|
+
"left": 5,
|
|
36
|
+
"right": 5
|
|
37
|
+
},
|
|
38
|
+
"preliminaryData": [],
|
|
39
|
+
"yAxis": {
|
|
40
|
+
"hideAxis": false,
|
|
41
|
+
"displayNumbersOnBar": false,
|
|
42
|
+
"hideLabel": false,
|
|
43
|
+
"hideTicks": false,
|
|
44
|
+
"size": 50,
|
|
45
|
+
"gridLines": false,
|
|
46
|
+
"enablePadding": false,
|
|
47
|
+
"min": "",
|
|
48
|
+
"max": "",
|
|
49
|
+
"labelColor": "#333",
|
|
50
|
+
"tickLabelColor": "#333",
|
|
51
|
+
"tickColor": "#333",
|
|
52
|
+
"rightHideAxis": true,
|
|
53
|
+
"rightAxisSize": 0,
|
|
54
|
+
"rightLabel": "",
|
|
55
|
+
"rightLabelOffsetSize": 0,
|
|
56
|
+
"rightAxisLabelColor": "#333",
|
|
57
|
+
"rightAxisTickLabelColor": "#333",
|
|
58
|
+
"rightAxisTickColor": "#333",
|
|
59
|
+
"numTicks": "",
|
|
60
|
+
"axisPadding": 0,
|
|
61
|
+
"scalePadding": 10,
|
|
62
|
+
"tickRotation": 0,
|
|
63
|
+
"anchors": [],
|
|
64
|
+
"shoMissingDataLabel": true,
|
|
65
|
+
"showMissingDataLine": true,
|
|
66
|
+
"categories": [],
|
|
67
|
+
"dataKey": "Number of adults",
|
|
68
|
+
"labelPlacement": "On Date/Category Axis",
|
|
69
|
+
"maxValue": 62
|
|
70
|
+
},
|
|
71
|
+
"boxplot": {
|
|
72
|
+
"plots": [],
|
|
73
|
+
"borders": "true",
|
|
74
|
+
"plotOutlierValues": false,
|
|
75
|
+
"plotNonOutlierValues": true,
|
|
76
|
+
"labels": {
|
|
77
|
+
"q1": "Lower Quartile",
|
|
78
|
+
"q2": "q2",
|
|
79
|
+
"q3": "Upper Quartile",
|
|
80
|
+
"q4": "q4",
|
|
81
|
+
"minimum": "Minimum",
|
|
82
|
+
"maximum": "Maximum",
|
|
83
|
+
"mean": "Mean",
|
|
84
|
+
"median": "Median",
|
|
85
|
+
"sd": "Standard Deviation",
|
|
86
|
+
"iqr": "Interquartile Range",
|
|
87
|
+
"total": "Total",
|
|
88
|
+
"outliers": "Outliers",
|
|
89
|
+
"values": "Values",
|
|
90
|
+
"lowerBounds": "Lower Bounds",
|
|
91
|
+
"upperBounds": "Upper Bounds",
|
|
92
|
+
"count": "Count"
|
|
93
|
+
},
|
|
94
|
+
"firstQuartilePercentage": 25,
|
|
95
|
+
"thirdQuartilePercentage": 75,
|
|
96
|
+
"boxWidthPercentage": 40,
|
|
97
|
+
"legend": {
|
|
98
|
+
"showHowToReadText": false,
|
|
99
|
+
"howToReadText": ""
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"topAxis": {
|
|
103
|
+
"hasLine": false
|
|
104
|
+
},
|
|
105
|
+
"isLegendValue": false,
|
|
106
|
+
"barThickness": 0.35,
|
|
107
|
+
"barHeight": "40",
|
|
108
|
+
"barSpace": "50",
|
|
109
|
+
"heights": {
|
|
110
|
+
"vertical": 300,
|
|
111
|
+
"horizontal": 180
|
|
112
|
+
},
|
|
113
|
+
"xAxis": {
|
|
114
|
+
"sortDates": false,
|
|
115
|
+
"anchors": [],
|
|
116
|
+
"type": "categorical",
|
|
117
|
+
"showTargetLabel": true,
|
|
118
|
+
"targetLabel": "Target",
|
|
119
|
+
"hideAxis": false,
|
|
120
|
+
"hideLabel": false,
|
|
121
|
+
"hideTicks": false,
|
|
122
|
+
"size": 75,
|
|
123
|
+
"tickRotation": 0,
|
|
124
|
+
"min": "",
|
|
125
|
+
"max": "",
|
|
126
|
+
"labelColor": "#333",
|
|
127
|
+
"tickLabelColor": "#333",
|
|
128
|
+
"tickColor": "#333",
|
|
129
|
+
"numTicks": "",
|
|
130
|
+
"labelOffset": 0,
|
|
131
|
+
"axisPadding": 200,
|
|
132
|
+
"target": 0,
|
|
133
|
+
"maxTickRotation": 0,
|
|
134
|
+
"padding": 5,
|
|
135
|
+
"showYearsOnce": false,
|
|
136
|
+
"sortByRecentDate": false,
|
|
137
|
+
"dataKey": "Subgroup",
|
|
138
|
+
"tickWidthMax": 46
|
|
139
|
+
},
|
|
140
|
+
"table": {
|
|
141
|
+
"label": "Data Table",
|
|
142
|
+
"expanded": false,
|
|
143
|
+
"limitHeight": false,
|
|
144
|
+
"height": "",
|
|
145
|
+
"caption": "",
|
|
146
|
+
"showDownloadUrl": false,
|
|
147
|
+
"showDataTableLink": true,
|
|
148
|
+
"showDownloadLinkBelow": true,
|
|
149
|
+
"indexLabel": "",
|
|
150
|
+
"download": true,
|
|
151
|
+
"showVertical": true,
|
|
152
|
+
"dateDisplayFormat": "",
|
|
153
|
+
"showMissingDataLabel": true,
|
|
154
|
+
"showSuppressedSymbol": true,
|
|
155
|
+
"show": true,
|
|
156
|
+
"showDownloadImgButton": false,
|
|
157
|
+
"collapsible": true
|
|
158
|
+
},
|
|
159
|
+
"orientation": "Pie",
|
|
160
|
+
"color": "pinkpurple",
|
|
161
|
+
"columns": {
|
|
162
|
+
"95% Confidence interval": {
|
|
163
|
+
"label": "95% Confidence interval",
|
|
164
|
+
"dataTable": true,
|
|
165
|
+
"tooltips": false,
|
|
166
|
+
"prefix": "",
|
|
167
|
+
"suffix": "",
|
|
168
|
+
"forestPlot": false,
|
|
169
|
+
"startingPoint": "0",
|
|
170
|
+
"forestPlotAlignRight": false,
|
|
171
|
+
"roundToPlace": 0,
|
|
172
|
+
"commas": false,
|
|
173
|
+
"showInViz": false,
|
|
174
|
+
"forestPlotStartingPoint": 0,
|
|
175
|
+
"name": "95% Confidence interval",
|
|
176
|
+
"order": 4
|
|
177
|
+
},
|
|
178
|
+
"Percent": {
|
|
179
|
+
"label": "Percent",
|
|
180
|
+
"dataTable": true,
|
|
181
|
+
"tooltips": false,
|
|
182
|
+
"prefix": "",
|
|
183
|
+
"suffix": "%",
|
|
184
|
+
"forestPlot": false,
|
|
185
|
+
"startingPoint": "0",
|
|
186
|
+
"forestPlotAlignRight": false,
|
|
187
|
+
"roundToPlace": "1",
|
|
188
|
+
"commas": false,
|
|
189
|
+
"showInViz": false,
|
|
190
|
+
"forestPlotStartingPoint": 0,
|
|
191
|
+
"name": "Percent",
|
|
192
|
+
"order": 3
|
|
193
|
+
},
|
|
194
|
+
"Number of adults": {
|
|
195
|
+
"label": "Number of adults",
|
|
196
|
+
"dataTable": true,
|
|
197
|
+
"tooltips": false,
|
|
198
|
+
"prefix": "",
|
|
199
|
+
"suffix": "",
|
|
200
|
+
"forestPlot": false,
|
|
201
|
+
"startingPoint": "0",
|
|
202
|
+
"forestPlotAlignRight": false,
|
|
203
|
+
"roundToPlace": 0,
|
|
204
|
+
"commas": true,
|
|
205
|
+
"showInViz": false,
|
|
206
|
+
"forestPlotStartingPoint": 0,
|
|
207
|
+
"name": "Number of adults"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"legend": {
|
|
211
|
+
"hide": false,
|
|
212
|
+
"behavior": "isolate",
|
|
213
|
+
"axisAlign": true,
|
|
214
|
+
"singleRow": true,
|
|
215
|
+
"colorCode": "",
|
|
216
|
+
"reverseLabelOrder": false,
|
|
217
|
+
"description": "",
|
|
218
|
+
"dynamicLegend": false,
|
|
219
|
+
"dynamicLegendDefaultText": "Show All",
|
|
220
|
+
"dynamicLegendItemLimit": 5,
|
|
221
|
+
"dynamicLegendItemLimitMessage": "Dynamic Legend Item Limit Hit.",
|
|
222
|
+
"dynamicLegendChartMessage": "Select Options from the Legend",
|
|
223
|
+
"label": "",
|
|
224
|
+
"lineMode": false,
|
|
225
|
+
"verticalSorted": false,
|
|
226
|
+
"highlightOnHover": false,
|
|
227
|
+
"hideSuppressedLabels": false,
|
|
228
|
+
"hideSuppressionLink": false,
|
|
229
|
+
"seriesHighlight": [],
|
|
230
|
+
"style": "circles",
|
|
231
|
+
"subStyle": "linear blocks",
|
|
232
|
+
"groupBy": "",
|
|
233
|
+
"shape": "circle",
|
|
234
|
+
"tickRotation": "",
|
|
235
|
+
"hideBorder": {
|
|
236
|
+
"side": false,
|
|
237
|
+
"topBottom": true
|
|
238
|
+
},
|
|
239
|
+
"position": "right"
|
|
240
|
+
},
|
|
241
|
+
"brush": {
|
|
242
|
+
"height": 25,
|
|
243
|
+
"active": false
|
|
244
|
+
},
|
|
245
|
+
"exclusions": {
|
|
246
|
+
"active": false,
|
|
247
|
+
"keys": []
|
|
248
|
+
},
|
|
249
|
+
"palette": "sequential-bluereverse",
|
|
250
|
+
"isPaletteReversed": true,
|
|
251
|
+
"twoColor": {
|
|
252
|
+
"palette": "monochrome-1",
|
|
253
|
+
"isPaletteReversed": false
|
|
254
|
+
},
|
|
255
|
+
"labels": false,
|
|
256
|
+
"dataFormat": {
|
|
257
|
+
"commas": false,
|
|
258
|
+
"prefix": "",
|
|
259
|
+
"suffix": "",
|
|
260
|
+
"abbreviated": false,
|
|
261
|
+
"bottomSuffix": "",
|
|
262
|
+
"bottomPrefix": "",
|
|
263
|
+
"bottomAbbreviated": false,
|
|
264
|
+
"roundTo": ""
|
|
265
|
+
},
|
|
266
|
+
"confidenceKeys": {},
|
|
267
|
+
"visual": {
|
|
268
|
+
"border": true,
|
|
269
|
+
"accent": true,
|
|
270
|
+
"background": true,
|
|
271
|
+
"verticalHoverLine": false,
|
|
272
|
+
"horizontalHoverLine": false,
|
|
273
|
+
"lineDatapointSymbol": "none",
|
|
274
|
+
"maximumShapeAmount": 7
|
|
275
|
+
},
|
|
276
|
+
"useLogScale": false,
|
|
277
|
+
"filterBehavior": "Filter Change",
|
|
278
|
+
"highlightedBarValues": [],
|
|
279
|
+
"series": [
|
|
280
|
+
{
|
|
281
|
+
"dataKey": "Percent",
|
|
282
|
+
"type": "Bar",
|
|
283
|
+
"axis": "Left",
|
|
284
|
+
"tooltip": true
|
|
285
|
+
}
|
|
286
|
+
],
|
|
287
|
+
"tooltips": {
|
|
288
|
+
"opacity": 90,
|
|
289
|
+
"singleSeries": false,
|
|
290
|
+
"dateDisplayFormat": ""
|
|
291
|
+
},
|
|
292
|
+
"forestPlot": {
|
|
293
|
+
"startAt": 0,
|
|
294
|
+
"colors": {
|
|
295
|
+
"line": "",
|
|
296
|
+
"shape": ""
|
|
297
|
+
},
|
|
298
|
+
"lineOfNoEffect": {
|
|
299
|
+
"show": true
|
|
300
|
+
},
|
|
301
|
+
"type": "",
|
|
302
|
+
"pooledResult": {
|
|
303
|
+
"diamondHeight": 5,
|
|
304
|
+
"column": ""
|
|
305
|
+
},
|
|
306
|
+
"estimateField": "",
|
|
307
|
+
"estimateRadius": "",
|
|
308
|
+
"shape": "square",
|
|
309
|
+
"rowHeight": 20,
|
|
310
|
+
"description": {
|
|
311
|
+
"show": true,
|
|
312
|
+
"text": "description",
|
|
313
|
+
"location": 0
|
|
314
|
+
},
|
|
315
|
+
"result": {
|
|
316
|
+
"show": true,
|
|
317
|
+
"text": "result",
|
|
318
|
+
"location": 100
|
|
319
|
+
},
|
|
320
|
+
"radius": {
|
|
321
|
+
"min": 2,
|
|
322
|
+
"max": 10,
|
|
323
|
+
"scalingColumn": ""
|
|
324
|
+
},
|
|
325
|
+
"regression": {
|
|
326
|
+
"lower": 0,
|
|
327
|
+
"upper": 0,
|
|
328
|
+
"estimateField": 0
|
|
329
|
+
},
|
|
330
|
+
"leftWidthOffset": 0,
|
|
331
|
+
"rightWidthOffset": 0,
|
|
332
|
+
"showZeroLine": false,
|
|
333
|
+
"leftLabel": "",
|
|
334
|
+
"rightLabel": ""
|
|
335
|
+
},
|
|
336
|
+
"area": {
|
|
337
|
+
"isStacked": false
|
|
338
|
+
},
|
|
339
|
+
"sankey": {
|
|
340
|
+
"title": {
|
|
341
|
+
"defaultColor": "black"
|
|
342
|
+
},
|
|
343
|
+
"iterations": 1,
|
|
344
|
+
"rxValue": 0.9,
|
|
345
|
+
"overallSize": {
|
|
346
|
+
"width": 900,
|
|
347
|
+
"height": 700
|
|
348
|
+
},
|
|
349
|
+
"margin": {
|
|
350
|
+
"margin_y": 25,
|
|
351
|
+
"margin_x": 0
|
|
352
|
+
},
|
|
353
|
+
"nodeSize": {
|
|
354
|
+
"nodeWidth": 26,
|
|
355
|
+
"nodeHeight": 40
|
|
356
|
+
},
|
|
357
|
+
"nodePadding": 55,
|
|
358
|
+
"nodeFontColor": "black",
|
|
359
|
+
"nodeColor": {
|
|
360
|
+
"default": "#ff8500",
|
|
361
|
+
"inactive": "#808080"
|
|
362
|
+
},
|
|
363
|
+
"linkColor": {
|
|
364
|
+
"default": "#ffc900",
|
|
365
|
+
"inactive": "#D3D3D3"
|
|
366
|
+
},
|
|
367
|
+
"opacity": {
|
|
368
|
+
"nodeOpacityDefault": 1,
|
|
369
|
+
"nodeOpacityInactive": 0.1,
|
|
370
|
+
"LinkOpacityDefault": 1,
|
|
371
|
+
"LinkOpacityInactive": 0.1
|
|
372
|
+
},
|
|
373
|
+
"storyNodeFontColor": "#006778",
|
|
374
|
+
"storyNodeText": [],
|
|
375
|
+
"nodeValueStyle": {
|
|
376
|
+
"textBefore": "(",
|
|
377
|
+
"textAfter": ")"
|
|
378
|
+
},
|
|
379
|
+
"data": []
|
|
380
|
+
},
|
|
381
|
+
"datasets": {},
|
|
382
|
+
"visualizationType": "Pie",
|
|
383
|
+
"data": [
|
|
384
|
+
{
|
|
385
|
+
"Subgroup": "Yes",
|
|
386
|
+
"Number of adults": "1201537",
|
|
387
|
+
"Percent": "38.4",
|
|
388
|
+
"95% Confidence interval": "34.8 - 42.1"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"Subgroup": "No",
|
|
392
|
+
"Number of adults": "1927950",
|
|
393
|
+
"Percent": "61.6",
|
|
394
|
+
"95% Confidence interval": "57.9 - 65.2"
|
|
395
|
+
}
|
|
396
|
+
],
|
|
397
|
+
"dataFileName": "disability-status.csv",
|
|
398
|
+
"dataFileSourceType": "file",
|
|
399
|
+
"dataDescription": {
|
|
400
|
+
"horizontal": false,
|
|
401
|
+
"series": false
|
|
402
|
+
},
|
|
403
|
+
"version": "4.25.1",
|
|
404
|
+
"footnotes": "<sup>a</sup> The final recode variable created for Washington Group Adult Composite Disability Indicator. Disability is defined by the reported level of difficulty (no difficulty, some difficulty, a lot of difficulty, or cannot do at all) in six functioning domains: seeing (even if wearing glasses), hearing (even if wearing hearing aids), mobility (walking or climbing stairs), communication (understanding or being understood by others), cognition (remembering or concentrating), and self-care (such as washing all over or dressing). Sample adults who responded \"a lot of difficulty\" or \"cannot do at all\" to at least one question were considered to have a disability.<br/><br/>\n\n<sup>b</sup> Active epilepsy was defined as adults who answered that a doctor or health professional had ever told them they had a seizure disorder or epilepsy and also reported taking medication, having had one or more seizures in the past year, or both.",
|
|
405
|
+
"dynamicMarginTop": 0,
|
|
406
|
+
"filters": [],
|
|
407
|
+
"migrations": {
|
|
408
|
+
"addColorMigration": true
|
|
409
|
+
},
|
|
410
|
+
"id": 13,
|
|
411
|
+
"category": "Charts",
|
|
412
|
+
"label": "Pie",
|
|
413
|
+
"subType": "Pie",
|
|
414
|
+
"icon": {
|
|
415
|
+
"key": null,
|
|
416
|
+
"ref": null,
|
|
417
|
+
"props": {},
|
|
418
|
+
"_owner": null
|
|
419
|
+
},
|
|
420
|
+
"content": "Present the numerical proportions of a data series.",
|
|
421
|
+
"activeVizButtonID": 13,
|
|
422
|
+
"formattedData": [
|
|
423
|
+
{
|
|
424
|
+
"Subgroup": "Yes",
|
|
425
|
+
"Number of adults": "1201537",
|
|
426
|
+
"Percent": "38.4",
|
|
427
|
+
"95% Confidence interval": "34.8 - 42.1"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"Subgroup": "No",
|
|
431
|
+
"Number of adults": "1927950",
|
|
432
|
+
"Percent": "61.6",
|
|
433
|
+
"95% Confidence interval": "57.9 - 65.2"
|
|
434
|
+
}
|
|
435
|
+
]
|
|
436
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdc/chart",
|
|
3
|
-
"version": "4.25.6-
|
|
3
|
+
"version": "4.25.6-2",
|
|
4
4
|
"description": "React component for visualizing tabular data in various types of charts",
|
|
5
5
|
"moduleName": "CdcChart",
|
|
6
6
|
"main": "dist/cdcchart",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"react": "^18.2.0",
|
|
54
54
|
"react-dom": "^18.2.0"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "8183dee16aa930575befad47833cf0ce2bcb4edb",
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/d3-array": "^3.2.1",
|
|
59
59
|
"@types/d3-format": "^3.0.4",
|
|
@@ -1062,8 +1062,8 @@ const LinearChart = forwardRef<SVGAElement, LinearChartProps>(({ parentHeight, p
|
|
|
1062
1062
|
const labelVerticalAnchor = labelsAboveGridlines ? 'end' : 'middle'
|
|
1063
1063
|
const combineDomInlineLabelWithValue = inlineLabel && labelsAboveGridlines && lastTick
|
|
1064
1064
|
const formattedValue = useInlineLabel
|
|
1065
|
-
? tick
|
|
1066
|
-
: tick
|
|
1065
|
+
? String(tick?.formattedValue || '').replace(config.dataFormat.suffix, '')
|
|
1066
|
+
: tick?.formattedValue
|
|
1067
1067
|
|
|
1068
1068
|
return (
|
|
1069
1069
|
<Group key={`vx-tick-${tick.value}-${i}`} className={'vx-axis-tick'}>
|