@cdc/chart 4.24.10 → 4.24.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.
- package/dist/cdcchart.js +34618 -33995
- package/examples/feature/boxplot/boxplot-data.json +88 -22
- package/examples/feature/boxplot/boxplot.json +540 -16
- package/examples/feature/boxplot/testing.csv +7 -7
- package/examples/feature/sankey/sankey-example-data.json +0 -1
- package/examples/private/test.json +20092 -0
- package/index.html +3 -3
- package/package.json +2 -2
- package/src/CdcChart.tsx +86 -86
- package/src/_stories/Chart.CustomColors.stories.tsx +19 -0
- package/src/_stories/Chart.DynamicSeries.stories.tsx +27 -0
- package/src/_stories/Chart.Legend.Gradient.stories.tsx +42 -1
- package/src/_stories/Chart.stories.tsx +7 -8
- package/src/_stories/ChartEditor.stories.tsx +27 -0
- package/src/_stories/ChartLine.Suppression.stories.tsx +25 -0
- package/src/_stories/ChartPrefixSuffix.stories.tsx +8 -0
- package/src/_stories/_mock/boxplot_multiseries.json +647 -0
- package/src/_stories/_mock/dynamic_series_bar_config.json +723 -0
- package/src/_stories/_mock/dynamic_series_config.json +979 -0
- package/{examples/feature/scatterplot/scatterplot.json → src/_stories/_mock/scatterplot_mock.json} +62 -92
- package/src/_stories/_mock/suppression_mock.json +1549 -0
- package/src/components/BarChart/components/BarChart.StackedVertical.tsx +43 -9
- package/src/components/BarChart/components/BarChart.Vertical.tsx +60 -42
- package/src/components/BarChart/helpers/index.ts +1 -2
- package/src/components/BoxPlot/BoxPlot.tsx +189 -0
- package/src/components/EditorPanel/EditorPanel.tsx +64 -62
- package/src/components/EditorPanel/components/Panels/Panel.Annotate.tsx +3 -3
- package/src/components/EditorPanel/components/Panels/Panel.BoxPlot.tsx +51 -6
- package/src/components/EditorPanel/components/Panels/Panel.Regions.tsx +40 -9
- package/src/components/EditorPanel/components/Panels/Panel.Sankey.tsx +3 -3
- package/src/components/EditorPanel/components/Panels/Panel.Series.tsx +121 -56
- package/src/components/EditorPanel/components/Panels/Panel.Visual.tsx +1 -2
- package/src/components/EditorPanel/useEditorPermissions.ts +15 -1
- package/src/components/Legend/Legend.Component.tsx +9 -10
- package/src/components/Legend/Legend.tsx +16 -16
- package/src/components/LineChart/helpers.ts +48 -43
- package/src/components/LineChart/index.tsx +88 -82
- package/src/components/LinearChart.tsx +17 -10
- package/src/components/Sankey/index.tsx +50 -32
- package/src/components/Sankey/sankey.scss +6 -5
- package/src/components/Sankey/useSankeyAlert.tsx +60 -0
- package/src/components/ScatterPlot/ScatterPlot.jsx +20 -4
- package/src/data/initial-state.js +3 -9
- package/src/hooks/useLegendClasses.ts +10 -23
- package/src/hooks/useMinMax.ts +27 -13
- package/src/hooks/useReduceData.ts +43 -10
- package/src/hooks/useScales.ts +56 -35
- package/src/hooks/useTooltip.tsx +54 -49
- package/src/scss/main.scss +0 -18
- package/src/types/ChartConfig.ts +6 -19
- package/src/types/ChartContext.ts +4 -1
- package/src/types/ForestPlot.ts +8 -0
- package/src/components/BoxPlot/BoxPlot.jsx +0 -111
package/{examples/feature/scatterplot/scatterplot.json → src/_stories/_mock/scatterplot_mock.json}
RENAMED
|
@@ -4,6 +4,18 @@
|
|
|
4
4
|
"chartMessage": {
|
|
5
5
|
"noData": "No Data Available"
|
|
6
6
|
},
|
|
7
|
+
"customColors": [
|
|
8
|
+
"red",
|
|
9
|
+
"orange",
|
|
10
|
+
"yellow",
|
|
11
|
+
"green",
|
|
12
|
+
"blue",
|
|
13
|
+
"purple",
|
|
14
|
+
"pink",
|
|
15
|
+
"brown",
|
|
16
|
+
"gray",
|
|
17
|
+
"black"
|
|
18
|
+
],
|
|
7
19
|
"title": "",
|
|
8
20
|
"showTitle": true,
|
|
9
21
|
"showDownloadMediaButton": false,
|
|
@@ -256,116 +268,74 @@
|
|
|
256
268
|
"visualizationType": "Scatter Plot",
|
|
257
269
|
"data": [
|
|
258
270
|
{
|
|
259
|
-
"x":
|
|
260
|
-
"y1":
|
|
261
|
-
"y2":
|
|
262
|
-
"y3":
|
|
263
|
-
"y4":
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
"x": "2",
|
|
267
|
-
"y1": "2",
|
|
268
|
-
"y2": "30",
|
|
269
|
-
"y3": "75",
|
|
270
|
-
"y4": "83"
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
"x": "3",
|
|
274
|
-
"y1": "15",
|
|
275
|
-
"y2": "42",
|
|
276
|
-
"y3": "51",
|
|
277
|
-
"y4": "95"
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
"x": "4",
|
|
281
|
-
"y1": "10",
|
|
282
|
-
"y2": "38",
|
|
283
|
-
"y3": "61",
|
|
284
|
-
"y4": "96"
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
"x": "5",
|
|
288
|
-
"y1": "1",
|
|
289
|
-
"y2": "38",
|
|
290
|
-
"y3": "66",
|
|
291
|
-
"y4": "86"
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
"x": "60",
|
|
295
|
-
"y1": "6",
|
|
296
|
-
"y2": "37",
|
|
297
|
-
"y3": "70",
|
|
298
|
-
"y4": "85"
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
"x": "10",
|
|
302
|
-
"y1": "19",
|
|
303
|
-
"y2": "47",
|
|
304
|
-
"y3": "59",
|
|
305
|
-
"y4": "91"
|
|
271
|
+
"x": 60000,
|
|
272
|
+
"y1": 19000,
|
|
273
|
+
"y2": 47000,
|
|
274
|
+
"y3": 59000,
|
|
275
|
+
"y4": 91000
|
|
306
276
|
},
|
|
307
277
|
{
|
|
308
|
-
"x":
|
|
309
|
-
"y1":
|
|
310
|
-
"y2":
|
|
311
|
-
"y3":
|
|
312
|
-
"y4":
|
|
278
|
+
"x": 64000,
|
|
279
|
+
"y1": 18000,
|
|
280
|
+
"y2": 32000,
|
|
281
|
+
"y3": 68000,
|
|
282
|
+
"y4": 89000
|
|
313
283
|
},
|
|
314
284
|
{
|
|
315
|
-
"x":
|
|
316
|
-
"y1":
|
|
317
|
-
"y2":
|
|
318
|
-
"y3":
|
|
319
|
-
"y4":
|
|
285
|
+
"x": 63000,
|
|
286
|
+
"y1": 7000,
|
|
287
|
+
"y2": 38000,
|
|
288
|
+
"y3": 74000,
|
|
289
|
+
"y4": 89000
|
|
320
290
|
},
|
|
321
291
|
{
|
|
322
|
-
"x":
|
|
323
|
-
"y1":
|
|
324
|
-
"y2":
|
|
325
|
-
"y3":
|
|
326
|
-
"y4":
|
|
292
|
+
"x": 66000,
|
|
293
|
+
"y1": 10000,
|
|
294
|
+
"y2": 39000,
|
|
295
|
+
"y3": 56000,
|
|
296
|
+
"y4": 91000
|
|
327
297
|
},
|
|
328
298
|
{
|
|
329
|
-
"x":
|
|
330
|
-
"y1":
|
|
331
|
-
"y2":
|
|
332
|
-
"y3":
|
|
333
|
-
"y4":
|
|
299
|
+
"x": 62000,
|
|
300
|
+
"y1": 16000,
|
|
301
|
+
"y2": 38000,
|
|
302
|
+
"y3": 55000,
|
|
303
|
+
"y4": 76000
|
|
334
304
|
},
|
|
335
305
|
{
|
|
336
|
-
"x":
|
|
337
|
-
"y1":
|
|
338
|
-
"y2":
|
|
339
|
-
"y3":
|
|
340
|
-
"y4":
|
|
306
|
+
"x": 62000,
|
|
307
|
+
"y1": 20000,
|
|
308
|
+
"y2": 46000,
|
|
309
|
+
"y3": 52000,
|
|
310
|
+
"y4": 94000
|
|
341
311
|
},
|
|
342
312
|
{
|
|
343
|
-
"x":
|
|
344
|
-
"y1":
|
|
345
|
-
"y2":
|
|
346
|
-
"y3":
|
|
347
|
-
"y4":
|
|
313
|
+
"x": 61000,
|
|
314
|
+
"y1": 9000,
|
|
315
|
+
"y2": 41000,
|
|
316
|
+
"y3": 57000,
|
|
317
|
+
"y4": 86000
|
|
348
318
|
},
|
|
349
319
|
{
|
|
350
|
-
"x":
|
|
351
|
-
"y1":
|
|
352
|
-
"y2":
|
|
353
|
-
"y3":
|
|
354
|
-
"y4":
|
|
320
|
+
"x": 62000,
|
|
321
|
+
"y1": 10000,
|
|
322
|
+
"y2": 47000,
|
|
323
|
+
"y3": 56000,
|
|
324
|
+
"y4": 80000
|
|
355
325
|
},
|
|
356
326
|
{
|
|
357
|
-
"x":
|
|
358
|
-
"y1":
|
|
359
|
-
"y2":
|
|
360
|
-
"y3":
|
|
361
|
-
"y4":
|
|
327
|
+
"x": 73000,
|
|
328
|
+
"y1": 1000,
|
|
329
|
+
"y2": 36000,
|
|
330
|
+
"y3": 71000,
|
|
331
|
+
"y4": 94000
|
|
362
332
|
},
|
|
363
333
|
{
|
|
364
|
-
"x":
|
|
365
|
-
"y1":
|
|
366
|
-
"y2":
|
|
367
|
-
"y3":
|
|
368
|
-
"y4":
|
|
334
|
+
"x": 63000,
|
|
335
|
+
"y1": 13000,
|
|
336
|
+
"y2": 30000,
|
|
337
|
+
"y3": 66000,
|
|
338
|
+
"y4": 78000
|
|
369
339
|
}
|
|
370
340
|
],
|
|
371
341
|
"dataFileName": "valid-scatterplot.csv",
|