@cdc/chart 4.24.12-2 → 4.25.1

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 (70) hide show
  1. package/dist/cdcchart.js +79411 -78816
  2. package/examples/feature/boxplot/boxplot.json +2 -157
  3. package/examples/feature/boxplot/testing.csv +23 -38
  4. package/examples/feature/tests-non-numerics/example-combo-bar-nonnumeric.json +394 -30
  5. package/examples/private/not-loading.json +360 -0
  6. package/index.html +7 -14
  7. package/package.json +2 -2
  8. package/src/CdcChart.tsx +92 -1512
  9. package/src/CdcChartComponent.tsx +1105 -0
  10. package/src/_stories/Chart.Anchors.stories.tsx +1 -1
  11. package/src/_stories/Chart.CustomColors.stories.tsx +1 -1
  12. package/src/_stories/Chart.DynamicSeries.stories.tsx +1 -1
  13. package/src/_stories/Chart.Legend.Gradient.stories.tsx +2 -2
  14. package/src/_stories/Chart.ScatterPlot.stories.tsx +19 -0
  15. package/src/_stories/Chart.tooltip.stories.tsx +1 -2
  16. package/src/_stories/ChartAnnotation.stories.tsx +1 -1
  17. package/src/_stories/ChartAxisLabels.stories.tsx +1 -1
  18. package/src/_stories/ChartAxisTitles.stories.tsx +1 -1
  19. package/src/_stories/ChartEditor.stories.tsx +1 -1
  20. package/src/_stories/ChartLine.Suppression.stories.tsx +1 -1
  21. package/src/_stories/ChartLine.Symbols.stories.tsx +18 -0
  22. package/src/_stories/ChartPrefixSuffix.stories.tsx +1 -1
  23. package/src/_stories/_mock/line_chart_symbols.json +437 -0
  24. package/src/_stories/_mock/scatterplot-image-download.json +1244 -0
  25. package/src/components/Annotations/components/AnnotationDraggable.tsx +3 -11
  26. package/src/components/Annotations/components/AnnotationDropdown.tsx +3 -3
  27. package/src/components/Axis/Categorical.Axis.tsx +3 -4
  28. package/src/components/BarChart/components/BarChart.Horizontal.tsx +14 -5
  29. package/src/components/BarChart/components/BarChart.StackedHorizontal.tsx +10 -4
  30. package/src/components/BoxPlot/BoxPlot.tsx +34 -32
  31. package/src/components/BoxPlot/helpers/index.ts +108 -18
  32. package/src/components/DeviationBar.jsx +2 -6
  33. package/src/components/EditorPanel/EditorPanel.tsx +62 -6
  34. package/src/components/EditorPanel/components/Panels/Panel.General.tsx +4 -0
  35. package/src/components/EditorPanel/components/Panels/Panel.Visual.tsx +44 -7
  36. package/src/components/ForestPlot/ForestPlot.tsx +176 -26
  37. package/src/components/Legend/Legend.Component.tsx +29 -38
  38. package/src/components/Legend/Legend.Suppression.tsx +3 -5
  39. package/src/components/Legend/Legend.tsx +2 -2
  40. package/src/components/Legend/LegendLine.Shape.tsx +51 -0
  41. package/src/components/Legend/helpers/createFormatLabels.tsx +29 -26
  42. package/src/components/Legend/helpers/getLegendClasses.ts +20 -38
  43. package/src/components/Legend/helpers/index.ts +14 -7
  44. package/src/components/Legend/tests/getLegendClasses.test.ts +3 -20
  45. package/src/components/LineChart/components/LineChart.Circle.tsx +90 -88
  46. package/src/components/LineChart/index.tsx +4 -0
  47. package/src/components/LinearChart.tsx +54 -29
  48. package/src/components/PairedBarChart.jsx +2 -9
  49. package/src/components/ZoomBrush.tsx +5 -7
  50. package/src/data/initial-state.js +6 -3
  51. package/src/helpers/getBoxPlotConfig.ts +68 -0
  52. package/src/helpers/getColorScale.ts +28 -0
  53. package/src/helpers/getComboChartConfig.ts +42 -0
  54. package/src/helpers/getExcludedData.ts +37 -0
  55. package/src/helpers/getTopAxis.ts +7 -0
  56. package/src/hooks/useBarChart.ts +28 -9
  57. package/src/hooks/{useHighlightedBars.js → useHighlightedBars.ts} +2 -1
  58. package/src/hooks/useIntersectionObserver.ts +37 -0
  59. package/src/hooks/useMinMax.ts +4 -0
  60. package/src/hooks/useReduceData.ts +1 -1
  61. package/src/hooks/useTooltip.tsx +9 -1
  62. package/src/index.jsx +1 -0
  63. package/src/scss/DataTable.scss +0 -5
  64. package/src/scss/main.scss +30 -115
  65. package/src/types/ChartConfig.ts +6 -3
  66. package/src/types/ChartContext.ts +1 -3
  67. package/src/helpers/getQuartiles.ts +0 -27
  68. package/src/hooks/useColorScale.ts +0 -50
  69. package/src/hooks/useIntersectionObserver.jsx +0 -29
  70. package/src/hooks/useTopAxis.js +0 -6
@@ -476,7 +476,7 @@
476
476
  "data": []
477
477
  },
478
478
  "height": 300,
479
- "dataUrl": "/examples/feature/boxplot/boxplot-data.json",
479
+ "dataUrl": "/examples/feature/boxplot/testing.csv",
480
480
  "visualizationType": "Box Plot",
481
481
  "description": "Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups.",
482
482
  "dataDescription": {
@@ -486,162 +486,7 @@
486
486
  "xKey": "category one",
487
487
  "valueKey": "value"
488
488
  },
489
- "data": [
490
- {
491
- "Group_Category": "category one",
492
- "Value": "21",
493
- "Price": "100",
494
- "Month": "January",
495
- "Radius": "10"
496
- },
497
- {
498
- "Group_Category": "category one",
499
- "Value": "19",
500
- "Price": "105",
501
- "Month": "January",
502
- "Radius": "12"
503
- },
504
- {
505
- "Group_Category": "category one",
506
- "Value": "23",
507
- "Price": "110",
508
- "Month": "February",
509
- "Radius": "7"
510
- },
511
- {
512
- "Group_Category": "category one",
513
- "Value": "24",
514
- "Price": "115",
515
- "Month": "February",
516
- "Radius": "5"
517
- },
518
- {
519
- "Group_Category": "category two",
520
- "Value": "18",
521
- "Price": "120",
522
- "Month": "March",
523
- "Radius": "9"
524
- },
525
- {
526
- "Group_Category": "category two",
527
- "Value": "10",
528
- "Price": "125",
529
- "Month": "March",
530
- "Radius": "14"
531
- },
532
- {
533
- "Group_Category": "category two",
534
- "Value": "12",
535
- "Price": "130",
536
- "Month": "April",
537
- "Radius": "11"
538
- },
539
- {
540
- "Group_Category": "category two",
541
- "Value": "19",
542
- "Price": "135",
543
- "Month": "April",
544
- "Radius": "6"
545
- },
546
- {
547
- "Group_Category": "category three",
548
- "Value": "30",
549
- "Price": "140",
550
- "Month": "May",
551
- "Radius": "8"
552
- },
553
- {
554
- "Group_Category": "category three",
555
- "Value": "35",
556
- "Price": "145",
557
- "Month": "May",
558
- "Radius": "10"
559
- },
560
- {
561
- "Group_Category": "category three",
562
- "Value": "36",
563
- "Price": "150",
564
- "Month": "June",
565
- "Radius": "12"
566
- },
567
- {
568
- "Group_Category": "category three",
569
- "Value": "46",
570
- "Price": "155",
571
- "Month": "June",
572
- "Radius": "13"
573
- },
574
- {
575
- "Group_Category": "category four",
576
- "Value": "30",
577
- "Price": "160",
578
- "Month": "July",
579
- "Radius": "5"
580
- },
581
- {
582
- "Group_Category": "category four",
583
- "Value": "40",
584
- "Price": "165",
585
- "Month": "July",
586
- "Radius": "9"
587
- },
588
- {
589
- "Group_Category": "category four",
590
- "Value": "50",
591
- "Price": "170",
592
- "Month": "August",
593
- "Radius": "14"
594
- },
595
- {
596
- "Group_Category": "category four",
597
- "Value": "50",
598
- "Price": "175",
599
- "Month": "August",
600
- "Radius": "15"
601
- },
602
- {
603
- "Group_Category": "category four",
604
- "Value": "85",
605
- "Price": "180",
606
- "Month": "September",
607
- "Radius": "7"
608
- },
609
- {
610
- "Group_Category": "category four",
611
- "Value": "82",
612
- "Price": "185",
613
- "Month": "September",
614
- "Radius": "8"
615
- },
616
- {
617
- "Group_Category": "category four",
618
- "Value": "43",
619
- "Price": "190",
620
- "Month": "October",
621
- "Radius": "10"
622
- },
623
- {
624
- "Group_Category": "category four",
625
- "Value": "42",
626
- "Price": "195",
627
- "Month": "October",
628
- "Radius": "12"
629
- },
630
- {
631
- "Group_Category": "category four",
632
- "Value": "41",
633
- "Price": "200",
634
- "Month": "November",
635
- "Radius": "11"
636
- },
637
- {
638
- "Group_Category": "category four",
639
- "Value": "21",
640
- "Price": "205",
641
- "Month": "November",
642
- "Radius": "9"
643
- }
644
- ],
489
+ "data": [],
645
490
  "version": "4.24.10",
646
491
  "dynamicMarginTop": 0
647
492
  }
@@ -1,38 +1,23 @@
1
- category one,value,price
2
- Group A,16,33
3
- Group A,24,54
4
- Group A,32,32
5
- Group A,40,45
6
- Group A,43,32
7
- Group A,72,33
8
- Group A,83
9
- Group A,104
10
- Group A,137
11
- Group A,152
12
- Group A,168
13
- Group A,174
14
- Group A,450
15
- Group B,27
16
- Group B,42
17
- Group B,52
18
- Group B,55
19
- Group B,60
20
- Group B,62
21
- Group B,90
22
- Group B,131
23
- Group B,157
24
- Group B,160
25
- Group B,200
26
- Group B,212
27
- Group C,38
28
- Group C,44
29
- Group C,46
30
- Group C,63
31
- Group C,76
32
- Group C,88
33
- Group C,94
34
- Group C,167
35
- Group C,184
36
- Group C,212
37
- Group C,232
38
- Group C,250
1
+ "Group_Category","Value","Price","Month","Radius"
2
+ "category one","21","100","January","10"
3
+ "category one","19","105","January","12"
4
+ "category one","23","110","February","7"
5
+ "category one","24","115","February","5"
6
+ "category two","18","120","March","9"
7
+ "category two","10","125","March","14"
8
+ "category two","12","130","April","11"
9
+ "category two","19","135","April","6"
10
+ "category three","30","140","May","8"
11
+ "category three","35","145","May","10"
12
+ "category three","36","150","June","12"
13
+ "category three","46","155","June","13"
14
+ "category four","30","160","July","5"
15
+ "category four","40","165","July","9"
16
+ "category four","50","170","August","14"
17
+ "category four","50","175","August","15"
18
+ "category four","85","180","September","7"
19
+ "category four","82","185","September","8"
20
+ "category four","43","190","October","10"
21
+ "category four","42","195","October","12"
22
+ "category four","41","200","November","11"
23
+ "category four","21","205","November","9"