@undp/data-viz 2.0.9 → 2.1.0
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/AreaChart.cjs +1 -1
- package/dist/AreaChart.d.ts +2 -0
- package/dist/AreaChart.js +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +2 -0
- package/dist/BarGraph.js +1188 -1213
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.d.ts +2 -0
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.d.ts +2 -0
- package/dist/BeeSwarmChart.js +258 -267
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.d.ts +2 -0
- package/dist/BiVariateChoroplethMap.js +126 -131
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.d.ts +2 -0
- package/dist/BulletChart.js +404 -413
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.d.ts +2 -0
- package/dist/ButterflyChart.js +179 -184
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.d.ts +2 -0
- package/dist/ChoroplethMap.js +268 -273
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.d.ts +2 -0
- package/dist/CirclePackingGraph.js +1 -1
- package/dist/DataCards.d.ts +2 -0
- package/dist/DataCards.js +1 -1
- package/dist/DataTable.d.ts +2 -0
- package/dist/DetailsModal-0Ry5nXiC.js +32 -0
- package/dist/DetailsModal-0Ry5nXiC.js.map +1 -0
- package/dist/DetailsModal-BN0HDFlV.cjs +2 -0
- package/dist/DetailsModal-BN0HDFlV.cjs.map +1 -0
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.d.ts +2 -0
- package/dist/DifferenceLineChart.js +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.d.ts +2 -0
- package/dist/DonutChart.js +185 -190
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.d.ts +2 -0
- package/dist/DotDensityMap.js +198 -203
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.d.ts +2 -0
- package/dist/DualAxisLineChart.js +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.d.ts +2 -0
- package/dist/DumbbellChart.js +364 -373
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/GeoHubCompareMaps.d.ts +2 -0
- package/dist/GeoHubMap.d.ts +2 -0
- package/dist/GeoHubMapWithLayerSelection.d.ts +2 -0
- package/dist/{GraphEl-BcKU0bG1.cjs → GraphEl-B16EYkko.cjs} +2 -2
- package/dist/{GraphEl-BcKU0bG1.cjs.map → GraphEl-B16EYkko.cjs.map} +1 -1
- package/dist/{GraphEl-CGq1EWRn.js → GraphEl-ebgfxefq.js} +3 -3
- package/dist/{GraphEl-CGq1EWRn.js.map → GraphEl-ebgfxefq.js.map} +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.cjs.map +1 -1
- package/dist/GriddedGraphs.d.ts +2 -0
- package/dist/GriddedGraphs.js +19 -19
- package/dist/GriddedGraphs.js.map +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +2 -0
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.d.ts +2 -0
- package/dist/HeatMap.js +111 -116
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.d.ts +2 -0
- package/dist/Histogram.js +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.d.ts +2 -0
- package/dist/HybridMap.js +202 -207
- package/dist/HybridMap.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.d.ts +2 -0
- package/dist/LineChartWithConfidenceInterval.js +1 -1
- package/dist/{Modal-DGcuAHyK.js → Modal-bMQA6bL_.js} +5 -5
- package/dist/{Modal-DGcuAHyK.js.map → Modal-bMQA6bL_.js.map} +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.cjs.map +1 -1
- package/dist/MultiGraphDashboard.d.ts +2 -0
- package/dist/MultiGraphDashboard.js +10 -10
- package/dist/MultiGraphDashboard.js.map +1 -1
- package/dist/MultiGraphDashboardFromConfig.d.ts +2 -0
- package/dist/MultiGraphDashboardWideToLongFormat.d.ts +2 -0
- package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +2 -0
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.d.ts +2 -0
- package/dist/MultiLineAltChart.js +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.d.ts +2 -0
- package/dist/MultiLineChart.js +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.d.ts +2 -0
- package/dist/ParetoChart.js +187 -192
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +2 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +16 -16
- package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +2 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +2 -0
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.d.ts +2 -0
- package/dist/RadarChart.js +158 -163
- package/dist/RadarChart.js.map +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.d.ts +2 -0
- package/dist/SankeyChart.js +172 -177
- package/dist/SankeyChart.js.map +1 -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 +222 -227
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.d.ts +2 -0
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.d.ts +2 -0
- package/dist/SimpleLineChart.js +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.cjs.map +1 -1
- package/dist/SingleGraphDashboard.d.ts +2 -0
- package/dist/SingleGraphDashboard.js +24 -24
- package/dist/SingleGraphDashboard.js.map +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +2 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +2 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +2 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +2 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +46 -46
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +2 -0
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.d.ts +2 -0
- package/dist/SlopeChart.js +182 -187
- package/dist/SlopeChart.js.map +1 -1
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.d.ts +2 -0
- package/dist/SparkLine.js +1 -1
- package/dist/StatCardFromData.d.ts +2 -0
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.d.ts +2 -0
- package/dist/StripChart.js +249 -258
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.d.ts +2 -0
- package/dist/ThreeDGlobe.js +142 -147
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/Tooltip-Dj5eVppQ.js +45 -0
- package/dist/Tooltip-Dj5eVppQ.js.map +1 -0
- package/dist/Tooltip-uUdw6wJL.cjs +2 -0
- package/dist/Tooltip-uUdw6wJL.cjs.map +1 -0
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.d.ts +2 -0
- package/dist/TreeMapGraph.js +159 -164
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.d.ts +2 -0
- package/dist/UnitChart.d.ts +2 -0
- package/dist/{checkIfMultiple-Y9iKaV_u.js → checkIfMultiple-CIRtG0KE.js} +2 -2
- package/dist/{checkIfMultiple-Y9iKaV_u.js.map → checkIfMultiple-CIRtG0KE.js.map} +1 -1
- package/dist/index-BBV4tAeA.js +330 -0
- package/dist/index-BBV4tAeA.js.map +1 -0
- package/dist/index-CF5hnGvG.cjs +2 -0
- package/dist/index-CF5hnGvG.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/Tooltip-4dJo4_AF.cjs +0 -2
- package/dist/Tooltip-4dJo4_AF.cjs.map +0 -1
- package/dist/Tooltip-CwWUegPB.js +0 -43
- package/dist/Tooltip-CwWUegPB.js.map +0 -1
- package/dist/index-B2LQV7Tk.js +0 -335
- package/dist/index-B2LQV7Tk.js.map +0 -1
- package/dist/index-xRHRLDIp.cjs +0 -2
- package/dist/index-xRHRLDIp.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DotDensityMap.js","sources":["../src/Components/Graphs/Maps/DotDensityMap/Graph.tsx","../src/Components/Graphs/Maps/DotDensityMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleSqrt } from 'd3-scale';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n DotDensityMapDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { X } from '@/Components/Icons';\r\n\r\ninterface Props {\r\n data: DotDensityMapDataType[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData: any;\r\n colorDomain: string[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n colorLegendTitle?: string;\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}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n colorLegendTitle,\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 collapseColorScaleByDefault,\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 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 return (\r\n <g key={i}>\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })}\r\n </g>\r\n );\r\n })\r\n }\r\n <AnimatePresence>\r\n {data.map(d => {\r\n const color =\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)];\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: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\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, d.lat]) as [number, number])[0]\r\n },${(projection([d.long, d.lat]) 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:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\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='fill-primary-gray-600 dark:fill-primary-gray-300 text-sm'\r\n style={{ textAnchor: 'start' }}\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 {data.filter(el => el.color).length === 0 || 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 className='p-2' style={{ backgroundColor: 'rgba(240,240,240, 0.7)' }}>\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <p\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 <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 </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'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\r\n ) : null}\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent } from 'react';\r\nimport { 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 { ascending, sort } from 'd3-array';\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 DotDensityMapDataType,\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} 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 { uniqBy } from '@/Utils/uniqBy';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: DotDensityMapDataType[];\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 | string[];\r\n /** Domain of colors for the graph */\r\n colorDomain: 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 /** 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 /** 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 /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\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 /** 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 DotDensityMap(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 colorLegendTitle,\r\n colorDomain,\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 } = 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 = sort(\r\n uniqBy(data, 'date', true).map(d =>\r\n parse(`${d}`, timeline.dateFormat || 'yyyy', new Date()).getTime(),\r\n ),\r\n (a, b) => ascending(a, b),\r\n );\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? d.date === format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => el.properties.NAME !== 'Antarctica',\r\n ),\r\n }\r\n }\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain || (uniqBy(data, 'color', true) as string[])\r\n }\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n colorLegendTitle={colorLegendTitle}\r\n radius={radius}\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 />\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","colors","mapData","colorLegendTitle","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","collapseColorScaleByDefault","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","d","length","scaleSqrt","domain","range","nice","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","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","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","i","el","j","masterPath","forEach","geo","path","c","k","point","stroke","strokeWidth","fill","AnimatePresence","color","indexOf","Colors","gray","initial","opacity","whileInView","label","transition","duration","event","clientY","clientX","isEqual","long","lat","r","fillOpacity","x","textAnchor","cn","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","P","Modal","__html","string2HTML","Tooltip","DotDensityMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","t2","t3","padding","t4","t5","t6","t7","t8","relativeHeight","isWorldMap","t9","t10","t11","graphID","t12","graphDownload","t13","dataDownload","t14","showAntarctica","t15","language","t16","minHeight","t17","theme","t18","ariaLabel","t19","t20","t21","t22","t23","timeline","t24","light","graphNoData","grays","t25","t26","t27","enabled","autoplay","showOnlyActiveDate","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","uniqDatesSorted","sort","uniqBy","parse","dateFormat","Date","getTime","_temp","index","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","t28","t29","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t30","shape","onUpdateShape","useEffectEvent","t31","fetchAndParseJSON","then","d_0","t32","interval","setInterval","speed","clearInterval","markObj","getSliderMarks","t33","graphContainer","t34","t35","description","title","GraphHeader","_temp2","_temp3","_temp4","_temp5","_temp6","t36","Pause","Play","SliderUI","nextValue","nextValue_0","t37","GraphArea","d_6","date","format","_temp7","_temp8","_temp9","primaryColors","categoricalColors","checkIfNullOrUndefined","max","_temp0","_temp1","Spinner","t38","footnote","source","GraphFooter","t39","GraphContainer","d_8","d_7","el_1","el_0","properties","NAME","d_3","d_2","d_1","d_5","d_4","a","b","ascending"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA0EO,SAASA,GAAMC,GAAc;AAClC,QAAM;AAAA,IACJC,MAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,kBAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,YAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,qBAAAA;AAAAA,IACAC,uBAAAA;AAAAA,IACAC,oBAAAA;AAAAA,IACAC,6BAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,YAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,cAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,6BAAAA;AAAAA,EAAAA,IACEhC,GACE,CAACiC,IAAeC,EAAgB,IAAIC,EAA6BC,MAAS,GAE1E,CAACC,IAAYC,EAAa,IAAIH,EAClCH,OAAgCI,SAAY,EAAE5B,IAAQ,OAAO,CAACwB,EAChE,GACMO,IAAUC,GAAoD,IAAI,GAGlE,CAACC,GAAgBC,EAAiB,IAAIP,EAAcC,MAAS,GAE7D,CAACO,IAAeC,CAAgB,IAAIT,EAAcC,MAAS,GAC3D,CAACS,GAAQC,CAAS,IAAIX,EAA6BC,MAAS,GAC5D,CAACW,IAAQC,EAAS,IAAIb,EAA6BC,MAAS,GAC5Da,IAAST,GAAsB,IA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/G,QAAAqH,IAAArH,QAAAoI,IAAApI,QAAAiC,IAAAjC,SAAA9J,GAAA8J,SAAAwI,MAAAA,KAAAxI,EAAA,GAAA,GAzKjBwI;AAyKiB;AAzRd,SAAAN,GAAAQ,GAAA;AAAA,SAoP8EvP,KAAM;AAAI;AApPxF,SAAA8O,GAAAU,GAAA;AAAA,SAoPqCxP,EAACnD;AAAO;AApP7C,SAAA4R,GAAAgB,GAAA;AAAA,SAgNyB1L,EAAEa;AAAM;AAhNjC,SAAA4J,GAAAkB,GAAA;AAAA,SAuMyB3L,EAAEa;AAAM;AAvMjC,SAAA2J,GAAAxK,GAAA;AAAA,SAkM4BA,EAAE4L,WAAWC,SAAU;AAAY;AAlM/D,SAAAjC,GAAAkC,GAAA;AAAA,SAiJ4B7P,MAAMrB;AAAS;AAjJ3C,SAAA+O,GAAAoC,GAAA;AAAA,SAgJ6C9P,MAAMrB;AAAS;AAhJ5D,SAAA8O,GAAAsC,GAAA;AAAA,SAgJyB/P,EAACxD;AAAK;AAhJ/B,SAAAgR,GAAAwC,GAAA;AAAA,SA+I2ChQ,MAAMrB;AAAS;AA/I1D,SAAA4O,GAAA0C,GAAA;AAAA,SA+IuBjQ,EAACxD;AAAK;AA/I7B,SAAAsO,GAAAoF,GAAAC,GAAA;AAAA,SA4DOC,GAAUF,GAAGC,CAAC;AAAC;"}
|
|
1
|
+
{"version":3,"file":"DotDensityMap.js","sources":["../src/Components/Graphs/Maps/DotDensityMap/Graph.tsx","../src/Components/Graphs/Maps/DotDensityMap/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleSqrt } 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\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n DotDensityMapDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { X } from '@/Components/Icons';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: DotDensityMapDataType[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData: any;\r\n colorDomain: string[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n colorLegendTitle?: string;\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}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n colorLegendTitle,\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 collapseColorScaleByDefault,\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 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 return (\r\n <g key={i}>\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })}\r\n </g>\r\n );\r\n })\r\n }\r\n <AnimatePresence>\r\n {data.map(d => {\r\n const color =\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)];\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: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\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, d.lat]) as [number, number])[0]\r\n },${(projection([d.long, d.lat]) 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:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\r\n stroke:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : !d.color\r\n ? Colors.gray\r\n : colors[colorDomain.indexOf(`${d.color}`)],\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='fill-primary-gray-600 dark:fill-primary-gray-300 text-sm'\r\n style={{ textAnchor: 'start' }}\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 {data.filter(el => el.color).length === 0 || 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 className='p-2' style={{ backgroundColor: 'rgba(240,240,240, 0.7)' }}>\r\n {colorLegendTitle && colorLegendTitle !== '' ? (\r\n <p\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 <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 </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'\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 } 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 { ascending, sort } from 'd3-array';\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 DotDensityMapDataType,\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} 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 { uniqBy } from '@/Utils/uniqBy';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: DotDensityMapDataType[];\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 | string[];\r\n /** Domain of colors for the graph */\r\n colorDomain: 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 /** 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 /** 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 /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\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 /** 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 DotDensityMap(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 colorLegendTitle,\r\n colorDomain,\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 } = 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 = sort(\r\n uniqBy(data, 'date', true).map(d =>\r\n parse(`${d}`, timeline.dateFormat || 'yyyy', new Date()).getTime(),\r\n ),\r\n (a, b) => ascending(a, b),\r\n );\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? d.date === format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => el.properties.NAME !== 'Antarctica',\r\n ),\r\n }\r\n }\r\n colorDomain={\r\n data.filter(el => el.color).length === 0\r\n ? []\r\n : colorDomain || (uniqBy(data, 'color', true) as string[])\r\n }\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n data.filter(el => el.color).length === 0\r\n ? colors\r\n ? [colors as string]\r\n : [Colors.primaryColors['blue-600']]\r\n : (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n }\r\n colorLegendTitle={colorLegendTitle}\r\n radius={radius}\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 />\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","colors","mapData","colorLegendTitle","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","collapseColorScaleByDefault","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","d","length","scaleSqrt","domain","range","nice","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","e","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","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","i","el","j","masterPath","forEach","geo","path","c","k","point","stroke","strokeWidth","fill","AnimatePresence","color","indexOf","Colors","gray","initial","opacity","whileInView","label","transition","duration","event","clientY","clientX","isEqual","long","lat","r","fillOpacity","x","textAnchor","cn","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","P","DetailsModal","modal","Tooltip","DotDensityMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","t2","t3","padding","t4","t5","t6","t7","t8","relativeHeight","isWorldMap","t9","t10","t11","graphID","t12","graphDownload","t13","dataDownload","t14","showAntarctica","t15","language","t16","minHeight","t17","theme","t18","ariaLabel","t19","t20","t21","t22","t23","timeline","t24","light","graphNoData","grays","t25","t26","t27","enabled","autoplay","showOnlyActiveDate","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","uniqDatesSorted","sort","uniqBy","parse","dateFormat","Date","getTime","_temp","index","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","t28","t29","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t30","shape","onUpdateShape","useEffectEvent","t31","fetchAndParseJSON","then","d_0","t32","interval","setInterval","speed","clearInterval","markObj","getSliderMarks","t33","graphContainer","t34","t35","description","title","GraphHeader","_temp2","_temp3","_temp4","_temp5","_temp6","t36","Pause","Play","SliderUI","nextValue","nextValue_0","t37","GraphArea","d_6","date","format","_temp7","_temp8","_temp9","primaryColors","categoricalColors","checkIfNullOrUndefined","max","_temp0","_temp1","Spinner","t38","footnote","source","GraphFooter","t39","GraphContainer","d_8","d_7","el_1","el_0","properties","NAME","d_3","d_2","d_1","d_5","d_4","a","b","ascending"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAyEO,SAASA,GAAMC,GAAc;AAClC,QAAM;AAAA,IACJC,MAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,kBAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,YAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,mBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,qBAAAA;AAAAA,IACAC,uBAAAA;AAAAA,IACAC,oBAAAA;AAAAA,IACAC,6BAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,YAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,cAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,6BAAAA;AAAAA,EAAAA,IACEhC,GACE,CAACiC,IAAeC,EAAgB,IAAIC,EAA6BC,MAAS,GAE1E,CAACC,IAAYC,EAAa,IAAIH,EAClCH,OAAgCI,SAAY,EAAE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AAAmG,IAAAnG,QAAAqG,IAAArG,QAAAsG,IAAAtG,QAAA+G,IAAA/G,QAAAqH,IAAArH,QAAAoI,IAAApI,QAAAiC,IAAAjC,SAAA7J,GAAA6J,SAAAwI,MAAAA,KAAAxI,EAAA,GAAA,GAzKjBwI;AAyKiB;AAzRd,SAAAN,GAAAQ,GAAA;AAAA,SAoP8EtP,KAAM;AAAI;AApPxF,SAAA6O,GAAAU,GAAA;AAAA,SAoPqCvP,EAACnD;AAAO;AApP7C,SAAA2R,GAAAgB,GAAA;AAAA,SAgNyBzL,EAAEa;AAAM;AAhNjC,SAAA2J,GAAAkB,GAAA;AAAA,SAuMyB1L,EAAEa;AAAM;AAvMjC,SAAA0J,GAAAvK,GAAA;AAAA,SAkM4BA,EAAE2L,WAAWC,SAAU;AAAY;AAlM/D,SAAAjC,GAAAkC,GAAA;AAAA,SAiJ4B5P,MAAMrB;AAAS;AAjJ3C,SAAA8O,GAAAoC,GAAA;AAAA,SAgJ6C7P,MAAMrB;AAAS;AAhJ5D,SAAA6O,GAAAsC,GAAA;AAAA,SAgJyB9P,EAACxD;AAAK;AAhJ/B,SAAA+Q,GAAAwC,GAAA;AAAA,SA+I2C/P,MAAMrB;AAAS;AA/I1D,SAAA2O,GAAA0C,GAAA;AAAA,SA+IuBhQ,EAACxD;AAAK;AA/I7B,SAAAqO,GAAAoF,GAAAC,GAAA;AAAA,SA4DOC,GAAUF,GAAGC,CAAC;AAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-CTPQjnHt.cjs"),E=require("react"),Vt=require("./parse-hMnG_lRV.cjs"),be=require("./index-Cno4Q0YE.cjs"),ae=require("./numberFormattingFunction-02t-wJta.cjs"),ke=require("./Tooltip-4dJo4_AF.cjs"),L=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ne=require("./XTicksAndGridLines-B6CELS7q.cjs"),he=require("./Axis-DxRV2yMi.cjs"),ve=require("./AxisTitle-sS5bLLR7.cjs"),Oe=require("./index-B_sAFsEV.cjs"),Ie=require("./time-CZd5YLSP.cjs"),je=require("./linear-BwPAspcq.cjs"),ye=require("./line-DHV4JwCR.cjs"),ce=require("./step-BZ3C8QFW.cjs"),Le=require("./select-Bnfk0lJx.cjs"),Se=require("./init-DU0ybBc_.cjs"),De=require("./pointer-Dkq5NV1q.cjs"),qe=require("./use-in-view-QcfiW0w3.cjs"),ct=require("./proxy-BxvUI_9l.cjs"),Me=require("./GraphFooter.cjs"),Te=require("./GraphHeader.cjs"),Ce=require("./ColorLegend.cjs"),Ae=require("./Colors.cjs"),Ve=require("./EmptyState-sAEZ_5rU.cjs"),we=require("./GraphContainer-d8A46BK2.cjs"),Fe=require("./getNoOfTicks-C_1CFXv_.cjs");function $e(e){const t=n.compilerRuntimeExports.c(117),{data:b,width:B,height:z,lineColors:o,labels:v,sameAxes:j,dateFormat:p,showValues:Rt,noOfXTicks:zt,rightMargin:Jt,leftMargin:Ft,topMargin:J,bottomMargin:bt,tooltip:ut,highlightAreaSettings:kt,onSeriesMouseOver:Nt,animate:s,strokeWidth:V,showDots:xt,noOfYTicks:mt,lineSuffixes:F,linePrefixes:K,minDate:pt,maxDate:Ot,curveType:Q,styles:a,classNames:c,precision:Z,customLayers:$,showAxisLabels:P}=e,$t=E.useRef(null);let ft;t[0]!==s.amount||t[1]!==s.once?(ft={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=ft):ft=t[2];const d=qe.useInView($t,ft),[y,Pt]=E.useState(!1);let dt,_;t[3]!==s.duration||t[4]!==y||t[5]!==d?(dt=()=>{if(d&&!y){const i=setTimeout(()=>{Pt(!0)},(s.duration+.5)*1e3);return()=>clearTimeout(i)}},_=[d,y,s.duration],t[3]=s.duration,t[4]=y,t[5]=d,t[6]=dt,t[7]=_):(dt=t[6],_=t[7]),E.useEffect(dt,_);const Gt=Q==="linear"?ye.curveLinear:Q==="step"?ce.curveStep:Q==="stepAfter"?ce.stepAfter:Q==="stepBefore"?ce.stepBefore:ce.monotoneX,[k,It]=E.useState(void 0),[ht,f]=E.useState(void 0),[m,Ht]=E.useState(void 0),tt=Ft+50,Lt=Jt+65;let et;t[8]!==bt||t[9]!==tt||t[10]!==Lt||t[11]!==J?(et={top:J,bottom:bt,left:tt,right:Lt},t[8]=bt,t[9]=tt,t[10]=Lt,t[11]=J,t[12]=et):et=t[12];const h=et,G=E.useRef(null);let H;t[13]!==p?(H=i=>({...i,date:Vt.parse(`${i.date}`,p,new Date)}),t[13]=p,t[14]=H):H=t[14];const r=be.orderBy(b.map(H),["date"],["asc"]);let it;if(t[15]!==p||t[16]!==kt){let i;t[18]!==p?(i=w=>({...w,coordinates:[w.coordinates[0]===null?null:Vt.parse(`${w.coordinates[0]}`,p,new Date),w.coordinates[1]===null?null:Vt.parse(`${w.coordinates[1]}`,p,new Date)]}),t[18]=p,t[19]=i):i=t[19],it=kt.map(i),t[15]=p,t[16]=kt,t[17]=it}else it=t[17];const yt=it,u=B-h.left-h.right,l=z-h.top-h.bottom,Ut=pt?Vt.parse(`${pt}`,p,new Date):r[0].date,St=Ot?Vt.parse(`${Ot}`,p,new Date):r[r.length-1].date,gt=Math.min(...r.map(yi).filter(hi))!==1/0?Math.min(...r.map(di).filter(fi))>0?0:Math.min(...r.map(pi).filter(mi)):0,nt=Math.min(...r.map(xi).filter(ui))!==1/0?Math.min(...r.map(ci).filter(ai))>0?0:Math.min(...r.map(li).filter(ri)):0,st=Math.max(...r.map(oi).filter(si))!==1/0?Math.max(...r.map(ni).filter(ii)):0,U=Math.max(...r.map(ei).filter(ti))!==1/0?Math.max(...r.map(_e).filter(Ze)):0,Dt=gt<nt?gt:nt,W=st>U?st:U,x=Ie.time().domain([Ut,St]).range([0,u]),R=je.linear().domain([j?Dt:gt,j?W>0?W:0:st>0?st:0]).range([l,0]).nice(),g=je.linear().domain([j?Dt:nt,j?W>0?W:0:U>0?U:0]).range([l,0]).nice(),qt=ye.line().defined(Qe).x(i=>x(i.date)).y(i=>R(i.y1)).curve(Gt),vt=ye.line().defined(Ke).x(i=>x(i.date)).y(i=>g(i.y2)).curve(Gt),Wt=R.ticks(mt),Xt=g.ticks(mt),Mt=x.ticks(zt);E.useEffect(()=>{const i=de=>{const ge=r[Se.bisectCenter(r.map(Je),x.invert(De.pointer(de)[0]),0)];It(ge||r[r.length-1]),Nt?.(ge||r[r.length-1]),Ht(de.clientY),f(de.clientX)},w=()=>{It(void 0),f(void 0),Ht(void 0),Nt?.(void 0)};Le.select(G.current).on("mousemove",i).on("mouseout",w)},[x,r,Nt]);let ot;t[20]!==s||t[21]!==l||t[22]!==u||t[23]!==yt||t[24]!==d||t[25]!==x?(ot=n.jsxRuntimeExports.jsx(Oe.HighlightArea,{areaSettings:yt,width:u,height:l,scale:x,animate:s,isInView:d}),t[20]=s,t[21]=l,t[22]=u,t[23]=yt,t[24]=d,t[25]=x,t[26]=ot):ot=t[26];const jt=c?.xAxis?.axis;let S;t[27]!==jt?(S={axis:jt},t[27]=jt,t[28]=S):S=t[28];let N;t[29]!==a?.xAxis?.axis?(N=a?.xAxis?.axis||{},t[29]=a?.xAxis?.axis,t[30]=N):N=t[30];let D;t[31]!==o[0]||t[32]!==N?(D={axis:{stroke:o[0],...N}},t[31]=o[0],t[32]=N,t[33]=D):D=t[33];let rt;t[34]!==l||t[35]!==S||t[36]!==D?(rt=n.jsxRuntimeExports.jsx(he.Axis,{y1:0,y2:l,x1:-15,x2:-15,classNames:S,styles:D}),t[34]=l,t[35]=S,t[36]=D,t[37]=rt):rt=t[37];let q;t[38]!==c?.yAxis?.title||t[39]!==l||t[40]!==v||t[41]!==o[0]||t[42]!==h.left||t[43]!==P||t[44]!==a?.yAxis?.title?(q=P?n.jsxRuntimeExports.jsx(ve.AxisTitle,{x:10-h.left,y:l/2,style:{fill:o[0],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:v[0].length>100?`${v[0].substring(0,100)}...`:v[0],rotate90:!0}):null,t[38]=c?.yAxis?.title,t[39]=l,t[40]=v,t[41]=o[0],t[42]=h.left,t[43]=P,t[44]=a?.yAxis?.title,t[45]=q):q=t[45];const Yt=u+15,lt=u+15,Bt=c?.xAxis?.axis;let M;t[46]!==Bt?(M={axis:Bt},t[46]=Bt,t[47]=M):M=t[47];let X;t[48]!==a?.xAxis?.axis?(X=a?.xAxis?.axis||{},t[48]=a?.xAxis?.axis,t[49]=X):X=t[49];let O;t[50]!==o[1]||t[51]!==X?(O={axis:{stroke:o[1],...X}},t[50]=o[1],t[51]=X,t[52]=O):O=t[52];let Y;t[53]!==l||t[54]!==Yt||t[55]!==lt||t[56]!==M||t[57]!==O?(Y=n.jsxRuntimeExports.jsx(he.Axis,{y1:0,y2:l,x1:Yt,x2:lt,classNames:M,styles:O}),t[53]=l,t[54]=Yt,t[55]=lt,t[56]=M,t[57]=O,t[58]=Y):Y=t[58];let at;t[59]!==c?.yAxis?.title||t[60]!==l||t[61]!==u||t[62]!==v||t[63]!==o[1]||t[64]!==h.right||t[65]!==P||t[66]!==a?.yAxis?.title?(at=P?n.jsxRuntimeExports.jsx(ve.AxisTitle,{x:u+h.right-15,y:l/2,style:{fill:o[1],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:v[1].length>100?`${v[1].substring(0,100)}...`:v[1],rotate90:!0}):null,t[59]=c?.yAxis?.title,t[60]=l,t[61]=u,t[62]=v,t[63]=o[1],t[64]=h.right,t[65]=P,t[66]=a?.yAxis?.title,t[67]=at):at=t[67];const At=u+15,T=c?.xAxis?.axis;let A;t[68]!==T?(A={axis:T},t[68]=T,t[69]=A):A=t[69];const C=a?.xAxis?.axis;let I;t[70]!==C?(I={axis:C},t[70]=C,t[71]=I):I=t[71];let wt;t[72]!==l||t[73]!==At||t[74]!==A||t[75]!==I?(wt=n.jsxRuntimeExports.jsx(he.Axis,{y1:l,y2:l,x1:-15,x2:At,classNames:A,styles:I}),t[72]=l,t[73]=At,t[74]=A,t[75]=I,t[76]=wt):wt=t[76];let Et;t[77]!==p?(Et=i=>Vt.format(i,p),t[77]=p,t[78]=Et):Et=t[78];const Ee=Mt.map(Et),Re=Mt.map(i=>x(i)),ue=a?.xAxis?.gridLines,xe=a?.xAxis?.labels;let Kt;t[79]!==ue||t[80]!==xe?(Kt={gridLines:ue,labels:xe},t[79]=ue,t[80]=xe,t[81]=Kt):Kt=t[81];const me=c?.xAxis?.gridLines;let Tt;t[82]!==me?(Tt=n.mo("opacity-0",me),t[82]=me,t[83]=Tt):Tt=t[83];const pe=c?.xAxis?.labels;let Ct;t[84]!==pe?(Ct=n.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",pe),t[84]=pe,t[85]=Ct):Ct=t[85];let Qt;t[86]!==Tt||t[87]!==Ct?(Qt={gridLines:Tt,labels:Ct},t[86]=Tt,t[87]=Ct,t[88]=Qt):Qt=t[88];let Zt;t[89]!==$?(Zt=$.filter(ze).map(Be),t[89]=$,t[90]=Zt):Zt=t[90];let _t;t[91]!==o[0]||t[92]!==V?(_t={stroke:o[0],strokeWidth:V,fill:"none"},t[91]=o[0],t[92]=V,t[93]=_t):_t=t[93];let te;t[94]!==s.duration?(te={opacity:0,transition:{duration:s.duration}},t[94]=s.duration,t[95]=te):te=t[95];let ee;t[96]!==o[1]||t[97]!==V?(ee={stroke:o[1],strokeWidth:V,fill:"none"},t[96]=o[1],t[97]=V,t[98]=ee):ee=t[98];let ie;t[99]!==s.duration?(ie={opacity:0,transition:{duration:s.duration}},t[99]=s.duration,t[100]=ie):ie=t[100];const fe=r.map((i,w)=>n.jsxRuntimeExports.jsxs(ct.motion.g,{children:[L.checkIfNullOrUndefined(i.y1)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[xt?n.jsxRuntimeExports.jsx(ct.motion.circle,{r:u/r.length<5?0:u/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:x(i.date),cy:R(i.y1),fill:o[0]},whileInView:{opacity:1,fill:o[0],transition:{duration:y?s.duration:.5,delay:y?0:s.duration},cx:x(i.date),cy:R(i.y1)}},initial:"initial",animate:d?"whileInView":"initial"}):null,Rt?n.jsxRuntimeExports.jsx(ct.motion.text,{dy:L.checkIfNullOrUndefined(i.y2)||i.y2<i.y1?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:n.mo("graph-value graph-value-line-1 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:x(i.date),y:g(i.y1),fill:o[0]},whileInView:{opacity:1,x:x(i.date),fill:o[0],y:g(i.y1),transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:ae.numberFormattingFunction(i.y1,"NA",Z,K[0],F[0])}):null]}),L.checkIfNullOrUndefined(i.y2)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[xt?n.jsxRuntimeExports.jsx(ct.motion.circle,{r:u/r.length<5?0:u/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:x(i.date),cy:g(i.y2),fill:o[1]},whileInView:{opacity:1,transition:{duration:y?s.duration:.5,delay:y?0:s.duration},fill:o[1],cx:x(i.date),cy:g(i.y2)}},initial:"initial",animate:d?"whileInView":"initial"}):null,Rt?n.jsxRuntimeExports.jsx(ct.motion.text,{dy:L.checkIfNullOrUndefined(i.y1)||i.y1<i.y2?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:n.mo("graph-value graph-value-line-2 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:x(i.date),y:g(i.y2),fill:o[1]},whileInView:{opacity:1,x:x(i.date),y:g(i.y2),fill:o[1],transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:ae.numberFormattingFunction(i.y2,"NA",Z,K[1],F[1])}):null]})]},w));let ne;t[101]!==fe?(ne=n.jsxRuntimeExports.jsx("g",{children:fe}),t[101]=fe,t[102]=ne):ne=t[102];let se;t[103]!==$?(se=$.filter(Ge).map(Pe),t[103]=$,t[104]=se):se=t[104];let oe;t[105]===Symbol.for("react.memo_cache_sentinel")?(oe={fill:"none",pointerEvents:"all"},t[105]=oe):oe=t[105];let re;t[106]!==G||t[107]!==l||t[108]!==u?(re=n.jsxRuntimeExports.jsx("rect",{ref:G,style:oe,width:u,height:l}),t[106]=G,t[107]=l,t[108]=u,t[109]=re):re=t[109];let le;return t[110]!==c?.tooltip||t[111]!==ht||t[112]!==m||t[113]!==k||t[114]!==a?.tooltip||t[115]!==ut?(le=k&&ut&&ht&&m?n.jsxRuntimeExports.jsx(ke.Tooltip,{data:k,body:ut,xPos:ht,yPos:m,backgroundStyle:a?.tooltip,className:c?.tooltip}):null,t[110]=c?.tooltip,t[111]=ht,t[112]=m,t[113]=k,t[114]=a?.tooltip,t[115]=ut,t[116]=le):le=t[116],n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(ct.motion.svg,{width:`${B}px`,height:`${z}px`,viewBox:`0 0 ${B} ${z}`,direction:"ltr",ref:$t,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${h.left},${h.top})`,children:[ot,n.jsxRuntimeExports.jsxs("g",{children:[Wt.map((i,w)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:R(i),y2:R(i),x1:-15,x2:-20,style:{stroke:o[0],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:-25,y:R(i),dy:"0.33em",className:n.mo("text-xs",c?.yAxis?.labels),style:{textAnchor:"end",fill:o[0],...a?.yAxis?.labels||{}},children:ae.numberFormattingFunction(i,"NA",Z,K[0],F[0])})]},w)),rt,q]}),n.jsxRuntimeExports.jsxs("g",{children:[Xt.map((i,w)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:g(i),y2:g(i),x1:u+15,x2:u+20,style:{stroke:o[1],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:u+25,y:g(i),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:o[1],...a?.yAxis?.labels||{}},className:n.mo("text-xs",c?.yAxis?.labels),children:ae.numberFormattingFunction(i,"NA",Z,K[1],F[1])})]},w)),Y,at]}),n.jsxRuntimeExports.jsxs("g",{children:[wt,n.jsxRuntimeExports.jsx(Ne.XTicksAndGridLines,{values:Ee,x:Re,y1:0,y2:l,styles:Kt,classNames:Qt,labelType:"primary",showGridLines:!0,precision:Z})]}),Zt,n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(ct.motion.path,{style:_t,exit:te,variants:{initial:{pathLength:0,d:qt(r.filter(Ye))||"",opacity:1},whileInView:{pathLength:1,d:qt(r.filter(Xe))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),n.jsxRuntimeExports.jsx(ct.motion.path,{d:vt(r.filter(We))||"",style:ee,exit:ie,variants:{initial:{pathLength:0,d:vt(r.filter(Ue))||"",opacity:1},whileInView:{pathLength:1,d:vt(r.filter(He))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),k?n.jsxRuntimeExports.jsx("line",{y1:0,y2:l,x1:x(k.date),x2:x(k.date),className:n.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",c?.mouseOverLine),style:a?.mouseOverLine}):null]}),ne,se,re]})}),le]})}function Pe(e){return e.layer}function Ge(e){return e.position==="after"}function He(e){return!L.checkIfNullOrUndefined(e.y2)}function Ue(e){return!L.checkIfNullOrUndefined(e.y2)}function We(e){return!L.checkIfNullOrUndefined(e.y2)}function Xe(e){return!L.checkIfNullOrUndefined(e.y1)}function Ye(e){return!L.checkIfNullOrUndefined(e.y1)}function Be(e){return e.layer}function ze(e){return e.position==="before"}function Je(e){return e.date}function Ke(e){return!L.checkIfNullOrUndefined(e.y2)}function Qe(e){return!L.checkIfNullOrUndefined(e.y1)}function Ze(e){return e!=null}function _e(e){return e.y2}function ti(e){return e!=null}function ei(e){return e.y2}function ii(e){return e!=null}function ni(e){return e.y1}function si(e){return e!=null}function oi(e){return e.y1}function ri(e){return e!=null}function li(e){return e.y2}function ai(e){return e!=null}function ci(e){return e.y2}function ui(e){return e!=null}function xi(e){return e.y2}function mi(e){return e!=null}function pi(e){return e.y1}function fi(e){return e!=null}function di(e){return e.y2}function hi(e){return e!=null}function yi(e){return e.y1}function gi(e){const t=n.compilerRuntimeExports.c(80),{data:b,graphTitle:B,sources:z,graphDescription:o,height:v,width:j,footNote:p,noOfXTicks:Rt,dateFormat:zt,showValues:Jt,padding:Ft,lineColors:J,sameAxes:bt,backgroundColor:ut,leftMargin:kt,rightMargin:Nt,topMargin:s,bottomMargin:V,labels:xt,lineSuffixes:mt,linePrefixes:F,tooltip:K,highlightAreaSettings:pt,relativeHeight:Ot,onSeriesMouseOver:Q,graphID:a,graphDownload:c,dataDownload:Z,animate:$,strokeWidth:P,showDots:$t,language:ft,showColorScale:d,minHeight:y,colorLegendTitle:Pt,theme:dt,ariaLabel:_,noOfYTicks:Gt,maxDate:k,minDate:It,curveType:ht,styles:f,classNames:m,precision:Ht,customLayers:tt,showAxisLabels:Lt}=e,et=zt===void 0?"yyyy":zt,h=Jt===void 0?!1:Jt;let G;t[0]!==J?(G=J===void 0?[Ae.Colors.light.categoricalColors.colors[0],Ae.Colors.light.categoricalColors.colors[1]]:J,t[0]=J,t[1]=G):G=t[1];const H=G,r=bt===void 0?!1:bt,it=ut===void 0?!1:ut,yt=kt===void 0?80:kt,u=Nt===void 0?80:Nt,l=s===void 0?20:s,Ut=V===void 0?25:V;let St;t[2]!==mt?(St=mt===void 0?["",""]:mt,t[2]=mt,t[3]=St):St=t[3];const gt=St;let nt;t[4]!==F?(nt=F===void 0?["",""]:F,t[4]=F,t[5]=nt):nt=t[5];const st=nt;let U;t[6]!==pt?(U=pt===void 0?[]:pt,t[6]=pt,t[7]=U):U=t[7];const Dt=U,W=c===void 0?!1:c,x=Z===void 0?!1:Z,R=$===void 0?!1:$,g=P===void 0?2:P,qt=$t===void 0?!0:$t,vt=ft===void 0?"en":ft,Wt=d===void 0?!0:d,Xt=y===void 0?0:y,Mt=dt===void 0?"light":dt,ot=Gt===void 0?5:Gt,jt=ht===void 0?"curve":ht,S=Ht===void 0?2:Ht;let N;t[8]!==tt?(N=tt===void 0?[]:tt,t[8]=tt,t[9]=N):N=t[9];const D=N,rt=Lt===void 0?!0:Lt,[q,Yt]=E.useState(0),[lt,Bt]=E.useState(0),M=E.useRef(null),X=E.useRef(null);let O,Y;t[10]===Symbol.for("react.memo_cache_sentinel")?(O=()=>{const wt=new ResizeObserver(Et=>{Yt(Et[0].target.clientWidth||620),Bt(Et[0].target.clientHeight||480)});return M.current&&wt.observe(M.current),()=>wt.disconnect()},Y=[],t[10]=O,t[11]=Y):(O=t[10],Y=t[11]),E.useEffect(O,Y);const at=m?.graphContainer,At=f?.graphContainer;let T;t[12]!==m?.description||t[13]!==m?.title||t[14]!==b||t[15]!==x||t[16]!==o||t[17]!==W||t[18]!==B||t[19]!==f?.description||t[20]!==f?.title||t[21]!==j?(T=B||o||W||x?n.jsxRuntimeExports.jsx(Te.GraphHeader,{styles:{title:f?.title,description:f?.description},classNames:{title:m?.title,description:m?.description},graphTitle:B,graphDescription:o,width:j,graphDownload:W?X:void 0,dataDownload:x?b.map(Ei).filter(wi).length>0?b.map(Ai).filter(ji):b.filter(vi):null}):null,t[12]=m?.description,t[13]=m?.title,t[14]=b,t[15]=x,t[16]=o,t[17]=W,t[18]=B,t[19]=f?.description,t[20]=f?.title,t[21]=j,t[22]=T):T=t[22];let A;t[23]!==R||t[24]!==Ut||t[25]!==m||t[26]!==Pt||t[27]!==jt||t[28]!==D||t[29]!==b||t[30]!==et||t[31]!==Dt||t[32]!==xt||t[33]!==yt||t[34]!==H||t[35]!==st||t[36]!==gt||t[37]!==k||t[38]!==It||t[39]!==Rt||t[40]!==ot||t[41]!==Q||t[42]!==S||t[43]!==u||t[44]!==r||t[45]!==rt||t[46]!==Wt||t[47]!==qt||t[48]!==h||t[49]!==g||t[50]!==f||t[51]!==lt||t[52]!==q||t[53]!==K||t[54]!==l?(A=b.length===0?n.jsxRuntimeExports.jsx(Ve.EmptyState,{}):n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[Wt?n.jsxRuntimeExports.jsx(Ce.ColorLegend,{colorDomain:xt,colorLegendTitle:Pt,colors:H,showNAColor:!1,className:m?.colorLegend}):null,n.jsxRuntimeExports.jsx(we.GraphArea,{ref:M,children:q&<?n.jsxRuntimeExports.jsx($e,{data:b,sameAxes:r,lineColors:H,width:q,height:lt,dateFormat:et,showValues:h,noOfXTicks:Rt??Fe.getNoOfTicks(q),leftMargin:yt,rightMargin:u,topMargin:l,bottomMargin:Ut,labels:xt,highlightAreaSettings:Dt,tooltip:K,onSeriesMouseOver:Q,animate:R===!0?{duration:.5,once:!0,amount:.5}:R||{duration:0,once:!0,amount:0},strokeWidth:g,showDots:qt,noOfYTicks:ot,lineSuffixes:gt,linePrefixes:st,minDate:It,maxDate:k,curveType:jt,styles:f,classNames:m,precision:S,customLayers:D,showAxisLabels:rt}):null})]}),t[23]=R,t[24]=Ut,t[25]=m,t[26]=Pt,t[27]=jt,t[28]=D,t[29]=b,t[30]=et,t[31]=Dt,t[32]=xt,t[33]=yt,t[34]=H,t[35]=st,t[36]=gt,t[37]=k,t[38]=It,t[39]=Rt,t[40]=ot,t[41]=Q,t[42]=S,t[43]=u,t[44]=r,t[45]=rt,t[46]=Wt,t[47]=qt,t[48]=h,t[49]=g,t[50]=f,t[51]=lt,t[52]=q,t[53]=K,t[54]=l,t[55]=A):A=t[55];let C;t[56]!==m?.footnote||t[57]!==m?.source||t[58]!==p||t[59]!==z||t[60]!==f?.footnote||t[61]!==f?.source||t[62]!==j?(C=z||p?n.jsxRuntimeExports.jsx(Me.GraphFooter,{styles:{footnote:f?.footnote,source:f?.source},classNames:{footnote:m?.footnote,source:m?.source},sources:z,footNote:p,width:j}):null,t[56]=m?.footnote,t[57]=m?.source,t[58]=p,t[59]=z,t[60]=f?.footnote,t[61]=f?.source,t[62]=j,t[63]=C):C=t[63];let I;return t[64]!==_||t[65]!==it||t[66]!==a||t[67]!==v||t[68]!==vt||t[69]!==Xt||t[70]!==Ft||t[71]!==Ot||t[72]!==at||t[73]!==At||t[74]!==T||t[75]!==A||t[76]!==C||t[77]!==Mt||t[78]!==j?(I=n.jsxRuntimeExports.jsxs(we.GraphContainer,{className:at,style:At,id:a,ref:X,"aria-label":_,backgroundColor:it,theme:Mt,language:vt,minHeight:Xt,width:j,height:v,relativeHeight:Ot,padding:Ft,children:[T,A,C]}),t[64]=_,t[65]=it,t[66]=a,t[67]=v,t[68]=vt,t[69]=Xt,t[70]=Ft,t[71]=Ot,t[72]=at,t[73]=At,t[74]=T,t[75]=A,t[76]=C,t[77]=Mt,t[78]=j,t[79]=I):I=t[79],I}function vi(e){return e!==void 0}function ji(e){return e!==void 0}function Ai(e){return e.data}function wi(e){return e!==void 0}function Ei(e){return e.data}exports.DualAxisLineChart=gi;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-CTPQjnHt.cjs"),E=require("react"),Vt=require("./parse-hMnG_lRV.cjs"),be=require("./index-Cno4Q0YE.cjs"),ae=require("./numberFormattingFunction-02t-wJta.cjs"),ke=require("./Tooltip-uUdw6wJL.cjs"),L=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ne=require("./XTicksAndGridLines-B6CELS7q.cjs"),he=require("./Axis-DxRV2yMi.cjs"),ve=require("./AxisTitle-sS5bLLR7.cjs"),Oe=require("./index-B_sAFsEV.cjs"),Ie=require("./time-CZd5YLSP.cjs"),je=require("./linear-BwPAspcq.cjs"),ye=require("./line-DHV4JwCR.cjs"),ce=require("./step-BZ3C8QFW.cjs"),Le=require("./select-Bnfk0lJx.cjs"),Se=require("./init-DU0ybBc_.cjs"),De=require("./pointer-Dkq5NV1q.cjs"),qe=require("./use-in-view-QcfiW0w3.cjs"),ct=require("./proxy-BxvUI_9l.cjs"),Me=require("./GraphFooter.cjs"),Te=require("./GraphHeader.cjs"),Ce=require("./ColorLegend.cjs"),Ae=require("./Colors.cjs"),Ve=require("./EmptyState-sAEZ_5rU.cjs"),we=require("./GraphContainer-d8A46BK2.cjs"),Fe=require("./getNoOfTicks-C_1CFXv_.cjs");function $e(e){const t=n.compilerRuntimeExports.c(117),{data:b,width:B,height:z,lineColors:o,labels:v,sameAxes:j,dateFormat:p,showValues:Rt,noOfXTicks:zt,rightMargin:Jt,leftMargin:Ft,topMargin:J,bottomMargin:bt,tooltip:ut,highlightAreaSettings:kt,onSeriesMouseOver:Nt,animate:s,strokeWidth:V,showDots:xt,noOfYTicks:mt,lineSuffixes:F,linePrefixes:K,minDate:pt,maxDate:Ot,curveType:Q,styles:a,classNames:c,precision:Z,customLayers:$,showAxisLabels:P}=e,$t=E.useRef(null);let ft;t[0]!==s.amount||t[1]!==s.once?(ft={once:s.once,amount:s.amount},t[0]=s.amount,t[1]=s.once,t[2]=ft):ft=t[2];const d=qe.useInView($t,ft),[y,Pt]=E.useState(!1);let dt,_;t[3]!==s.duration||t[4]!==y||t[5]!==d?(dt=()=>{if(d&&!y){const i=setTimeout(()=>{Pt(!0)},(s.duration+.5)*1e3);return()=>clearTimeout(i)}},_=[d,y,s.duration],t[3]=s.duration,t[4]=y,t[5]=d,t[6]=dt,t[7]=_):(dt=t[6],_=t[7]),E.useEffect(dt,_);const Gt=Q==="linear"?ye.curveLinear:Q==="step"?ce.curveStep:Q==="stepAfter"?ce.stepAfter:Q==="stepBefore"?ce.stepBefore:ce.monotoneX,[k,It]=E.useState(void 0),[ht,f]=E.useState(void 0),[m,Ht]=E.useState(void 0),tt=Ft+50,Lt=Jt+65;let et;t[8]!==bt||t[9]!==tt||t[10]!==Lt||t[11]!==J?(et={top:J,bottom:bt,left:tt,right:Lt},t[8]=bt,t[9]=tt,t[10]=Lt,t[11]=J,t[12]=et):et=t[12];const h=et,G=E.useRef(null);let H;t[13]!==p?(H=i=>({...i,date:Vt.parse(`${i.date}`,p,new Date)}),t[13]=p,t[14]=H):H=t[14];const r=be.orderBy(b.map(H),["date"],["asc"]);let it;if(t[15]!==p||t[16]!==kt){let i;t[18]!==p?(i=w=>({...w,coordinates:[w.coordinates[0]===null?null:Vt.parse(`${w.coordinates[0]}`,p,new Date),w.coordinates[1]===null?null:Vt.parse(`${w.coordinates[1]}`,p,new Date)]}),t[18]=p,t[19]=i):i=t[19],it=kt.map(i),t[15]=p,t[16]=kt,t[17]=it}else it=t[17];const yt=it,u=B-h.left-h.right,l=z-h.top-h.bottom,Ut=pt?Vt.parse(`${pt}`,p,new Date):r[0].date,St=Ot?Vt.parse(`${Ot}`,p,new Date):r[r.length-1].date,gt=Math.min(...r.map(yi).filter(hi))!==1/0?Math.min(...r.map(di).filter(fi))>0?0:Math.min(...r.map(pi).filter(mi)):0,nt=Math.min(...r.map(xi).filter(ui))!==1/0?Math.min(...r.map(ci).filter(ai))>0?0:Math.min(...r.map(li).filter(ri)):0,st=Math.max(...r.map(oi).filter(si))!==1/0?Math.max(...r.map(ni).filter(ii)):0,U=Math.max(...r.map(ei).filter(ti))!==1/0?Math.max(...r.map(_e).filter(Ze)):0,Dt=gt<nt?gt:nt,W=st>U?st:U,x=Ie.time().domain([Ut,St]).range([0,u]),R=je.linear().domain([j?Dt:gt,j?W>0?W:0:st>0?st:0]).range([l,0]).nice(),g=je.linear().domain([j?Dt:nt,j?W>0?W:0:U>0?U:0]).range([l,0]).nice(),qt=ye.line().defined(Qe).x(i=>x(i.date)).y(i=>R(i.y1)).curve(Gt),vt=ye.line().defined(Ke).x(i=>x(i.date)).y(i=>g(i.y2)).curve(Gt),Wt=R.ticks(mt),Xt=g.ticks(mt),Mt=x.ticks(zt);E.useEffect(()=>{const i=de=>{const ge=r[Se.bisectCenter(r.map(Je),x.invert(De.pointer(de)[0]),0)];It(ge||r[r.length-1]),Nt?.(ge||r[r.length-1]),Ht(de.clientY),f(de.clientX)},w=()=>{It(void 0),f(void 0),Ht(void 0),Nt?.(void 0)};Le.select(G.current).on("mousemove",i).on("mouseout",w)},[x,r,Nt]);let ot;t[20]!==s||t[21]!==l||t[22]!==u||t[23]!==yt||t[24]!==d||t[25]!==x?(ot=n.jsxRuntimeExports.jsx(Oe.HighlightArea,{areaSettings:yt,width:u,height:l,scale:x,animate:s,isInView:d}),t[20]=s,t[21]=l,t[22]=u,t[23]=yt,t[24]=d,t[25]=x,t[26]=ot):ot=t[26];const jt=c?.xAxis?.axis;let S;t[27]!==jt?(S={axis:jt},t[27]=jt,t[28]=S):S=t[28];let N;t[29]!==a?.xAxis?.axis?(N=a?.xAxis?.axis||{},t[29]=a?.xAxis?.axis,t[30]=N):N=t[30];let D;t[31]!==o[0]||t[32]!==N?(D={axis:{stroke:o[0],...N}},t[31]=o[0],t[32]=N,t[33]=D):D=t[33];let rt;t[34]!==l||t[35]!==S||t[36]!==D?(rt=n.jsxRuntimeExports.jsx(he.Axis,{y1:0,y2:l,x1:-15,x2:-15,classNames:S,styles:D}),t[34]=l,t[35]=S,t[36]=D,t[37]=rt):rt=t[37];let q;t[38]!==c?.yAxis?.title||t[39]!==l||t[40]!==v||t[41]!==o[0]||t[42]!==h.left||t[43]!==P||t[44]!==a?.yAxis?.title?(q=P?n.jsxRuntimeExports.jsx(ve.AxisTitle,{x:10-h.left,y:l/2,style:{fill:o[0],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:v[0].length>100?`${v[0].substring(0,100)}...`:v[0],rotate90:!0}):null,t[38]=c?.yAxis?.title,t[39]=l,t[40]=v,t[41]=o[0],t[42]=h.left,t[43]=P,t[44]=a?.yAxis?.title,t[45]=q):q=t[45];const Yt=u+15,lt=u+15,Bt=c?.xAxis?.axis;let M;t[46]!==Bt?(M={axis:Bt},t[46]=Bt,t[47]=M):M=t[47];let X;t[48]!==a?.xAxis?.axis?(X=a?.xAxis?.axis||{},t[48]=a?.xAxis?.axis,t[49]=X):X=t[49];let O;t[50]!==o[1]||t[51]!==X?(O={axis:{stroke:o[1],...X}},t[50]=o[1],t[51]=X,t[52]=O):O=t[52];let Y;t[53]!==l||t[54]!==Yt||t[55]!==lt||t[56]!==M||t[57]!==O?(Y=n.jsxRuntimeExports.jsx(he.Axis,{y1:0,y2:l,x1:Yt,x2:lt,classNames:M,styles:O}),t[53]=l,t[54]=Yt,t[55]=lt,t[56]=M,t[57]=O,t[58]=Y):Y=t[58];let at;t[59]!==c?.yAxis?.title||t[60]!==l||t[61]!==u||t[62]!==v||t[63]!==o[1]||t[64]!==h.right||t[65]!==P||t[66]!==a?.yAxis?.title?(at=P?n.jsxRuntimeExports.jsx(ve.AxisTitle,{x:u+h.right-15,y:l/2,style:{fill:o[1],...a?.yAxis?.title||{}},className:c?.yAxis?.title,text:v[1].length>100?`${v[1].substring(0,100)}...`:v[1],rotate90:!0}):null,t[59]=c?.yAxis?.title,t[60]=l,t[61]=u,t[62]=v,t[63]=o[1],t[64]=h.right,t[65]=P,t[66]=a?.yAxis?.title,t[67]=at):at=t[67];const At=u+15,T=c?.xAxis?.axis;let A;t[68]!==T?(A={axis:T},t[68]=T,t[69]=A):A=t[69];const C=a?.xAxis?.axis;let I;t[70]!==C?(I={axis:C},t[70]=C,t[71]=I):I=t[71];let wt;t[72]!==l||t[73]!==At||t[74]!==A||t[75]!==I?(wt=n.jsxRuntimeExports.jsx(he.Axis,{y1:l,y2:l,x1:-15,x2:At,classNames:A,styles:I}),t[72]=l,t[73]=At,t[74]=A,t[75]=I,t[76]=wt):wt=t[76];let Et;t[77]!==p?(Et=i=>Vt.format(i,p),t[77]=p,t[78]=Et):Et=t[78];const Ee=Mt.map(Et),Re=Mt.map(i=>x(i)),ue=a?.xAxis?.gridLines,xe=a?.xAxis?.labels;let Kt;t[79]!==ue||t[80]!==xe?(Kt={gridLines:ue,labels:xe},t[79]=ue,t[80]=xe,t[81]=Kt):Kt=t[81];const me=c?.xAxis?.gridLines;let Tt;t[82]!==me?(Tt=n.mo("opacity-0",me),t[82]=me,t[83]=Tt):Tt=t[83];const pe=c?.xAxis?.labels;let Ct;t[84]!==pe?(Ct=n.mo("fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",pe),t[84]=pe,t[85]=Ct):Ct=t[85];let Qt;t[86]!==Tt||t[87]!==Ct?(Qt={gridLines:Tt,labels:Ct},t[86]=Tt,t[87]=Ct,t[88]=Qt):Qt=t[88];let Zt;t[89]!==$?(Zt=$.filter(ze).map(Be),t[89]=$,t[90]=Zt):Zt=t[90];let _t;t[91]!==o[0]||t[92]!==V?(_t={stroke:o[0],strokeWidth:V,fill:"none"},t[91]=o[0],t[92]=V,t[93]=_t):_t=t[93];let te;t[94]!==s.duration?(te={opacity:0,transition:{duration:s.duration}},t[94]=s.duration,t[95]=te):te=t[95];let ee;t[96]!==o[1]||t[97]!==V?(ee={stroke:o[1],strokeWidth:V,fill:"none"},t[96]=o[1],t[97]=V,t[98]=ee):ee=t[98];let ie;t[99]!==s.duration?(ie={opacity:0,transition:{duration:s.duration}},t[99]=s.duration,t[100]=ie):ie=t[100];const fe=r.map((i,w)=>n.jsxRuntimeExports.jsxs(ct.motion.g,{children:[L.checkIfNullOrUndefined(i.y1)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[xt?n.jsxRuntimeExports.jsx(ct.motion.circle,{r:u/r.length<5?0:u/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:x(i.date),cy:R(i.y1),fill:o[0]},whileInView:{opacity:1,fill:o[0],transition:{duration:y?s.duration:.5,delay:y?0:s.duration},cx:x(i.date),cy:R(i.y1)}},initial:"initial",animate:d?"whileInView":"initial"}):null,Rt?n.jsxRuntimeExports.jsx(ct.motion.text,{dy:L.checkIfNullOrUndefined(i.y2)||i.y2<i.y1?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:n.mo("graph-value graph-value-line-1 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:x(i.date),y:g(i.y1),fill:o[0]},whileInView:{opacity:1,x:x(i.date),fill:o[0],y:g(i.y1),transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:ae.numberFormattingFunction(i.y1,"NA",Z,K[0],F[0])}):null]}),L.checkIfNullOrUndefined(i.y2)?null:n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[xt?n.jsxRuntimeExports.jsx(ct.motion.circle,{r:u/r.length<5?0:u/r.length<20?2:4,exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,cx:x(i.date),cy:g(i.y2),fill:o[1]},whileInView:{opacity:1,transition:{duration:y?s.duration:.5,delay:y?0:s.duration},fill:o[1],cx:x(i.date),cy:g(i.y2)}},initial:"initial",animate:d?"whileInView":"initial"}):null,Rt?n.jsxRuntimeExports.jsx(ct.motion.text,{dy:L.checkIfNullOrUndefined(i.y1)||i.y1<i.y2?-8:"1em",style:{textAnchor:"middle",...a?.graphObjectValues||{}},className:n.mo("graph-value graph-value-line-2 text-xs font-bold",c?.graphObjectValues),exit:{opacity:0,transition:{duration:s.duration}},variants:{initial:{opacity:0,x:x(i.date),y:g(i.y2),fill:o[1]},whileInView:{opacity:1,x:x(i.date),y:g(i.y2),fill:o[1],transition:{duration:y?s.duration:.5,delay:y?0:s.duration}}},initial:"initial",animate:d?"whileInView":"initial",children:ae.numberFormattingFunction(i.y2,"NA",Z,K[1],F[1])}):null]})]},w));let ne;t[101]!==fe?(ne=n.jsxRuntimeExports.jsx("g",{children:fe}),t[101]=fe,t[102]=ne):ne=t[102];let se;t[103]!==$?(se=$.filter(Ge).map(Pe),t[103]=$,t[104]=se):se=t[104];let oe;t[105]===Symbol.for("react.memo_cache_sentinel")?(oe={fill:"none",pointerEvents:"all"},t[105]=oe):oe=t[105];let re;t[106]!==G||t[107]!==l||t[108]!==u?(re=n.jsxRuntimeExports.jsx("rect",{ref:G,style:oe,width:u,height:l}),t[106]=G,t[107]=l,t[108]=u,t[109]=re):re=t[109];let le;return t[110]!==c?.tooltip||t[111]!==ht||t[112]!==m||t[113]!==k||t[114]!==a?.tooltip||t[115]!==ut?(le=k&&ut&&ht&&m?n.jsxRuntimeExports.jsx(ke.Tooltip,{data:k,body:ut,xPos:ht,yPos:m,backgroundStyle:a?.tooltip,className:c?.tooltip}):null,t[110]=c?.tooltip,t[111]=ht,t[112]=m,t[113]=k,t[114]=a?.tooltip,t[115]=ut,t[116]=le):le=t[116],n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(ct.motion.svg,{width:`${B}px`,height:`${z}px`,viewBox:`0 0 ${B} ${z}`,direction:"ltr",ref:$t,children:n.jsxRuntimeExports.jsxs("g",{transform:`translate(${h.left},${h.top})`,children:[ot,n.jsxRuntimeExports.jsxs("g",{children:[Wt.map((i,w)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:R(i),y2:R(i),x1:-15,x2:-20,style:{stroke:o[0],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:-25,y:R(i),dy:"0.33em",className:n.mo("text-xs",c?.yAxis?.labels),style:{textAnchor:"end",fill:o[0],...a?.yAxis?.labels||{}},children:ae.numberFormattingFunction(i,"NA",Z,K[0],F[0])})]},w)),rt,q]}),n.jsxRuntimeExports.jsxs("g",{children:[Xt.map((i,w)=>n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx("line",{y1:g(i),y2:g(i),x1:u+15,x2:u+20,style:{stroke:o[1],strokeWidth:1,...a?.yAxis?.gridLines||{}},className:c?.yAxis?.gridLines}),n.jsxRuntimeExports.jsx("text",{x:u+25,y:g(i),dy:"0.33em",dx:-2,style:{textAnchor:"start",fill:o[1],...a?.yAxis?.labels||{}},className:n.mo("text-xs",c?.yAxis?.labels),children:ae.numberFormattingFunction(i,"NA",Z,K[1],F[1])})]},w)),Y,at]}),n.jsxRuntimeExports.jsxs("g",{children:[wt,n.jsxRuntimeExports.jsx(Ne.XTicksAndGridLines,{values:Ee,x:Re,y1:0,y2:l,styles:Kt,classNames:Qt,labelType:"primary",showGridLines:!0,precision:Z})]}),Zt,n.jsxRuntimeExports.jsxs("g",{children:[n.jsxRuntimeExports.jsx(ct.motion.path,{style:_t,exit:te,variants:{initial:{pathLength:0,d:qt(r.filter(Ye))||"",opacity:1},whileInView:{pathLength:1,d:qt(r.filter(Xe))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),n.jsxRuntimeExports.jsx(ct.motion.path,{d:vt(r.filter(We))||"",style:ee,exit:ie,variants:{initial:{pathLength:0,d:vt(r.filter(Ue))||"",opacity:1},whileInView:{pathLength:1,d:vt(r.filter(He))||"",opacity:1,transition:{duration:s.duration}}},initial:"initial",animate:d?"whileInView":"initial"}),k?n.jsxRuntimeExports.jsx("line",{y1:0,y2:l,x1:x(k.date),x2:x(k.date),className:n.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",c?.mouseOverLine),style:a?.mouseOverLine}):null]}),ne,se,re]})}),le]})}function Pe(e){return e.layer}function Ge(e){return e.position==="after"}function He(e){return!L.checkIfNullOrUndefined(e.y2)}function Ue(e){return!L.checkIfNullOrUndefined(e.y2)}function We(e){return!L.checkIfNullOrUndefined(e.y2)}function Xe(e){return!L.checkIfNullOrUndefined(e.y1)}function Ye(e){return!L.checkIfNullOrUndefined(e.y1)}function Be(e){return e.layer}function ze(e){return e.position==="before"}function Je(e){return e.date}function Ke(e){return!L.checkIfNullOrUndefined(e.y2)}function Qe(e){return!L.checkIfNullOrUndefined(e.y1)}function Ze(e){return e!=null}function _e(e){return e.y2}function ti(e){return e!=null}function ei(e){return e.y2}function ii(e){return e!=null}function ni(e){return e.y1}function si(e){return e!=null}function oi(e){return e.y1}function ri(e){return e!=null}function li(e){return e.y2}function ai(e){return e!=null}function ci(e){return e.y2}function ui(e){return e!=null}function xi(e){return e.y2}function mi(e){return e!=null}function pi(e){return e.y1}function fi(e){return e!=null}function di(e){return e.y2}function hi(e){return e!=null}function yi(e){return e.y1}function gi(e){const t=n.compilerRuntimeExports.c(80),{data:b,graphTitle:B,sources:z,graphDescription:o,height:v,width:j,footNote:p,noOfXTicks:Rt,dateFormat:zt,showValues:Jt,padding:Ft,lineColors:J,sameAxes:bt,backgroundColor:ut,leftMargin:kt,rightMargin:Nt,topMargin:s,bottomMargin:V,labels:xt,lineSuffixes:mt,linePrefixes:F,tooltip:K,highlightAreaSettings:pt,relativeHeight:Ot,onSeriesMouseOver:Q,graphID:a,graphDownload:c,dataDownload:Z,animate:$,strokeWidth:P,showDots:$t,language:ft,showColorScale:d,minHeight:y,colorLegendTitle:Pt,theme:dt,ariaLabel:_,noOfYTicks:Gt,maxDate:k,minDate:It,curveType:ht,styles:f,classNames:m,precision:Ht,customLayers:tt,showAxisLabels:Lt}=e,et=zt===void 0?"yyyy":zt,h=Jt===void 0?!1:Jt;let G;t[0]!==J?(G=J===void 0?[Ae.Colors.light.categoricalColors.colors[0],Ae.Colors.light.categoricalColors.colors[1]]:J,t[0]=J,t[1]=G):G=t[1];const H=G,r=bt===void 0?!1:bt,it=ut===void 0?!1:ut,yt=kt===void 0?80:kt,u=Nt===void 0?80:Nt,l=s===void 0?20:s,Ut=V===void 0?25:V;let St;t[2]!==mt?(St=mt===void 0?["",""]:mt,t[2]=mt,t[3]=St):St=t[3];const gt=St;let nt;t[4]!==F?(nt=F===void 0?["",""]:F,t[4]=F,t[5]=nt):nt=t[5];const st=nt;let U;t[6]!==pt?(U=pt===void 0?[]:pt,t[6]=pt,t[7]=U):U=t[7];const Dt=U,W=c===void 0?!1:c,x=Z===void 0?!1:Z,R=$===void 0?!1:$,g=P===void 0?2:P,qt=$t===void 0?!0:$t,vt=ft===void 0?"en":ft,Wt=d===void 0?!0:d,Xt=y===void 0?0:y,Mt=dt===void 0?"light":dt,ot=Gt===void 0?5:Gt,jt=ht===void 0?"curve":ht,S=Ht===void 0?2:Ht;let N;t[8]!==tt?(N=tt===void 0?[]:tt,t[8]=tt,t[9]=N):N=t[9];const D=N,rt=Lt===void 0?!0:Lt,[q,Yt]=E.useState(0),[lt,Bt]=E.useState(0),M=E.useRef(null),X=E.useRef(null);let O,Y;t[10]===Symbol.for("react.memo_cache_sentinel")?(O=()=>{const wt=new ResizeObserver(Et=>{Yt(Et[0].target.clientWidth||620),Bt(Et[0].target.clientHeight||480)});return M.current&&wt.observe(M.current),()=>wt.disconnect()},Y=[],t[10]=O,t[11]=Y):(O=t[10],Y=t[11]),E.useEffect(O,Y);const at=m?.graphContainer,At=f?.graphContainer;let T;t[12]!==m?.description||t[13]!==m?.title||t[14]!==b||t[15]!==x||t[16]!==o||t[17]!==W||t[18]!==B||t[19]!==f?.description||t[20]!==f?.title||t[21]!==j?(T=B||o||W||x?n.jsxRuntimeExports.jsx(Te.GraphHeader,{styles:{title:f?.title,description:f?.description},classNames:{title:m?.title,description:m?.description},graphTitle:B,graphDescription:o,width:j,graphDownload:W?X:void 0,dataDownload:x?b.map(Ei).filter(wi).length>0?b.map(Ai).filter(ji):b.filter(vi):null}):null,t[12]=m?.description,t[13]=m?.title,t[14]=b,t[15]=x,t[16]=o,t[17]=W,t[18]=B,t[19]=f?.description,t[20]=f?.title,t[21]=j,t[22]=T):T=t[22];let A;t[23]!==R||t[24]!==Ut||t[25]!==m||t[26]!==Pt||t[27]!==jt||t[28]!==D||t[29]!==b||t[30]!==et||t[31]!==Dt||t[32]!==xt||t[33]!==yt||t[34]!==H||t[35]!==st||t[36]!==gt||t[37]!==k||t[38]!==It||t[39]!==Rt||t[40]!==ot||t[41]!==Q||t[42]!==S||t[43]!==u||t[44]!==r||t[45]!==rt||t[46]!==Wt||t[47]!==qt||t[48]!==h||t[49]!==g||t[50]!==f||t[51]!==lt||t[52]!==q||t[53]!==K||t[54]!==l?(A=b.length===0?n.jsxRuntimeExports.jsx(Ve.EmptyState,{}):n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[Wt?n.jsxRuntimeExports.jsx(Ce.ColorLegend,{colorDomain:xt,colorLegendTitle:Pt,colors:H,showNAColor:!1,className:m?.colorLegend}):null,n.jsxRuntimeExports.jsx(we.GraphArea,{ref:M,children:q&<?n.jsxRuntimeExports.jsx($e,{data:b,sameAxes:r,lineColors:H,width:q,height:lt,dateFormat:et,showValues:h,noOfXTicks:Rt??Fe.getNoOfTicks(q),leftMargin:yt,rightMargin:u,topMargin:l,bottomMargin:Ut,labels:xt,highlightAreaSettings:Dt,tooltip:K,onSeriesMouseOver:Q,animate:R===!0?{duration:.5,once:!0,amount:.5}:R||{duration:0,once:!0,amount:0},strokeWidth:g,showDots:qt,noOfYTicks:ot,lineSuffixes:gt,linePrefixes:st,minDate:It,maxDate:k,curveType:jt,styles:f,classNames:m,precision:S,customLayers:D,showAxisLabels:rt}):null})]}),t[23]=R,t[24]=Ut,t[25]=m,t[26]=Pt,t[27]=jt,t[28]=D,t[29]=b,t[30]=et,t[31]=Dt,t[32]=xt,t[33]=yt,t[34]=H,t[35]=st,t[36]=gt,t[37]=k,t[38]=It,t[39]=Rt,t[40]=ot,t[41]=Q,t[42]=S,t[43]=u,t[44]=r,t[45]=rt,t[46]=Wt,t[47]=qt,t[48]=h,t[49]=g,t[50]=f,t[51]=lt,t[52]=q,t[53]=K,t[54]=l,t[55]=A):A=t[55];let C;t[56]!==m?.footnote||t[57]!==m?.source||t[58]!==p||t[59]!==z||t[60]!==f?.footnote||t[61]!==f?.source||t[62]!==j?(C=z||p?n.jsxRuntimeExports.jsx(Me.GraphFooter,{styles:{footnote:f?.footnote,source:f?.source},classNames:{footnote:m?.footnote,source:m?.source},sources:z,footNote:p,width:j}):null,t[56]=m?.footnote,t[57]=m?.source,t[58]=p,t[59]=z,t[60]=f?.footnote,t[61]=f?.source,t[62]=j,t[63]=C):C=t[63];let I;return t[64]!==_||t[65]!==it||t[66]!==a||t[67]!==v||t[68]!==vt||t[69]!==Xt||t[70]!==Ft||t[71]!==Ot||t[72]!==at||t[73]!==At||t[74]!==T||t[75]!==A||t[76]!==C||t[77]!==Mt||t[78]!==j?(I=n.jsxRuntimeExports.jsxs(we.GraphContainer,{className:at,style:At,id:a,ref:X,"aria-label":_,backgroundColor:it,theme:Mt,language:vt,minHeight:Xt,width:j,height:v,relativeHeight:Ot,padding:Ft,children:[T,A,C]}),t[64]=_,t[65]=it,t[66]=a,t[67]=v,t[68]=vt,t[69]=Xt,t[70]=Ft,t[71]=Ot,t[72]=at,t[73]=At,t[74]=T,t[75]=A,t[76]=C,t[77]=Mt,t[78]=j,t[79]=I):I=t[79],I}function vi(e){return e!==void 0}function ji(e){return e!==void 0}function Ai(e){return e.data}function wi(e){return e!==void 0}function Ei(e){return e.data}exports.DualAxisLineChart=gi;
|
|
2
2
|
//# sourceMappingURL=DualAxisLineChart.cjs.map
|
|
@@ -36,6 +36,7 @@ declare interface ClassNameObject {
|
|
|
36
36
|
regLine?: string;
|
|
37
37
|
dataCards?: string;
|
|
38
38
|
colorLegend?: string;
|
|
39
|
+
modal?: string;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
declare type CurveTypes = 'linear' | 'curve' | 'step' | 'stepAfter' | 'stepBefore';
|
|
@@ -178,6 +179,7 @@ declare interface StyleObject {
|
|
|
178
179
|
mouseOverLine?: React.CSSProperties;
|
|
179
180
|
regLine?: React.CSSProperties;
|
|
180
181
|
dataCards?: React.CSSProperties;
|
|
182
|
+
modal?: React.CSSProperties;
|
|
181
183
|
}
|
|
182
184
|
|
|
183
185
|
export { }
|
|
@@ -3,7 +3,7 @@ import { useRef as me, useState as Pt, useEffect as ge } from "react";
|
|
|
3
3
|
import { p as qt, f as De } from "./parse-DlCRUFh_.js";
|
|
4
4
|
import { o as Me } from "./index-BZQYSqar.js";
|
|
5
5
|
import { n as ce } from "./numberFormattingFunction-14YCbkN2.js";
|
|
6
|
-
import { T as Oe } from "./Tooltip-
|
|
6
|
+
import { T as Oe } from "./Tooltip-Dj5eVppQ.js";
|
|
7
7
|
import { c as O } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
8
8
|
import { X as Se } from "./XTicksAndGridLines-CObVFSm4.js";
|
|
9
9
|
import { A as ye } from "./Axis-CRyfcLjc.js";
|