@undp/data-viz 2.2.3 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/BiVariateChoroplethMap.cjs +1 -1
  2. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  3. package/dist/BiVariateChoroplethMap.d.ts +4 -0
  4. package/dist/BiVariateChoroplethMap.js +328 -401
  5. package/dist/BiVariateChoroplethMap.js.map +1 -1
  6. package/dist/ChoroplethMap.cjs +1 -1
  7. package/dist/ChoroplethMap.cjs.map +1 -1
  8. package/dist/ChoroplethMap.d.ts +4 -0
  9. package/dist/ChoroplethMap.js +341 -416
  10. package/dist/ChoroplethMap.js.map +1 -1
  11. package/dist/Data/01.json +4042 -0
  12. package/dist/Data/mapData.json +4543 -0
  13. package/dist/Data/testMap.json +361 -0
  14. package/dist/DotDensityMap.cjs +1 -1
  15. package/dist/DotDensityMap.cjs.map +1 -1
  16. package/dist/DotDensityMap.d.ts +4 -0
  17. package/dist/DotDensityMap.js +297 -311
  18. package/dist/DotDensityMap.js.map +1 -1
  19. package/dist/{GraphEl-C1Rz1V__.js → GraphEl-L5hNe7wJ.js} +25 -17
  20. package/dist/GraphEl-L5hNe7wJ.js.map +1 -0
  21. package/dist/GraphEl-ic8C5Ksc.cjs +2 -0
  22. package/dist/GraphEl-ic8C5Ksc.cjs.map +1 -0
  23. package/dist/GriddedGraphs.cjs +1 -1
  24. package/dist/GriddedGraphs.d.ts +2 -0
  25. package/dist/GriddedGraphs.js +1 -1
  26. package/dist/GriddedGraphsFromConfig.d.ts +2 -0
  27. package/dist/HybridMap.cjs +1 -1
  28. package/dist/HybridMap.cjs.map +1 -1
  29. package/dist/HybridMap.d.ts +4 -0
  30. package/dist/HybridMap.js +398 -445
  31. package/dist/HybridMap.js.map +1 -1
  32. package/dist/MultiGraphDashboard.d.ts +2 -0
  33. package/dist/MultiGraphDashboardFromConfig.d.ts +2 -0
  34. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +2 -0
  35. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +2 -0
  36. package/dist/PerformanceIntensiveScrollStory.d.ts +2 -0
  37. package/dist/ScrollStory.d.ts +2 -0
  38. package/dist/SingleGraphDashboard.cjs +1 -1
  39. package/dist/SingleGraphDashboard.d.ts +2 -0
  40. package/dist/SingleGraphDashboard.js +1 -1
  41. package/dist/SingleGraphDashboardFromConfig.d.ts +2 -0
  42. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +2 -0
  43. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +2 -0
  44. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +2 -0
  45. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +2 -0
  46. package/dist/Types.d.ts +2 -0
  47. package/dist/index-DLFt97gy.cjs +2 -0
  48. package/dist/index-DLFt97gy.cjs.map +1 -0
  49. package/dist/index-Dp_SfsUA.js +2344 -0
  50. package/dist/index-Dp_SfsUA.js.map +1 -0
  51. package/dist/index.d.ts +18 -0
  52. package/package.json +2 -1
  53. package/readme.md +0 -7
  54. package/dist/GraphEl-BZbunD1_.cjs +0 -2
  55. package/dist/GraphEl-BZbunD1_.cjs.map +0 -1
  56. package/dist/GraphEl-C1Rz1V__.js.map +0 -1
  57. package/dist/zoom-5AkJSuWO.js +0 -1864
  58. package/dist/zoom-5AkJSuWO.js.map +0 -1
  59. package/dist/zoom-ChcvXFIz.cjs +0 -2
  60. package/dist/zoom-ChcvXFIz.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"HybridMap.cjs","sources":["../node_modules/@undp/design-system-react/dist/Separator.js","../src/Components/Graphs/Maps/HybridMap/Graph.tsx","../src/Components/Graphs/Maps/HybridMap/index.tsx"],"sourcesContent":["import { j as v } from \"./jsx-runtime-BzflLqGi.js\";\nimport { c as N } from \"./compiler-runtime-Cu50tn6L.js\";\nimport * as R from \"react\";\nimport g from \"react\";\nimport { P as x } from \"./index-DE1ItLfl.js\";\nimport { c as O } from \"./utils-D_Pof5Gy.js\";\nvar h = \"Separator\", f = \"horizontal\", E = [\"horizontal\", \"vertical\"], y = R.forwardRef((i, s) => {\n const { decorative: r, orientation: a = f, ...o } = i, t = P(a) ? a : f, m = r ? { role: \"none\" } : { \"aria-orientation\": t === \"vertical\" ? t : void 0, role: \"separator\" };\n return /* @__PURE__ */ v.jsx(\n x.div,\n {\n \"data-orientation\": t,\n ...m,\n ...o,\n ref: s\n }\n );\n});\ny.displayName = h;\nfunction P(i) {\n return E.includes(i);\n}\nvar u = y;\nconst T = g.forwardRef((i, s) => {\n const r = N.c(14);\n let a, o, t, e;\n r[0] !== i ? ({\n className: a,\n variant: t,\n orientation: e,\n ...o\n } = i, r[0] = i, r[1] = a, r[2] = o, r[3] = t, r[4] = e) : (a = r[1], o = r[2], t = r[3], e = r[4]);\n const m = t === void 0 ? \"dark\" : t, l = e === void 0 ? \"horizontal\" : e, c = l === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\", d = m === \"dark\" ? \"bg-primary-gray-600 dark:bg-primary-gray-200\" : \"bg-primary-gray-400 dark:bg-primary-gray-550\";\n let n;\n r[5] !== a || r[6] !== c || r[7] !== d ? (n = O(c, d, a), r[5] = a, r[6] = c, r[7] = d, r[8] = n) : n = r[8];\n let p;\n return r[9] !== l || r[10] !== o || r[11] !== s || r[12] !== n ? (p = /* @__PURE__ */ v.jsx(u, { ...o, ref: s, orientation: l, className: n }), r[9] = l, r[10] = o, r[11] = s, r[12] = n, r[13] = p) : p = r[13], p;\n});\nT.displayName = u.displayName;\nexport {\n T as Separator\n};\n//# sourceMappingURL=Separator.js.map\n","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 { scaleOrdinal, scaleSqrt, scaleThreshold } from 'd3-scale';\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\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\nimport { Separator } from '@undp/design-system-react/Separator';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n HybridMapDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { X } from '@/Components/Icons';\r\nimport { checkIfNullOrUndefined, numberFormattingFunction } from '@/Utils';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: HybridMapDataType[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData: any;\r\n colorDomain: (string | number)[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n mapColorLegendTitle?: string;\r\n categorical: boolean;\r\n radius: number;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n showLabels: boolean;\r\n mapBorderColor: string;\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 isWorldMap: boolean;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedDataPoints: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\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 maxRadiusValue: number;\r\n collapseColorScaleByDefault?: boolean;\r\n dotColor: string;\r\n highlightedIds: string[];\r\n mapProperty: string;\r\n dotLegendTitle?: string;\r\n dotBorderColor?: string;\r\n labelColor: string;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n mapColorLegendTitle,\r\n colorDomain,\r\n radius,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n showLabels,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\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 maxRadiusValue,\r\n categorical,\r\n dotColor,\r\n collapseColorScaleByDefault,\r\n highlightedIds,\r\n mapProperty,\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor,\r\n } = props;\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\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 radiusScale =\r\n data.filter(d => d.radius === undefined || d.radius === null).length !== data.length\r\n ? scaleSqrt().domain([0, maxRadiusValue]).range([0.25, radius]).nice()\r\n : undefined;\r\n\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 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\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\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\r\n .filter(d => d.id)\r\n .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 as string) !== -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={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\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={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\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 {data\r\n .filter(d => !checkIfNullOrUndefined(d.lat) && !checkIfNullOrUndefined(d.long))\r\n .map(d => {\r\n return (\r\n <motion.g\r\n key={d.label || `${d.lat}-${d.long}`}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity:\r\n highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label || '') !== -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 transform={`translate(${\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0]\r\n },${(projection([d.long as number, d.lat as number]) as [number, number])[1]})`}\r\n >\r\n <motion.circle\r\n cx={0}\r\n cy={0}\r\n variants={{\r\n initial: {\r\n r: 0,\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ r: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n fillOpacity: 0.8,\r\n }}\r\n />\r\n {showLabels && d.label ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\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 y={0}\r\n className={cn('text-sm', classNames?.graphObjectValues)}\r\n style={{\r\n textAnchor: 'start',\r\n fill: labelColor || '#000',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n dx={4}\r\n dy={5}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\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 {dotLegendTitle && dotLegendTitle !== '' ? (\r\n <>\r\n <div className='flex items-center gap-2'>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{ backgroundColor: dotColor }}\r\n />\r\n <P\r\n size='xs'\r\n marginBottom='none'\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 {dotLegendTitle}\r\n </P>\r\n </div>\r\n <Spacer size='xl' />\r\n <Separator />\r\n <Spacer size='xl' />\r\n </>\r\n ) : null}\r\n {mapColorLegendTitle && mapColorLegendTitle !== '' ? (\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 {mapColorLegendTitle}\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 <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\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, useMemo } from 'react';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n HybridMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ZoomInteractionTypes,\r\n MapProjectionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n ScaleDataType,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { getJenks, getUniqValue } from '@/Utils';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects for dot density map*/\r\n data: HybridMapDataType[];\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 /** Color or array of colors for the circle */\r\n colors?: string[];\r\n /** Domain of colors for the graph for the choropleth map */\r\n colorDomain?: number[] | string[];\r\n /** Title for the legend for the dot density scale */\r\n dotLegendTitle?: string;\r\n /** Title for the color legend for the color scale */\r\n mapColorLegendTitle?: 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 /** Maximum radius of the circle */\r\n radius?: number;\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 /** Color of the dots in the dot density map */\r\n dotColor?: string;\r\n /** Border color of the dots in the dot density map */\r\n dotBorderColor?: string;\r\n /** Color of the labels */\r\n labelColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Scale for the colors of the choropleth map */\r\n choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;\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 /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\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 /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\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 /** 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 /** 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 HybridMap(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 mapColorLegendTitle,\r\n colorDomain,\r\n choroplethScaleType = 'threshold',\r\n radius = 5,\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 showLabels = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n tooltip,\r\n relativeHeight,\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 highlightedDataPoints = [],\r\n onSeriesMouseClick,\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 maxRadiusValue,\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n dotColor = Colors.primaryColors['blue-600'],\r\n highlightedIds = [],\r\n mapProperty = 'ISO3',\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor = Colors.primaryColors['blue-600'],\r\n } = props;\r\n\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 = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\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 const domain =\r\n colorDomain ||\r\n (choroplethScaleType === '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 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 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 dotColor={dotColor}\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 (choroplethScaleType === '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 mapColorLegendTitle={mapColorLegendTitle}\r\n radius={radius}\r\n categorical={choroplethScaleType === 'categorical'}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showLabels={showLabels}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n classNames={classNames}\r\n zoomInteraction={zoomInteraction}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\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 dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n maxRadiusValue={\r\n !checkIfNullOrUndefined(maxRadiusValue)\r\n ? (maxRadiusValue as number)\r\n : Math.max(...data.map(d => d.radius).filter(d => d !== undefined && d !== null))\r\n }\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n highlightedIds={highlightedIds}\r\n mapProperty={mapProperty}\r\n dotLegendTitle={dotLegendTitle}\r\n dotBorderColor={dotBorderColor}\r\n labelColor={labelColor}\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":["h","f","E","y","R","s","r","a","o","t","P","m","v","x","u","T","g","N","e","l","c","d","n","O","p","Graph","props","data","colors","mapData","mapColorLegendTitle","colorDomain","radius","height","width","scale","centerPoint","tooltip","showLabels","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","maxRadiusValue","categorical","dotColor","collapseColorScaleByDefault","highlightedIds","mapProperty","dotLegendTitle","dotBorderColor","labelColor","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","length","scaleSqrt","domain","range","nice","colorScale","scaleOrdinal","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","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","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","i","findIndex","el","id","properties","indexOf","j","masterPath","forEach","geo","path","k","point","stroke","strokeWidth","fill","AnimatePresence","index","color","checkIfNullOrUndefined","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","lat","long","label","fillOpacity","cn","graphObjectValues","textAnchor","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","Spacer","Separator","numberFormattingFunction","DetailsModal","modal","Tooltip","HybridMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","choroplethScaleType","t2","t3","t4","padding","t5","t6","t7","t8","t9","relativeHeight","isWorldMap","t10","t11","t12","graphID","t13","graphDownload","t14","dataDownload","t15","showAntarctica","t16","language","t17","minHeight","t18","theme","t19","ariaLabel","t20","t21","t22","t23","t24","timeline","t25","t26","t27","t28","t29","Colors","light","graphNoData","grays","t30","t31","t32","t33","enabled","autoplay","showOnlyActiveDate","primaryColors","t34","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t35","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","getUniqValue","getJenks","_temp3","t36","t37","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t38","shape","onUpdateShape","useEffectEvent","t39","fetchAndParseJSON","then","d_2","t40","t41","t42","speed","interval","setInterval","clearInterval","t43","t44","getSliderMarks","markObj","t45","graphContainer","t46","t47","description","title","GraphHeader","_temp4","_temp5","_temp6","_temp7","_temp8","t48","Pause","Play","SliderUI","nextValue","nextValue_0","t49","GraphArea","format","d_8","_temp9","sequentialColors","max","_temp0","_temp1","Spinner","t50","footnote","source","GraphFooter","t51","GraphContainer","d_10","d_9","NAME","d_5","d_4","d_3","d_7","d_6","d_1","b"],"mappings":"u+CAMA,IAAIA,GAAI,YAAaC,GAAI,aAAcC,GAAI,CAAC,aAAc,UAAU,EAAGC,GAAIC,GAAE,WAAW,CAAC,EAAGC,IAAM,CAChG,KAAM,CAAE,WAAYC,EAAG,YAAaC,EAAIN,GAAG,GAAGO,CAAC,EAAK,EAAGC,EAAIC,GAAEH,CAAC,EAAIA,EAAIN,GAAGU,EAAIL,EAAI,CAAE,KAAM,MAAM,EAAK,CAAE,mBAAoBG,IAAM,WAAaA,EAAI,OAAQ,KAAM,WAAW,EAC1K,OAAuBG,EAAAA,GAAE,IACvBC,GAAAA,EAAE,IACF,CACE,mBAAoBJ,EACpB,GAAGE,EACH,GAAGH,EACH,IAAKH,CACX,CACA,CACA,CAAC,EACDF,GAAE,YAAcH,GAChB,SA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CU,EAAAA,EAYH,EAAiBpJ,OAAAqC,GAAArC,OAAAX,EAAAW,OAAAuB,GAAAvB,OAAAxK,EAAAwK,OAAA+B,EAAA/B,OAAAiC,EAAAjC,OAAAY,GAAAZ,OAAAkB,EAAAlB,OAAAwH,GAAAxH,OAAA0H,GAAA1H,OAAA2H,GAAA3H,OAAAoI,GAAApI,OAAA0I,GAAA1I,OAAAoJ,GAAApJ,OAAAmC,GAAAnC,OAAAvK,EAAAuK,OAAAwJ,IAAAA,GAAAxJ,EAAA,GAAA,EA/KjBwJ,EA+KiB,CAnTd,SAAAN,GAAAQ,EAAA,CAAA,OAyQ8E9U,GAAM,IAAI,CAzQxF,SAAAqU,GAAAU,EAAA,CAAA,OAyQqC/U,EAACW,MAAO,CAzQ7C,SAAAuT,GAAA7L,EAAA,CAAA,OAuN4BA,EAAEE,WAAWyM,OAAU,YAAY,CAvN/D,SAAAzB,GAAA0B,EAAA,CAAA,OAqK4BjV,IAAMgD,MAAS,CArK3C,SAAAsQ,GAAA4B,EAAA,CAAA,OAoK6ClV,IAAMgD,MAAS,CApK5D,SAAAqQ,GAAA8B,EAAA,CAAA,OAoKyBnV,EAACM,IAAK,CApK/B,SAAA8S,GAAAgC,EAAA,CAAA,OAmK2CpV,IAAMgD,MAAS,CAnK1D,SAAAmQ,GAAAkC,EAAA,CAAA,OAmKuBrV,EAACM,IAAK,CAnK7B,SAAAsQ,GAAA0E,EAAA,CAAA,OAsFiBtV,EAACR,CAA+B,CAtFjD,SAAA2Q,GAAAjR,EAAAqW,EAAA,CAAA,OAuEkBrW,EAAIqW,CAAC,CAvEvB,SAAAtF,GAAAjQ,EAAA,CAAA,OAmEgBA,EAAC6P,IAAK","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"HybridMap.cjs","sources":["../node_modules/@undp/design-system-react/dist/Separator.js","../src/Components/Graphs/Maps/HybridMap/Graph.tsx","../src/Components/Graphs/Maps/HybridMap/index.tsx"],"sourcesContent":["import { j as v } from \"./jsx-runtime-BzflLqGi.js\";\nimport { c as N } from \"./compiler-runtime-Cu50tn6L.js\";\nimport * as R from \"react\";\nimport g from \"react\";\nimport { P as x } from \"./index-DE1ItLfl.js\";\nimport { c as O } from \"./utils-D_Pof5Gy.js\";\nvar h = \"Separator\", f = \"horizontal\", E = [\"horizontal\", \"vertical\"], y = R.forwardRef((i, s) => {\n const { decorative: r, orientation: a = f, ...o } = i, t = P(a) ? a : f, m = r ? { role: \"none\" } : { \"aria-orientation\": t === \"vertical\" ? t : void 0, role: \"separator\" };\n return /* @__PURE__ */ v.jsx(\n x.div,\n {\n \"data-orientation\": t,\n ...m,\n ...o,\n ref: s\n }\n );\n});\ny.displayName = h;\nfunction P(i) {\n return E.includes(i);\n}\nvar u = y;\nconst T = g.forwardRef((i, s) => {\n const r = N.c(14);\n let a, o, t, e;\n r[0] !== i ? ({\n className: a,\n variant: t,\n orientation: e,\n ...o\n } = i, r[0] = i, r[1] = a, r[2] = o, r[3] = t, r[4] = e) : (a = r[1], o = r[2], t = r[3], e = r[4]);\n const m = t === void 0 ? \"dark\" : t, l = e === void 0 ? \"horizontal\" : e, c = l === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\", d = m === \"dark\" ? \"bg-primary-gray-600 dark:bg-primary-gray-200\" : \"bg-primary-gray-400 dark:bg-primary-gray-550\";\n let n;\n r[5] !== a || r[6] !== c || r[7] !== d ? (n = O(c, d, a), r[5] = a, r[6] = c, r[7] = d, r[8] = n) : n = r[8];\n let p;\n return r[9] !== l || r[10] !== o || r[11] !== s || r[12] !== n ? (p = /* @__PURE__ */ v.jsx(u, { ...o, ref: s, orientation: l, className: n }), r[9] = l, r[10] = o, r[11] = s, r[12] = n, r[13] = p) : p = r[13], p;\n});\nT.displayName = u.displayName;\nexport {\n T as Separator\n};\n//# sourceMappingURL=Separator.js.map\n","import isEqual from 'fast-deep-equal';\r\nimport { useEffect, useMemo, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n geoPath,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleOrdinal, scaleSqrt, scaleThreshold } from 'd3-scale';\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\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\nimport { Separator } from '@undp/design-system-react/Separator';\r\nimport { FeatureCollection } from 'geojson';\r\nimport rewind from '@turf/rewind';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n HybridMapDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { X } from '@/Components/Icons';\r\nimport { checkIfNullOrUndefined, numberFormattingFunction } from '@/Utils';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: HybridMapDataType[];\r\n mapData: FeatureCollection;\r\n colorDomain: (string | number)[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n mapColorLegendTitle?: string;\r\n categorical: boolean;\r\n radius: number;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n showLabels: boolean;\r\n mapBorderColor: string;\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 isWorldMap: boolean;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedDataPoints: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\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 maxRadiusValue: number;\r\n collapseColorScaleByDefault?: boolean;\r\n dotColor: string;\r\n highlightedIds: string[];\r\n mapProperty: string;\r\n dotLegendTitle?: string;\r\n dotBorderColor?: string;\r\n labelColor: string;\r\n projectionRotate: [number, number] | [number, number, number];\r\n rewindCoordinatesInMapData: boolean;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n mapColorLegendTitle,\r\n colorDomain,\r\n radius,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n showLabels,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\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 maxRadiusValue,\r\n categorical,\r\n dotColor,\r\n collapseColorScaleByDefault,\r\n highlightedIds,\r\n mapProperty,\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor,\r\n projectionRotate,\r\n rewindCoordinatesInMapData,\r\n } = props;\r\n const formattedMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData) return mapData;\r\n\r\n return rewind(mapData, { reverse: true }) as FeatureCollection;\r\n }, [mapData, rewindCoordinatesInMapData]);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\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 radiusScale =\r\n data.filter(d => d.radius === undefined || d.radius === null).length !== data.length\r\n ? scaleSqrt().domain([0, maxRadiusValue]).range([0.25, radius]).nice()\r\n : undefined;\r\n\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 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 const bounds = bbox(formattedMapData);\r\n\r\n const center = centerOfMass(formattedMapData);\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(projectionRotate)\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(projectionRotate)\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(projectionRotate)\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(projectionRotate)\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(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n const pathGenerator = geoPath().projection(projection);\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 {formattedMapData.features.map((d, i: number) => {\r\n if (!d.properties?.[mapProperty]) return null;\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <motion.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 <path\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 </motion.g>\r\n );\r\n })}\r\n <AnimatePresence>\r\n {data\r\n .filter(d => d.id)\r\n .map(d => {\r\n const index = formattedMapData.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 if (index === -1) return null;\r\n const path = pathGenerator(formattedMapData.features[index]);\r\n if (!path) return null;\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 as string) !== -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 <motion.path\r\n key={`${d.id}`}\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={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n {data\r\n .filter(d => !checkIfNullOrUndefined(d.lat) && !checkIfNullOrUndefined(d.long))\r\n .map(d => {\r\n const labelPosMultiplier =\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0] >\r\n 0.6 * width\r\n ? -1\r\n : 1;\r\n return (\r\n <motion.g\r\n key={d.label || `${d.lat}-${d.long}`}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity:\r\n highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label || '') !== -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 transform={`translate(${\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0]\r\n },${(projection([d.long as number, d.lat as number]) as [number, number])[1]})`}\r\n >\r\n <motion.circle\r\n cx={0}\r\n cy={0}\r\n variants={{\r\n initial: {\r\n r: 0,\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ r: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n fillOpacity: 0.8,\r\n }}\r\n />\r\n {showLabels && d.label ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x:\r\n labelPosMultiplier *\r\n (!radiusScale ? radius : radiusScale(d.radius || 0)),\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x:\r\n labelPosMultiplier *\r\n (!radiusScale ? radius : radiusScale(d.radius || 0)),\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 y={0}\r\n className={cn('text-sm', classNames?.graphObjectValues)}\r\n style={{\r\n textAnchor: labelPosMultiplier === -1 ? 'end' : 'start',\r\n fill: labelColor || '#000',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n dx={labelPosMultiplier * 4}\r\n dy={5}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\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 {dotLegendTitle && dotLegendTitle !== '' ? (\r\n <>\r\n <div className='flex items-center gap-2'>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{ backgroundColor: dotColor }}\r\n />\r\n <P\r\n size='xs'\r\n marginBottom='none'\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 {dotLegendTitle}\r\n </P>\r\n </div>\r\n <Spacer size='xl' />\r\n <Separator />\r\n <Spacer size='xl' />\r\n </>\r\n ) : null}\r\n {mapColorLegendTitle && mapColorLegendTitle !== '' ? (\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 {mapColorLegendTitle}\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 <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\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, useMemo } from 'react';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n HybridMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ZoomInteractionTypes,\r\n MapProjectionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n ScaleDataType,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { getJenks, getUniqValue } from '@/Utils';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects for dot density map*/\r\n data: HybridMapDataType[];\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 /** Color or array of colors for the circle */\r\n colors?: string[];\r\n /** Domain of colors for the graph for the choropleth map */\r\n colorDomain?: number[] | string[];\r\n /** Title for the legend for the dot density scale */\r\n dotLegendTitle?: string;\r\n /** Title for the color legend for the color scale */\r\n mapColorLegendTitle?: 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 /** Maximum radius of the circle */\r\n radius?: number;\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 /** Defines if the coordinates in the map data should be rewinded or not. Try to change this is the visualization shows countries as holes instead of shapes. */\r\n rewindCoordinatesInMapData?: boolean;\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 /** Controls the rotation of the map projection, in degrees, applied before rendering. Useful for shifting the antimeridian to focus the map on different regions */\r\n projectionRotate?: [number, number] | [number, 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 /** Color of the dots in the dot density map */\r\n dotColor?: string;\r\n /** Border color of the dots in the dot density map */\r\n dotBorderColor?: string;\r\n /** Color of the labels */\r\n labelColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Scale for the colors of the choropleth map */\r\n choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;\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 /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\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 /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\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 /** 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 /** 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 HybridMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.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 mapColorLegendTitle,\r\n colorDomain,\r\n choroplethScaleType = 'threshold',\r\n radius = 5,\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 showLabels = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n tooltip,\r\n relativeHeight,\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 highlightedDataPoints = [],\r\n onSeriesMouseClick,\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 = 'naturalEarth',\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n maxRadiusValue,\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n dotColor = Colors.primaryColors['blue-600'],\r\n highlightedIds = [],\r\n mapProperty = 'ISO3',\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor = Colors.primaryColors['blue-600'],\r\n projectionRotate = [0, 0],\r\n rewindCoordinatesInMapData = true,\r\n } = props;\r\n\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 = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n const [mapShape, setMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n const domain =\r\n colorDomain ||\r\n (choroplethScaleType === '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 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 as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\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 dotColor={dotColor}\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 (choroplethScaleType === '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 mapColorLegendTitle={mapColorLegendTitle}\r\n radius={radius}\r\n categorical={choroplethScaleType === 'categorical'}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showLabels={showLabels}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n classNames={classNames}\r\n zoomInteraction={zoomInteraction}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\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 dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n maxRadiusValue={\r\n !checkIfNullOrUndefined(maxRadiusValue)\r\n ? (maxRadiusValue as number)\r\n : Math.max(...data.map(d => d.radius).filter(d => d !== undefined && d !== null))\r\n }\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n highlightedIds={highlightedIds}\r\n mapProperty={mapProperty}\r\n dotLegendTitle={dotLegendTitle}\r\n dotBorderColor={dotBorderColor}\r\n labelColor={labelColor}\r\n projectionRotate={projectionRotate}\r\n rewindCoordinatesInMapData={rewindCoordinatesInMapData}\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":["h","f","E","y","R","s","r","a","o","t","P","m","v","x","u","T","g","N","e","l","c","d","n","O","p","Graph","props","data","colors","mapData","mapColorLegendTitle","colorDomain","radius","height","width","scale","centerPoint","tooltip","showLabels","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","maxRadiusValue","categorical","dotColor","collapseColorScaleByDefault","highlightedIds","mapProperty","dotLegendTitle","dotBorderColor","labelColor","projectionRotate","rewindCoordinatesInMapData","formattedMapData","useMemo","rewind","reverse","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","length","scaleSqrt","domain","range","nice","colorScale","scaleOrdinal","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","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","pathGenerator","geoPath","handleZoom","direction","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","i","properties","path","indexOf","stroke","strokeWidth","fill","AnimatePresence","id","index","findIndex","el","color","checkIfNullOrUndefined","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","lat","long","labelPosMultiplier","label","fillOpacity","cn","graphObjectValues","textAnchor","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","Spacer","Separator","numberFormattingFunction","DetailsModal","modal","Tooltip","HybridMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","choroplethScaleType","t2","t3","t4","padding","t5","t6","t7","t8","t9","relativeHeight","isWorldMap","t10","t11","t12","graphID","t13","graphDownload","t14","dataDownload","t15","showAntarctica","t16","language","t17","minHeight","t18","theme","t19","ariaLabel","t20","t21","t22","t23","t24","t25","timeline","t26","t27","t28","t29","t30","t31","t32","Colors","light","graphNoData","grays","t33","t34","t35","t36","enabled","autoplay","showOnlyActiveDate","primaryColors","t37","t38","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t39","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","getUniqValue","getJenks","_temp3","t40","t41","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t42","shape","onUpdateShape","useEffectEvent","t43","fetchAndParseJSON","then","d_2","t44","t45","t46","speed","interval","setInterval","clearInterval","t47","t48","getSliderMarks","markObj","t49","graphContainer","t50","t51","description","title","GraphHeader","_temp4","_temp5","_temp6","_temp7","_temp8","t52","Pause","Play","SliderUI","nextValue","nextValue_0","t53","GraphArea","format","d_8","_temp9","sequentialColors","max","_temp0","_temp1","Spinner","t54","footnote","source","GraphFooter","t55","GraphContainer","d_10","d_9","NAME","d_5","d_4","d_3","d_7","d_6","d_1","b"],"mappings":"u+CAMA,IAAIA,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_google_ignoreList":[0]}
@@ -104,10 +104,14 @@ declare interface Props {
104
104
  radius?: number;
105
105
  /** Map data as an object in geoJson format or a url for geoJson */
106
106
  mapData?: any;
107
+ /** Defines if the coordinates in the map data should be rewinded or not. Try to change this is the visualization shows countries as holes instead of shapes. */
108
+ rewindCoordinatesInMapData?: boolean;
107
109
  /** Scaling factor for the map. Multiplies the scale number to scale. */
108
110
  scale?: number;
109
111
  /** Center point of the map */
110
112
  centerPoint?: [number, number];
113
+ /** Controls the rotation of the map projection, in degrees, applied before rendering. Useful for shifting the antimeridian to focus the map on different regions */
114
+ projectionRotate?: [number, number] | [number, number, number];
111
115
  /** Defines the zoom mode for the map */
112
116
  zoomInteraction?: ZoomInteractionTypes;
113
117
  /** Stroke width of the regions in the map */