@cdc/chart 4.25.5-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.
Files changed (63) hide show
  1. package/LICENSE +201 -0
  2. package/dist/cdcchart.js +31118 -27459
  3. package/examples/private/0527.json +1 -0
  4. package/examples/private/DEV-8850-2.json +493 -0
  5. package/examples/private/DEV-9822.json +574 -0
  6. package/examples/private/DEV-9840.json +553 -0
  7. package/examples/private/DEV-9850-3.json +461 -0
  8. package/examples/private/chart.json +1084 -0
  9. package/examples/private/ci_formatted.json +202 -0
  10. package/examples/private/ci_issue.json +3016 -0
  11. package/examples/private/completed.json +634 -0
  12. package/examples/private/dem-data-long.csv +20 -0
  13. package/examples/private/dem-data-long.json +36 -0
  14. package/examples/private/demographic_data.csv +157 -0
  15. package/examples/private/demographic_data.json +2654 -0
  16. package/examples/private/demographic_dynamic.json +443 -0
  17. package/examples/private/demographic_standard.json +560 -0
  18. package/examples/private/ehdi.json +29939 -0
  19. package/examples/private/line-issue.json +497 -0
  20. package/examples/private/not-loading.json +360 -0
  21. package/examples/private/test.json +493 -0
  22. package/examples/private/testing-pie.json +436 -0
  23. package/index.html +130 -130
  24. package/package.json +2 -2
  25. package/src/CdcChartComponent.tsx +66 -26
  26. package/src/_stories/Chart.stories.tsx +99 -93
  27. package/src/_stories/ChartPrefixSuffix.stories.tsx +29 -32
  28. package/src/_stories/_mock/pie_calculated_area.json +417 -0
  29. package/src/components/BarChart/components/BarChart.Horizontal.tsx +4 -13
  30. package/src/components/BarChart/components/BarChart.StackedVertical.tsx +3 -14
  31. package/src/components/BarChart/components/BarChart.Vertical.tsx +2 -8
  32. package/src/components/Brush/BrushChart.tsx +73 -0
  33. package/src/components/Brush/BrushController..tsx +39 -0
  34. package/src/components/DeviationBar.jsx +0 -1
  35. package/src/components/EditorPanel/EditorPanel.tsx +246 -156
  36. package/src/components/EditorPanel/components/Panels/Panel.General.tsx +2 -2
  37. package/src/components/EditorPanel/components/Panels/Panel.Series.tsx +3 -2
  38. package/src/components/EditorPanel/components/Panels/Panel.Visual.tsx +2 -1
  39. package/src/components/EditorPanel/components/Panels/panelVisual.styles.css +8 -0
  40. package/src/components/EditorPanel/useEditorPermissions.ts +7 -4
  41. package/src/components/HoverLine/HoverLine.tsx +74 -0
  42. package/src/components/Legend/Legend.Suppression.tsx +47 -3
  43. package/src/components/Legend/helpers/index.ts +1 -1
  44. package/src/components/LineChart/helpers.ts +7 -7
  45. package/src/components/LineChart/index.tsx +3 -6
  46. package/src/components/LinearChart.tsx +108 -72
  47. package/src/components/PieChart/PieChart.tsx +58 -13
  48. package/src/data/initial-state.js +8 -5
  49. package/src/helpers/countNumOfTicks.ts +4 -19
  50. package/src/helpers/getNewRuntime.ts +35 -0
  51. package/src/helpers/getPiePercent.ts +22 -0
  52. package/src/helpers/getTransformedData.ts +22 -0
  53. package/src/helpers/tests/getNewRuntime.test.ts +82 -0
  54. package/src/helpers/tests/getPiePercent.test.ts +38 -0
  55. package/src/hooks/useRightAxis.ts +1 -1
  56. package/src/hooks/useScales.ts +8 -3
  57. package/src/hooks/useTooltip.tsx +24 -10
  58. package/src/scss/main.scss +8 -4
  59. package/src/store/chart.actions.ts +2 -6
  60. package/src/store/chart.reducer.ts +23 -23
  61. package/src/types/ChartConfig.ts +7 -4
  62. package/src/types/ChartContext.ts +0 -2
  63. package/src/components/ZoomBrush.tsx +0 -251
@@ -0,0 +1,360 @@
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": "categorical",
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
+ "dataKey": "date",
37
+ "tickWidthMax": 86
38
+ },
39
+ "icon": {
40
+ "key": null,
41
+ "ref": null,
42
+ "props": {},
43
+ "_owner": null,
44
+ "_store": {}
45
+ },
46
+ "content": "Use bars to show comparisons between data categories.",
47
+ "visualizationType": "Bar",
48
+ "datasets": {},
49
+ "activeVizButtonID": 1,
50
+ "dataFileName": "http://localhost:8080/example/data-vertical.json",
51
+ "dataFileSourceType": "url",
52
+ "formattedData": [
53
+ {
54
+ "date": "01/01/2020",
55
+ "value": 90
56
+ },
57
+ {
58
+ "date": "02/01/2020",
59
+ "value": 120
60
+ },
61
+ {
62
+ "date": "03/01/2020",
63
+ "value": 150
64
+ }
65
+ ],
66
+ "dataUrl": "http://localhost:8080/examples/data-vertical.json",
67
+ "dataDescription": {
68
+ "horizontal": false,
69
+ "series": false
70
+ },
71
+ "annotations": [],
72
+ "debugSvg": false,
73
+ "chartMessage": {
74
+ "noData": "No Data Available"
75
+ },
76
+ "title": "Chart Title",
77
+ "showTitle": true,
78
+ "showDownloadMediaButton": false,
79
+ "theme": "theme-blue",
80
+ "animate": false,
81
+ "lineDatapointStyle": "hover",
82
+ "lineDatapointColor": "Same as Line",
83
+ "barHasBorder": "true",
84
+ "isLollipopChart": false,
85
+ "lollipopShape": "circle",
86
+ "lollipopColorStyle": "two-tone",
87
+ "barStyle": "",
88
+ "roundingStyle": "standard",
89
+ "tipRounding": "top",
90
+ "isResponsiveTicks": false,
91
+ "general": {
92
+ "annotationDropdownText": "Annotations",
93
+ "showDownloadButton": false,
94
+ "showMissingDataLabel": true,
95
+ "showSuppressedSymbol": true,
96
+ "showZeroValueData": true,
97
+ "hideNullValue": true
98
+ },
99
+ "padding": {
100
+ "left": 5,
101
+ "right": 5
102
+ },
103
+ "preliminaryData": [],
104
+ "yAxis": {
105
+ "hideAxis": false,
106
+ "displayNumbersOnBar": false,
107
+ "hideLabel": false,
108
+ "hideTicks": false,
109
+ "size": 50,
110
+ "gridLines": false,
111
+ "enablePadding": false,
112
+ "min": "",
113
+ "max": "",
114
+ "labelColor": "#333",
115
+ "tickLabelColor": "#333",
116
+ "tickColor": "#333",
117
+ "rightHideAxis": false,
118
+ "rightAxisSize": 0,
119
+ "rightLabel": "",
120
+ "rightLabelOffsetSize": 0,
121
+ "rightAxisLabelColor": "#333",
122
+ "rightAxisTickLabelColor": "#333",
123
+ "rightAxisTickColor": "#333",
124
+ "numTicks": "",
125
+ "axisPadding": 0,
126
+ "scalePadding": 10,
127
+ "tickRotation": 0,
128
+ "anchors": [],
129
+ "shoMissingDataLabel": true,
130
+ "showMissingDataLine": true,
131
+ "categories": []
132
+ },
133
+ "boxplot": {
134
+ "plots": [],
135
+ "borders": "true",
136
+ "plotOutlierValues": false,
137
+ "plotNonOutlierValues": true,
138
+ "labels": {
139
+ "q1": "Lower Quartile",
140
+ "q2": "q2",
141
+ "q3": "Upper Quartile",
142
+ "q4": "q4",
143
+ "minimum": "Minimum",
144
+ "maximum": "Maximum",
145
+ "mean": "Mean",
146
+ "median": "Median",
147
+ "sd": "Standard Deviation",
148
+ "iqr": "Interquartile Range",
149
+ "count": "Count",
150
+ "outliers": "Outliers",
151
+ "values": "Values",
152
+ "lowerBounds": "Lower Bounds",
153
+ "upperBounds": "Upper Bounds"
154
+ }
155
+ },
156
+ "topAxis": {
157
+ "hasLine": false
158
+ },
159
+ "isLegendValue": false,
160
+ "barHeight": 25,
161
+ "barSpace": 15,
162
+ "heights": {
163
+ "vertical": 300,
164
+ "horizontal": 750
165
+ },
166
+ "table": {
167
+ "label": "Data Table",
168
+ "expanded": true,
169
+ "limitHeight": false,
170
+ "height": "",
171
+ "caption": "",
172
+ "showDownloadUrl": false,
173
+ "showDataTableLink": true,
174
+ "showDownloadLinkBelow": true,
175
+ "indexLabel": "",
176
+ "download": true,
177
+ "showVertical": true,
178
+ "dateDisplayFormat": "",
179
+ "showMissingDataLabel": true,
180
+ "showSuppressedSymbol": true,
181
+ "show": true
182
+ },
183
+ "color": "pinkpurple",
184
+ "columns": {},
185
+ "legend": {
186
+ "hide": false,
187
+ "behavior": "isolate",
188
+ "axisAlign": true,
189
+ "singleRow": true,
190
+ "colorCode": "",
191
+ "reverseLabelOrder": false,
192
+ "description": "",
193
+ "dynamicLegend": false,
194
+ "dynamicLegendDefaultText": "Show All",
195
+ "dynamicLegendItemLimit": 5,
196
+ "dynamicLegendItemLimitMessage": "Dynamic Legend Item Limit Hit.",
197
+ "dynamicLegendChartMessage": "Select Options from the Legend",
198
+ "label": "",
199
+ "lineMode": false,
200
+ "verticalSorted": false,
201
+ "highlightOnHover": false,
202
+ "hideSuppressedLabels": false,
203
+ "hideSuppressionLink": false,
204
+ "seriesHighlight": [],
205
+ "style": "circles",
206
+ "subStyle": "linear blocks",
207
+ "shape": "circle",
208
+ "tickRotation": "",
209
+ "hideBorder": {
210
+ "side": false,
211
+ "topBottom": true
212
+ },
213
+ "position": "right"
214
+ },
215
+ "brush": {
216
+ "height": 45,
217
+ "active": false
218
+ },
219
+ "exclusions": {
220
+ "active": false,
221
+ "keys": []
222
+ },
223
+ "palette": "qualitative-bold",
224
+ "isPaletteReversed": false,
225
+ "twoColor": {
226
+ "palette": "monochrome-1",
227
+ "isPaletteReversed": false
228
+ },
229
+ "labels": true,
230
+ "dataFormat": {
231
+ "commas": false,
232
+ "prefix": "",
233
+ "suffix": "",
234
+ "abbreviated": false,
235
+ "bottomSuffix": "",
236
+ "bottomPrefix": "",
237
+ "bottomAbbreviated": false
238
+ },
239
+ "filters": [],
240
+ "confidenceKeys": {},
241
+ "visual": {
242
+ "border": true,
243
+ "accent": true,
244
+ "background": true,
245
+ "verticalHoverLine": false,
246
+ "horizontalHoverLine": false,
247
+ "lineDatapointSymbol": "none",
248
+ "maximumShapeAmount": 7
249
+ },
250
+ "useLogScale": false,
251
+ "filterBehavior": "Filter Change",
252
+ "highlightedBarValues": [],
253
+ "series": [
254
+ {
255
+ "dataKey": "value",
256
+ "type": "Bar",
257
+ "axis": "Left",
258
+ "tooltip": true
259
+ }
260
+ ],
261
+ "tooltips": {
262
+ "opacity": 90,
263
+ "singleSeries": false,
264
+ "dateDisplayFormat": ""
265
+ },
266
+ "forestPlot": {
267
+ "startAt": 0,
268
+ "colors": {
269
+ "line": "",
270
+ "shape": ""
271
+ },
272
+ "lineOfNoEffect": {
273
+ "show": true
274
+ },
275
+ "type": "",
276
+ "pooledResult": {
277
+ "diamondHeight": 5,
278
+ "column": ""
279
+ },
280
+ "estimateField": "",
281
+ "estimateRadius": "",
282
+ "shape": "square",
283
+ "rowHeight": 20,
284
+ "description": {
285
+ "show": true,
286
+ "text": "description",
287
+ "location": 0
288
+ },
289
+ "result": {
290
+ "show": true,
291
+ "text": "result",
292
+ "location": 100
293
+ },
294
+ "radius": {
295
+ "min": 2,
296
+ "max": 10,
297
+ "scalingColumn": ""
298
+ },
299
+ "regression": {
300
+ "lower": 0,
301
+ "upper": 0,
302
+ "estimateField": 0
303
+ },
304
+ "leftWidthOffset": 0,
305
+ "rightWidthOffset": 0,
306
+ "showZeroLine": false,
307
+ "leftLabel": "",
308
+ "rightLabel": ""
309
+ },
310
+ "area": {
311
+ "isStacked": false
312
+ },
313
+ "sankey": {
314
+ "title": {
315
+ "defaultColor": "black"
316
+ },
317
+ "iterations": 1,
318
+ "rxValue": 0.9,
319
+ "overallSize": {
320
+ "width": 900,
321
+ "height": 700
322
+ },
323
+ "margin": {
324
+ "margin_y": 25,
325
+ "margin_x": 0
326
+ },
327
+ "nodeSize": {
328
+ "nodeWidth": 26,
329
+ "nodeHeight": 40
330
+ },
331
+ "nodePadding": 55,
332
+ "nodeFontColor": "black",
333
+ "nodeColor": {
334
+ "default": "#ff8500",
335
+ "inactive": "#808080"
336
+ },
337
+ "linkColor": {
338
+ "default": "#ffc900",
339
+ "inactive": "#D3D3D3"
340
+ },
341
+ "opacity": {
342
+ "nodeOpacityDefault": 1,
343
+ "nodeOpacityInactive": 0.1,
344
+ "LinkOpacityDefault": 1,
345
+ "LinkOpacityInactive": 0.1
346
+ },
347
+ "storyNodeFontColor": "#006778",
348
+ "storyNodeText": [],
349
+ "nodeValueStyle": {
350
+ "textBefore": "(",
351
+ "textAfter": ")"
352
+ },
353
+ "data": []
354
+ },
355
+ "version": "4.25.1",
356
+ "migrations": {
357
+ "addColorMigration": true
358
+ },
359
+ "dynamicMarginTop": 0
360
+ }