@cdc/editor 4.25.11 → 4.26.2

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/index.html CHANGED
@@ -1,20 +1 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
6
- <style type="text/css">
7
- body {
8
- margin: 0;
9
- }
10
- .react-container {
11
- min-height: 100vh;
12
- }
13
- </style>
14
- <link rel="stylesheet prefetch" href="https://www.cdc.gov/TemplatePackage/5.0/css/app.min.css?_=71669" />
15
- </head>
16
- <body>
17
- <div class="react-container react--editor"></div>
18
- <script type="module" src="./src/index.jsx"></script>
19
- </body>
20
- </html>
1
+ <!-- index.html is generated by @cdc/core/generateViteConfig.js using the files in @cdc/core/devTemplate/ -->
package/package.json CHANGED
@@ -1,51 +1,49 @@
1
1
  {
2
2
  "name": "@cdc/editor",
3
- "version": "4.25.11",
3
+ "version": "4.26.2",
4
4
  "description": "React component for generating a new component entry",
5
- "moduleName": "CdcEditor",
6
- "main": "dist/cdceditor",
7
- "type": "module",
8
- "scripts": {
9
- "start": "vite --open",
10
- "build": "vite build",
11
- "preview": "vite preview",
12
- "graph": "nx graph",
13
- "prepublishOnly": "lerna run --scope @cdc/editor build",
14
- "test": "vitest run --reporter verbose",
15
- "test-watch": "vitest watch --reporter verbose",
16
- "test-watch:ui": "vitest --ui"
17
- },
18
- "repository": {
19
- "type": "git",
20
- "url": "git+https://github.com/CDCgov/cdc-open-viz",
21
- "directory": "packages/editor"
22
- },
23
- "bugs": {
24
- "url": "https://github.com/CDCgov/cdc-open-viz/issues"
25
- },
26
5
  "license": "Apache-2.0",
6
+ "bugs": "https://github.com/CDCgov/cdc-open-viz/issues",
27
7
  "dependencies": {
28
- "@cdc/chart": "^4.25.11",
29
- "@cdc/core": "^4.25.11",
30
- "@cdc/dashboard": "^4.25.11",
31
- "@cdc/data-bite": "^4.25.11",
32
- "@cdc/map": "^4.25.11",
33
- "@cdc/markup-include": "^4.25.11",
34
- "@cdc/waffle-chart": "^4.25.11",
35
- "axios": "^1.9.0",
8
+ "@cdc/chart": "^4.26.2",
9
+ "@cdc/core": "^4.26.2",
10
+ "@cdc/dashboard": "^4.26.2",
11
+ "@cdc/data-bite": "^4.26.2",
12
+ "@cdc/map": "^4.26.2",
13
+ "@cdc/markup-include": "^4.26.2",
14
+ "@cdc/waffle-chart": "^4.26.2",
15
+ "axios": "^1.13.2",
36
16
  "d3": "^7.9.0",
37
17
  "react-dropzone": "^14.3.8",
38
- "use-debounce": "^10.0.5"
18
+ "use-debounce": "^10.1.0"
39
19
  },
20
+ "devDependencies": {
21
+ "@rollup/plugin-dsv": "^3.0.2",
22
+ "@vitejs/plugin-react": "^5.1.2",
23
+ "vite-plugin-css-injected-by-js": "^2.4.0",
24
+ "vite-plugin-svgr": "^4.2.0"
25
+ },
26
+ "gitHead": "be3413e8e1149abf94225108f86a7910f56e0616",
27
+ "main": "dist/cdceditor",
28
+ "moduleName": "CdcEditor",
40
29
  "peerDependencies": {
41
30
  "react": "^18.2.0",
42
31
  "react-dom": "^18.2.0"
43
32
  },
44
- "devDependencies": {
45
- "@vitejs/plugin-react": "^4.3.4",
46
- "vite": "^4.4.11",
47
- "vite-plugin-css-injected-by-js": "^2.4.0",
48
- "vite-plugin-svgr": "^2.4.0"
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/CDCgov/cdc-open-viz",
36
+ "directory": "packages/editor"
37
+ },
38
+ "scripts": {
39
+ "build": "vite build",
40
+ "graph": "nx graph",
41
+ "prepublishOnly": "lerna run --scope @cdc/editor build",
42
+ "preview": "vite preview",
43
+ "start": "vite --open",
44
+ "test": "vitest run --reporter verbose",
45
+ "test-watch": "vitest watch --reporter verbose",
46
+ "test-watch:ui": "vitest --ui"
49
47
  },
50
- "gitHead": "5f09a137c22f454111ab5f4cd7fdf1d2d58e31bd"
48
+ "type": "module"
51
49
  }
package/src/CdcEditor.tsx CHANGED
@@ -1,7 +1,4 @@
1
1
  import React, { useState, useEffect, useCallback, useReducer, useMemo } from 'react'
2
-
3
- // IE11
4
- // import 'core-js/stable' // temp remove, appears to be used with html2pdf.js which we're temp removing
5
2
  import ResizeObserver from 'resize-observer-polyfill'
6
3
 
7
4
  import getViewport from '@cdc/core/helpers/getViewport'
@@ -4,29 +4,33 @@ import '../scss/choose-vis-tab.scss'
4
4
  import ConfigContext, { EditorDispatchContext } from '@cdc/core/contexts/EditorContext'
5
5
  import Tooltip from '@cdc/core/components/ui/Tooltip'
6
6
 
7
- import DashboardIcon from '@cdc/core/assets/icon-dashboard.svg'
7
+ import AlabamaGraphic from '@cdc/core/assets/icon-map-alabama.svg'
8
+ import AreaChartIcon from '@cdc/core/assets/icon-area-chart.svg'
8
9
  import BarIcon from '@cdc/core/assets/icon-chart-bar.svg'
10
+ import BoxPlotIcon from '@cdc/core/assets/icon-chart-box-whisker.svg'
11
+ import CodeIcon from '@cdc/core/assets/icon-code.svg'
12
+ import ComboChartIcon from '@cdc/core/assets/icon-combo-chart.svg'
13
+ import DashboardIcon from '@cdc/core/assets/icon-dashboard.svg'
14
+ import DataBiteIcon from '@cdc/core/assets/icon-databite.svg'
15
+ import DeviationIcon from '@cdc/core/assets/icon-deviation-bar.svg'
16
+ import EpiChartIcon from '@cdc/core/assets/icon-epi-chart.svg'
17
+ import ForecastIcon from '@cdc/core/assets/icon-chart-forecast.svg'
18
+ import GaugeChartIcon from '@cdc/core/assets/icon-linear-gauge.svg'
19
+ import GlobeIcon from '@cdc/core/assets/icon-map-world.svg'
20
+ import HorizonChartIcon from '@cdc/core/assets/icon-chart-area.svg'
21
+ import HorizontalStackIcon from '@cdc/core/assets/icon-chart-bar-stacked.svg'
22
+ import Icon from '@cdc/core/components/ui/Icon'
9
23
  import LineIcon from '@cdc/core/assets/icon-chart-line.svg'
24
+ import PairedBarIcon from '@cdc/core/assets/icon-chart-bar-paired.svg'
10
25
  import PieIcon from '@cdc/core/assets/icon-chart-pie.svg'
11
- import GlobeIcon from '@cdc/core/assets/icon-map-world.svg'
26
+ import RadarChartIcon from '@cdc/core/assets/icon-chart-radar.svg'
27
+ import SankeyIcon from '@cdc/core/assets/icon-sankey.svg'
28
+ import ScatterPlotIcon from '@cdc/core/assets/icon-chart-scatterplot.svg'
29
+ import TableIcon from '@cdc/core/assets/icon-table.svg'
12
30
  import UsaIcon from '@cdc/core/assets/icon-map-usa.svg'
13
31
  import UsaRegionIcon from '@cdc/core/assets/usa-region-graphic.svg'
14
- import DataBiteIcon from '@cdc/core/assets/icon-databite.svg'
15
32
  import WaffleChartIcon from '@cdc/core/assets/icon-grid.svg'
16
- import AlabamaGraphic from '@cdc/core/assets/icon-map-alabama.svg'
17
- import PairedBarIcon from '@cdc/core/assets/icon-chart-bar-paired.svg'
18
- import HorizontalStackIcon from '@cdc/core/assets/icon-chart-bar-stacked.svg'
19
- import ScatterPlotIcon from '@cdc/core/assets/icon-chart-scatterplot.svg'
20
- import BoxPlotIcon from '@cdc/core/assets/icon-chart-box-whisker.svg'
21
- import AreaChartIcon from '@cdc/core/assets/icon-area-chart.svg'
22
- import GaugeChartIcon from '@cdc/core/assets/icon-linear-gauge.svg'
23
- import ForecastIcon from '@cdc/core/assets/icon-chart-forecast.svg'
24
- import DeviationIcon from '@cdc/core/assets/icon-deviation-bar.svg'
25
- import SankeyIcon from '@cdc/core/assets/icon-sankey.svg'
26
- import ComboChartIcon from '@cdc/core/assets/icon-combo-chart.svg'
27
- import EpiChartIcon from '@cdc/core/assets/icon-epi-chart.svg'
28
- import TableIcon from '@cdc/core/assets/icon-table.svg'
29
- import Icon from '@cdc/core/components/ui/Icon'
33
+ import WarmingStripesIcon from '@cdc/core/assets/icon-warming-stripes.svg'
30
34
 
31
35
  import {
32
36
  convertVegaConfig,
@@ -276,6 +280,77 @@ const ChooseTab: React.FC = (): JSX.Element => {
276
280
  export default ChooseTab
277
281
 
278
282
  const buttons = [
283
+ // General - sorted by label
284
+ {
285
+ id: 15,
286
+ category: 'General',
287
+ label: 'Dashboard',
288
+ type: 'dashboard',
289
+ subType: null,
290
+ orientation: null,
291
+ icon: <DashboardIcon />,
292
+ content: 'Present multiple data visualizations with shared filter controls.'
293
+ },
294
+ {
295
+ id: 16,
296
+ category: 'General',
297
+ label: 'Data Bite',
298
+ type: 'data-bite',
299
+ subType: null,
300
+ orientation: null,
301
+ icon: <DataBiteIcon />,
302
+ content: 'Highlight a single aggregated value (e.g., sum or median).'
303
+ },
304
+ {
305
+ id: 24,
306
+ category: 'General',
307
+ label: 'Data Table',
308
+ type: 'table',
309
+ subType: null,
310
+ icon: <TableIcon />
311
+ },
312
+ {
313
+ id: 18,
314
+ category: 'General',
315
+ label: 'Gauge Chart',
316
+ type: 'waffle-chart',
317
+ subType: 'Gauge',
318
+ orientation: null,
319
+ icon: <GaugeChartIcon />,
320
+ content: `Specify the calculation of a single data point (such as a percentage value) and present it on a horizontal
321
+ scale.`
322
+ },
323
+ {
324
+ id: 26,
325
+ category: 'General',
326
+ label: 'Markup Include',
327
+ type: 'markup-include',
328
+ subType: null,
329
+ orientation: null,
330
+ icon: <CodeIcon />,
331
+ content: 'Include custom HTML markup or embed content from external URLs.'
332
+ },
333
+ {
334
+ id: 17,
335
+ category: 'General',
336
+ label: 'Waffle Chart',
337
+ type: 'waffle-chart',
338
+ subType: 'Waffle',
339
+ orientation: null,
340
+ icon: <WaffleChartIcon />,
341
+ content: 'Highlight a piece of data in relationship to a data set.'
342
+ },
343
+ // Charts - sorted by label
344
+ {
345
+ id: 6,
346
+ category: 'Charts',
347
+ label: 'Area Chart',
348
+ type: 'chart',
349
+ subType: 'Area Chart',
350
+ orientation: 'vertical',
351
+ icon: <AreaChartIcon />,
352
+ content: 'Display an area chart to visualize quantities over time.'
353
+ },
279
354
  {
280
355
  id: 1,
281
356
  category: 'Charts',
@@ -295,23 +370,14 @@ const buttons = [
295
370
  content: 'Use bars to show comparisons between data categories.'
296
371
  },
297
372
  {
298
- id: 2,
373
+ id: 9,
299
374
  category: 'Charts',
300
- label: 'Epi Chart',
375
+ label: 'Box Plot',
301
376
  type: 'chart',
302
- subType: 'Bar',
377
+ subType: 'Box Plot',
303
378
  orientation: 'vertical',
304
- barThickness: '0.95',
305
- isResponsiveTicks: true,
306
- visualizationSubType: 'regular',
307
- xAxis: {
308
- type: 'date-time',
309
- size: 0,
310
- labelOffset: 0,
311
- maxTickRotation: 45
312
- },
313
- icon: <EpiChartIcon />,
314
- content: 'Use bars to show comparisons between data categories.'
379
+ icon: <BoxPlotIcon />,
380
+ content: 'Display a box plot to visualize the distribution of numerical data through quartiles.'
315
381
  },
316
382
  {
317
383
  id: 3,
@@ -324,34 +390,33 @@ const buttons = [
324
390
  content: 'Use bars to show comparisons between data categories.'
325
391
  },
326
392
  {
327
- id: 4,
328
- category: 'Charts',
329
- label: 'Line',
330
- type: 'chart',
331
- subType: 'Line',
332
- orientation: 'vertical',
333
- icon: <LineIcon />,
334
- content: 'Present one or more data trends over time.'
335
- },
336
- {
337
- id: 5,
393
+ id: 14,
338
394
  category: 'Charts',
339
- label: 'Paired Bar',
395
+ label: 'Deviation Bar',
340
396
  type: 'chart',
341
- subType: 'Paired Bar',
342
- orientation: 'horizontal',
343
- icon: <PairedBarIcon />,
344
- content: 'Use paired bars to show comparisons between two different data categories.'
397
+ subType: 'Deviation Bar',
398
+ orientation: 'Pie',
399
+ icon: <DeviationIcon />,
400
+ content: 'Use deviation bars to display how individual values differ from a target'
345
401
  },
346
402
  {
347
- id: 6,
403
+ id: 2,
348
404
  category: 'Charts',
349
- label: 'Area Chart',
405
+ label: 'Epi Chart',
350
406
  type: 'chart',
351
- subType: 'Area Chart',
407
+ subType: 'Bar',
352
408
  orientation: 'vertical',
353
- icon: <AreaChartIcon />,
354
- content: 'Display an area chart to visualize quantities over time.'
409
+ barThickness: '0.95',
410
+ isResponsiveTicks: true,
411
+ visualizationSubType: 'regular',
412
+ xAxis: {
413
+ type: 'date-time',
414
+ size: 0,
415
+ labelOffset: 0,
416
+ maxTickRotation: 45
417
+ },
418
+ icon: <EpiChartIcon />,
419
+ content: 'Use bars to show comparisons between data categories.'
355
420
  },
356
421
  {
357
422
  id: 7,
@@ -364,55 +429,45 @@ const buttons = [
364
429
  content: 'Display a forecasting chart to predict future data trends.'
365
430
  },
366
431
  {
367
- id: 8,
432
+ id: 27,
368
433
  category: 'Charts',
369
- label: 'Scatter Plot',
434
+ label: 'Horizon Chart',
370
435
  type: 'chart',
371
- subType: 'Scatter Plot',
436
+ subType: 'Horizon Chart',
372
437
  orientation: 'vertical',
373
- icon: <ScatterPlotIcon />,
374
- content: 'Display a scatter plot to explore relationships between numeric variables.'
375
- },
376
- {
377
- id: 9,
378
- category: 'Charts',
379
- label: 'Box Plot',
380
- type: 'chart',
381
- subType: 'Box Plot',
382
- orientation: 'vertical',
383
- icon: <BoxPlotIcon />,
384
- content: 'Display a box plot to visualize the distribution of numerical data through quartiles.'
438
+ icon: <HorizonChartIcon />,
439
+ content: 'Display a horizon chart to visualize quantities over time in a smaller space.'
385
440
  },
386
441
  {
387
- id: 10,
442
+ id: 12,
388
443
  category: 'Charts',
389
- label: 'Sankey Diagram',
444
+ label: 'Horizontal Bar (Stacked)',
390
445
  type: 'chart',
391
- subType: 'Sankey',
392
- orientation: 'vertical',
393
- icon: <SankeyIcon />,
394
- content: 'Display a sankey diagram'
446
+ subType: 'Bar',
447
+ visualizationSubType: 'stacked',
448
+ orientation: 'horizontal',
449
+ icon: <HorizontalStackIcon />,
450
+ content: 'Use bars to show comparisons between data categories.'
395
451
  },
396
452
  {
397
- id: 11,
453
+ id: 4,
398
454
  category: 'Charts',
399
- label: 'Forecast Chart',
455
+ label: 'Line',
400
456
  type: 'chart',
401
- subType: 'Forecasting',
457
+ subType: 'Line',
402
458
  orientation: 'vertical',
403
- icon: <ForecastIcon />,
404
- content: 'Display a forecasting chart'
459
+ icon: <LineIcon />,
460
+ content: 'Present one or more data trends over time.'
405
461
  },
406
462
  {
407
- id: 12,
463
+ id: 5,
408
464
  category: 'Charts',
409
- label: 'Horizontal Bar (Stacked)',
465
+ label: 'Paired Bar',
410
466
  type: 'chart',
411
- subType: 'Bar',
412
- visualizationSubType: 'stacked',
467
+ subType: 'Paired Bar',
413
468
  orientation: 'horizontal',
414
- icon: <HorizontalStackIcon />,
415
- content: 'Use bars to show comparisons between data categories.'
469
+ icon: <PairedBarIcon />,
470
+ content: 'Use paired bars to show comparisons between two different data categories.'
416
471
  },
417
472
  {
418
473
  id: 13,
@@ -425,65 +480,67 @@ const buttons = [
425
480
  content: 'Present the numerical proportions of a data series.'
426
481
  },
427
482
  {
428
- id: 14,
483
+ id: 27,
429
484
  category: 'Charts',
430
- label: 'Deviation Bar',
485
+ label: 'Radar',
431
486
  type: 'chart',
432
- subType: 'Deviation Bar',
433
- orientation: 'Pie',
434
- icon: <DeviationIcon />,
435
- content: 'Use deviation bars to display how individual values differ from a target'
487
+ subType: 'Radar',
488
+ orientation: 'vertical',
489
+ icon: <RadarChartIcon />,
490
+ content: 'Compare multiple quantitative variables across categories using a radial layout.'
436
491
  },
437
492
  {
438
- id: 15,
439
- category: 'General',
440
- label: 'Dashboard',
441
- type: 'dashboard',
442
- subType: null,
443
- orientation: null,
444
- icon: <DashboardIcon />,
445
- content: 'Present multiple data visualizations with shared filter controls.'
493
+ id: 10,
494
+ category: 'Charts',
495
+ label: 'Sankey Diagram',
496
+ type: 'chart',
497
+ subType: 'Sankey',
498
+ orientation: 'vertical',
499
+ icon: <SankeyIcon />,
500
+ content: 'Display a sankey diagram'
446
501
  },
447
502
  {
448
- id: 16,
449
- category: 'General',
450
- label: 'Data Bite',
451
- type: 'data-bite',
452
- subType: null,
453
- orientation: null,
454
- icon: <DataBiteIcon />,
455
- content: 'Highlight a single aggregated value (e.g., sum or median).'
503
+ id: 8,
504
+ category: 'Charts',
505
+ label: 'Scatter Plot',
506
+ type: 'chart',
507
+ subType: 'Scatter Plot',
508
+ orientation: 'vertical',
509
+ icon: <ScatterPlotIcon />,
510
+ content: 'Display a scatter plot to explore relationships between numeric variables.'
456
511
  },
457
512
  {
458
- id: 17,
459
- category: 'General',
460
- label: 'Waffle Chart',
461
- type: 'waffle-chart',
462
- subType: 'Waffle',
463
- orientation: null,
464
- icon: <WaffleChartIcon />,
465
- content: 'Highlight a piece of data in relationship to a data set.'
513
+ id: 25,
514
+ category: 'Charts',
515
+ label: 'Warming Stripes',
516
+ type: 'chart',
517
+ subType: 'Warming Stripes',
518
+ orientation: 'vertical',
519
+ legend: {
520
+ position: 'bottom'
521
+ },
522
+ icon: <WarmingStripesIcon />,
523
+ content: 'Display temperature anomalies over time using color-coded vertical stripes.'
466
524
  },
525
+ // Maps - sorted by label
467
526
  {
468
- id: 18,
469
- category: 'General',
470
- label: 'Gauge Chart',
471
- type: 'waffle-chart',
472
- subType: 'Gauge',
473
- orientation: null,
474
- icon: <GaugeChartIcon />,
475
- content: `Specify the calculation of a single data point (such as a percentage value) and present it on a horizontal
476
- scale.`
527
+ id: 23,
528
+ category: 'Maps',
529
+ label: 'U.S. Geocode',
530
+ type: 'map',
531
+ subType: 'us-county',
532
+ generalType: 'us-geocode',
533
+ icon: <UsaIcon />,
534
+ content: 'United States GeoCode'
477
535
  },
478
536
  {
479
- id: 19,
537
+ id: 22,
480
538
  category: 'Maps',
481
- label: 'United States (State- or County-Level)',
539
+ label: 'U.S. State',
482
540
  type: 'map',
483
- subType: 'us',
484
- icon: <UsaIcon />,
485
- content: 'Present a U.S. choropleth map at state or county level.',
486
- position: 'right'
541
+ subType: 'single-state',
542
+ icon: <AlabamaGraphic />,
543
+ content: 'Present a choropleth map of an individual U.S. state.'
487
544
  },
488
545
  {
489
546
  id: 20,
@@ -495,6 +552,16 @@ const buttons = [
495
552
  content: 'Present a U.S. choropleth map at state or county level.',
496
553
  position: 'right'
497
554
  },
555
+ {
556
+ id: 19,
557
+ category: 'Maps',
558
+ label: 'United States (State- or County-Level)',
559
+ type: 'map',
560
+ subType: 'us',
561
+ icon: <UsaIcon />,
562
+ content: 'Present a U.S. choropleth map at state or county level.',
563
+ position: 'right'
564
+ },
498
565
  {
499
566
  id: 21,
500
567
  category: 'Maps',
@@ -503,32 +570,5 @@ const buttons = [
503
570
  subType: 'world',
504
571
  icon: <GlobeIcon />,
505
572
  content: 'Present a choropleth map of the world.'
506
- },
507
- {
508
- id: 22,
509
- category: 'Maps',
510
- label: 'U.S. State',
511
- type: 'map',
512
- subType: 'single-state',
513
- icon: <AlabamaGraphic />,
514
- content: 'Present a choropleth map of an individual U.S. state.'
515
- },
516
- {
517
- id: 23,
518
- category: 'Maps',
519
- label: 'U.S. Geocode',
520
- type: 'map',
521
- subType: 'us-county',
522
- generalType: 'us-geocode',
523
- icon: <UsaIcon />,
524
- content: 'United States GeoCode'
525
- },
526
- {
527
- id: 24,
528
- category: 'General',
529
- label: 'Data Table',
530
- type: 'table',
531
- subType: null,
532
- icon: <TableIcon />
533
573
  }
534
574
  ]
@@ -30,7 +30,12 @@ export default function ConfigureTab({ containerEl }) {
30
30
  </ErrorBoundary>
31
31
  )
32
32
  case 'waffle-chart':
33
- if (config.visualizationType === 'Waffle' || config.visualizationType === 'Gauge') {
33
+ if (
34
+ config.visualizationType === 'Waffle' ||
35
+ config.visualizationType === 'TP5 Waffle' ||
36
+ config.visualizationType === 'Gauge' ||
37
+ config.visualizationType === 'TP5 Gauge'
38
+ ) {
34
39
  return (
35
40
  <ErrorBoundary component='CdcWaffleChart'>
36
41
  <CdcWaffleChart isEditor={true} isDebug={isDebug} config={config} setConfig={setTempConfig} />
@@ -1,21 +1,31 @@
1
1
  import React, { useContext } from 'react'
2
2
  import SampleDataContext from './samples/SampleDataContext'
3
+ import { cityTemperature } from '@visx/mock-data'
3
4
 
4
5
  // Data Samples
5
- import validMapData from './samples/valid-data-map.csv?raw'
6
- import validMapDataFootnotes from './samples/valid-data-map-footnotes.csv?raw'
6
+ import pivotData from './samples/pivotData.json?raw'
7
+ import vaidWorldData from './samples/valid-world-data.json?raw'
8
+ import validAreaChart from './samples/valid-area-chart.json?raw'
9
+ import validBoxPlotData from './samples/valid-boxplot.csv?raw'
7
10
  import validChartData from './samples/valid-data-chart.csv?raw'
8
11
  import validCountyMapData from './samples/valid-county-data.csv?raw'
9
- import validGeoPoint from './samples/valid-geo-point.csv?raw'
10
- import validScatterPlot from './samples/valid-scatterplot.csv?raw'
11
- import validBoxPlotData from './samples/valid-boxplot.csv?raw'
12
- import validAreaChart from './samples/valid-area-chart.json?raw'
13
- import validWorldGeocodeData from './samples/valid-world-geocode.json?raw'
14
12
  import validForecastData from './samples/valid-forecast-data.csv?raw'
15
- import vaidWorldData from './samples/valid-world-data.json?raw'
13
+ import validGeoPoint from './samples/valid-geo-point.csv?raw'
14
+ import validHorizonData from './samples/valid-horizon-chart.json?raw'
15
+ import validMapData from './samples/valid-data-map.csv?raw'
16
+ import validMapDataFootnotes from './samples/valid-data-map-footnotes.csv?raw'
17
+ import validRadarData from './samples/valid-radar-chart.csv?raw'
16
18
  import validRegionData from './samples/valid-region-data.json?raw'
17
19
  import validSankeyData from './samples/valid-sankey-data.json?raw'
18
- import pivotData from './samples/pivotData.json?raw'
20
+ import validScatterPlot from './samples/valid-scatterplot.csv?raw'
21
+ import validWorldGeocodeData from './samples/valid-world-geocode.json?raw'
22
+
23
+ // Convert visx cityTemperature data to CSV format
24
+ const visxTemperatureData = (() => {
25
+ const headers = Object.keys(cityTemperature[0])
26
+ const rows = cityTemperature.map(row => Object.values(row).join(','))
27
+ return [headers.join(','), ...rows].join('\n')
28
+ })()
19
29
 
20
30
  // Add additional data to samples
21
31
  const sampleData = {
@@ -45,15 +55,30 @@ const sampleData = {
45
55
  fileName: 'valid-forecast-data.csv',
46
56
  data: validForecastData
47
57
  },
58
+ {
59
+ text: 'Horizon Chart Data',
60
+ fileName: 'valid-horizon-data.json',
61
+ data: validHorizonData
62
+ },
48
63
  {
49
64
  text: 'Sankey Chart Data',
50
65
  fileName: 'valid-sankey-data.json',
51
66
  data: validSankeyData
52
67
  },
68
+ {
69
+ text: 'Radar Chart Data (Program Comparison)',
70
+ fileName: 'valid-radar-chart.csv',
71
+ data: validRadarData
72
+ },
53
73
  {
54
74
  text: 'Pivot Table Data',
55
75
  fileName: 'pivotData.json',
56
76
  data: pivotData
77
+ },
78
+ {
79
+ text: 'Warming Stripes Temperature Data',
80
+ fileName: 'visx-temperature-data.csv',
81
+ data: visxTemperatureData
57
82
  }
58
83
  ],
59
84
  maps: [