@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.
Files changed (53) hide show
  1. package/dist/cdcchart.js +34618 -33995
  2. package/examples/feature/boxplot/boxplot-data.json +88 -22
  3. package/examples/feature/boxplot/boxplot.json +540 -16
  4. package/examples/feature/boxplot/testing.csv +7 -7
  5. package/examples/feature/sankey/sankey-example-data.json +0 -1
  6. package/examples/private/test.json +20092 -0
  7. package/index.html +3 -3
  8. package/package.json +2 -2
  9. package/src/CdcChart.tsx +86 -86
  10. package/src/_stories/Chart.CustomColors.stories.tsx +19 -0
  11. package/src/_stories/Chart.DynamicSeries.stories.tsx +27 -0
  12. package/src/_stories/Chart.Legend.Gradient.stories.tsx +42 -1
  13. package/src/_stories/Chart.stories.tsx +7 -8
  14. package/src/_stories/ChartEditor.stories.tsx +27 -0
  15. package/src/_stories/ChartLine.Suppression.stories.tsx +25 -0
  16. package/src/_stories/ChartPrefixSuffix.stories.tsx +8 -0
  17. package/src/_stories/_mock/boxplot_multiseries.json +647 -0
  18. package/src/_stories/_mock/dynamic_series_bar_config.json +723 -0
  19. package/src/_stories/_mock/dynamic_series_config.json +979 -0
  20. package/{examples/feature/scatterplot/scatterplot.json → src/_stories/_mock/scatterplot_mock.json} +62 -92
  21. package/src/_stories/_mock/suppression_mock.json +1549 -0
  22. package/src/components/BarChart/components/BarChart.StackedVertical.tsx +43 -9
  23. package/src/components/BarChart/components/BarChart.Vertical.tsx +60 -42
  24. package/src/components/BarChart/helpers/index.ts +1 -2
  25. package/src/components/BoxPlot/BoxPlot.tsx +189 -0
  26. package/src/components/EditorPanel/EditorPanel.tsx +64 -62
  27. package/src/components/EditorPanel/components/Panels/Panel.Annotate.tsx +3 -3
  28. package/src/components/EditorPanel/components/Panels/Panel.BoxPlot.tsx +51 -6
  29. package/src/components/EditorPanel/components/Panels/Panel.Regions.tsx +40 -9
  30. package/src/components/EditorPanel/components/Panels/Panel.Sankey.tsx +3 -3
  31. package/src/components/EditorPanel/components/Panels/Panel.Series.tsx +121 -56
  32. package/src/components/EditorPanel/components/Panels/Panel.Visual.tsx +1 -2
  33. package/src/components/EditorPanel/useEditorPermissions.ts +15 -1
  34. package/src/components/Legend/Legend.Component.tsx +9 -10
  35. package/src/components/Legend/Legend.tsx +16 -16
  36. package/src/components/LineChart/helpers.ts +48 -43
  37. package/src/components/LineChart/index.tsx +88 -82
  38. package/src/components/LinearChart.tsx +17 -10
  39. package/src/components/Sankey/index.tsx +50 -32
  40. package/src/components/Sankey/sankey.scss +6 -5
  41. package/src/components/Sankey/useSankeyAlert.tsx +60 -0
  42. package/src/components/ScatterPlot/ScatterPlot.jsx +20 -4
  43. package/src/data/initial-state.js +3 -9
  44. package/src/hooks/useLegendClasses.ts +10 -23
  45. package/src/hooks/useMinMax.ts +27 -13
  46. package/src/hooks/useReduceData.ts +43 -10
  47. package/src/hooks/useScales.ts +56 -35
  48. package/src/hooks/useTooltip.tsx +54 -49
  49. package/src/scss/main.scss +0 -18
  50. package/src/types/ChartConfig.ts +6 -19
  51. package/src/types/ChartContext.ts +4 -1
  52. package/src/types/ForestPlot.ts +8 -0
  53. package/src/components/BoxPlot/BoxPlot.jsx +0 -111
@@ -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": "1",
260
- "y1": "8",
261
- "y2": "37",
262
- "y3": "72",
263
- "y4": "82"
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": "24",
309
- "y1": "18",
310
- "y2": "32",
311
- "y3": "68",
312
- "y4": "89"
278
+ "x": 64000,
279
+ "y1": 18000,
280
+ "y2": 32000,
281
+ "y3": 68000,
282
+ "y4": 89000
313
283
  },
314
284
  {
315
- "x": "3",
316
- "y1": "7",
317
- "y2": "38",
318
- "y3": "74",
319
- "y4": "89"
285
+ "x": 63000,
286
+ "y1": 7000,
287
+ "y2": 38000,
288
+ "y3": 74000,
289
+ "y4": 89000
320
290
  },
321
291
  {
322
- "x": "26",
323
- "y1": "10",
324
- "y2": "39",
325
- "y3": "56",
326
- "y4": "91"
292
+ "x": 66000,
293
+ "y1": 10000,
294
+ "y2": 39000,
295
+ "y3": 56000,
296
+ "y4": 91000
327
297
  },
328
298
  {
329
- "x": "42",
330
- "y1": "16",
331
- "y2": "38",
332
- "y3": "55",
333
- "y4": "76"
299
+ "x": 62000,
300
+ "y1": 16000,
301
+ "y2": 38000,
302
+ "y3": 55000,
303
+ "y4": 76000
334
304
  },
335
305
  {
336
- "x": "32",
337
- "y1": "20",
338
- "y2": "46",
339
- "y3": "52",
340
- "y4": "94"
306
+ "x": 62000,
307
+ "y1": 20000,
308
+ "y2": 46000,
309
+ "y3": 52000,
310
+ "y4": 94000
341
311
  },
342
312
  {
343
- "x": "11",
344
- "y1": "9",
345
- "y2": "41",
346
- "y3": "57",
347
- "y4": "86"
313
+ "x": 61000,
314
+ "y1": 9000,
315
+ "y2": 41000,
316
+ "y3": 57000,
317
+ "y4": 86000
348
318
  },
349
319
  {
350
- "x": "22",
351
- "y1": "10",
352
- "y2": "47",
353
- "y3": "56",
354
- "y4": "80"
320
+ "x": 62000,
321
+ "y1": 10000,
322
+ "y2": 47000,
323
+ "y3": 56000,
324
+ "y4": 80000
355
325
  },
356
326
  {
357
- "x": "73",
358
- "y1": "1",
359
- "y2": "36",
360
- "y3": "71",
361
- "y4": "94"
327
+ "x": 73000,
328
+ "y1": 1000,
329
+ "y2": 36000,
330
+ "y3": 71000,
331
+ "y4": 94000
362
332
  },
363
333
  {
364
- "x": "23",
365
- "y1": "13",
366
- "y2": "30",
367
- "y3": "66",
368
- "y4": "78"
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",