@undp/data-viz 2.0.6 → 2.0.7

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 (62) hide show
  1. package/dist/ChoroplethMap.cjs +1 -1
  2. package/dist/ChoroplethMap.cjs.map +1 -1
  3. package/dist/ChoroplethMap.js +68 -68
  4. package/dist/ChoroplethMap.js.map +1 -1
  5. package/dist/GraphEl-BcKU0bG1.cjs +2 -0
  6. package/dist/GraphEl-BcKU0bG1.cjs.map +1 -0
  7. package/dist/{GraphEl-VtiYqELy.js → GraphEl-CGq1EWRn.js} +70 -8
  8. package/dist/GraphEl-CGq1EWRn.js.map +1 -0
  9. package/dist/GriddedGraphs.cjs +1 -1
  10. package/dist/GriddedGraphs.d.ts +6 -1
  11. package/dist/GriddedGraphs.js +2 -2
  12. package/dist/GriddedGraphsFromConfig.d.ts +6 -1
  13. package/dist/HybridMap.cjs +2 -0
  14. package/dist/HybridMap.cjs.map +1 -0
  15. package/dist/HybridMap.d.ts +211 -0
  16. package/dist/HybridMap.js +599 -0
  17. package/dist/HybridMap.js.map +1 -0
  18. package/dist/MultiGraphDashboard.d.ts +6 -1
  19. package/dist/MultiGraphDashboardFromConfig.d.ts +6 -1
  20. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +6 -1
  21. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +6 -1
  22. package/dist/PerformanceIntensiveScrollStory.d.ts +6 -1
  23. package/dist/ScrollStory.d.ts +6 -1
  24. package/dist/SingleGraphDashboard.cjs +1 -1
  25. package/dist/SingleGraphDashboard.d.ts +6 -1
  26. package/dist/SingleGraphDashboard.js +2 -2
  27. package/dist/SingleGraphDashboardFromConfig.d.ts +6 -1
  28. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +5 -0
  29. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +5 -0
  30. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  31. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +5 -0
  32. package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
  33. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +5 -0
  34. package/dist/Types.d.ts +17 -1
  35. package/dist/getSchema.cjs +1 -1
  36. package/dist/getSchema.cjs.map +1 -1
  37. package/dist/getSchema.d.ts +3 -3
  38. package/dist/getSchema.js +4 -0
  39. package/dist/getSchema.js.map +1 -1
  40. package/dist/index.cjs +1 -1
  41. package/dist/index.d.ts +353 -220
  42. package/dist/index.js +163 -161
  43. package/dist/index.js.map +1 -1
  44. package/dist/transformData.cjs +1 -1
  45. package/dist/transformData.d.ts +1 -1
  46. package/dist/transformData.js +2 -2
  47. package/dist/{transformDataForAggregation-CE3bAlHU.js → transformDataForAggregation-CjwEAUOR.js} +62 -31
  48. package/dist/transformDataForAggregation-CjwEAUOR.js.map +1 -0
  49. package/dist/transformDataForAggregation-DAGK2BZy.cjs +2 -0
  50. package/dist/transformDataForAggregation-DAGK2BZy.cjs.map +1 -0
  51. package/dist/{transformDataForGraphFromFile-DaJHQCsL.cjs → transformDataForGraphFromFile-B1zJSPRP.cjs} +2 -2
  52. package/dist/{transformDataForGraphFromFile-DaJHQCsL.cjs.map → transformDataForGraphFromFile-B1zJSPRP.cjs.map} +1 -1
  53. package/dist/{transformDataForGraphFromFile-BExxcITV.js → transformDataForGraphFromFile-D5TMQYYd.js} +2 -2
  54. package/dist/{transformDataForGraphFromFile-BExxcITV.js.map → transformDataForGraphFromFile-D5TMQYYd.js.map} +1 -1
  55. package/dist/validateSchema.d.ts +1 -1
  56. package/package.json +6 -1
  57. package/dist/GraphEl-D5RBCD7p.cjs +0 -2
  58. package/dist/GraphEl-D5RBCD7p.cjs.map +0 -1
  59. package/dist/GraphEl-VtiYqELy.js.map +0 -1
  60. package/dist/transformDataForAggregation-CE3bAlHU.js.map +0 -1
  61. package/dist/transformDataForAggregation-KXGm6flX.cjs +0 -2
  62. package/dist/transformDataForAggregation-KXGm6flX.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ChoroplethMap.js","sources":["../src/Components/Graphs/Maps/ChoroplethMap/Graph.tsx","../src/Components/Graphs/Maps/ChoroplethMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleThreshold, scaleOrdinal } from 'd3-scale';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport {\r\n AnimateDataType,\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { X } from '@/Components/Icons';\r\n\r\ninterface Props {\r\n colorDomain: (number | string)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData: any;\r\n width: number;\r\n height: number;\r\n colors: string[];\r\n colorLegendTitle?: string;\r\n categorical: boolean;\r\n data: ChoroplethMapDataType[];\r\n scale: number;\r\n centerPoint?: [number, number];\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n mapBorderColor: string;\r\n isWorldMap: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedIds: string[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapProperty: string;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n collapseColorScaleByDefault?: boolean;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colorDomain,\r\n colors,\r\n mapData,\r\n colorLegendTitle,\r\n categorical,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedIds,\r\n onSeriesMouseClick,\r\n mapProperty,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n collapseColorScaleByDefault,\r\n } = props;\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const bounds = bbox(mapData as any);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const center = centerOfMass(mapData as any);\r\n const lonDiff = bounds[2] - bounds[0];\r\n const latDiff = bounds[3] - bounds[1];\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData.features.map((d: any, i: number) => {\r\n const index = data.findIndex(el => el.id === d.properties[mapProperty]);\r\n if (index !== -1) return null;\r\n return (\r\n <g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })}\r\n </g>\r\n );\r\n })\r\n }\r\n <AnimatePresence>\r\n {data.map(d => {\r\n const index = mapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n const color = !checkIfNullOrUndefined(d.x)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.x as any)\r\n : mapNoDataColor;\r\n return (\r\n <motion.g\r\n key={d.id}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.id) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n >\r\n {index === -1\r\n ? null\r\n : mapData.features[index].geometry.type === 'MultiPolygon'\r\n ? mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1)\r\n path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <motion.path\r\n key={`${d.id}-${j}`}\r\n d={masterPath}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )\r\n : mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <motion.path\r\n key={`${d.id}-${j}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {mouseOverData\r\n ? mapData.features\r\n .filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: { properties: any }) => d.properties[mapProperty] === mouseOverData.id,\r\n )\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .map((d: any, i: number) => {\r\n return (\r\n <g key={i}>\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1)\r\n path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n }}\r\n />\r\n );\r\n })}\r\n </g>\r\n );\r\n })\r\n : null}\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {colorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={\r\n selectedColor === colors[i]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }\r\n style={{\r\n fill: colors[i],\r\n ...(selectedColor === colors[i] ? {} : { stroke: colors[i] }),\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(d as number, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\r\n : { stroke: colors[colorDomain.length] }),\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\r\n ) : null}\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent } from 'react';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { ascending, sort } from 'd3-array';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n ChoroplethMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ScaleDataType,\r\n MapProjectionTypes,\r\n ZoomInteractionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { getUniqValue } from '@/Utils/getUniqValue';\r\nimport { getJenks } from '@/Utils/getJenks';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: ChoroplethMapDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Colors for the choropleth map */\r\n colors?: string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: number[] | string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Scale for the colors */\r\n scaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Toggle visibility of color scale. */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function ChoroplethMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = 'The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.',\r\n colorDomain,\r\n colorLegendTitle,\r\n scaleType = 'threshold',\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedIds = [],\r\n onSeriesMouseClick,\r\n mapProperty = 'ISO3',\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = sort(\r\n uniqBy(data, 'date', true).map(d =>\r\n parse(`${d}`, timeline.dateFormat || 'yyyy', new Date()).getTime(),\r\n ),\r\n (a, b) => ascending(a, b),\r\n );\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n\r\n const domain =\r\n colorDomain ||\r\n (scaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? d.date === format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => el.properties.NAME !== 'Antarctica',\r\n ),\r\n }\r\n }\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (scaleType === 'categorical'\r\n ? Colors[theme].sequentialColors[\r\n `neutralColorsx0${domain.length as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n colorLegendTitle={colorLegendTitle}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n categorical={scaleType === 'categorical'}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n mapProperty={mapProperty}\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n classNames={classNames}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n zoomInteraction={zoomInteraction}\r\n dimmedOpacity={dimmedOpacity}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n customLayers={customLayers}\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["Graph","props","data","colorDomain","colors","mapData","colorLegendTitle","categorical","height","width","scale","centerPoint","tooltip","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedIds","onSeriesMouseClick","mapProperty","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","collapseColorScaleByDefault","selectedColor","setSelectedColor","useState","undefined","zoomRef","useRef","showLegend","setShowLegend","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","colorScale","scaleOrdinal","domain","range","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","filter","on","transform","attr","call","bounds","bbox","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","d","position","map","layer","features","i","findIndex","el","id","properties","length","indexOf","j","masterPath","forEach","geo","path","c","k","point","stroke","strokeWidth","fill","AnimatePresence","index","color","checkIfNullOrUndefined","x","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","fillOpacity","cn","colorLegend","X","P","display","WebkitLineClamp","WebkitBoxOrient","backgroundColor","textAnchor","numberFormattingFunction","Modal","__html","string2HTML","Tooltip","ChoroplethMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","scaleType","t2","t3","padding","t4","t5","t6","t7","relativeHeight","isWorldMap","t8","t9","t10","graphID","t11","t12","graphDownload","t13","dataDownload","t14","showAntarctica","t15","language","t16","minHeight","t17","theme","t18","ariaLabel","t19","t20","t21","t22","t23","timeline","t24","Colors","light","graphNoData","grays","t25","t26","t27","enabled","autoplay","showOnlyActiveDate","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","uniqDatesSorted","sort","uniqBy","parse","dateFormat","Date","getTime","_temp","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","t28","t29","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t30","shape","onUpdateShape","useEffectEvent","t31","fetchAndParseJSON","then","d_0","t32","t33","getUniqValue","getJenks","_temp2","interval","setInterval","speed","clearInterval","markObj","getSliderMarks","t34","graphContainer","t35","t36","description","title","GraphHeader","_temp3","_temp4","_temp5","_temp6","_temp7","t37","Pause","Play","SliderUI","nextValue","nextValue_0","t38","GraphArea","d_7","date","format","_temp8","sequentialColors","max","Spinner","t39","footnote","source","GraphFooter","t40","GraphContainer","NAME","d_4","d_3","d_2","d_6","d_5","d_1","a","b","ascending"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0EO,SAASA,GAAMC,GAAc;AAClC,QAAM;AAAA,IACJC,MAAAA;AAAAA,IACAC,a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;AAjGjD,SAAA6F,GAAA6E,GAAAC,GAAA;AAAA,SA0DOC,GAAUF,GAAGC,CAAC;AAAC;"}
1
+ {"version":3,"file":"ChoroplethMap.js","sources":["../src/Components/Graphs/Maps/ChoroplethMap/Graph.tsx","../src/Components/Graphs/Maps/ChoroplethMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleThreshold, scaleOrdinal } from 'd3-scale';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport {\r\n AnimateDataType,\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { X } from '@/Components/Icons';\r\n\r\ninterface Props {\r\n colorDomain: (number | string)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData: any;\r\n width: number;\r\n height: number;\r\n colors: string[];\r\n colorLegendTitle?: string;\r\n categorical: boolean;\r\n data: ChoroplethMapDataType[];\r\n scale: number;\r\n centerPoint?: [number, number];\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n mapBorderColor: string;\r\n isWorldMap: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedIds: string[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapProperty: string;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n collapseColorScaleByDefault?: boolean;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colorDomain,\r\n colors,\r\n mapData,\r\n colorLegendTitle,\r\n categorical,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedIds,\r\n onSeriesMouseClick,\r\n mapProperty,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n collapseColorScaleByDefault,\r\n } = props;\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const bounds = bbox(mapData as any);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const center = centerOfMass(mapData as any);\r\n const lonDiff = bounds[2] - bounds[0];\r\n const latDiff = bounds[3] - bounds[1];\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData.features.map((d: any, i: number) => {\r\n const index = data.findIndex(el => el.id === d.properties[mapProperty]);\r\n if (index !== -1) return null;\r\n return (\r\n <g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })}\r\n </g>\r\n );\r\n })\r\n }\r\n <AnimatePresence>\r\n {data.map(d => {\r\n const index = mapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n const color = !checkIfNullOrUndefined(d.x)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.x as any)\r\n : mapNoDataColor;\r\n return (\r\n <motion.g\r\n key={d.id}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.id) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n >\r\n {index === -1\r\n ? null\r\n : mapData.features[index].geometry.type === 'MultiPolygon'\r\n ? mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1)\r\n path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <motion.path\r\n key={`${d.id}-${j}`}\r\n d={masterPath}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )\r\n : mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <motion.path\r\n key={`${d.id}-${j}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {mouseOverData\r\n ? mapData.features\r\n .filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: { properties: any }) => d.properties[mapProperty] === mouseOverData.id,\r\n )\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .map((d: any, i: number) => {\r\n return (\r\n <g key={i}>\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1)\r\n path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n }}\r\n />\r\n );\r\n })}\r\n </g>\r\n );\r\n })\r\n : null}\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {colorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={\r\n selectedColor === colors[i]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }\r\n style={{\r\n fill: colors[i],\r\n ...(selectedColor === colors[i] ? {} : { stroke: colors[i] }),\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(d as number, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\r\n : { stroke: colors[colorDomain.length] }),\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\r\n ) : null}\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent } from 'react';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { ascending, sort } from 'd3-array';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n ChoroplethMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ScaleDataType,\r\n MapProjectionTypes,\r\n ZoomInteractionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { getUniqValue } from '@/Utils/getUniqValue';\r\nimport { getJenks } from '@/Utils/getJenks';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: ChoroplethMapDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Colors for the choropleth map */\r\n colors?: string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: number[] | string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Scale for the colors */\r\n scaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Toggle visibility of color scale. */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function ChoroplethMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = 'The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.',\r\n colorDomain,\r\n colorLegendTitle,\r\n scaleType = 'threshold',\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedIds = [],\r\n onSeriesMouseClick,\r\n mapProperty = 'ISO3',\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = sort(\r\n uniqBy(data, 'date', true).map(d =>\r\n parse(`${d}`, timeline.dateFormat || 'yyyy', new Date()).getTime(),\r\n ),\r\n (a, b) => ascending(a, b),\r\n );\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n\r\n const domain =\r\n colorDomain ||\r\n (scaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? d.date === format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => el.properties.NAME !== 'Antarctica',\r\n ),\r\n }\r\n }\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (scaleType === 'categorical'\r\n ? Colors[theme].categoricalColors.colors\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n colorLegendTitle={colorLegendTitle}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n categorical={scaleType === 'categorical'}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n mapProperty={mapProperty}\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n classNames={classNames}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n zoomInteraction={zoomInteraction}\r\n dimmedOpacity={dimmedOpacity}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n customLayers={customLayers}\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["Graph","props","data","colorDomain","colors","mapData","colorLegendTitle","categorical","height","width","scale","centerPoint","tooltip","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedIds","onSeriesMouseClick","mapProperty","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","collapseColorScaleByDefault","selectedColor","setSelectedColor","useState","undefined","zoomRef","useRef","showLegend","setShowLegend","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","colorScale","scaleOrdinal","domain","range","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","filter","on","transform","attr","call","bounds","bbox","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","d","position","map","layer","features","i","findIndex","el","id","properties","length","indexOf","j","masterPath","forEach","geo","path","c","k","point","stroke","strokeWidth","fill","AnimatePresence","index","color","checkIfNullOrUndefined","x","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","fillOpacity","cn","colorLegend","X","P","display","WebkitLineClamp","WebkitBoxOrient","backgroundColor","textAnchor","numberFormattingFunction","Modal","__html","string2HTML","Tooltip","ChoroplethMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","scaleType","t2","t3","padding","t4","t5","t6","t7","relativeHeight","isWorldMap","t8","t9","t10","graphID","t11","t12","graphDownload","t13","dataDownload","t14","showAntarctica","t15","language","t16","minHeight","t17","theme","t18","ariaLabel","t19","t20","t21","t22","t23","timeline","t24","Colors","light","graphNoData","grays","t25","t26","t27","enabled","autoplay","showOnlyActiveDate","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","uniqDatesSorted","sort","uniqBy","parse","dateFormat","Date","getTime","_temp","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","t28","t29","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t30","shape","onUpdateShape","useEffectEvent","t31","fetchAndParseJSON","then","d_0","t32","t33","getUniqValue","getJenks","_temp2","interval","setInterval","speed","clearInterval","markObj","getSliderMarks","t34","graphContainer","t35","t36","description","title","GraphHeader","_temp3","_temp4","_temp5","_temp6","_temp7","t37","Pause","Play","SliderUI","nextValue","nextValue_0","t38","GraphArea","d_7","date","format","_temp8","categoricalColors","sequentialColors","max","Spinner","t39","footnote","source","GraphFooter","t40","GraphContainer","NAME","d_4","d_3","d_2","d_6","d_5","d_1","a","b","ascending"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0EO,SAASA,GAAMC,GAAc;AAClC,QAAM;AAAA,IACJC,MAAAA;AAAAA,IACAC,aAAAA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AAA,SA0DOC,GAAUF,GAAGC,CAAC;AAAC;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const c=require("./index-CHPV5EwG-CTPQjnHt.cjs"),y=require("./Typography-DX7PlgQU.cjs"),S=require("./ButterflyChart.cjs"),V=require("./index-xRHRLDIp.cjs"),N=require("./DataTable.cjs"),H=require("./DonutChart.cjs"),A=require("./HeatMap.cjs"),v=require("./Histogram.cjs"),B=require("./DualAxisLineChart.cjs"),P=require("./SimpleLineChart.cjs"),I=require("./MultiLineChart.cjs"),W=require("./MultiLineAltChart.cjs"),j=require("./SparkLine.cjs"),q=require("./BiVariateChoroplethMap.cjs"),z=require("./ChoroplethMap.cjs"),F=require("./DotDensityMap.cjs"),E=require("./ParetoChart.cjs"),R=require("./ScatterPlot.cjs"),X=require("./SlopeChart.cjs"),Y=require("./AreaChart.cjs"),G=require("./StatCardFromData.cjs"),$=require("./TreeMapGraph.cjs"),_=require("./UnitChart.cjs"),U=require("./DifferenceLineChart.cjs"),J=require("./SankeyChart.cjs"),K=require("./LineChartWithConfidenceInterval.cjs"),Q=require("./DataCards.cjs"),x=require("./BarGraph.cjs"),Z=require("./DumbbellChart.cjs"),ee=require("./StripChart.cjs"),ae=require("./BeeSwarmChart.cjs"),te=require("./RadarChart.cjs"),oe=require("./BulletChart.cjs"),ie=require("./HybridMap.cjs"),r=require("./checkIfMultiple-wg6hJLXy.cjs");function re(L){const a=c.compilerRuntimeExports.c(24),{settings:e,graph:s,graphData:t,debugMode:M,graphDataConfiguration:o,readableHeader:i,updateFilters:n}=L;if(M&&(console.log(`Graph: ${s}`),console.log("Transformed data:",t),console.log("Settings:",e)),typeof t=="string"){const d=`flex my-0 mx-auto grow flex-col justify-center ${e?.width?"w-fit":"w-full"}`;let l;a[0]===Symbol.for("react.memo_cache_sentinel")?(l={height:"inherit"},a[0]=l):l=a[0];let h;a[1]!==t?(h=c.jsxRuntimeExports.jsx(y.j,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:t}),a[1]=t,a[2]=h):h=a[2];let b;return a[3]!==d||a[4]!==h?(b=c.jsxRuntimeExports.jsx("div",{className:d,style:l,children:h}),a[3]=d,a[4]=h,a[5]=b):b=a[5],b}let p;a[6]===Symbol.for("react.memo_cache_sentinel")?(p={barChart:x.SimpleBarGraph,bulletChart:oe.BulletChart,groupedBarChart:x.GroupedBarGraph,stackedBarChart:x.StackedBarGraph,lineChart:P.SimpleLineChart,dualAxisLineChart:B.DualAxisLineChart,multiLineChart:I.MultiLineChart,multiLineAltChart:W.MultiLineAltChart,stackedAreaChart:Y.AreaChart,choroplethMap:z.ChoroplethMap,biVariateChoroplethMap:q.BiVariateChoroplethMap,dotDensityMap:F.DotDensityMap,donutChart:H.DonutChart,slopeChart:X.SlopeChart,scatterPlot:R.ScatterPlot,dumbbellChart:Z.DumbbellChart,treeMap:$.TreeMapGraph,circlePacking:V.CirclePackingGraph,heatMap:A.HeatMap,stripChart:ee.StripChart,beeSwarmChart:ae.BeeSwarmChart,butterflyChart:S.ButterflyChart,histogram:v.Histogram,sparkLine:j.SparkLine,paretoChart:E.ParetoChart,dataTable:N.DataTable,statCard:G.StatCardFromData,unitChart:_.UnitChart,differenceLineChart:U.DifferenceLineChart,sankeyChart:J.SankeyChart,lineChartWithConfidenceInterval:K.LineChartWithConfidenceInterval,dataCards:Q.DataCards,radarChart:te.RadarChart,hybridMap:ie.HybridMap},a[6]=p):p=a[6];const O=p;let m;a[7]!==t||a[8]!==o||a[9]!==i||a[10]!==e||a[11]!==n?(m=d=>{switch(d){case"barChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,height:e?.height,width:e?.width,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,maxValue:e?.maxValue,minValue:e?.minValue,labelOrder:e?.labelOrder,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,sortData:e?.sortData,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.label)},resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,filterNA:e?.filterNA,animate:e?.animate,naLabel:e?.naLabel};case"groupedBarChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,sortParameter:e?.sortParameter,sortData:e?.sortData,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,showColorScale:e?.showColorScale,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain||r.getValues("size",o||[],i||[]),colorLegendTitle:e?.colorLegendTitle,suffix:e?.suffix,prefix:e?.prefix,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,showLabels:e?.showLabels,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,labelOrder:e?.labelOrder,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,ariaLabel:e?.ariaLabel,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,naLabel:e?.naLabel};case"stackedBarChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,showColorScale:e?.showColorScale,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain||r.getValues("size",o||[],i||[]),colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,suffix:e?.suffix,prefix:e?.prefix,labelOrder:e?.labelOrder,showValues:e?.showValues,showLabels:e?.showLabels,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,maxValue:e?.maxValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,sortParameter:e?.sortParameter,sortData:e?.sortData,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,naLabel:e?.naLabel};case"bulletChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,data:t,barColor:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,height:e?.height,width:e?.width,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,maxValue:e?.maxValue,minValue:e?.minValue,labelOrder:e?.labelOrder,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,sortData:e?.sortData,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.label)},resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,filterNA:e?.filterNA,qualitativeRangeColors:e?.qualitativeRangeColors,targetStyle:e?.targetStyle,targetColor:e?.targetColor,measureBarWidthFactor:e?.measureBarWidthFactor,animate:e?.animate,naLabel:e?.naLabel};case"lineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,curveType:e?.curveType,data:t,graphID:e?.graphID,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames};case"lineChartWithConfidenceInterval":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,curveType:e?.curveType,graphID:e?.graphID,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,showIntervalDots:e?.showIntervalDots,showIntervalValues:e?.showIntervalValues,intervalLineStrokeWidth:e?.intervalLineStrokeWidth,intervalLineColors:e?.intervalLineColors,intervalAreaColor:e?.intervalAreaColor,intervalAreaOpacity:e?.intervalAreaOpacity,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,colorLegendTitle:e?.colorLegendTitle,colorLegendColors:e?.colorLegendColors,colorLegendDomain:e?.colorLegendDomain,styles:e?.styles,classNames:e?.classNames};case"dualAxisLineChart":return{showAxisLabels:e?.showAxisLabels,showColorScale:e?.showColorScale,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,curveType:e?.curveType,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,labels:e?.labels||[r.getValues("y1",o||[],i||[]),r.getValues("y2",o||[],i||[])],footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,lineColors:e?.lineColors,sameAxes:e?.sameAxes,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,ariaLabel:e?.ariaLabel,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,lineSuffixes:e?.lineSuffixes,linePrefixes:e?.linePrefixes,styles:e?.styles,classNames:e?.classNames};case"multiLineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,data:t,curveType:e?.curveType,lineColors:e?.lineColors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,showColorScale:e?.showColorScale,labels:e?.labels||r.getValues("y",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,showValues:e?.showValues,relativeHeight:e?.relativeHeight,showColorLegendAtTop:e?.showColorLegendAtTop,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,highlightedLines:e?.highlightedLines,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames,dashedLines:e?.dashedLines,dashSettings:e?.dashSettings,labelsToBeHidden:e?.labelsToBeHidden};case"multiLineAltChart":return{naLabel:e?.naLabel,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,dimmedOpacity:e?.dimmedOpacity,curveType:e?.curveType,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,showLabels:e?.showLabels,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,highlightedLines:e?.highlightedLines,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames,colorDomain:e?.colorDomain,showNAColor:e?.showNAColor};case"differenceLineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,curveType:e?.curveType,lineColors:e?.lineColors,diffAreaColors:e?.diffAreaColors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,labels:e?.labels||[r.getValues("y1",o||[],i||[]),r.getValues("y2",o||[],i||[])],backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,showValues:e?.showValues,relativeHeight:e?.relativeHeight,showColorLegendAtTop:e?.showColorLegendAtTop,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames};case"stackedAreaChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:t,curveType:e?.curveType,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,colorDomain:e?.colorDomain||r.getValues("y",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,colorLegendTitle:e?.colorLegendTitle,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,relativeHeight:e?.relativeHeight,bottomMargin:e?.bottomMargin,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showColorScale:e?.showColorScale,language:e?.language,minHeight:e?.minHeight,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,suffix:e?.suffix,prefix:e?.prefix,styles:e?.styles,classNames:e?.classNames};case"choroplethMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,collapseColorScaleByDefault:e?.collapseColorScaleByDefault,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,mapData:e?.mapData,mapProjection:e?.mapProjection,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,colorDomain:e?.colorDomain,colors:e?.colors,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("x",o||[],i||[]),scaleType:e?.scaleType,data:t,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,mapBorderColor:e?.mapBorderColor,relativeHeight:e?.relativeHeight,padding:e?.padding,isWorldMap:e?.isWorldMap,tooltip:e?.tooltip,showColorScale:e?.showColorScale,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedIds:e?.highlightedIds,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,mapProperty:e?.mapProperty,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.id)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"biVariateChoroplethMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,collapseColorScaleByDefault:e?.collapseColorScaleByDefault,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,mapData:e?.mapData,mapProjection:e?.mapProjection,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,xColorLegendTitle:Object.keys(e||{}).indexOf("xColorLegendTitle")!==-1?e?.xColorLegendTitle:r.getValues("x",o||[],i||[]),yColorLegendTitle:Object.keys(e||{}).indexOf("yColorLegendTitle")!==-1?e?.yColorLegendTitle:r.getValues("y",o||[],i||[]),xDomain:e?.xDomain,yDomain:e?.yDomain,colors:e?.colors,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,padding:e?.padding,mapBorderColor:e?.mapBorderColor,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,isWorldMap:e?.isWorldMap,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedIds:e?.highlightedIds,mapProperty:e?.mapProperty,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.id)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"dotDensityMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,collapseColorScaleByDefault:e?.collapseColorScaleByDefault,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,mapData:e?.mapData,mapProjection:e?.mapProjection,graphDescription:e?.graphDescription,footNote:e?.footNote,maxRadiusValue:e?.maxRadiusValue,width:e?.width,height:e?.height,radius:e?.radius,sources:e?.sources,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),data:t,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,mapBorderColor:e?.mapBorderColor,padding:e?.padding,showLabels:e?.showLabels,relativeHeight:e?.relativeHeight,isWorldMap:e?.isWorldMap,tooltip:e?.tooltip,showColorScale:e?.showColorScale,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"hybridMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,collapseColorScaleByDefault:e?.collapseColorScaleByDefault,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,mapData:e?.mapData,mapProjection:e?.mapProjection,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,colorDomain:e?.colorDomain,colors:e?.colors,mapColorLegendTitle:Object.keys(e||{}).indexOf("mapColorLegendTitle")!==-1?e?.mapColorLegendTitle:r.getValues("x",o||[],i||[]),choroplethScaleType:e?.choroplethScaleType,data:t,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,mapBorderColor:e?.mapBorderColor,relativeHeight:e?.relativeHeight,padding:e?.padding,isWorldMap:e?.isWorldMap,tooltip:e?.tooltip,showColorScale:e?.showColorScale,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedIds:e?.highlightedIds,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,mapProperty:e?.mapProperty,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.id)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate,maxRadiusValue:e?.maxRadiusValue,radius:e?.radius,showLabels:e?.showLabels,highlightedDataPoints:e?.highlightedDataPoints,dotLegendTitle:e?.dotLegendTitle,dotColor:e?.dotColor,dotBorderColor:e?.dotBorderColor,labelColor:e?.labelColor};case"donutChart":return{precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,mainText:e?.mainText,data:t,colors:e?.colors,graphTitle:e?.graphTitle,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,graphDescription:e?.graphDescription,subNote:e?.subNote,footNote:e?.footNote,radius:e?.radius,strokeWidth:e?.strokeWidth,showColorScale:e?.showColorScale,backgroundColor:e?.backgroundColor,padding:e?.padding,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,colorDomain:e?.colorDomain,sortData:e?.sortData,language:e?.language,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,ariaLabel:e?.ariaLabel,legendMaxWidth:e?.legendMaxWidth,onSeriesMouseClick:l=>{n?.(l.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,colorScaleMaxWidth:e?.colorScaleMaxWidth};case"slopeChart":return{customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),radius:e?.radius,axisTitles:e?.axisTitles,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightedDataPoints:e?.highlightedDataPoints,showColorScale:e?.showColorScale,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"scatterPlot":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),radius:e?.radius,xAxisTitle:Object.keys(e||{}).indexOf("xAxisTitle")!==-1?e?.xAxisTitle:r.getValues("x",o||[],i||[]),yAxisTitle:Object.keys(e||{}).indexOf("yAxisTitle")!==-1?e?.yAxisTitle:r.getValues("y",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refXValues:e?.refXValues,refYValues:e?.refYValues,highlightedDataPoints:e?.highlightedDataPoints,highlightAreaSettings:e?.highlightAreaSettings,showColorScale:e?.showColorScale,graphID:e?.graphID,maxRadiusValue:e?.maxRadiusValue,maxXValue:e?.maxXValue,minXValue:e?.minXValue,maxYValue:e?.maxYValue,minYValue:e?.minYValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,noOfXTicks:e?.noOfXTicks,noOfYTicks:e?.noOfYTicks,labelColor:e?.labelColor,xSuffix:e?.xSuffix,ySuffix:e?.ySuffix,xPrefix:e?.xPrefix,yPrefix:e?.yPrefix,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dumbbellChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,refValues:e?.refValues,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,truncateBy:e?.truncateBy,labelOrder:e?.labelOrder,showColorScale:e?.showColorScale,colorDomain:e?.colorDomain||r.getValues("x",o||[],i||[]),colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,padding:e?.padding,radius:e?.radius,relativeHeight:e?.relativeHeight,showValues:e?.showValues,showLabels:e?.showLabels,tooltip:e?.tooltip,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,suffix:e?.suffix,prefix:e?.prefix,language:e?.language,minHeight:e?.minHeight,sortParameter:e?.sortParameter,sortData:e?.sortData,arrowConnector:e?.arrowConnector,connectorStrokeWidth:e?.connectorStrokeWidth,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,axisTitle:e?.axisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,highlightedDataPoints:e?.highlightedDataPoints,dimmedOpacity:e?.dimmedOpacity};case"treeMap":return{precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,tooltip:e?.tooltip,showColorScale:e?.showColorScale,showValues:e?.showValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,onSeriesMouseClick:l=>{n?.(l.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"circlePacking":return{precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,tooltip:e?.tooltip,showColorScale:e?.showColorScale,showValues:e?.showValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,radius:e?.radius,maxRadiusValue:e?.maxRadiusValue,onSeriesMouseClick:l=>{n?.(l.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"heatMap":return{precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,scaleType:e?.scaleType,colorDomain:e?.colorDomain,showColumnLabels:e?.showColumnLabels,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,suffix:e?.suffix,prefix:e?.prefix,showValues:e?.showValues,showRowLabels:e?.showRowLabels,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,noDataColor:e?.noDataColor,showColorScale:e?.showColorScale,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"stripChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),radius:e?.radius,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightedDataPoints:e?.highlightedDataPoints,showColorScale:e?.showColorScale,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,noOfTicks:e?.noOfTicks,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,prefix:e?.prefix,suffix:e?.suffix,stripType:e?.stripType,valueColor:e?.valueColor,language:e?.language,minHeight:e?.minHeight,highlightColor:e?.highlightColor,dotOpacity:e?.dotOpacity,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"beeSwarmChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:r.getValues("color",o||[],i||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,radius:e?.radius,maxRadiusValue:e?.maxRadiusValue,maxValue:e?.maxValue,minValue:e?.minValue,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,orientation:e?.orientation,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"butterflyChart":return{naLabel:e?.naLabel,timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,leftBarTitle:Object.keys(e||{}).indexOf("leftBarTitle")!==-1?e?.leftBarTitle:r.getValues("leftBar",o||[],i||[]),rightBarTitle:Object.keys(e||{}).indexOf("rightBarTitle")!==-1?e?.rightBarTitle:r.getValues("rightBar",o||[],i||[]),footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,barColors:e?.barColors,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,barPadding:e?.barPadding,truncateBy:e?.truncateBy,suffix:e?.suffix,prefix:e?.prefix,showTicks:e?.showTicks,showValues:e?.showValues,centerGap:e?.centerGap,maxValue:e?.maxValue,minValue:e?.minValue,showColorScale:e?.showColorScale,refValues:e?.refValues,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"histogram":return{precision:e?.precision,theme:e?.theme,data:t,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,maxValue:e?.maxValue,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,numberOfBins:e?.numberOfBins,truncateBy:e?.truncateBy,donutStrokeWidth:e?.donutStrokeWidth,sortData:e?.sortData,barGraphLayout:e?.barGraphLayout,graphType:e?.graphType,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames};case"sparkLine":return{customLayers:e?.customLayers,theme:e?.theme,data:t,curveType:e?.curveType,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,dateFormat:e?.dateFormat,area:e?.area,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,styles:e?.styles,classNames:e?.classNames};case"paretoChart":return{showAxisLabels:e?.showAxisLabels,showColorScale:e?.showColorScale,naLabel:e?.naLabel,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,showValues:e?.showValues,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,barTitle:Object.keys(e||{}).indexOf("barTitle")!==-1?e?.barTitle:r.getValues("barTitle",o||[],i||[]),lineTitle:Object.keys(e||{}).indexOf("lineTitle")!==-1?e?.lineTitle:r.getValues("lineTitle",o||[],i||[]),footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,barColor:e?.barColor,curveType:e?.curveType,lineColor:e?.lineColor,sameAxes:e?.sameAxes,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,barPadding:e?.barPadding,truncateBy:e?.truncateBy,showLabels:e?.showLabels,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,noOfTicks:e?.noOfTicks,lineSuffix:e?.lineSuffix,barSuffix:e?.barSuffix,linePrefix:e?.lineSuffix,barPrefix:e?.barPrefix,barAxisTitle:e?.barAxisTitle,lineAxisTitle:e?.lineAxisTitle,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dataTable":return{naLabel:e?.naLabel,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,sources:e?.sources,graphDescription:e?.graphDescription,footNote:e?.footNote,graphID:e?.graphID,width:e?.width,height:e?.height,columnData:e?.columnData||[],data:t,language:e?.language,ariaLabel:e?.ariaLabel,minWidth:e?.minWidth,backgroundColor:e?.backgroundColor,padding:e?.padding,styles:e?.styles,classNames:e?.classNames};case"statCard":return{precision:e?.precision,theme:e?.theme,year:e?.year,data:t,graphTitle:e?.graphTitle||"",graphDescription:e?.graphDescription,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources||[],footNote:e?.footNote,backgroundColor:e?.backgroundColor,padding:e?.padding,graphID:e?.graphID,aggregationMethod:e?.aggregationMethod,language:e?.language,minHeight:e?.minHeight,countOnly:e?.countOnly,ariaLabel:e?.ariaLabel,textBackground:e?.textBackground,headingFontSize:e?.headingFontSize,centerAlign:e?.centerAlign,verticalAlign:e?.verticalAlign,styles:e?.styles,classNames:e?.classNames,layout:e?.layout};case"unitChart":return{precision:e?.precision,theme:e?.theme,totalNoOfDots:e?.totalNoOfDots,gridSize:e?.gridSize,unitPadding:e?.unitPadding,size:e?.size,graphTitle:e?.graphTitle,sources:e?.sources,colors:e?.colors,graphDescription:e?.graphDescription,footNote:e?.footNote,backgroundColor:e?.backgroundColor,padding:e?.padding,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,showColorScale:e?.showColorScale,showStrokeForWhiteDots:e?.showStrokeForWhiteDots,note:e?.note,data:t,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,ariaLabel:e?.ariaLabel,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"sankeyChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:t,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,truncateBy:e?.truncateBy,padding:e?.padding,backgroundColor:e?.backgroundColor,tooltip:e?.tooltip,suffix:e?.suffix,prefix:e?.prefix,relativeHeight:e?.relativeHeight,showValues:e?.showValues,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,sourceColors:e?.sourceColors,targetColors:e?.targetColors,sourceColorDomain:e?.sourceColorDomain,targetColorDomain:e?.targetColorDomain,nodePadding:e?.nodePadding,nodeWidth:e?.nodeWidth,highlightedSourceDataPoints:e?.highlightedSourceDataPoints,highlightedTargetDataPoints:e?.highlightedTargetDataPoints,defaultLinkOpacity:e?.defaultLinkOpacity,sourceTitle:e?.sourceTitle,targetTitle:e?.targetTitle,sortNodes:e?.sortNodes,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dataCards":return{theme:e?.theme,graphTitle:e?.graphTitle,sources:e?.sources,graphDescription:e?.graphDescription,footNote:e?.footNote,graphID:e?.graphID,width:e?.width,height:e?.height,columnData:e?.columnData||[],data:t,language:e?.language,ariaLabel:e?.ariaLabel,cardTemplate:e?.cardTemplate,cardBackgroundColor:e?.cardBackgroundColor,cardFilters:e?.cardFilters||[],cardSortingOptions:e?.cardSortingOptions,cardSearchColumns:e?.cardSearchColumns,cardMinWidth:e?.cardMinWidth,backgroundColor:e?.backgroundColor,padding:e?.padding,detailsOnClick:e?.detailsOnClick,allowDataDownloadOnDetail:e?.allowDataDownloadOnDetail,noOfItemsInAPage:e?.noOfItemsInAPage,uiMode:e?.uiMode,styles:e?.styles,classNames:e?.classNames};case"radarChart":return{customLayers:e?.customLayers,precision:e?.precision,graphTitle:e?.graphTitle,dimmedOpacity:e?.dimmedOpacity,graphDescription:e?.graphDescription,footNote:e?.footNote,sources:e?.sources,ariaLabel:e?.ariaLabel,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,styles:e?.styles,classNames:e?.classNames,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,padding:e?.padding,radius:e?.radius,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,maxValue:e?.maxValue,minValue:e?.minValue,showValues:e?.showValues,showDots:e?.showDots,strokeWidth:e?.strokeWidth,fillShape:e?.fillShape,noOfTicks:e?.noOfTicks,showColorScale:e?.showColorScale,showNAColor:e?.showNAColor,highlightedLines:e?.highlightedLines,axisLabels:e?.axisLabels,curveType:e?.curveType,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,tooltip:e?.tooltip,detailsOnClick:e?.detailsOnClick,language:e?.language,theme:e?.theme,graphID:e?.graphID,animate:e?.animate};default:return{}}},a[7]=t,a[8]=o,a[9]=i,a[10]=e,a[11]=n,a[12]=m):m=a[12];const w=m,u=O[s];let D;a[13]!==w||a[14]!==s?(D=w(s),a[13]=w,a[14]=s,a[15]=D):D=a[15];const T=D,k=`grow my-0 ${s!=="statCard"?"mx-auto":"mx-0"} flex flex-col w-full ${s!=="unitChart"&&s!=="statCard"?"justify-center":"justify-start"} ${e?.theme||"light"}`;let f;a[16]===Symbol.for("react.memo_cache_sentinel")?(f={minHeight:"inherit"},a[16]=f):f=a[16];let g;a[17]!==u||a[18]!==s||a[19]!==T?(g=u?c.jsxRuntimeExports.jsx(u,{...T}):c.jsxRuntimeExports.jsx(y.j,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:`Invalid chart type: ${s}`}),a[17]=u,a[18]=s,a[19]=T,a[20]=g):g=a[20];let C;return a[21]!==k||a[22]!==g?(C=c.jsxRuntimeExports.jsx("div",{className:k,style:f,children:g}),a[21]=k,a[22]=g,a[23]=C):C=a[23],C}exports.GraphEl=re;
2
+ //# sourceMappingURL=GraphEl-BcKU0bG1.cjs.map