@undp/data-viz 2.3.13 → 2.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.d.ts +6 -0
- package/dist/BiVariateChoroplethMap.js +330 -297
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.d.ts +6 -0
- package/dist/ChoroplethMap.js +359 -326
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.d.ts +8 -1
- package/dist/DotDensityMap.js +319 -286
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/{GraphEl-Bb5oGHoa.js → GraphEl-BgNA-xFf.js} +10 -5
- package/dist/GraphEl-BgNA-xFf.js.map +1 -0
- package/dist/GraphEl-Bl1Hnqnd.cjs +2 -0
- package/dist/GraphEl-Bl1Hnqnd.cjs.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +8 -1
- package/dist/GriddedGraphs.js +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +8 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.d.ts +8 -1
- package/dist/HybridMap.js +416 -382
- package/dist/HybridMap.js.map +1 -1
- package/dist/MultiGraphDashboard.d.ts +8 -1
- package/dist/MultiGraphDashboardFromConfig.d.ts +8 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +8 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +8 -1
- package/dist/PerformanceIntensiveScrollStory.d.ts +8 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.d.ts +2 -0
- package/dist/ScatterPlot.js +408 -403
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.d.ts +8 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +8 -1
- package/dist/SingleGraphDashboard.js +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +8 -1
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +8 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +8 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +8 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +8 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.js +330 -334
- package/dist/StripChart.js.map +1 -1
- package/dist/Types.d.ts +9 -1
- package/dist/index.d.ts +36 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/GraphEl-Bb5oGHoa.js.map +0 -1
- package/dist/GraphEl-BerZfJ3j.cjs +0 -2
- package/dist/GraphEl-BerZfJ3j.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoroplethMap.cjs","sources":["../src/Components/Graphs/Maps/ChoroplethMap/Graph.tsx","../src/Components/Graphs/Maps/ChoroplethMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { useEffect, 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 { scaleThreshold, scaleOrdinal } 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 rewind from '@turf/rewind';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport {\r\n AnimateDataType,\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { X } from '@/Components/Icons';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n colorDomain: (number | string)[];\r\n mapData: FeatureCollection;\r\n width: number;\r\n height: number;\r\n colors: string[];\r\n colorLegendTitle?: string;\r\n categorical: boolean;\r\n data: ChoroplethMapDataType[];\r\n scale: number;\r\n centerPoint?: [number, number];\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n mapBorderColor: string;\r\n isWorldMap: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedIds: string[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapProperty: string;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n collapseColorScaleByDefault?: boolean;\r\n zoomAndCenterByHighlightedIds: boolean;\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 colorDomain,\r\n colors,\r\n mapData,\r\n colorLegendTitle,\r\n categorical,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedIds,\r\n onSeriesMouseClick,\r\n mapProperty,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n collapseColorScaleByDefault,\r\n zoomAndCenterByHighlightedIds,\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 const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n const bounds = bbox({\r\n ...formattedMapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? formattedMapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : formattedMapData.features,\r\n });\r\n\r\n const center = centerOfMass({\r\n ...formattedMapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? formattedMapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : formattedMapData.features,\r\n });\r\n const lonDiff = (bounds[2] - bounds[0]) * 1.15;\r\n const latDiff = (bounds[3] - bounds[1]) * 1.15;\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.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 className='undp-map-shapes'\r\n key={d.id}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.id) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n >\r\n <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={{ opacity: 0, transition: { duration: animate.duration } }}\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 </AnimatePresence>\r\n {mouseOverData\r\n ? formattedMapData.features\r\n .filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: { properties: any }) => d.properties[mapProperty] === mouseOverData.id,\r\n )\r\n .map((d, i) => (\r\n <path\r\n key={i}\r\n d={pathGenerator(d) || ''}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n }}\r\n />\r\n ))\r\n : null}\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {colorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={\r\n selectedColor === colors[i]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }\r\n style={{\r\n fill: colors[i],\r\n ...(selectedColor === colors[i] ? {} : { stroke: colors[i] }),\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(d as number, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\r\n : { stroke: colors[colorDomain.length] }),\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <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 { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n ChoroplethMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ScaleDataType,\r\n MapProjectionTypes,\r\n ZoomInteractionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { getUniqValue } from '@/Utils/getUniqValue';\r\nimport { getJenks } from '@/Utils/getJenks';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: ChoroplethMapDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Colors for the choropleth map */\r\n colors?: string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: number[] | string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** 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 /** Toggle if the map is centered and zoomed to the highlighted ids. */\r\n zoomAndCenterByHighlightedIds?: boolean;\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 /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Scale for the colors */\r\n scaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Toggle visibility of color scale. */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function ChoroplethMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-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 colorDomain,\r\n colorLegendTitle,\r\n scaleType = 'threshold',\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedIds = [],\r\n onSeriesMouseClick,\r\n mapProperty = 'ISO3',\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection = 'naturalEarth',\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n projectionRotate = [0, 0],\r\n zoomAndCenterByHighlightedIds = false,\r\n rewindCoordinatesInMapData = true,\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = 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 useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n\r\n const domain =\r\n colorDomain ||\r\n (scaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? `${d.date}` ===\r\n format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => el.properties.NAME !== 'Antarctica',\r\n ),\r\n }\r\n }\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (scaleType === 'categorical'\r\n ? Colors[theme].categoricalColors.colors\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n colorLegendTitle={colorLegendTitle}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n categorical={scaleType === 'categorical'}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n mapProperty={mapProperty}\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n classNames={classNames}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n zoomInteraction={zoomInteraction}\r\n dimmedOpacity={dimmedOpacity}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n customLayers={customLayers}\r\n zoomAndCenterByHighlightedIds={zoomAndCenterByHighlightedIds}\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\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":["Graph","props","data","colorDomain","colors","mapData","colorLegendTitle","categorical","height","width","scale","centerPoint","tooltip","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedIds","onSeriesMouseClick","mapProperty","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","collapseColorScaleByDefault","zoomAndCenterByHighlightedIds","projectionRotate","rewindCoordinatesInMapData","formattedMapData","useMemo","rewind","reverse","selectedColor","setSelectedColor","useState","undefined","zoomRef","useRef","showLegend","setShowLegend","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","colorScale","scaleOrdinal","domain","range","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","filter","on","transform","attr","call","bounds","bbox","features","d","length","indexOf","properties","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","i","path","stroke","strokeWidth","fill","AnimatePresence","index","findIndex","el","id","color","checkIfNullOrUndefined","x","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","fillOpacity","cn","colorLegend","X","P","display","WebkitLineClamp","WebkitBoxOrient","backgroundColor","textAnchor","numberFormattingFunction","DetailsModal","modal","Tooltip","ChoroplethMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","scaleType","t2","t3","padding","t4","t5","t6","t7","relativeHeight","isWorldMap","t8","t9","t10","graphID","t11","t12","graphDownload","t13","dataDownload","t14","showAntarctica","t15","language","t16","minHeight","t17","theme","t18","ariaLabel","t19","t20","t21","t22","t23","t24","timeline","t25","t26","t27","t28","Colors","light","graphNoData","grays","t29","t30","t31","t32","enabled","autoplay","showOnlyActiveDate","t33","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t34","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","t35","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t36","shape","onUpdateShape","useEffectEvent","t37","fetchAndParseJSON","then","d_1","t38","t39","getUniqValue","getJenks","_temp3","t40","t41","speed","interval","setInterval","clearInterval","t42","t43","getSliderMarks","markObj","t44","graphContainer","t45","t46","description","title","GraphHeader","_temp4","_temp5","_temp6","_temp7","_temp8","t47","Pause","Play","SliderUI","nextValue","nextValue_0","t48","GraphArea","d_8","format","_temp9","categoricalColors","sequentialColors","max","Spinner","t49","footnote","source","GraphFooter","t50","GraphContainer","NAME","d_5","d_4","d_3","d_7","d_6","d_2","a","b"],"mappings":"ylCA8EO,SAASA,GAAMC,EAAc,CAClC,KAAM,CACJC,KAAAA,EACAC,YAAAA,EACAC,OAAAA,EACAC,QAAAA,EACAC,iBAAAA,EACAC,YAAAA,EACAC,OAAAA,EACAC,MAAAA,EACAC,MAAAA,EACAC,YAAAA,EACAC,QAAAA,EACAC,eAAAA,EACAC,eAAAA,GACAC,eAAAA,GACAC,kBAAAA,GACAC,eAAAA,GACAC,gBAAAA,GACAC,oBAAAA,GACAC,eAAAA,EACAC,mBAAAA,GACAC,YAAAA,EACAC,4BAAAA,GACAC,eAAAA,EACAC,OAAAA,GACAC,WAAAA,GACAC,cAAAA,EACAC,gBAAAA,EACAC,QAAAA,EACAC,cAAAA,EACAC,aAAAA,GACAC,4BAAAA,GACAC,8BAAAA,GACAC,iBAAAA,EACAC,2BAAAA,EAAAA,EACElC,EACEmC,EAAmBC,EAAAA,QAAQ,IAC1BF,GAEEG,EAAAA,cAAOjC,EAAS,CAAEkC,QAAS,EAAA,CAAM,EAFAlC,EAGvC,CAACA,EAAS8B,EAA0B,CAAC,EAClC,CAACK,EAAeC,CAAgB,EAAIC,EAAAA,SAA6BC,MAAS,EAC1EC,EAAUC,EAAAA,OAAoD,IAAI,EAClE,CAACC,GAAYC,EA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GAAAjJ,OAAAkC,EAAAlC,OAAA7J,EAAA6J,OAAAqJ,IAAAA,GAAArJ,EAAA,GAAA,EArKjBqJ,EAqKiB,CApSd,SAAAT,GAAAzK,EAAA,CAAA,OAkN4BA,EAAExC,WAAW4N,OAAU,YAAY,CAlN/D,SAAAtB,GAAAuB,EAAA,CAAA,OAgK4BhO,IAAMnD,MAAS,CAhK3C,SAAA2P,GAAAyB,EAAA,CAAA,OA+J6CjO,IAAMnD,MAAS,CA/J5D,SAAA0P,GAAA2B,EAAA,CAAA,OA+JyBlO,EAAC5F,IAAK,CA/J/B,SAAAkS,GAAA6B,EAAA,CAAA,OA8J2CnO,IAAMnD,MAAS,CA9J1D,SAAAwP,GAAA+B,EAAA,CAAA,OA8JuBpO,EAAC5F,IAAK,CA9J7B,SAAA+Q,GAAAkD,EAAA,CAAA,OAyGiBrO,EAAC+C,CAA+B,CAzGjD,SAAAsG,GAAAiF,EAAAC,EAAA,CAAA,OAiEkBD,EAAIC,CAAC,CAjEvB,SAAApF,GAAAnJ,EAAA,CAAA,OA6DgBA,EAAC+I,IAAK"}
|
|
1
|
+
{"version":3,"file":"ChoroplethMap.cjs","sources":["../src/Components/Graphs/Maps/ChoroplethMap/Graph.tsx","../src/Components/Graphs/Maps/ChoroplethMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { useEffect, 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 { scaleThreshold, scaleOrdinal } 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 rewind from '@turf/rewind';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport {\r\n AnimateDataType,\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { X } from '@/Components/Icons';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n colorDomain: (number | string)[];\r\n mapData: FeatureCollection;\r\n width: number;\r\n height: number;\r\n colors: string[];\r\n colorLegendTitle?: string;\r\n categorical: boolean;\r\n data: ChoroplethMapDataType[];\r\n scale: number;\r\n centerPoint?: [number, number];\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n mapBorderColor: string;\r\n isWorldMap: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedIds: string[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapProperty: string;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n collapseColorScaleByDefault?: boolean;\r\n zoomAndCenterByHighlightedIds: boolean;\r\n projectionRotate: [number, number] | [number, number, number];\r\n rewindCoordinatesInMapData: boolean;\r\n overlayMapData?: FeatureCollection;\r\n overlayMapBorderColor?: string;\r\n overlayMapBorderWidth?: number;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colorDomain,\r\n colors,\r\n mapData,\r\n colorLegendTitle,\r\n categorical,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedIds,\r\n onSeriesMouseClick,\r\n mapProperty,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n collapseColorScaleByDefault,\r\n zoomAndCenterByHighlightedIds,\r\n projectionRotate,\r\n rewindCoordinatesInMapData,\r\n overlayMapData,\r\n overlayMapBorderColor,\r\n overlayMapBorderWidth,\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 formattedOverlayMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData || !overlayMapData) return overlayMapData;\r\n\r\n return rewind(overlayMapData, { reverse: true }) as FeatureCollection;\r\n }, [overlayMapData, rewindCoordinatesInMapData]);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n const bounds = bbox({\r\n ...formattedMapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? formattedMapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : formattedMapData.features,\r\n });\r\n\r\n const center = centerOfMass({\r\n ...formattedMapData,\r\n features: zoomAndCenterByHighlightedIds\r\n ? formattedMapData.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: any) =>\r\n (highlightedIds || []).length === 0 ||\r\n highlightedIds.indexOf(d.properties[mapProperty]) !== -1,\r\n )\r\n : formattedMapData.features,\r\n });\r\n const lonDiff = (bounds[2] - bounds[0]) * 1.15;\r\n const latDiff = (bounds[3] - bounds[1]) * 1.15;\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 vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n <AnimatePresence>\r\n {data.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 className='undp-map-shapes'\r\n key={d.id}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.id) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n >\r\n <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={{ opacity: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {mouseOverData\r\n ? formattedMapData.features\r\n .filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d: { properties: any }) => d.properties[mapProperty] === mouseOverData.id,\r\n )\r\n .map((d, i) => (\r\n <path\r\n key={i}\r\n d={pathGenerator(d) || ''}\r\n className='stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n style={{\r\n fill: 'none',\r\n fillOpacity: 0,\r\n strokeWidth: '0.5',\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n ))\r\n : null}\r\n {formattedOverlayMapData?.features.map((d, i: number) => {\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <g key={i}>\r\n <path\r\n d={path}\r\n style={{\r\n stroke: overlayMapBorderColor || mapBorderColor,\r\n strokeWidth: overlayMapBorderWidth || mapBorderWidth + 1,\r\n fill: 'none',\r\n pointerEvents: 'none',\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </g>\r\n );\r\n })}\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {colorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={\r\n selectedColor === colors[i]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }\r\n style={{\r\n fill: colors[i],\r\n ...(selectedColor === colors[i] ? {} : { stroke: colors[i] }),\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(d as number, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\r\n : { stroke: colors[colorDomain.length] }),\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <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 { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { FeatureCollection } from 'geojson';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport {\r\n ChoroplethMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ScaleDataType,\r\n MapProjectionTypes,\r\n ZoomInteractionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { getUniqValue } from '@/Utils/getUniqValue';\r\nimport { getJenks } from '@/Utils/getJenks';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: ChoroplethMapDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Colors for the choropleth map */\r\n colors?: string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: number[] | string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** Detail if any other map needs to be overlayed over the main map */\r\n mapOverlay?: {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n mapBorderWidth?: number;\r\n mapBorderColor?: string;\r\n };\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 /** Toggle if the map is centered and zoomed to the highlighted ids. */\r\n zoomAndCenterByHighlightedIds?: boolean;\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 /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Scale for the colors */\r\n scaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Toggle visibility of color scale. */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function ChoroplethMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-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 colorDomain,\r\n colorLegendTitle,\r\n scaleType = 'threshold',\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedIds = [],\r\n onSeriesMouseClick,\r\n mapProperty = 'ISO3',\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection = 'naturalEarth',\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n projectionRotate = [0, 0],\r\n zoomAndCenterByHighlightedIds = false,\r\n rewindCoordinatesInMapData = true,\r\n mapOverlay,\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = 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 const [overlayMapShape, setOverlayMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(shape);\r\n });\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateOverlayMapShape = useEffectEvent((shape: any) => {\r\n setOverlayMapShape(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 useEffect(() => {\r\n if (!mapOverlay?.mapData) onUpdateOverlayMapShape(undefined);\r\n if (typeof mapOverlay?.mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapOverlay?.mapData);\r\n fetchData.then(d => {\r\n onUpdateOverlayMapShape(d as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateOverlayMapShape(mapOverlay?.mapData);\r\n }\r\n }, [mapOverlay?.mapData]);\r\n\r\n const domain =\r\n colorDomain ||\r\n (scaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? `${d.date}` ===\r\n format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => el.properties.NAME !== 'Antarctica',\r\n ),\r\n }\r\n }\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (scaleType === 'categorical'\r\n ? Colors[theme].categoricalColors.colors\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n colorLegendTitle={colorLegendTitle}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n categorical={scaleType === 'categorical'}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n mapProperty={mapProperty}\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n overlayMapData={overlayMapShape}\r\n overlayMapBorderColor={mapOverlay?.mapBorderColor}\r\n overlayMapBorderWidth={mapOverlay?.mapBorderWidth}\r\n classNames={classNames}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n zoomInteraction={zoomInteraction}\r\n dimmedOpacity={dimmedOpacity}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n customLayers={customLayers}\r\n zoomAndCenterByHighlightedIds={zoomAndCenterByHighlightedIds}\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\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":["Graph","props","data","colorDomain","colors","mapData","colorLegendTitle","categorical","height","width","scale","centerPoint","tooltip","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedIds","onSeriesMouseClick","mapProperty","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","collapseColorScaleByDefault","zoomAndCenterByHighlightedIds","projectionRotate","rewindCoordinatesInMapData","overlayMapData","overlayMapBorderColor","overlayMapBorderWidth","formattedMapData","useMemo","rewind","reverse","formattedOverlayMapData","selectedColor","setSelectedColor","useState","undefined","zoomRef","useRef","showLegend","setShowLegend","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","colorScale","scaleOrdinal","domain","range","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","filter","on","transform","attr","call","bounds","bbox","features","d","length","indexOf","properties","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","i","path","stroke","strokeWidth","fill","vectorEffect","AnimatePresence","index","findIndex","el","id","color","checkIfNullOrUndefined","x","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","fillOpacity","pointerEvents","cn","colorLegend","X","P","display","WebkitLineClamp","WebkitBoxOrient","backgroundColor","textAnchor","numberFormattingFunction","DetailsModal","modal","Tooltip","ChoroplethMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","scaleType","t2","t3","padding","t4","t5","t6","t7","relativeHeight","isWorldMap","t8","t9","t10","graphID","t11","t12","graphDownload","t13","dataDownload","t14","showAntarctica","t15","language","t16","minHeight","t17","theme","t18","ariaLabel","t19","t20","t21","t22","t23","t24","timeline","t25","t26","t27","t28","mapOverlay","Colors","light","graphNoData","grays","t29","t30","t31","t32","enabled","autoplay","showOnlyActiveDate","t33","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t34","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","overlayMapShape","setOverlayMapShape","graphDiv","graphParentDiv","t35","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t36","shape","onUpdateShape","useEffectEvent","t37","shape_0","onUpdateOverlayMapShape","t38","fetchAndParseJSON","then","d_1","t39","t40","d_2","t41","t42","t43","getUniqValue","getJenks","_temp3","t44","t45","speed","interval","setInterval","clearInterval","t46","t47","getSliderMarks","markObj","t48","graphContainer","t49","t50","description","title","GraphHeader","_temp4","_temp5","_temp6","_temp7","_temp8","t51","Pause","Play","SliderUI","nextValue","nextValue_0","t52","GraphArea","d_9","format","_temp9","categoricalColors","sequentialColors","max","Spinner","t53","footnote","source","GraphFooter","t54","GraphContainer","NAME","d_6","d_5","d_4","d_8","d_7","d_3","a","b"],"mappings":"ylCAiFO,SAASA,GAAMC,EAAc,CAClC,KAAM,CACJC,KAAAA,EACAC,YAAAA,EACAC,OAAAA,EACAC,QAAAA,EACAC,iBAAAA,EACAC,YAAAA,EACAC,OAAAA,EACAC,MAAAA,EACAC,MAAAA,EACAC,YAAAA,EACAC,QAAAA,GACAC,eAAAA,EACAC,eAAAA,GACAC,eAAAA,GACAC,kBAAAA,GACAC,eAAAA,GACAC,gBAAAA,GACAC,oBAAAA,GACAC,eAAAA,EACAC,mBAAAA,GACAC,YAAAA,EACAC,4BAAAA,GACAC,eAAAA,EACAC,OAAAA,GACAC,WAAAA,GACAC,cAAAA,EACAC,gBAAAA,EACAC,QAAAA,EACAC,cAAAA,EACAC,aAAAA,GACAC,4BAAAA,GACAC,8BAAAA,GACAC,iBAAAA,EACAC,2BAAAA,EACAC,eAAAA,EACAC,sBAAAA,GACAC,sBAAAA,EAAAA,EACErC,EACEsC,EAAmBC,EAAAA,QAAQ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,CAAC,CAlEvB,SAAA7F,GAAAtJ,EAAA,CAAA,OA8DgBA,EAACkJ,IAAK"}
|
package/dist/ChoroplethMap.d.ts
CHANGED
|
@@ -96,6 +96,12 @@ declare interface Props {
|
|
|
96
96
|
padding?: string;
|
|
97
97
|
/** Map data as an object in geoJson format or a url for geoJson */
|
|
98
98
|
mapData?: any;
|
|
99
|
+
/** Detail if any other map needs to be overlayed over the main map */
|
|
100
|
+
mapOverlay?: {
|
|
101
|
+
mapData?: any;
|
|
102
|
+
mapBorderWidth?: number;
|
|
103
|
+
mapBorderColor?: string;
|
|
104
|
+
};
|
|
99
105
|
/** 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. */
|
|
100
106
|
rewindCoordinatesInMapData?: boolean;
|
|
101
107
|
/** Scaling factor for the map. Multiplies the scale number to scale. */
|