@cdc/chart 1.3.2 → 1.3.4

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 (36) hide show
  1. package/dist/cdcchart.js +77 -4
  2. package/examples/age-adjusted-rates.json +1218 -0
  3. package/examples/case-rate-example-config.json +36 -0
  4. package/examples/case-rate-example-data.json +33602 -0
  5. package/examples/date-exclusions-config.json +62 -0
  6. package/examples/date-exclusions-data.json +162 -0
  7. package/examples/horizontal-chart.json +35 -0
  8. package/examples/horizontal-stacked-bar-chart.json +36 -0
  9. package/examples/line-chart.json +76 -0
  10. package/examples/paired-bar-data.json +14 -0
  11. package/examples/paired-bar-example.json +48 -0
  12. package/examples/paired-bar-formatted.json +37 -0
  13. package/examples/planet-chart-horizontal-example-config.json +35 -0
  14. package/examples/planet-example-config.json +1 -0
  15. package/examples/private/newtest.csv +101 -0
  16. package/examples/private/test.json +10124 -0
  17. package/package.json +9 -5
  18. package/src/CdcChart.tsx +417 -149
  19. package/src/components/BarChart.tsx +431 -24
  20. package/src/components/BarStackVertical.js +0 -0
  21. package/src/components/DataTable.tsx +55 -28
  22. package/src/components/EditorPanel.js +914 -260
  23. package/src/components/LineChart.tsx +4 -3
  24. package/src/components/LinearChart.tsx +258 -88
  25. package/src/components/PairedBarChart.tsx +144 -0
  26. package/src/components/PieChart.tsx +30 -16
  27. package/src/components/SparkLine.js +206 -0
  28. package/src/data/initial-state.js +59 -32
  29. package/src/hooks/useActiveElement.js +19 -0
  30. package/src/hooks/useColorPalette.ts +83 -0
  31. package/src/hooks/useReduceData.ts +43 -0
  32. package/src/index.html +49 -13
  33. package/src/index.tsx +6 -2
  34. package/src/scss/editor-panel.scss +12 -4
  35. package/src/scss/main.scss +112 -3
  36. package/LICENSE +0 -201
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdc/chart",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "React component for visualizing tabular data in various types of charts",
5
5
  "main": "dist/cdcchart",
6
6
  "scripts": {
@@ -18,8 +18,8 @@
18
18
  "url": "https://github.com/CDCgov/cdc-open-viz/issues"
19
19
  },
20
20
  "license": "Apache-2.0",
21
- "devDependencies": {
22
- "@cdc/core": "^1.1.2",
21
+ "dependencies": {
22
+ "@cdc/core": "^1.1.4",
23
23
  "@visx/axis": "^1.0.0",
24
24
  "@visx/curve": "^1.0.0",
25
25
  "@visx/gradient": "^1.0.0",
@@ -30,9 +30,10 @@
30
30
  "@visx/scale": "^1.0.0",
31
31
  "@visx/shape": "^1.0.0",
32
32
  "@visx/tooltip": "^1.1.0",
33
+ "chroma-js": "^2.1.2",
33
34
  "d3-array": "^2.8.0",
34
35
  "d3-time-format": "^3.0.0",
35
- "html-react-parser": "^0.14.0",
36
+ "html-react-parser": "1.4.9",
36
37
  "js-base64": "^2.5.2",
37
38
  "papaparse": "^5.3.0",
38
39
  "react-accessible-accordion": "^3.3.4",
@@ -46,5 +47,8 @@
46
47
  "react": ">=16.8",
47
48
  "react-dom": ">=16"
48
49
  },
49
- "gitHead": "8790a2336ff2453d0d6f09ecec56b5e4beaa7377"
50
+ "resolutions": {
51
+ "@types/react": "17.x"
52
+ },
53
+ "gitHead": "ff89a7aea74c533413c62ef8859cc011e6b3cbfa"
50
54
  }