@cdc/chart 4.23.7 → 4.23.8

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 (38) hide show
  1. package/LICENSE +201 -0
  2. package/dist/cdcchart.js +27964 -26942
  3. package/examples/feature/__data__/area-chart-date-apple.json +5122 -0
  4. package/examples/feature/__data__/city-temperature.json +2198 -0
  5. package/examples/feature/area/area-chart-category.json +45 -45
  6. package/examples/feature/area/area-chart-date-apple.json +10376 -0
  7. package/examples/feature/area/area-chart-date-city-temperature.json +4528 -0
  8. package/examples/feature/area/area-chart-date.json +111 -3
  9. package/examples/feature/forest-plot/broken.json +700 -0
  10. package/examples/feature/forest-plot/data.csv +24 -0
  11. package/examples/feature/forest-plot/forest-plot.json +717 -0
  12. package/examples/feature/pie/planet-pie-example-config.json +1 -1
  13. package/examples/private/confidence_interval_test.json +248 -0
  14. package/examples/private/tooltip-issue.json +45275 -0
  15. package/index.html +13 -11
  16. package/package.json +4 -3
  17. package/src/CdcChart.jsx +24 -14
  18. package/src/components/AreaChart.jsx +84 -59
  19. package/src/components/BarChart.Horizontal.jsx +251 -0
  20. package/src/components/BarChart.StackedHorizontal.jsx +118 -0
  21. package/src/components/BarChart.StackedVertical.jsx +93 -0
  22. package/src/components/BarChart.Vertical.jsx +204 -0
  23. package/src/components/BarChart.jsx +14 -674
  24. package/src/components/BarChartType.jsx +15 -0
  25. package/src/components/BrushHandle.jsx +17 -0
  26. package/src/components/DataTable.jsx +63 -21
  27. package/src/components/EditorPanel.jsx +351 -303
  28. package/src/components/ForestPlot.jsx +191 -0
  29. package/src/components/ForestPlotSettings.jsx +508 -0
  30. package/src/components/LineChart.jsx +2 -2
  31. package/src/components/LinearChart.jsx +115 -310
  32. package/src/data/initial-state.js +43 -0
  33. package/src/hooks/useBarChart.js +186 -0
  34. package/src/hooks/useEditorPermissions.js +218 -0
  35. package/src/hooks/useMinMax.js +15 -3
  36. package/src/hooks/useScales.js +45 -2
  37. package/src/hooks/useTooltip.jsx +407 -0
  38. package/src/scss/main.scss +7 -0
@@ -86,7 +86,7 @@
86
86
  "horizontal": 750
87
87
  },
88
88
  "xAxis": {
89
- "type": "date",
89
+ "type": "categorical",
90
90
  "showTargetLabel": true,
91
91
  "targetLabel": "Target",
92
92
  "hideAxis": false,
@@ -104,13 +104,13 @@
104
104
  "axisPadding": 0,
105
105
  "target": 0,
106
106
  "isLegendValue": false,
107
- "dataKey": "Date",
107
+ "dataKey": "name",
108
108
  "label": "X Axis Example Label",
109
109
  "dateParseFormat": "%m/%d/%Y",
110
110
  "dateDisplayFormat": "%m/%d/%Y"
111
111
  },
112
112
  "table": {
113
- "label": "Data Type by Date",
113
+ "label": "Data Type by Category Name",
114
114
  "expanded": false,
115
115
  "limitHeight": false,
116
116
  "height": "",
@@ -178,58 +178,58 @@
178
178
  "dataFileSourceType": "file",
179
179
  "formattedData": [
180
180
  {
181
- "Data 1": "900",
182
- "Data 2": "135",
183
- "Data 3": "300",
184
- "Data 4": "95",
185
- "Data 5": "120",
186
- "Data 6": "310",
187
- "Date": "1/15/2016"
181
+ "name": "Jupiter",
182
+ "Radius": "10.97",
183
+ "Diameter": "25.1",
184
+ "distance": "0"
188
185
  },
189
186
  {
190
- "Data 1": "4000",
191
- "Data 2": "90",
192
- "Data 3": "240",
193
- "Data 4": "60",
194
- "Data 5": "160",
195
- "Data 6": "2000",
196
- "Date": "2/15/2016"
187
+ "name": "Saturn",
188
+ "Radius": "9.14",
189
+ "Diameter": "18",
190
+ "distance": "0"
197
191
  },
198
192
  {
199
- "Data 1": "500",
200
- "Data 2": "300",
201
- "Data 3": "290",
202
- "Data 4": "100",
203
- "Data 5": "200",
204
- "Data 6": "250",
205
- "Date": "3/15/2016"
193
+ "name": "Uranus",
194
+ "Radius": "-4",
195
+ "Diameter": "-30",
196
+ "distance": "0"
206
197
  },
207
198
  {
208
- "Data 1": "1200",
209
- "Data 2": "160",
210
- "Data 3": "230",
211
- "Data 4": "180",
212
- "Data 5": "160",
213
- "Data 6": "220",
214
- "Date": "4/15/2016"
199
+ "name": "Neptune",
200
+ "Radius": "3.86",
201
+ "Diameter": "7",
202
+ "distance": "0"
215
203
  },
216
204
  {
217
- "Data 1": "8000",
218
- "Data 2": "350",
219
- "Data 3": "300",
220
- "Data 4": "150",
221
- "Data 5": "130",
222
- "Data 6": "100",
223
- "Date": "5/15/2016"
205
+ "name": "Earth",
206
+ "Radius": "1",
207
+ "Diameter": "2",
208
+ "distance": "0"
224
209
  },
225
210
  {
226
- "Data 1": "9000",
227
- "Data 2": "220",
228
- "Data 3": "320",
229
- "Data 4": "100",
230
- "Data 5": "220",
231
- "Data 6": "300",
232
- "Date": "6/15/2016"
211
+ "name": "Venus",
212
+ "Radius": "0.950",
213
+ "Diameter": "2",
214
+ "distance": "0"
215
+ },
216
+ {
217
+ "name": "Mars",
218
+ "Radius": "0.532",
219
+ "Diameter": "1",
220
+ "distance": "0"
221
+ },
222
+ {
223
+ "name": "Mercury",
224
+ "Radius": "0.383",
225
+ "Diameter": "0.7",
226
+ "distance": "0"
227
+ },
228
+ {
229
+ "name": "Pluto",
230
+ "Radius": "0.181",
231
+ "Diameter": "0.3",
232
+ "distance": "0"
233
233
  }
234
234
  ],
235
235
  "height": 300,