@cdc/chart 4.23.10-alpha → 4.23.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 (54) hide show
  1. package/dist/cdcchart.js +30598 -28669
  2. package/examples/feature/bar/example-bar-chart.json +1 -46
  3. package/examples/feature/dev-4261.json +399 -0
  4. package/examples/feature/forest-plot/{broken.json → linear.json} +55 -50
  5. package/examples/{private/forest-plot.json → feature/forest-plot/logarithmic.json} +305 -355
  6. package/examples/feature/line/line-points.json +340 -0
  7. package/examples/feature/regions/index.json +462 -0
  8. package/examples/gallery/bar-chart-vertical/combo-line-chart.json +181 -48
  9. package/examples/sparkline-multilple.json +846 -0
  10. package/index.html +11 -8
  11. package/package.json +3 -3
  12. package/src/CdcChart.tsx +71 -60
  13. package/src/_stories/Chart.tooltip.stories.tsx +305 -0
  14. package/src/_stories/ChartBrush.stories.tsx +19 -0
  15. package/src/_stories/ChartSuppress.stories.tsx +19 -0
  16. package/{examples/private/missing-color.json → src/_stories/_mock/brush_mock.json} +392 -332
  17. package/src/_stories/_mock/suppress_mock.json +911 -0
  18. package/src/components/AreaChart.Stacked.jsx +4 -5
  19. package/src/components/AreaChart.jsx +6 -35
  20. package/src/components/{BarChart.Horizontal.jsx → BarChart.Horizontal.tsx} +106 -29
  21. package/src/components/{BarChart.StackedHorizontal.jsx → BarChart.StackedHorizontal.tsx} +22 -17
  22. package/src/components/{BarChart.StackedVertical.jsx → BarChart.StackedVertical.tsx} +22 -26
  23. package/src/components/{BarChart.Vertical.jsx → BarChart.Vertical.tsx} +175 -31
  24. package/src/components/BarChart.jsx +1 -1
  25. package/src/components/DeviationBar.jsx +4 -3
  26. package/src/components/EditorPanel.jsx +176 -50
  27. package/src/components/ForestPlot/ForestPlotProps.ts +11 -0
  28. package/src/components/ForestPlot/index.scss +1 -0
  29. package/src/components/{ForestPlot.jsx → ForestPlot/index.tsx} +51 -31
  30. package/src/components/ForestPlotSettings.jsx +162 -112
  31. package/src/components/Legend.jsx +35 -2
  32. package/src/components/{LineChart.Circle.tsx → LineChart/LineChart.Circle.tsx} +26 -23
  33. package/src/components/LineChart/LineChartProps.ts +17 -0
  34. package/src/components/LineChart/index.scss +1 -0
  35. package/src/components/{LineChart.tsx → LineChart/index.tsx} +60 -24
  36. package/src/components/LinearChart.jsx +120 -60
  37. package/src/components/PairedBarChart.jsx +2 -2
  38. package/src/components/Series.jsx +22 -3
  39. package/src/components/ZoomBrush.tsx +168 -0
  40. package/src/data/initial-state.js +27 -12
  41. package/src/hooks/useBarChart.js +70 -6
  42. package/src/hooks/useColorScale.ts +50 -0
  43. package/src/hooks/useEditorPermissions.js +22 -4
  44. package/src/hooks/{useMinMax.js → useMinMax.ts} +75 -23
  45. package/src/hooks/{useRightAxis.js → useRightAxis.ts} +10 -2
  46. package/src/hooks/{useScales.js → useScales.ts} +64 -17
  47. package/src/hooks/useTooltip.jsx +68 -41
  48. package/src/scss/main.scss +3 -35
  49. package/src/types/ChartConfig.ts +43 -0
  50. package/src/types/ChartContext.ts +38 -0
  51. package/src/types/ChartProps.ts +7 -0
  52. package/src/types/ForestPlot.ts +60 -0
  53. package/examples/private/full.json +0 -45324
  54. /package/{examples/private/TESTING.json → src/components/ForestPlot/Readme.md} +0 -0
@@ -0,0 +1,340 @@
1
+ {
2
+ "type": "chart",
3
+ "debugSvg": false,
4
+ "chartMessage": {
5
+ "noData": "No Data Available"
6
+ },
7
+ "title": "Combo Bar-Line Chart",
8
+ "showTitle": true,
9
+ "showDownloadMediaButton": false,
10
+ "theme": "theme-purple",
11
+ "animate": true,
12
+ "fontSize": "medium",
13
+ "lineDatapointStyle": "always show",
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
+ "yAxis": {
33
+ "hideAxis": false,
34
+ "displayNumbersOnBar": false,
35
+ "hideLabel": false,
36
+ "hideTicks": false,
37
+ "size": "68",
38
+ "gridLines": false,
39
+ "enablePadding": false,
40
+ "min": "",
41
+ "max": "",
42
+ "labelColor": "#333",
43
+ "tickLabelColor": "#333",
44
+ "tickColor": "#333",
45
+ "rightHideAxis": true,
46
+ "rightAxisSize": 50,
47
+ "rightLabel": "",
48
+ "rightLabelOffsetSize": 0,
49
+ "rightAxisLabelColor": "#333",
50
+ "rightAxisTickLabelColor": "#333",
51
+ "rightAxisTickColor": "#333",
52
+ "numTicks": "",
53
+ "axisPadding": 0,
54
+ "tickRotation": 0,
55
+ "anchors": [],
56
+ "label": "Y-Axis Label Example"
57
+ },
58
+ "boxplot": {
59
+ "plots": [],
60
+ "borders": "true",
61
+ "firstQuartilePercentage": 25,
62
+ "thirdQuartilePercentage": 75,
63
+ "boxWidthPercentage": 40,
64
+ "plotOutlierValues": false,
65
+ "plotNonOutlierValues": true,
66
+ "legend": {
67
+ "showHowToReadText": false,
68
+ "howToReadText": ""
69
+ },
70
+ "labels": {
71
+ "q1": "Lower Quartile",
72
+ "q2": "q2",
73
+ "q3": "Upper Quartile",
74
+ "q4": "q4",
75
+ "minimum": "Minimum",
76
+ "maximum": "Maximum",
77
+ "mean": "Mean",
78
+ "median": "Median",
79
+ "sd": "Standard Deviation",
80
+ "iqr": "Interquartile Range",
81
+ "total": "Total",
82
+ "outliers": "Outliers",
83
+ "values": "Values"
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": "date",
101
+ "showTargetLabel": true,
102
+ "targetLabel": "Target",
103
+ "hideAxis": false,
104
+ "hideLabel": false,
105
+ "hideTicks": false,
106
+ "size": "78",
107
+ "tickRotation": "25",
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": "Date",
119
+ "label": "X-Axis Example Label",
120
+ "dateParseFormat": "%d/%m/%Y",
121
+ "dateDisplayFormat": "%d/%m/%Y",
122
+ "tickWidthMax": 91
123
+ },
124
+ "table": {
125
+ "label": "Data Table",
126
+ "expanded": true,
127
+ "limitHeight": false,
128
+ "height": "",
129
+ "caption": "",
130
+ "showDownloadUrl": false,
131
+ "showDataTableLink": true,
132
+ "indexLabel": "",
133
+ "download": true,
134
+ "showVertical": false,
135
+ "show": true
136
+ },
137
+ "orientation": "vertical",
138
+ "color": "pinkpurple",
139
+ "columns": {},
140
+ "legend": {
141
+ "hide": false,
142
+ "behavior": "highlight",
143
+ "singleRow": false,
144
+ "colorCode": "",
145
+ "reverseLabelOrder": false,
146
+ "description": "",
147
+ "dynamicLegend": false,
148
+ "dynamicLegendDefaultText": "Show All",
149
+ "dynamicLegendItemLimit": 5,
150
+ "dynamicLegendItemLimitMessage": "Dynamic Legend Item Limit Hit.",
151
+ "dynamicLegendChartMessage": "Select Options from the Legend",
152
+ "lineMode": false,
153
+ "verticalSorted": false,
154
+ "position": "right",
155
+ "label": "Data Type"
156
+ },
157
+ "brush": {
158
+ "height": 25,
159
+ "data": [
160
+ {
161
+ "Date": "1/15/2016",
162
+ "Data 1": "1000",
163
+ "Data 2": "110",
164
+ "Data 3": "100",
165
+ "Data 4": "90",
166
+ "Monthly-Goal": "100"
167
+ }
168
+ ],
169
+ "active": false
170
+ },
171
+ "exclusions": {
172
+ "active": false,
173
+ "keys": []
174
+ },
175
+ "palette": "qualitative-soft",
176
+ "isPaletteReversed": false,
177
+ "twoColor": {
178
+ "palette": "monochrome-1",
179
+ "isPaletteReversed": false
180
+ },
181
+ "labels": false,
182
+ "dataFormat": {
183
+ "commas": false,
184
+ "prefix": "",
185
+ "suffix": "",
186
+ "abbreviated": false,
187
+ "bottomSuffix": "",
188
+ "bottomPrefix": "",
189
+ "bottomAbbreviated": false
190
+ },
191
+ "confidenceKeys": {},
192
+ "visual": {
193
+ "border": true,
194
+ "accent": true,
195
+ "background": true,
196
+ "verticalHoverLine": false,
197
+ "horizontalHoverLine": false
198
+ },
199
+ "useLogScale": false,
200
+ "filterBehavior": "Filter Change",
201
+ "highlightedBarValues": [],
202
+ "series": [
203
+ {
204
+ "dataKey": "Data 2",
205
+ "type": "Line",
206
+ "axis": "Left",
207
+ "tooltip": true
208
+ }
209
+ ],
210
+ "tooltips": {
211
+ "opacity": 90
212
+ },
213
+ "forestPlot": {
214
+ "startAt": 0,
215
+ "colors": {
216
+ "line": "",
217
+ "shape": ""
218
+ },
219
+ "lineOfNoEffect": {
220
+ "show": true
221
+ },
222
+ "type": "",
223
+ "pooledResult": {
224
+ "diamondHeight": 5,
225
+ "column": ""
226
+ },
227
+ "estimateField": "",
228
+ "estimateRadius": "",
229
+ "shape": "",
230
+ "rowHeight": 20,
231
+ "description": {
232
+ "show": true,
233
+ "text": "description",
234
+ "location": 0
235
+ },
236
+ "result": {
237
+ "show": true,
238
+ "text": "result",
239
+ "location": 100
240
+ },
241
+ "radius": {
242
+ "min": 1,
243
+ "max": 8,
244
+ "scalingColumn": ""
245
+ },
246
+ "regression": {
247
+ "lower": 0,
248
+ "upper": 0,
249
+ "estimateField": 0
250
+ },
251
+ "leftWidthOffset": 0,
252
+ "rightWidthOffset": 0,
253
+ "showZeroLine": false,
254
+ "hideDateCategoryCol": false,
255
+ "leftLabel": "",
256
+ "rightLabel": ""
257
+ },
258
+ "area": {
259
+ "isStacked": false
260
+ },
261
+ "height": "332",
262
+ "data": [
263
+ {
264
+ "Date": "1/15/2016",
265
+ "Data 1": "$1,000",
266
+ "Data 2": "110",
267
+ "Data 3": "100",
268
+ "Data 4": "90",
269
+ "Monthly-Goal": "100"
270
+ },
271
+ {
272
+ "Date": "2/15/2016",
273
+ "Data 1": "100",
274
+ "Data 2": "110",
275
+ "Data 3": "100",
276
+ "Data 4": "100",
277
+ "Monthly-Goal": "100"
278
+ },
279
+ {
280
+ "Date": "3/15/2016",
281
+ "Data 1": "80",
282
+ "Data 2": "90",
283
+ "Data 3": "100",
284
+ "Data 4": "120",
285
+ "Monthly-Goal": "110"
286
+ },
287
+ {
288
+ "Date": "4/15/2016",
289
+ "Data 1": "80",
290
+ "Data 2": "90",
291
+ "Data 3": "110",
292
+ "Data 4": "120",
293
+ "Monthly-Goal": "110"
294
+ },
295
+ {
296
+ "Date": "5/15/2016",
297
+ "Data 1": "70",
298
+ "Data 2": "90",
299
+ "Data 3": "110",
300
+ "Data 4": "130",
301
+ "Monthly-Goal": "120"
302
+ },
303
+ {
304
+ "Date": "6/15/2016",
305
+ "Data 1": "100",
306
+ "Data 2": "120",
307
+ "Data 3": "120",
308
+ "Data 4": "130",
309
+ "Monthly-Goal": "120"
310
+ },
311
+ {
312
+ "Date": "7/15/2016",
313
+ "Data 1": "110",
314
+ "Data 2": "140",
315
+ "Data 3": "120",
316
+ "Data 4": "130",
317
+ "Monthly-Goal": "130"
318
+ },
319
+ {
320
+ "Date": "8/15/2016",
321
+ "Data 1": "110",
322
+ "Data 2": "130",
323
+ "Data 3": "120",
324
+ "Data 4": "140",
325
+ "Monthly-Goal": "130"
326
+ },
327
+ {
328
+ "Date": "9/15/2016",
329
+ "Data 1": "120",
330
+ "Data 2": "130",
331
+ "Data 3": "120",
332
+ "Data 4": "150",
333
+ "Monthly-Goal": "140"
334
+ }
335
+ ],
336
+ "visualizationType": "Line",
337
+ "filters": [],
338
+ "validated": 4.23,
339
+ "dynamicMarginTop": 0
340
+ }