@undp/data-viz 2.3.19 → 2.4.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/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.js +1360 -1363
- package/dist/BarGraph.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.js +302 -305
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.js +4 -4
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.js +591 -594
- package/dist/BulletChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.js +4 -4
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.js +255 -258
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.js +553 -556
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/{GraphEl-Dorm_qQE.js → GraphEl-B73N4RIA.js} +2 -2
- package/dist/{GraphEl-Dorm_qQE.js.map → GraphEl-B73N4RIA.js.map} +1 -1
- package/dist/{GraphEl-D8WRC8-j.cjs → GraphEl-Lt1og0C-.cjs} +2 -2
- package/dist/{GraphEl-D8WRC8-j.cjs.map → GraphEl-Lt1og0C-.cjs.map} +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.js +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.js +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.js +310 -313
- package/dist/HybridMap.js.map +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.js +269 -272
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.js +319 -322
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.js +3 -3
- package/dist/RadarChart.js.map +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.js +274 -280
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.js +341 -344
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.js +1 -1
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.js +251 -254
- package/dist/SlopeChart.js.map +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.js +292 -295
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.js +3 -3
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.js +196 -199
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/WaterfallChart.cjs +1 -1
- package/dist/WaterfallChart.cjs.map +1 -1
- package/dist/WaterfallChart.js +274 -277
- package/dist/WaterfallChart.js.map +1 -1
- package/dist/index-B0Awa_de.js +377 -0
- package/dist/index-B0Awa_de.js.map +1 -0
- package/dist/index-CP8cmNzt.cjs +2 -0
- package/dist/index-CP8cmNzt.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/index-Bdo_HXb_.cjs +0 -2
- package/dist/index-Bdo_HXb_.cjs.map +0 -1
- package/dist/index-CGrBpeUa.js +0 -380
- package/dist/index-CGrBpeUa.js.map +0 -1
package/dist/TreeMapGraph.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeMapGraph.js","sources":["../node_modules/d3-hierarchy/src/hierarchy/count.js","../node_modules/d3-hierarchy/src/hierarchy/each.js","../node_modules/d3-hierarchy/src/hierarchy/eachBefore.js","../node_modules/d3-hierarchy/src/hierarchy/eachAfter.js","../node_modules/d3-hierarchy/src/hierarchy/find.js","../node_modules/d3-hierarchy/src/hierarchy/sum.js","../node_modules/d3-hierarchy/src/hierarchy/sort.js","../node_modules/d3-hierarchy/src/hierarchy/path.js","../node_modules/d3-hierarchy/src/hierarchy/ancestors.js","../node_modules/d3-hierarchy/src/hierarchy/descendants.js","../node_modules/d3-hierarchy/src/hierarchy/leaves.js","../node_modules/d3-hierarchy/src/hierarchy/links.js","../node_modules/d3-hierarchy/src/hierarchy/iterator.js","../node_modules/d3-hierarchy/src/hierarchy/index.js","../node_modules/d3-hierarchy/src/accessors.js","../node_modules/d3-hierarchy/src/constant.js","../node_modules/d3-hierarchy/src/treemap/round.js","../node_modules/d3-hierarchy/src/treemap/dice.js","../node_modules/d3-hierarchy/src/stratify.js","../node_modules/d3-hierarchy/src/treemap/slice.js","../node_modules/d3-hierarchy/src/treemap/squarify.js","../node_modules/d3-hierarchy/src/treemap/index.js","../src/Components/Graphs/TreeMapGraph/Graph.tsx","../src/Components/Graphs/TreeMapGraph/index.tsx"],"sourcesContent":["function count(node) {\n var sum = 0,\n children = node.children,\n i = children && children.length;\n if (!i) sum = 1;\n else while (--i >= 0) sum += children[i].value;\n node.value = sum;\n}\n\nexport default function() {\n return this.eachAfter(count);\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], children, i, index = -1;\n while (node = nodes.pop()) {\n callback.call(that, node, ++index, this);\n if (children = node.children) {\n for (i = children.length - 1; i >= 0; --i) {\n nodes.push(children[i]);\n }\n }\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], next = [], children, i, n, index = -1;\n while (node = nodes.pop()) {\n next.push(node);\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n nodes.push(children[i]);\n }\n }\n }\n while (node = next.pop()) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n if (callback.call(that, node, ++index, this)) {\n return node;\n }\n }\n}\n","export default function(value) {\n return this.eachAfter(function(node) {\n var sum = +value(node.data) || 0,\n children = node.children,\n i = children && children.length;\n while (--i >= 0) sum += children[i].value;\n node.value = sum;\n });\n}\n","export default function(compare) {\n return this.eachBefore(function(node) {\n if (node.children) {\n node.children.sort(compare);\n }\n });\n}\n","export default function(end) {\n var start = this,\n ancestor = leastCommonAncestor(start, end),\n nodes = [start];\n while (start !== ancestor) {\n start = start.parent;\n nodes.push(start);\n }\n var k = nodes.length;\n while (end !== ancestor) {\n nodes.splice(k, 0, end);\n end = end.parent;\n }\n return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n if (a === b) return a;\n var aNodes = a.ancestors(),\n bNodes = b.ancestors(),\n c = null;\n a = aNodes.pop();\n b = bNodes.pop();\n while (a === b) {\n c = a;\n a = aNodes.pop();\n b = bNodes.pop();\n }\n return c;\n}\n","export default function() {\n var node = this, nodes = [node];\n while (node = node.parent) {\n nodes.push(node);\n }\n return nodes;\n}\n","export default function() {\n return Array.from(this);\n}\n","export default function() {\n var leaves = [];\n this.eachBefore(function(node) {\n if (!node.children) {\n leaves.push(node);\n }\n });\n return leaves;\n}\n","export default function() {\n var root = this, links = [];\n root.each(function(node) {\n if (node !== root) { // Don’t include the root’s parent, if any.\n links.push({source: node.parent, target: node});\n }\n });\n return links;\n}\n","export default function*() {\n var node = this, current, next = [node], children, i, n;\n do {\n current = next.reverse(), next = [];\n while (node = current.pop()) {\n yield node;\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n next.push(children[i]);\n }\n }\n }\n } while (next.length);\n}\n","import node_count from \"./count.js\";\nimport node_each from \"./each.js\";\nimport node_eachBefore from \"./eachBefore.js\";\nimport node_eachAfter from \"./eachAfter.js\";\nimport node_find from \"./find.js\";\nimport node_sum from \"./sum.js\";\nimport node_sort from \"./sort.js\";\nimport node_path from \"./path.js\";\nimport node_ancestors from \"./ancestors.js\";\nimport node_descendants from \"./descendants.js\";\nimport node_leaves from \"./leaves.js\";\nimport node_links from \"./links.js\";\nimport node_iterator from \"./iterator.js\";\n\nexport default function hierarchy(data, children) {\n if (data instanceof Map) {\n data = [undefined, data];\n if (children === undefined) children = mapChildren;\n } else if (children === undefined) {\n children = objectChildren;\n }\n\n var root = new Node(data),\n node,\n nodes = [root],\n child,\n childs,\n i,\n n;\n\n while (node = nodes.pop()) {\n if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) {\n node.children = childs;\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = childs[i] = new Node(childs[i]));\n child.parent = node;\n child.depth = node.depth + 1;\n }\n }\n }\n\n return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n return hierarchy(this).eachBefore(copyData);\n}\n\nfunction objectChildren(d) {\n return d.children;\n}\n\nfunction mapChildren(d) {\n return Array.isArray(d) ? d[1] : null;\n}\n\nfunction copyData(node) {\n if (node.data.value !== undefined) node.value = node.data.value;\n node.data = node.data.data;\n}\n\nexport function computeHeight(node) {\n var height = 0;\n do node.height = height;\n while ((node = node.parent) && (node.height < ++height));\n}\n\nexport function Node(data) {\n this.data = data;\n this.depth =\n this.height = 0;\n this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n constructor: Node,\n count: node_count,\n each: node_each,\n eachAfter: node_eachAfter,\n eachBefore: node_eachBefore,\n find: node_find,\n sum: node_sum,\n sort: node_sort,\n path: node_path,\n ancestors: node_ancestors,\n descendants: node_descendants,\n leaves: node_leaves,\n links: node_links,\n copy: node_copy,\n [Symbol.iterator]: node_iterator\n};\n","export function optional(f) {\n return f == null ? null : required(f);\n}\n\nexport function required(f) {\n if (typeof f !== \"function\") throw new Error;\n return f;\n}\n","export function constantZero() {\n return 0;\n}\n\nexport default function(x) {\n return function() {\n return x;\n };\n}\n","export default function(node) {\n node.x0 = Math.round(node.x0);\n node.y0 = Math.round(node.y0);\n node.x1 = Math.round(node.x1);\n node.y1 = Math.round(node.y1);\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (x1 - x0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.y0 = y0, node.y1 = y1;\n node.x0 = x0, node.x1 = x0 += node.value * k;\n }\n}\n","import {optional} from \"./accessors.js\";\nimport {Node, computeHeight} from \"./hierarchy/index.js\";\n\nvar preroot = {depth: -1},\n ambiguous = {},\n imputed = {};\n\nfunction defaultId(d) {\n return d.id;\n}\n\nfunction defaultParentId(d) {\n return d.parentId;\n}\n\nexport default function() {\n var id = defaultId,\n parentId = defaultParentId,\n path;\n\n function stratify(data) {\n var nodes = Array.from(data),\n currentId = id,\n currentParentId = parentId,\n n,\n d,\n i,\n root,\n parent,\n node,\n nodeId,\n nodeKey,\n nodeByKey = new Map;\n\n if (path != null) {\n const I = nodes.map((d, i) => normalize(path(d, i, data)));\n const P = I.map(parentof);\n const S = new Set(I).add(\"\");\n for (const i of P) {\n if (!S.has(i)) {\n S.add(i);\n I.push(i);\n P.push(parentof(i));\n nodes.push(imputed);\n }\n }\n currentId = (_, i) => I[i];\n currentParentId = (_, i) => P[i];\n }\n\n for (i = 0, n = nodes.length; i < n; ++i) {\n d = nodes[i], node = nodes[i] = new Node(d);\n if ((nodeId = currentId(d, i, data)) != null && (nodeId += \"\")) {\n nodeKey = node.id = nodeId;\n nodeByKey.set(nodeKey, nodeByKey.has(nodeKey) ? ambiguous : node);\n }\n if ((nodeId = currentParentId(d, i, data)) != null && (nodeId += \"\")) {\n node.parent = nodeId;\n }\n }\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n if (nodeId = node.parent) {\n parent = nodeByKey.get(nodeId);\n if (!parent) throw new Error(\"missing: \" + nodeId);\n if (parent === ambiguous) throw new Error(\"ambiguous: \" + nodeId);\n if (parent.children) parent.children.push(node);\n else parent.children = [node];\n node.parent = parent;\n } else {\n if (root) throw new Error(\"multiple roots\");\n root = node;\n }\n }\n\n if (!root) throw new Error(\"no root\");\n\n // When imputing internal nodes, only introduce roots if needed.\n // Then replace the imputed marker data with null.\n if (path != null) {\n while (root.data === imputed && root.children.length === 1) {\n root = root.children[0], --n;\n }\n for (let i = nodes.length - 1; i >= 0; --i) {\n node = nodes[i];\n if (node.data !== imputed) break;\n node.data = null;\n }\n }\n\n root.parent = preroot;\n root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(computeHeight);\n root.parent = null;\n if (n > 0) throw new Error(\"cycle\");\n\n return root;\n }\n\n stratify.id = function(x) {\n return arguments.length ? (id = optional(x), stratify) : id;\n };\n\n stratify.parentId = function(x) {\n return arguments.length ? (parentId = optional(x), stratify) : parentId;\n };\n\n stratify.path = function(x) {\n return arguments.length ? (path = optional(x), stratify) : path;\n };\n\n return stratify;\n}\n\n// To normalize a path, we coerce to a string, strip the trailing slash if any\n// (as long as the trailing slash is not immediately preceded by another slash),\n// and add leading slash if missing.\nfunction normalize(path) {\n path = `${path}`;\n let i = path.length;\n if (slash(path, i - 1) && !slash(path, i - 2)) path = path.slice(0, -1);\n return path[0] === \"/\" ? path : `/${path}`;\n}\n\n// Walk backwards to find the first slash that is not the leading slash, e.g.:\n// \"/foo/bar\" ⇥ \"/foo\", \"/foo\" ⇥ \"/\", \"/\" ↦ \"\". (The root is special-cased\n// because the id of the root must be a truthy value.)\nfunction parentof(path) {\n let i = path.length;\n if (i < 2) return \"\";\n while (--i > 1) if (slash(path, i)) break;\n return path.slice(0, i);\n}\n\n// Slashes can be escaped; to determine whether a slash is a path delimiter, we\n// count the number of preceding backslashes escaping the forward slash: an odd\n// number indicates an escaped forward slash.\nfunction slash(path, i) {\n if (path[i] === \"/\") {\n let k = 0;\n while (i > 0 && path[--i] === \"\\\\\") ++k;\n if ((k & 1) === 0) return true;\n }\n return false;\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (y1 - y0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.x0 = x0, node.x1 = x1;\n node.y0 = y0, node.y1 = y0 += node.value * k;\n }\n}\n","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\n\nexport var phi = (1 + Math.sqrt(5)) / 2;\n\nexport function squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n var rows = [],\n nodes = parent.children,\n row,\n nodeValue,\n i0 = 0,\n i1 = 0,\n n = nodes.length,\n dx, dy,\n value = parent.value,\n sumValue,\n minValue,\n maxValue,\n newRatio,\n minRatio,\n alpha,\n beta;\n\n while (i0 < n) {\n dx = x1 - x0, dy = y1 - y0;\n\n // Find the next non-empty node.\n do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);\n minValue = maxValue = sumValue;\n alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n beta = sumValue * sumValue * alpha;\n minRatio = Math.max(maxValue / beta, beta / minValue);\n\n // Keep adding nodes while the aspect ratio maintains or improves.\n for (; i1 < n; ++i1) {\n sumValue += nodeValue = nodes[i1].value;\n if (nodeValue < minValue) minValue = nodeValue;\n if (nodeValue > maxValue) maxValue = nodeValue;\n beta = sumValue * sumValue * alpha;\n newRatio = Math.max(maxValue / beta, beta / minValue);\n if (newRatio > minRatio) { sumValue -= nodeValue; break; }\n minRatio = newRatio;\n }\n\n // Position and record the row orientation.\n rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});\n if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n value -= sumValue, i0 = i1;\n }\n\n return rows;\n}\n\nexport default (function custom(ratio) {\n\n function squarify(parent, x0, y0, x1, y1) {\n squarifyRatio(ratio, parent, x0, y0, x1, y1);\n }\n\n squarify.ratio = function(x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return squarify;\n})(phi);\n","import roundNode from \"./round.js\";\nimport squarify from \"./squarify.js\";\nimport {required} from \"../accessors.js\";\nimport constant, {constantZero} from \"../constant.js\";\n\nexport default function() {\n var tile = squarify,\n round = false,\n dx = 1,\n dy = 1,\n paddingStack = [0],\n paddingInner = constantZero,\n paddingTop = constantZero,\n paddingRight = constantZero,\n paddingBottom = constantZero,\n paddingLeft = constantZero;\n\n function treemap(root) {\n root.x0 =\n root.y0 = 0;\n root.x1 = dx;\n root.y1 = dy;\n root.eachBefore(positionNode);\n paddingStack = [0];\n if (round) root.eachBefore(roundNode);\n return root;\n }\n\n function positionNode(node) {\n var p = paddingStack[node.depth],\n x0 = node.x0 + p,\n y0 = node.y0 + p,\n x1 = node.x1 - p,\n y1 = node.y1 - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n node.x0 = x0;\n node.y0 = y0;\n node.x1 = x1;\n node.y1 = y1;\n if (node.children) {\n p = paddingStack[node.depth + 1] = paddingInner(node) / 2;\n x0 += paddingLeft(node) - p;\n y0 += paddingTop(node) - p;\n x1 -= paddingRight(node) - p;\n y1 -= paddingBottom(node) - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n tile(node, x0, y0, x1, y1);\n }\n }\n\n treemap.round = function(x) {\n return arguments.length ? (round = !!x, treemap) : round;\n };\n\n treemap.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];\n };\n\n treemap.tile = function(x) {\n return arguments.length ? (tile = required(x), treemap) : tile;\n };\n\n treemap.padding = function(x) {\n return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();\n };\n\n treemap.paddingInner = function(x) {\n return arguments.length ? (paddingInner = typeof x === \"function\" ? x : constant(+x), treemap) : paddingInner;\n };\n\n treemap.paddingOuter = function(x) {\n return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();\n };\n\n treemap.paddingTop = function(x) {\n return arguments.length ? (paddingTop = typeof x === \"function\" ? x : constant(+x), treemap) : paddingTop;\n };\n\n treemap.paddingRight = function(x) {\n return arguments.length ? (paddingRight = typeof x === \"function\" ? x : constant(+x), treemap) : paddingRight;\n };\n\n treemap.paddingBottom = function(x) {\n return arguments.length ? (paddingBottom = typeof x === \"function\" ? x : constant(+x), treemap) : paddingBottom;\n };\n\n treemap.paddingLeft = function(x) {\n return arguments.length ? (paddingLeft = typeof x === \"function\" ? x : constant(+x), treemap) : paddingLeft;\n };\n\n return treemap;\n}\n","import { stratify, treemap } from 'd3-hierarchy';\r\nimport { useRef, useState } from 'react';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { AnimateDataType, ClassNameObject, Languages, StyleObject, TreeMapDataType } from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { getTextColorBasedOnBgColor } from '@/Utils/getTextColorBasedOnBgColor';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: TreeMapDataType[];\r\n colors: string[];\r\n colorDomain: string[];\r\n leftMargin: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\r\n showLabels: boolean;\r\n showValues: boolean;\r\n width: number;\r\n height: number;\r\n suffix: string;\r\n prefix: string;\r\n selectedColor?: 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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n highlightedDataPoints: (string | number)[];\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 language?: Languages;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n precision: number;\r\n locale: string;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n leftMargin,\r\n width,\r\n height,\r\n colorDomain,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\r\n showLabels,\r\n tooltip,\r\n onSeriesMouseOver,\r\n selectedColor,\r\n showValues,\r\n suffix,\r\n prefix,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n language,\r\n styles,\r\n classNames,\r\n animate,\r\n dimmedOpacity,\r\n precision,\r\n locale,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const margin = {\r\n top: topMargin,\r\n bottom: bottomMargin,\r\n left: leftMargin,\r\n right: rightMargin,\r\n };\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n\r\n const treeMapData = [\r\n {\r\n id: 'root',\r\n parent: undefined,\r\n value: undefined,\r\n data: undefined,\r\n },\r\n ...data.map((d: TreeMapDataType) => ({\r\n id: d.label,\r\n value: d.size,\r\n parent: 'root',\r\n data: d,\r\n })),\r\n ];\r\n const treeData = stratify()\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .id((d: any) => d.id)\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .parentId((d: any) => d.parent)(treeMapData);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n treeData.sum((d: any) => d.value);\r\n const treeMapVizData = treemap().size([graphWidth, graphHeight]).padding(2)(treeData);\r\n\r\n return (\r\n <>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n direction='ltr'\r\n ref={svgRef}\r\n >\r\n <g transform={`translate(${margin.left},${margin.top})`}>\r\n <AnimatePresence>\r\n {treeMapVizData.children?.map(d => {\r\n return (\r\n <motion.g\r\n className='undp-viz-g-with-hover'\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n key={(d.data as any).id}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: d.x0,\r\n y: d.y0,\r\n },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).data.color\r\n ? colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ] === selectedColor\r\n ? 1\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : highlightedDataPoints.length !== 0\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n highlightedDataPoints.indexOf((d.data as any).id) !== -1\r\n ? 0.85\r\n : dimmedOpacity\r\n : 0.85,\r\n x: d.x0,\r\n y: d.y0,\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setMouseOverData((d.data as any).data);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?.((d.data as any).data);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mouseClickData === (d.data as any).id &&\r\n resetSelectionOnDoubleClick\r\n ) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setMouseClickData((d.data as any).id);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?.((d.data as any).data);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setMouseOverData((d.data as any).data);\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 >\r\n <motion.rect\r\n x={0}\r\n y={0}\r\n exit={{\r\n width: 0,\r\n height: 0,\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n variants={{\r\n initial: {\r\n width: 0,\r\n height: 0,\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ],\r\n },\r\n whileInView: {\r\n width: d.x1 - d.x0,\r\n height: d.y1 - d.y0,\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ],\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n />\r\n {d.x1 - d.x0 > 50 && d.y1 - d.y0 > 25 && (showLabels || showValues) ? (\r\n <motion.g\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n >\r\n <foreignObject y={0} x={0} width={d.x1 - d.x0} height={d.y1 - d.y0}>\r\n <div\r\n className='flex flex-col gap-0.5 p-2 w-full'\r\n style={{\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ],\r\n ),\r\n }}\r\n >\r\n {showLabels ? (\r\n <P\r\n marginBottom='none'\r\n size='sm'\r\n leading='none'\r\n className={cn(\r\n 'w-full treemap-label',\r\n language === 'ar' || language === 'he' ? 'text-right' : 'text-left',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n WebkitLineClamp:\r\n d.y1 - d.y0 > 50\r\n ? d.y1 - d.y0 > 100\r\n ? d.y1 - d.y0 > 150\r\n ? undefined\r\n : 3\r\n : 2\r\n : 1,\r\n display: '-webkit-box',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n colorDomain.indexOf(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).data.color,\r\n )\r\n ],\r\n ),\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).id\r\n }\r\n </P>\r\n ) : null}\r\n {showValues ? (\r\n <P\r\n marginBottom='none'\r\n size='sm'\r\n leading='none'\r\n className={cn(\r\n 'w-full font-bold treemap-value',\r\n language === 'ar' || language === 'he' ? 'text-right' : 'text-left',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n colorDomain.indexOf(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).data.color,\r\n )\r\n ],\r\n ),\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {numberFormattingFunction(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).value,\r\n undefined,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n )}\r\n </P>\r\n ) : null}\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n </g>\r\n </motion.svg>\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 {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 </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect } from 'react';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport {\r\n TreeMapDataType,\r\n SourcesDataType,\r\n Languages,\r\n StyleObject,\r\n ClassNameObject,\r\n AnimateDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\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: TreeMapDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for 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 /** 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 /** Left margin of the graph */\r\n leftMargin?: number;\r\n /** Right margin of the graph */\r\n rightMargin?: number;\r\n /** Top margin of the graph */\r\n topMargin?: number;\r\n /** Bottom margin of the graph */\r\n bottomMargin?: number;\r\n /** Maximum radius of the circle */\r\n\r\n // Values and Ticks\r\n /** Prefix for values */\r\n prefix?: string;\r\n /** Suffix for values */\r\n suffix?: string;\r\n\r\n // Graph Parameters\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Toggle visibility of values */\r\n showValues?: boolean;\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 visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n showNAColor?: boolean;\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 /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Locale for number formatting. Must matches what `Intl.NumberFormat` expects. */\r\n locale?: string;\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 TreeMapGraph(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n suffix = '',\r\n sources,\r\n prefix = '',\r\n graphDescription,\r\n leftMargin = 0,\r\n rightMargin = 0,\r\n topMargin = 0,\r\n bottomMargin = 0,\r\n height,\r\n width,\r\n footNote,\r\n colorDomain,\r\n colorLegendTitle,\r\n padding,\r\n backgroundColor = false,\r\n showLabels = true,\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n showColorScale = true,\r\n showValues = true,\r\n graphID,\r\n highlightedDataPoints = [],\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n language = 'en',\r\n showNAColor = true,\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 animate = false,\r\n dimmedOpacity = 0.3,\r\n precision = 2,\r\n locale = 'en',\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n 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 {showColorScale && data.filter(el => el.color).length !== 0 && data.length > 0 ? (\r\n <ColorLegendWithMouseOver\r\n width={width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={(colors as string[] | undefined) || Colors[theme].categoricalColors.colors}\r\n colorDomain={colorDomain || (uniqBy(data, 'color', true) as string[])}\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={showNAColor}\r\n className={classNames?.colorLegend}\r\n />\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {data.length === 0 && <EmptyState />}\r\n {svgWidth && svgHeight && data.length > 0 ? (\r\n <Graph\r\n data={data.filter(d => !checkIfNullOrUndefined(d.size))}\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 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 leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n showLabels={showLabels}\r\n showValues={showValues}\r\n suffix={suffix}\r\n prefix={prefix}\r\n selectedColor={selectedColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n language={language}\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 precision={precision}\r\n locale={locale}\r\n />\r\n ) : null}\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":["count","node","sum","children","node_count","node_each","callback","that","index","node_eachBefore","nodes","i","node_eachAfter","next","n","node_find","node_sum","value","node_sort","compare","node_path","end","start","ancestor","leastCommonAncestor","k","a","b","aNodes","bNodes","c","node_ancestors","node_descendants","node_leaves","leaves","node_links","root","links","node_iterator","current","hierarchy","data","mapChildren","objectChildren","Node","child","childs","computeHeight","node_copy","copyData","d","height","optional","f","required","constantZero","constant","x","roundNode","treemapDice","parent","x0","y0","x1","y1","preroot","ambiguous","imputed","defaultId","defaultParentId","stratify","id","parentId","path","currentId","currentParentId","nodeId","nodeKey","nodeByKey","I","normalize","P","parentof","S","_","slash","treemapSlice","phi","squarifyRatio","ratio","rows","row","nodeValue","i0","i1","dx","dy","sumValue","minValue","maxValue","newRatio","minRatio","alpha","beta","squarify","custom","treemap","tile","round","paddingStack","paddingInner","paddingTop","paddingRight","paddingBottom","paddingLeft","positionNode","p","Graph","props","$","_c","colors","leftMargin","width","colorDomain","rightMargin","topMargin","bottomMargin","showLabels","tooltip","onSeriesMouseOver","selectedColor","showValues","suffix","prefix","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","language","styles","classNames","animate","dimmedOpacity","precision","locale","svgRef","useRef","t0","amount","once","isInView","useInView","mouseOverData","setMouseOverData","useState","undefined","mouseClickData","setMouseClickData","eventX","setEventX","eventY","setEventY","t1","top","bottom","left","right","margin","graphWidth","graphHeight","T0","T1","t2","t3","t4","t5","t6","t7","t8","duration","graphObjectValues","treeMapData","map","_temp","treeData","_temp2","_temp3","_temp4","treeMapVizData","size","padding","motion","svg","AnimatePresence","d_3","jsxs","initial","opacity","y","whileInView","color","indexOf","length","transition","event","clientY","clientX","event_0","jsx","fill","filter","_temp5","Colors","gray","_temp6","getTextColorBasedOnBgColor","_temp7","cn","WebkitLineClamp","display","WebkitBoxOrient","overflow","_temp8","_temp9","numberFormattingFunction","t9","t10","t11","t12","Tooltip","t13","modal","DetailsModal","t14","Fragment","el_3","el","el_2","el_1","el_0","d_2","d_1","d_0","label","TreeMapGraph","graphTitle","sources","graphDescription","footNote","colorLegendTitle","backgroundColor","relativeHeight","showColorScale","graphID","graphDownload","dataDownload","showNAColor","minHeight","t15","theme","t16","ariaLabel","t17","t18","t19","t20","t21","t22","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","t23","t24","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","useEffect","t25","graphContainer","t26","t27","description","title","GraphHeader","t28","colorLegend","ColorLegendWithMouseOver","categoricalColors","uniqBy","t29","EmptyState","t30","primaryColors","t31","GraphArea","t32","footnote","source","GraphFooter","t33","GraphContainer","d_4","checkIfNullOrUndefined"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAASA,GAAMC,GAAM;AACnB,MAAIC,IAAM,GACNC,IAAWF,EAAK,UAChB,IAAIE,KAAYA,EAAS;AAC7B,MAAI,CAAC,EAAG,CAAAD,IAAM;AAAA,MACT,QAAO,EAAE,KAAK,IAAG,CAAAA,KAAOC,EAAS,CAAC,EAAE;AACzC,EAAAF,EAAK,QAAQC;AACf;AAEe,SAAAE,KAAW;AACxB,SAAO,KAAK,UAAUJ,EAAK;AAC7B;ACXe,SAAAK,GAASC,GAAUC,GAAM;AACtC,MAAIC,IAAQ;AACZ,aAAWP,KAAQ;AACjB,IAAAK,EAAS,KAAKC,GAAMN,GAAM,EAAEO,GAAO,IAAI;AAEzC,SAAO;AACT;ACNe,SAAAC,GAASH,GAAUC,GAAM;AAEtC,WADIN,IAAO,MAAMS,IAAQ,CAACT,CAAI,GAAGE,GAAUQ,GAAGH,IAAQ,IAC/CP,IAAOS,EAAM;AAElB,QADAJ,EAAS,KAAKC,GAAMN,GAAM,EAAEO,GAAO,IAAI,GACnCL,IAAWF,EAAK;AAClB,WAAKU,IAAIR,EAAS,SAAS,GAAGQ,KAAK,GAAG,EAAEA;AACtC,QAAAD,EAAM,KAAKP,EAASQ,C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,SAAAA,GAERqG,UAAAA;AAAAA,IAAAA;AAAAA,IAuBAI;AAAAA,IAWDS;AAAAA,IAgDCE;AAAAA,EAAAA,GAYH,GAAiB5L,QAAA+I,IAAA/I,QAAAoI,GAAApI,QAAAuI,GAAAvI,QAAApE,GAAAoE,QAAAoB,GAAApB,QAAA2I,IAAA3I,QAAAwE,GAAAxE,QAAAqI,GAAArI,QAAA0K,IAAA1K,QAAA4K,IAAA5K,QAAA6K,IAAA7K,QAAAiL,IAAAjL,QAAA0L,IAAA1L,QAAA4L,IAAA5L,QAAA6I,GAAA7I,QAAAI,GAAAJ,QAAAgM,MAAAA,KAAAhM,EAAA,EAAA,GA7GjBgM;AA6GiB;AA3Kd,SAAAvF,GAAAe,GAAA;AAAA,SA4HyBF,EAAEpC;AAAM;AA5HjC,SAAAsB,GAAAiB,GAAA;AAAA,SAqHyBH,EAAEpC;AAAM;AArHjC,SAAAgB,GAAAgG,GAAA;AAAA,SAmH4B,CAACC,GAAuBxQ,EAAC4I,IAAK;AAAC;AAnH3D,SAAAyB,GAAAsB,GAAA;AAAA,SAoGoCA,EAAEpC;AAAM;AApG5C,SAAAW,GAAA8B,GAAA;AAAA,SA+F4BhM,MAAM0G;AAAS;AA/F3C,SAAAgC,GAAAuD,GAAA;AAAA,SA8F6CjM,MAAM0G;AAAS;AA9F5D,SAAA+B,GAAAzI,GAAA;AAAA,SA8FyBA,EAACT;AAAK;AA9F/B,SAAAiJ,GAAAS,GAAA;AAAA,SA6F2CjJ,MAAM0G;AAAS;AA7F1D,SAAA4B,GAAAyD,GAAA;AAAA,SA6FuB/L,EAACT;AAAK;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]}
|
|
1
|
+
{"version":3,"file":"TreeMapGraph.js","sources":["../node_modules/d3-hierarchy/src/hierarchy/count.js","../node_modules/d3-hierarchy/src/hierarchy/each.js","../node_modules/d3-hierarchy/src/hierarchy/eachBefore.js","../node_modules/d3-hierarchy/src/hierarchy/eachAfter.js","../node_modules/d3-hierarchy/src/hierarchy/find.js","../node_modules/d3-hierarchy/src/hierarchy/sum.js","../node_modules/d3-hierarchy/src/hierarchy/sort.js","../node_modules/d3-hierarchy/src/hierarchy/path.js","../node_modules/d3-hierarchy/src/hierarchy/ancestors.js","../node_modules/d3-hierarchy/src/hierarchy/descendants.js","../node_modules/d3-hierarchy/src/hierarchy/leaves.js","../node_modules/d3-hierarchy/src/hierarchy/links.js","../node_modules/d3-hierarchy/src/hierarchy/iterator.js","../node_modules/d3-hierarchy/src/hierarchy/index.js","../node_modules/d3-hierarchy/src/accessors.js","../node_modules/d3-hierarchy/src/constant.js","../node_modules/d3-hierarchy/src/treemap/round.js","../node_modules/d3-hierarchy/src/treemap/dice.js","../node_modules/d3-hierarchy/src/stratify.js","../node_modules/d3-hierarchy/src/treemap/slice.js","../node_modules/d3-hierarchy/src/treemap/squarify.js","../node_modules/d3-hierarchy/src/treemap/index.js","../src/Components/Graphs/TreeMapGraph/Graph.tsx","../src/Components/Graphs/TreeMapGraph/index.tsx"],"sourcesContent":["function count(node) {\n var sum = 0,\n children = node.children,\n i = children && children.length;\n if (!i) sum = 1;\n else while (--i >= 0) sum += children[i].value;\n node.value = sum;\n}\n\nexport default function() {\n return this.eachAfter(count);\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], children, i, index = -1;\n while (node = nodes.pop()) {\n callback.call(that, node, ++index, this);\n if (children = node.children) {\n for (i = children.length - 1; i >= 0; --i) {\n nodes.push(children[i]);\n }\n }\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], next = [], children, i, n, index = -1;\n while (node = nodes.pop()) {\n next.push(node);\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n nodes.push(children[i]);\n }\n }\n }\n while (node = next.pop()) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n if (callback.call(that, node, ++index, this)) {\n return node;\n }\n }\n}\n","export default function(value) {\n return this.eachAfter(function(node) {\n var sum = +value(node.data) || 0,\n children = node.children,\n i = children && children.length;\n while (--i >= 0) sum += children[i].value;\n node.value = sum;\n });\n}\n","export default function(compare) {\n return this.eachBefore(function(node) {\n if (node.children) {\n node.children.sort(compare);\n }\n });\n}\n","export default function(end) {\n var start = this,\n ancestor = leastCommonAncestor(start, end),\n nodes = [start];\n while (start !== ancestor) {\n start = start.parent;\n nodes.push(start);\n }\n var k = nodes.length;\n while (end !== ancestor) {\n nodes.splice(k, 0, end);\n end = end.parent;\n }\n return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n if (a === b) return a;\n var aNodes = a.ancestors(),\n bNodes = b.ancestors(),\n c = null;\n a = aNodes.pop();\n b = bNodes.pop();\n while (a === b) {\n c = a;\n a = aNodes.pop();\n b = bNodes.pop();\n }\n return c;\n}\n","export default function() {\n var node = this, nodes = [node];\n while (node = node.parent) {\n nodes.push(node);\n }\n return nodes;\n}\n","export default function() {\n return Array.from(this);\n}\n","export default function() {\n var leaves = [];\n this.eachBefore(function(node) {\n if (!node.children) {\n leaves.push(node);\n }\n });\n return leaves;\n}\n","export default function() {\n var root = this, links = [];\n root.each(function(node) {\n if (node !== root) { // Don’t include the root’s parent, if any.\n links.push({source: node.parent, target: node});\n }\n });\n return links;\n}\n","export default function*() {\n var node = this, current, next = [node], children, i, n;\n do {\n current = next.reverse(), next = [];\n while (node = current.pop()) {\n yield node;\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n next.push(children[i]);\n }\n }\n }\n } while (next.length);\n}\n","import node_count from \"./count.js\";\nimport node_each from \"./each.js\";\nimport node_eachBefore from \"./eachBefore.js\";\nimport node_eachAfter from \"./eachAfter.js\";\nimport node_find from \"./find.js\";\nimport node_sum from \"./sum.js\";\nimport node_sort from \"./sort.js\";\nimport node_path from \"./path.js\";\nimport node_ancestors from \"./ancestors.js\";\nimport node_descendants from \"./descendants.js\";\nimport node_leaves from \"./leaves.js\";\nimport node_links from \"./links.js\";\nimport node_iterator from \"./iterator.js\";\n\nexport default function hierarchy(data, children) {\n if (data instanceof Map) {\n data = [undefined, data];\n if (children === undefined) children = mapChildren;\n } else if (children === undefined) {\n children = objectChildren;\n }\n\n var root = new Node(data),\n node,\n nodes = [root],\n child,\n childs,\n i,\n n;\n\n while (node = nodes.pop()) {\n if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) {\n node.children = childs;\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = childs[i] = new Node(childs[i]));\n child.parent = node;\n child.depth = node.depth + 1;\n }\n }\n }\n\n return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n return hierarchy(this).eachBefore(copyData);\n}\n\nfunction objectChildren(d) {\n return d.children;\n}\n\nfunction mapChildren(d) {\n return Array.isArray(d) ? d[1] : null;\n}\n\nfunction copyData(node) {\n if (node.data.value !== undefined) node.value = node.data.value;\n node.data = node.data.data;\n}\n\nexport function computeHeight(node) {\n var height = 0;\n do node.height = height;\n while ((node = node.parent) && (node.height < ++height));\n}\n\nexport function Node(data) {\n this.data = data;\n this.depth =\n this.height = 0;\n this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n constructor: Node,\n count: node_count,\n each: node_each,\n eachAfter: node_eachAfter,\n eachBefore: node_eachBefore,\n find: node_find,\n sum: node_sum,\n sort: node_sort,\n path: node_path,\n ancestors: node_ancestors,\n descendants: node_descendants,\n leaves: node_leaves,\n links: node_links,\n copy: node_copy,\n [Symbol.iterator]: node_iterator\n};\n","export function optional(f) {\n return f == null ? null : required(f);\n}\n\nexport function required(f) {\n if (typeof f !== \"function\") throw new Error;\n return f;\n}\n","export function constantZero() {\n return 0;\n}\n\nexport default function(x) {\n return function() {\n return x;\n };\n}\n","export default function(node) {\n node.x0 = Math.round(node.x0);\n node.y0 = Math.round(node.y0);\n node.x1 = Math.round(node.x1);\n node.y1 = Math.round(node.y1);\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (x1 - x0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.y0 = y0, node.y1 = y1;\n node.x0 = x0, node.x1 = x0 += node.value * k;\n }\n}\n","import {optional} from \"./accessors.js\";\nimport {Node, computeHeight} from \"./hierarchy/index.js\";\n\nvar preroot = {depth: -1},\n ambiguous = {},\n imputed = {};\n\nfunction defaultId(d) {\n return d.id;\n}\n\nfunction defaultParentId(d) {\n return d.parentId;\n}\n\nexport default function() {\n var id = defaultId,\n parentId = defaultParentId,\n path;\n\n function stratify(data) {\n var nodes = Array.from(data),\n currentId = id,\n currentParentId = parentId,\n n,\n d,\n i,\n root,\n parent,\n node,\n nodeId,\n nodeKey,\n nodeByKey = new Map;\n\n if (path != null) {\n const I = nodes.map((d, i) => normalize(path(d, i, data)));\n const P = I.map(parentof);\n const S = new Set(I).add(\"\");\n for (const i of P) {\n if (!S.has(i)) {\n S.add(i);\n I.push(i);\n P.push(parentof(i));\n nodes.push(imputed);\n }\n }\n currentId = (_, i) => I[i];\n currentParentId = (_, i) => P[i];\n }\n\n for (i = 0, n = nodes.length; i < n; ++i) {\n d = nodes[i], node = nodes[i] = new Node(d);\n if ((nodeId = currentId(d, i, data)) != null && (nodeId += \"\")) {\n nodeKey = node.id = nodeId;\n nodeByKey.set(nodeKey, nodeByKey.has(nodeKey) ? ambiguous : node);\n }\n if ((nodeId = currentParentId(d, i, data)) != null && (nodeId += \"\")) {\n node.parent = nodeId;\n }\n }\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n if (nodeId = node.parent) {\n parent = nodeByKey.get(nodeId);\n if (!parent) throw new Error(\"missing: \" + nodeId);\n if (parent === ambiguous) throw new Error(\"ambiguous: \" + nodeId);\n if (parent.children) parent.children.push(node);\n else parent.children = [node];\n node.parent = parent;\n } else {\n if (root) throw new Error(\"multiple roots\");\n root = node;\n }\n }\n\n if (!root) throw new Error(\"no root\");\n\n // When imputing internal nodes, only introduce roots if needed.\n // Then replace the imputed marker data with null.\n if (path != null) {\n while (root.data === imputed && root.children.length === 1) {\n root = root.children[0], --n;\n }\n for (let i = nodes.length - 1; i >= 0; --i) {\n node = nodes[i];\n if (node.data !== imputed) break;\n node.data = null;\n }\n }\n\n root.parent = preroot;\n root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(computeHeight);\n root.parent = null;\n if (n > 0) throw new Error(\"cycle\");\n\n return root;\n }\n\n stratify.id = function(x) {\n return arguments.length ? (id = optional(x), stratify) : id;\n };\n\n stratify.parentId = function(x) {\n return arguments.length ? (parentId = optional(x), stratify) : parentId;\n };\n\n stratify.path = function(x) {\n return arguments.length ? (path = optional(x), stratify) : path;\n };\n\n return stratify;\n}\n\n// To normalize a path, we coerce to a string, strip the trailing slash if any\n// (as long as the trailing slash is not immediately preceded by another slash),\n// and add leading slash if missing.\nfunction normalize(path) {\n path = `${path}`;\n let i = path.length;\n if (slash(path, i - 1) && !slash(path, i - 2)) path = path.slice(0, -1);\n return path[0] === \"/\" ? path : `/${path}`;\n}\n\n// Walk backwards to find the first slash that is not the leading slash, e.g.:\n// \"/foo/bar\" ⇥ \"/foo\", \"/foo\" ⇥ \"/\", \"/\" ↦ \"\". (The root is special-cased\n// because the id of the root must be a truthy value.)\nfunction parentof(path) {\n let i = path.length;\n if (i < 2) return \"\";\n while (--i > 1) if (slash(path, i)) break;\n return path.slice(0, i);\n}\n\n// Slashes can be escaped; to determine whether a slash is a path delimiter, we\n// count the number of preceding backslashes escaping the forward slash: an odd\n// number indicates an escaped forward slash.\nfunction slash(path, i) {\n if (path[i] === \"/\") {\n let k = 0;\n while (i > 0 && path[--i] === \"\\\\\") ++k;\n if ((k & 1) === 0) return true;\n }\n return false;\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (y1 - y0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.x0 = x0, node.x1 = x1;\n node.y0 = y0, node.y1 = y0 += node.value * k;\n }\n}\n","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\n\nexport var phi = (1 + Math.sqrt(5)) / 2;\n\nexport function squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n var rows = [],\n nodes = parent.children,\n row,\n nodeValue,\n i0 = 0,\n i1 = 0,\n n = nodes.length,\n dx, dy,\n value = parent.value,\n sumValue,\n minValue,\n maxValue,\n newRatio,\n minRatio,\n alpha,\n beta;\n\n while (i0 < n) {\n dx = x1 - x0, dy = y1 - y0;\n\n // Find the next non-empty node.\n do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);\n minValue = maxValue = sumValue;\n alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n beta = sumValue * sumValue * alpha;\n minRatio = Math.max(maxValue / beta, beta / minValue);\n\n // Keep adding nodes while the aspect ratio maintains or improves.\n for (; i1 < n; ++i1) {\n sumValue += nodeValue = nodes[i1].value;\n if (nodeValue < minValue) minValue = nodeValue;\n if (nodeValue > maxValue) maxValue = nodeValue;\n beta = sumValue * sumValue * alpha;\n newRatio = Math.max(maxValue / beta, beta / minValue);\n if (newRatio > minRatio) { sumValue -= nodeValue; break; }\n minRatio = newRatio;\n }\n\n // Position and record the row orientation.\n rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});\n if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n value -= sumValue, i0 = i1;\n }\n\n return rows;\n}\n\nexport default (function custom(ratio) {\n\n function squarify(parent, x0, y0, x1, y1) {\n squarifyRatio(ratio, parent, x0, y0, x1, y1);\n }\n\n squarify.ratio = function(x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return squarify;\n})(phi);\n","import roundNode from \"./round.js\";\nimport squarify from \"./squarify.js\";\nimport {required} from \"../accessors.js\";\nimport constant, {constantZero} from \"../constant.js\";\n\nexport default function() {\n var tile = squarify,\n round = false,\n dx = 1,\n dy = 1,\n paddingStack = [0],\n paddingInner = constantZero,\n paddingTop = constantZero,\n paddingRight = constantZero,\n paddingBottom = constantZero,\n paddingLeft = constantZero;\n\n function treemap(root) {\n root.x0 =\n root.y0 = 0;\n root.x1 = dx;\n root.y1 = dy;\n root.eachBefore(positionNode);\n paddingStack = [0];\n if (round) root.eachBefore(roundNode);\n return root;\n }\n\n function positionNode(node) {\n var p = paddingStack[node.depth],\n x0 = node.x0 + p,\n y0 = node.y0 + p,\n x1 = node.x1 - p,\n y1 = node.y1 - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n node.x0 = x0;\n node.y0 = y0;\n node.x1 = x1;\n node.y1 = y1;\n if (node.children) {\n p = paddingStack[node.depth + 1] = paddingInner(node) / 2;\n x0 += paddingLeft(node) - p;\n y0 += paddingTop(node) - p;\n x1 -= paddingRight(node) - p;\n y1 -= paddingBottom(node) - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n tile(node, x0, y0, x1, y1);\n }\n }\n\n treemap.round = function(x) {\n return arguments.length ? (round = !!x, treemap) : round;\n };\n\n treemap.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];\n };\n\n treemap.tile = function(x) {\n return arguments.length ? (tile = required(x), treemap) : tile;\n };\n\n treemap.padding = function(x) {\n return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();\n };\n\n treemap.paddingInner = function(x) {\n return arguments.length ? (paddingInner = typeof x === \"function\" ? x : constant(+x), treemap) : paddingInner;\n };\n\n treemap.paddingOuter = function(x) {\n return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();\n };\n\n treemap.paddingTop = function(x) {\n return arguments.length ? (paddingTop = typeof x === \"function\" ? x : constant(+x), treemap) : paddingTop;\n };\n\n treemap.paddingRight = function(x) {\n return arguments.length ? (paddingRight = typeof x === \"function\" ? x : constant(+x), treemap) : paddingRight;\n };\n\n treemap.paddingBottom = function(x) {\n return arguments.length ? (paddingBottom = typeof x === \"function\" ? x : constant(+x), treemap) : paddingBottom;\n };\n\n treemap.paddingLeft = function(x) {\n return arguments.length ? (paddingLeft = typeof x === \"function\" ? x : constant(+x), treemap) : paddingLeft;\n };\n\n return treemap;\n}\n","import { stratify, treemap } from 'd3-hierarchy';\r\nimport { useRef, useState } from 'react';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { AnimateDataType, ClassNameObject, Languages, StyleObject, TreeMapDataType } from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { getTextColorBasedOnBgColor } from '@/Utils/getTextColorBasedOnBgColor';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: TreeMapDataType[];\r\n colors: string[];\r\n colorDomain: string[];\r\n leftMargin: number;\r\n rightMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\r\n showLabels: boolean;\r\n showValues: boolean;\r\n width: number;\r\n height: number;\r\n suffix: string;\r\n prefix: string;\r\n selectedColor?: 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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n highlightedDataPoints?: (string | number)[];\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 language?: Languages;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n precision: number;\r\n locale: string;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n leftMargin,\r\n width,\r\n height,\r\n colorDomain,\r\n rightMargin,\r\n topMargin,\r\n bottomMargin,\r\n showLabels,\r\n tooltip,\r\n onSeriesMouseOver,\r\n selectedColor,\r\n showValues,\r\n suffix,\r\n prefix,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n language,\r\n styles,\r\n classNames,\r\n animate,\r\n dimmedOpacity,\r\n precision,\r\n locale,\r\n } = props;\r\n const svgRef = useRef(null);\r\n const isInView = useInView(svgRef, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const margin = {\r\n top: topMargin,\r\n bottom: bottomMargin,\r\n left: leftMargin,\r\n right: rightMargin,\r\n };\r\n const graphWidth = width - margin.left - margin.right;\r\n const graphHeight = height - margin.top - margin.bottom;\r\n\r\n const treeMapData = [\r\n {\r\n id: 'root',\r\n parent: undefined,\r\n value: undefined,\r\n data: undefined,\r\n },\r\n ...data.map((d: TreeMapDataType) => ({\r\n id: d.label,\r\n value: d.size,\r\n parent: 'root',\r\n data: d,\r\n })),\r\n ];\r\n const treeData = stratify()\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .id((d: any) => d.id)\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .parentId((d: any) => d.parent)(treeMapData);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n treeData.sum((d: any) => d.value);\r\n const treeMapVizData = treemap().size([graphWidth, graphHeight]).padding(2)(treeData);\r\n\r\n return (\r\n <>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n direction='ltr'\r\n ref={svgRef}\r\n >\r\n <g transform={`translate(${margin.left},${margin.top})`}>\r\n <AnimatePresence>\r\n {treeMapVizData.children?.map(d => {\r\n return (\r\n <motion.g\r\n className='undp-viz-g-with-hover'\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n key={(d.data as any).id}\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: d.x0,\r\n y: d.y0,\r\n },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).data.color\r\n ? colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ] === selectedColor\r\n ? 1\r\n : dimmedOpacity\r\n : dimmedOpacity\r\n : highlightedDataPoints\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n highlightedDataPoints.indexOf((d.data as any).id) !== -1\r\n ? 0.85\r\n : dimmedOpacity\r\n : 0.85,\r\n x: d.x0,\r\n y: d.y0,\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setMouseOverData((d.data as any).data);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?.((d.data as any).data);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mouseClickData === (d.data as any).id &&\r\n resetSelectionOnDoubleClick\r\n ) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setMouseClickData((d.data as any).id);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?.((d.data as any).data);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n setMouseOverData((d.data as any).data);\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 >\r\n <motion.rect\r\n x={0}\r\n y={0}\r\n exit={{\r\n width: 0,\r\n height: 0,\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n variants={{\r\n initial: {\r\n width: 0,\r\n height: 0,\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ],\r\n },\r\n whileInView: {\r\n width: d.x1 - d.x0,\r\n height: d.y1 - d.y0,\r\n fill:\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ],\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n />\r\n {d.x1 - d.x0 > 50 && d.y1 - d.y0 > 25 && (showLabels || showValues) ? (\r\n <motion.g\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n >\r\n <foreignObject y={0} x={0} width={d.x1 - d.x0} height={d.y1 - d.y0}>\r\n <div\r\n className='flex flex-col gap-0.5 p-2 w-full'\r\n style={{\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorDomain.indexOf((d.data as any).data.color)\r\n ],\r\n ),\r\n }}\r\n >\r\n {showLabels ? (\r\n <P\r\n marginBottom='none'\r\n size='sm'\r\n leading='none'\r\n className={cn(\r\n 'w-full treemap-label',\r\n language === 'ar' || language === 'he' ? 'text-right' : 'text-left',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n WebkitLineClamp:\r\n d.y1 - d.y0 > 50\r\n ? d.y1 - d.y0 > 100\r\n ? d.y1 - d.y0 > 150\r\n ? undefined\r\n : 3\r\n : 2\r\n : 1,\r\n display: '-webkit-box',\r\n WebkitBoxOrient: 'vertical',\r\n overflow: 'hidden',\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n colorDomain.indexOf(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).data.color,\r\n )\r\n ],\r\n ),\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).id\r\n }\r\n </P>\r\n ) : null}\r\n {showValues ? (\r\n <P\r\n marginBottom='none'\r\n size='sm'\r\n leading='none'\r\n className={cn(\r\n 'w-full font-bold treemap-value',\r\n language === 'ar' || language === 'he' ? 'text-right' : 'text-left',\r\n classNames?.graphObjectValues,\r\n )}\r\n style={{\r\n color: getTextColorBasedOnBgColor(\r\n data.filter(el => el.color).length === 0\r\n ? colors[0]\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n !(d.data as any).data.color\r\n ? Colors.gray\r\n : colors[\r\n colorDomain.indexOf(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).data.color,\r\n )\r\n ],\r\n ),\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n >\r\n {numberFormattingFunction(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (d.data as any).value,\r\n undefined,\r\n precision,\r\n prefix,\r\n suffix,\r\n locale,\r\n )}\r\n </P>\r\n ) : null}\r\n </div>\r\n </foreignObject>\r\n </motion.g>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n </g>\r\n </motion.svg>\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 {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 </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect } from 'react';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport {\r\n TreeMapDataType,\r\n SourcesDataType,\r\n Languages,\r\n StyleObject,\r\n ClassNameObject,\r\n AnimateDataType,\r\n} from '@/Types';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\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: TreeMapDataType[];\r\n\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for 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 /** 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 /** Left margin of the graph */\r\n leftMargin?: number;\r\n /** Right margin of the graph */\r\n rightMargin?: number;\r\n /** Top margin of the graph */\r\n topMargin?: number;\r\n /** Bottom margin of the graph */\r\n bottomMargin?: number;\r\n /** Maximum radius of the circle */\r\n\r\n // Values and Ticks\r\n /** Prefix for values */\r\n prefix?: string;\r\n /** Suffix for values */\r\n suffix?: string;\r\n\r\n // Graph Parameters\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Toggle visibility of values */\r\n showValues?: boolean;\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 visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n showNAColor?: boolean;\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 /** Specifies the number of decimal places to display in the value. */\r\n precision?: number;\r\n /** Locale for number formatting. Must matches what `Intl.NumberFormat` expects. */\r\n locale?: string;\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 TreeMapGraph(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n colors,\r\n suffix = '',\r\n sources,\r\n prefix = '',\r\n graphDescription,\r\n leftMargin = 0,\r\n rightMargin = 0,\r\n topMargin = 0,\r\n bottomMargin = 0,\r\n height,\r\n width,\r\n footNote,\r\n colorDomain,\r\n colorLegendTitle,\r\n padding,\r\n backgroundColor = false,\r\n showLabels = true,\r\n relativeHeight,\r\n tooltip,\r\n onSeriesMouseOver,\r\n showColorScale = true,\r\n showValues = true,\r\n graphID,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n language = 'en',\r\n showNAColor = true,\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 animate = false,\r\n dimmedOpacity = 0.3,\r\n precision = 2,\r\n locale = 'en',\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n 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 {showColorScale && data.filter(el => el.color).length !== 0 && data.length > 0 ? (\r\n <ColorLegendWithMouseOver\r\n width={width}\r\n colorLegendTitle={colorLegendTitle}\r\n colors={(colors as string[] | undefined) || Colors[theme].categoricalColors.colors}\r\n colorDomain={colorDomain || (uniqBy(data, 'color', true) as string[])}\r\n setSelectedColor={setSelectedColor}\r\n showNAColor={showNAColor}\r\n className={classNames?.colorLegend}\r\n />\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {data.length === 0 && <EmptyState />}\r\n {svgWidth && svgHeight && data.length > 0 ? (\r\n <Graph\r\n data={data.filter(d => !checkIfNullOrUndefined(d.size))}\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 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 leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n showLabels={showLabels}\r\n showValues={showValues}\r\n suffix={suffix}\r\n prefix={prefix}\r\n selectedColor={selectedColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n styles={styles}\r\n classNames={classNames}\r\n language={language}\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 precision={precision}\r\n locale={locale}\r\n />\r\n ) : null}\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":["count","node","sum","children","node_count","node_each","callback","that","index","node_eachBefore","nodes","i","node_eachAfter","next","n","node_find","node_sum","value","node_sort","compare","node_path","end","start","ancestor","leastCommonAncestor","k","a","b","aNodes","bNodes","c","node_ancestors","node_descendants","node_leaves","leaves","node_links","root","links","node_iterator","current","hierarchy","data","mapChildren","objectChildren","Node","child","childs","computeHeight","node_copy","copyData","d","height","optional","f","required","constantZero","constant","x","roundNode","treemapDice","parent","x0","y0","x1","y1","preroot","ambiguous","imputed","defaultId","defaultParentId","stratify","id","parentId","path","currentId","currentParentId","nodeId","nodeKey","nodeByKey","I","normalize","P","parentof","S","_","slash","treemapSlice","phi","squarifyRatio","ratio","rows","row","nodeValue","i0","i1","dx","dy","sumValue","minValue","maxValue","newRatio","minRatio","alpha","beta","squarify","custom","treemap","tile","round","paddingStack","paddingInner","paddingTop","paddingRight","paddingBottom","paddingLeft","positionNode","p","Graph","props","$","_c","colors","leftMargin","width","colorDomain","rightMargin","topMargin","bottomMargin","showLabels","tooltip","onSeriesMouseOver","selectedColor","showValues","suffix","prefix","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","language","styles","classNames","animate","dimmedOpacity","precision","locale","svgRef","useRef","t0","amount","once","isInView","useInView","mouseOverData","setMouseOverData","useState","undefined","mouseClickData","setMouseClickData","eventX","setEventX","eventY","setEventY","t1","top","bottom","left","right","margin","graphWidth","graphHeight","T0","T1","t2","t3","t4","t5","t6","t7","t8","duration","graphObjectValues","treeMapData","map","_temp","treeData","_temp2","_temp3","_temp4","treeMapVizData","size","padding","motion","svg","AnimatePresence","d_3","jsxs","initial","opacity","y","whileInView","color","indexOf","transition","event","clientY","clientX","event_0","jsx","fill","filter","_temp5","length","Colors","gray","_temp6","getTextColorBasedOnBgColor","_temp7","cn","WebkitLineClamp","display","WebkitBoxOrient","overflow","_temp8","_temp9","numberFormattingFunction","t9","t10","t11","t12","Tooltip","t13","modal","DetailsModal","t14","Fragment","el_3","el","el_2","el_1","el_0","d_2","d_1","d_0","label","TreeMapGraph","graphTitle","sources","graphDescription","footNote","colorLegendTitle","backgroundColor","relativeHeight","showColorScale","graphID","graphDownload","dataDownload","showNAColor","minHeight","theme","t15","ariaLabel","t16","t17","t18","t19","t20","svgWidth","setSvgWidth","svgHeight","setSvgHeight","setSelectedColor","graphDiv","graphParentDiv","t21","t22","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","useEffect","t23","graphContainer","t24","t25","description","title","GraphHeader","t26","colorLegend","ColorLegendWithMouseOver","categoricalColors","uniqBy","t27","EmptyState","t28","primaryColors","t29","GraphArea","t30","footnote","source","GraphFooter","t31","GraphContainer","d_4","checkIfNullOrUndefined"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAASA,GAAMC,GAAM;AACnB,MAAIC,IAAM,GACNC,IAAWF,EAAK,UAChB,IAAIE,KAAYA,EAAS;AAC7B,MAAI,CAAC,EAAG,CAAAD,IAAM;AAAA,MACT,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AAS;AA9F5D,SAAA+B,GAAAzI,GAAA;AAAA,SA8FyBA,EAACT;AAAK;AA9F/B,SAAAiJ,GAAAS,GAAA;AAAA,SA6F2CjJ,MAAM0G;AAAS;AA7F1D,SAAA4B,GAAAyD,GAAA;AAAA,SA6FuB/L,EAACT;AAAK;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]}
|
package/dist/WaterfallChart.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-D4pAp7u0.cjs"),M=require("react"),ae=require("./index-DQA8q5sC.cjs"),se=require("./numberFormattingFunction-Cn9R7CM9.cjs"),ce=require("./Tooltip-Hr46paWP.cjs"),Gt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),pt=require("./Colors.cjs"),ue=require("./AxisTitle-DP_evhbe.cjs"),de=require("./Axis-BTaS9oPQ.cjs"),me=require("./ReferenceLine-CpU4G01Y.cjs"),xe=require("./YTicksAndGridLines-DFjm8RCc.cjs"),he=require("./XAxesLabels-C03jHniq.cjs"),fe=require("./DetailsModal-jmmKRMRM.cjs"),zt=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),ge=require("./linear-CgUCbw9F.cjs"),pe=require("./band-VYfcZeJ2.cjs"),ne=require("./proxy-CqH8m8IQ.cjs"),ve=require("./use-in-view-dnRv_qqF.cjs"),be=require("./index-FXfr51ZM.cjs"),ye=require("./ColorLegendWithMouseOver.cjs"),Ce=require("./EmptyState-CFmiFPHz.cjs"),re=require("./GraphContainer-Cul9b74X.cjs"),we=require("./GraphFooter.cjs"),je=require("./GraphHeader.cjs"),le=require("./uniqBy-O05lp2S5.cjs");function Oe(i){let t=0,n=0,j=0;for(const x of i)t+=x||0,t>n&&(n=t),t<j&&(j=t);return{max:n,min:j}}function Ee(i){const t=s.compilerRuntimeExports.c(46),{leftMargin:n,rightMargin:j,topMargin:x,bottomMargin:Wt,data:h,width:vt,height:S,barColor:f,suffix:bt,prefix:yt,barPadding:Qt,showLabels:Ft,showValues:d,showTicks:st,colorDomain:g,truncateBy:Ct,tooltip:T,onSeriesMouseOver:wt,refValues:Ht,selectedColor:V,maxValue:jt,minValue:Ot,highlightedDataPoints:I,onSeriesMouseClick:Et,labelOrder:v,maxBarThickness:Mt,minBarThickness:At,detailsOnClick:N,barAxisTitle:rt,noOfTicks:Ut,styles:m,classNames:a,dimmedOpacity:A,animate:c,precision:Rt,customLayers:R,naLabel:Zt,hideAxisLine:_t,locale:kt}=i,k=n===void 0?20:n,lt=j===void 0?20:j,P=x===void 0?20:x,at=Wt===void 0?25:Wt,Lt=M.useRef(null);let z;t[0]!==c.amount||t[1]!==c.once?(z={once:c.once,amount:c.amount},t[0]=c.amount,t[1]=c.once,t[2]=z):z=t[2];const q=ve.useInView(Lt,z),Tt=rt?k+30:k;let l;t[3]!==at||t[4]!==lt||t[5]!==Tt||t[6]!==P?(l={top:P,bottom:at,left:Tt,right:lt},t[3]=at,t[4]=lt,t[5]=Tt,t[6]=P,t[7]=l):l=t[7];const o=l,{max:te,min:ee}=Oe(h.map(Ve)),Yt=Gt.checkIfNullOrUndefined(jt)?te:jt,b=Gt.checkIfNullOrUndefined(Ot)?ee:Ot,[$,Nt]=M.useState(void 0),[G,W]=M.useState(void 0),[F,ct]=M.useState(void 0),[H,ut]=M.useState(void 0),L=vt-o.left-o.right,qt=S-o.top-o.bottom;let B;if(t[8]!==h||t[9]!==v){const e=new Set,E=h.map((nt,Kt)=>{const D=v?`${nt.label}`:`${Kt}`;return e.add(D),{...nt,id:D}}),C=v?v.filter(nt=>!e.has(nt)):[];B=[...E,...C.map(Se)],t[8]=h,t[9]=v,t[10]=B}else B=t[10];const U=B;let Y;t[11]!==U||t[12]!==v?(Y=v??U.map(De),t[11]=U,t[12]=v,t[13]=Y):Y=t[13];const dt=Y,r=ge.linear().domain([b,Yt]).range([qt,0]).nice(),u=pe.band().domain(dt).range([0,At?Math.max(L,At*dt.length):Mt?Math.min(L,Mt*dt.length):L]).paddingInner(Qt),mt=r.ticks(Ut);let y=0;const Xt=U.map(e=>{const E=y;return y=y+(e.size||0),{...e,start:E,end:y}}),xt=a?.xAxis?.axis,p=a?.yAxis?.labels;let X;t[14]!==p||t[15]!==xt?(X={axis:xt,label:p},t[14]=p,t[15]=xt,t[16]=X):X=t[16];const O=m?.xAxis?.axis,J=m?.yAxis?.labels;let K;t[17]!==O||t[18]!==J?(K={axis:O,label:J},t[17]=O,t[18]=J,t[19]=K):K=t[19];const ht=0-k-15,Q=qt/2,ft=m?.yAxis?.title,gt=a?.yAxis?.title;let Z;t[20]!==rt||t[21]!==ht||t[22]!==Q||t[23]!==ft||t[24]!==gt?(Z=s.jsxRuntimeExports.jsx(ue.AxisTitle,{x:ht,y:Q,style:ft,className:gt,text:rt,rotate90:!0}),t[20]=rt,t[21]=ht,t[22]=Q,t[23]=ft,t[24]=gt,t[25]=Z):Z=t[25];let _;t[26]!==R?(_=R.filter(qe).map(Ne),t[26]=R,t[27]=_):_=t[27];const tt=be.AnimatePresence,Jt=Xt.map((e,E)=>Gt.checkIfNullOrUndefined(u(e.id))?null:s.jsxRuntimeExports.jsxs(ne.motion.g,{className:"undp-viz-g-with-hover",initial:"initial",animate:q?"whileInView":"initial",variants:{initial:{opacity:V?e.color&&f[g.indexOf(e.color)]===V?1:A:I.length!==0?I.indexOf(e.label)!==-1?.85:A:.85},whileInView:{opacity:V?e.color&&f[g.indexOf(e.color)]===V?1:A:I.length!==0?I.indexOf(e.label)!==-1?.85:A:.85,transition:{duration:c.duration}}},exit:{opacity:0,transition:{duration:c.duration}},onMouseEnter:C=>{Nt(e),ut(C.clientY),ct(C.clientX),wt?.(e)},onClick:()=>{(Et||N)&&(ae.isEqual(G,e)?(W(void 0),Et?.(void 0)):(W(e),Et?.(e)))},onMouseMove:C=>{Nt(e),ut(C.clientY),ct(C.clientX)},onMouseLeave:()=>{Nt(void 0),ct(void 0),ut(void 0),wt?.(void 0)},children:[e.size?s.jsxRuntimeExports.jsx(ne.motion.rect,{width:u.bandwidth(),initial:"initial",animate:q?"whileInView":"initial",variants:{initial:{height:0,x:u(`${e.id}`),y:r(e.start),fill:h.filter(Te).length===0?f[0]:e.color?f[g.indexOf(e.color)]:pt.Colors.gray},whileInView:{height:Math.abs(r(e.start)-r(e.end)),y:r(Math.max(e.start,e.end)),x:u(`${e.id}`),fill:h.filter(Le).length===0?f[0]:e.color?f[g.indexOf(e.color)]:pt.Colors.gray,transition:{duration:c.duration}}},exit:{height:0,y:r(e.start),transition:{duration:c.duration}}}):null,Ft?s.jsxRuntimeExports.jsx(he.XAxesLabels,{value:`${e.label}`.length<Ct?`${e.label}`:`${`${e.label}`.substring(0,Ct)}...`,y:r(0)+5,x:u(`${e.id}`),width:u.bandwidth(),height:o.bottom,style:m?.xAxis?.labels,className:a?.xAxis?.labels,alignment:"top",animate:c,isInView:q}):null,d&&Math.abs(r(e.start)-r(e.end))>16?s.jsxRuntimeExports.jsx(ne.motion.text,{style:{textAnchor:"middle",...m?.graphObjectValues||{}},className:s.mo("graph-value text-sm",a?.graphObjectValues),dy:"0.33em",variants:{initial:{x:u(`${e.id}`)+u.bandwidth()/2,y:(r(e.start)+r(e.end))/2,opacity:0,fill:h.filter(ke).length===0?zt.getTextColorBasedOnBgColor(f[0]):e.color?zt.getTextColorBasedOnBgColor(f[g.indexOf(e.color)]):zt.getTextColorBasedOnBgColor(pt.Colors.gray)},whileInView:{x:u(`${e.id}`)+u.bandwidth()/2,y:(r(e.start)+r(e.end))/2,fill:h.filter(Re).length===0?zt.getTextColorBasedOnBgColor(f[0]):e.color?zt.getTextColorBasedOnBgColor(f[g.indexOf(e.color)]):zt.getTextColorBasedOnBgColor(pt.Colors.gray),opacity:1,transition:{duration:c.duration}}},initial:"initial",animate:q?"whileInView":"initial",exit:{opacity:0,transition:{duration:c.duration}},children:se.numberFormattingFunction(e.size?Math.abs(e.size):e.size,Zt,Rt,yt,bt,kt)}):null]},e.label)),et=Ht?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:Ht.map((e,E)=>s.jsxRuntimeExports.jsx(me.RefLineY,{text:e.text,color:e.color,y:r(e.value),x1:0-k,x2:L+o.right,classNames:e.classNames,styles:e.styles,animate:c,isInView:q},E))}):null;let $t;t[28]!==tt||t[29]!==Jt||t[30]!==et?($t=s.jsxRuntimeExports.jsxs(tt,{children:[Jt,et]}),t[28]=tt,t[29]=Jt,t[30]=et,t[31]=$t):$t=t[31];let it;t[32]!==R?(it=R.filter(Ae).map(Me),t[32]=R,t[33]=it):it=t[33];let Bt;t[34]!==a?.tooltip||t[35]!==F||t[36]!==H||t[37]!==$||t[38]!==m?.tooltip||t[39]!==T?(Bt=$&&T&&F&&H?s.jsxRuntimeExports.jsx(ce.Tooltip,{data:$,body:T,xPos:F,yPos:H,backgroundStyle:m?.tooltip,className:a?.tooltip}):null,t[34]=a?.tooltip,t[35]=F,t[36]=H,t[37]=$,t[38]=m?.tooltip,t[39]=T,t[40]=Bt):Bt=t[40];let ot;return t[41]!==a?.modal||t[42]!==N||t[43]!==G||t[44]!==W?(ot=N&&G!==void 0?s.jsxRuntimeExports.jsx(fe.DetailsModal,{body:N,data:G,setData:W,className:a?.modal}):null,t[41]=a?.modal,t[42]=N,t[43]=G,t[44]=W,t[45]=ot):ot=t[45],s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(ne.motion.svg,{ref:Lt,width:`${vt}px`,height:`${S}px`,viewBox:`0 0 ${vt} ${S}`,direction:"ltr",children:s.jsxRuntimeExports.jsxs("g",{transform:`translate(${o.left},${o.top})`,children:[s.jsxRuntimeExports.jsx(de.Axis,{y1:r(b<0?0:b),y2:r(b<0?0:b),x1:0-k,x2:L+o.right,hideAxisLine:_t,label:st?se.numberFormattingFunction(b<0?0:b,void 0,Rt,yt,bt,kt):void 0,labelPos:{x:0-k,dx:0,dy:Yt<0?"1em":-5,y:r(b<0?0:b)},classNames:X,styles:K}),st?s.jsxRuntimeExports.jsx(xe.YTicksAndGridLines,{values:mt.filter(Be),y:mt.filter($e).map(e=>r(e)),x1:0-k,x2:L+o.right,styles:{gridLines:m?.yAxis?.gridLines,labels:m?.yAxis?.labels},classNames:{gridLines:a?.yAxis?.gridLines,labels:a?.yAxis?.labels},suffix:bt,prefix:yt,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:Rt,locale:kt}):null,Z,_,$t,it]})}),Bt,ot]})}function Me(i){return i.layer}function Ae(i){return i.position==="after"}function Re(i){return i.color}function ke(i){return i.color}function Le(i){return i.color}function Te(i){return i.color}function Ne(i){return i.layer}function qe(i){return i.position==="before"}function $e(i){return i!==0}function Be(i){return i!==0}function De(i){return`${i.id}`}function Se(i){return{id:i,label:i,color:null,size:null}}function Ve(i){return i.size}function Ie(i){const t=s.compilerRuntimeExports.c(102),{data:n,graphTitle:j,colors:x,suffix:Wt,sources:h,prefix:vt,graphDescription:S,barPadding:f,showValues:bt,showTicks:yt,truncateBy:Qt,height:Ft,width:d,footNote:st,colorDomain:g,colorLegendTitle:Ct,highlightedDataPoints:T,padding:wt,backgroundColor:Ht,topMargin:V,bottomMargin:jt,leftMargin:Ot,rightMargin:I,showLabels:Et,relativeHeight:v,tooltip:Mt,onSeriesMouseOver:At,refValues:N,showColorScale:rt,graphID:Ut,maxValue:m,minValue:a,onSeriesMouseClick:A,graphDownload:c,dataDownload:Rt,labelOrder:R,language:Zt,showNAColor:_t,minHeight:kt,theme:k,maxBarThickness:lt,maxNumberOfBars:P,minBarThickness:at,ariaLabel:Lt,detailsOnClick:z,barAxisTitle:q,noOfTicks:Tt,styles:l,classNames:o,filterNA:te,animate:ee,dimmedOpacity:Yt,precision:b,customLayers:$,naLabel:Nt,hideAxisLine:G,locale:W}=i,F=Wt===void 0?"":Wt,ct=vt===void 0?"":vt,H=f===void 0?.25:f,ut=bt===void 0?!0:bt,L=yt===void 0?!0:yt,qt=Qt===void 0?999:Qt;let B;t[0]!==T?(B=T===void 0?[]:T,t[0]=T,t[1]=B):B=t[1];const U=B,Y=Ht===void 0?!1:Ht,dt=Et===void 0?!0:Et,r=rt===void 0?!0:rt,u=c===void 0?!1:c,mt=Rt===void 0?!1:Rt,y=Zt===void 0?"en":Zt,Xt=_t===void 0?!0:_t,xt=kt===void 0?0:kt,p=k===void 0?"light":k,X=Tt===void 0?5:Tt,O=te===void 0?!0:te,J=ee===void 0?!1:ee,K=Yt===void 0?.3:Yt,ht=b===void 0?2:b;let Q;t[2]!==$?(Q=$===void 0?[]:$,t[2]=$,t[3]=Q):Q=t[3];const ft=Q,gt=Nt===void 0?"NA":Nt,Z=G===void 0?!1:G,_=W===void 0?"en":W,[tt,Jt]=M.useState(0),[et,$t]=M.useState(0),[it,Bt]=M.useState(void 0),ot=M.useRef(null),e=M.useRef(null);let E,C;t[4]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{const w=new ResizeObserver(oe=>{Jt(oe[0].target.clientWidth||620),$t(oe[0].target.clientHeight||480)});return ot.current&&w.observe(ot.current),()=>w.disconnect()},C=[],t[4]=E,t[5]=C):(E=t[4],C=t[5]),M.useEffect(E,C);const nt=o?.graphContainer,Kt=l?.graphContainer;let D;t[6]!==o?.description||t[7]!==o?.title||t[8]!==n||t[9]!==mt||t[10]!==S||t[11]!==u||t[12]!==j||t[13]!==l?.description||t[14]!==l?.title||t[15]!==d?(D=j||S||u||mt?s.jsxRuntimeExports.jsx(je.GraphHeader,{styles:{title:l?.title,description:l?.description},classNames:{title:o?.title,description:o?.description},graphTitle:j,graphDescription:S,width:d,graphDownload:u?e:void 0,dataDownload:mt?n.map(Ye).filter(Ue).length>0?n.map(He).filter(Fe):n.filter(We):null}):null,t[6]=o?.description,t[7]=o?.title,t[8]=n,t[9]=mt,t[10]=S,t[11]=u,t[12]=j,t[13]=l?.description,t[14]=l?.title,t[15]=d,t[16]=D):D=t[16];let Dt;t[17]!==o?.colorLegend||t[18]!==g||t[19]!==Ct||t[20]!==x||t[21]!==n||t[22]!==r||t[23]!==Xt||t[24]!==p||t[25]!==d?(Dt=r&&n.filter(Ge).length!==0&&n.length>0?s.jsxRuntimeExports.jsx(ye.ColorLegendWithMouseOver,{width:d,colorLegendTitle:Ct,colors:x||pt.Colors[p].categoricalColors.colors,colorDomain:g||le.uniqBy(n,"color",!0),setSelectedColor:Bt,showNAColor:Xt,className:o?.colorLegend}):null,t[17]=o?.colorLegend,t[18]=g,t[19]=Ct,t[20]=x,t[21]=n,t[22]=r,t[23]=Xt,t[24]=p,t[25]=d,t[26]=Dt):Dt=t[26];let St;t[27]!==n||t[28]!==O?(St=n.filter(w=>O?!Gt.checkIfNullOrUndefined(w.size):w).length===0&&s.jsxRuntimeExports.jsx(Ce.EmptyState,{}),t[27]=n,t[28]=O,t[29]=St):St=t[29];let Vt;t[30]!==J||t[31]!==q||t[32]!==H||t[33]!==jt||t[34]!==o||t[35]!==g||t[36]!==x||t[37]!==ft||t[38]!==n||t[39]!==z||t[40]!==K||t[41]!==O||t[42]!==Z||t[43]!==U||t[44]!==R||t[45]!==y||t[46]!==Ot||t[47]!==_||t[48]!==lt||t[49]!==P||t[50]!==m||t[51]!==at||t[52]!==a||t[53]!==gt||t[54]!==X||t[55]!==A||t[56]!==At||t[57]!==ht||t[58]!==ct||t[59]!==N||t[60]!==I||t[61]!==it||t[62]!==dt||t[63]!==L||t[64]!==ut||t[65]!==l||t[66]!==F||t[67]!==et||t[68]!==tt||t[69]!==p||t[70]!==Mt||t[71]!==V||t[72]!==qt?(Vt=tt&&et&&n.filter(w=>O?!Gt.checkIfNullOrUndefined(w.size):w).length>0?s.jsxRuntimeExports.jsx(Ee,{hideAxisLine:Z,data:n.filter(w=>O?!Gt.checkIfNullOrUndefined(w.size):w).filter((w,oe)=>P?oe<P:!0),barColor:n.filter(ze).length===0?x?[x]:[pt.Colors.primaryColors["blue-600"]]:x||pt.Colors[p].categoricalColors.colors,colorDomain:n.filter(Pe).length===0?[]:g||le.uniqBy(n,"color",!0),selectedColor:it,width:tt,height:et,suffix:F,prefix:ct,barPadding:H,showValues:ut,showTicks:L,leftMargin:Ot,rightMargin:I,topMargin:V,bottomMargin:jt,truncateBy:qt,showLabels:dt,tooltip:Mt,onSeriesMouseOver:At,refValues:N,maxValue:m,minValue:a,highlightedDataPoints:U,onSeriesMouseClick:A,labelOrder:R,rtl:y==="he"||y==="ar",maxBarThickness:lt,minBarThickness:at,detailsOnClick:z,barAxisTitle:q,noOfTicks:X,classNames:o,styles:l,animate:J===!0?{duration:.5,once:!0,amount:.5}:J||{duration:0,once:!0,amount:0},dimmedOpacity:K,precision:ht,customLayers:ft,naLabel:gt,locale:_}):null,t[30]=J,t[31]=q,t[32]=H,t[33]=jt,t[34]=o,t[35]=g,t[36]=x,t[37]=ft,t[38]=n,t[39]=z,t[40]=K,t[41]=O,t[42]=Z,t[43]=U,t[44]=R,t[45]=y,t[46]=Ot,t[47]=_,t[48]=lt,t[49]=P,t[50]=m,t[51]=at,t[52]=a,t[53]=gt,t[54]=X,t[55]=A,t[56]=At,t[57]=ht,t[58]=ct,t[59]=N,t[60]=I,t[61]=it,t[62]=dt,t[63]=L,t[64]=ut,t[65]=l,t[66]=F,t[67]=et,t[68]=tt,t[69]=p,t[70]=Mt,t[71]=V,t[72]=qt,t[73]=Vt):Vt=t[73];let It;t[74]!==St||t[75]!==Vt?(It=s.jsxRuntimeExports.jsxs(re.GraphArea,{ref:ot,children:[St,Vt]}),t[74]=St,t[75]=Vt,t[76]=It):It=t[76];let Pt;t[77]!==o?.footnote||t[78]!==o?.source||t[79]!==st||t[80]!==h||t[81]!==l?.footnote||t[82]!==l?.source||t[83]!==d?(Pt=h||st?s.jsxRuntimeExports.jsx(we.GraphFooter,{sources:h,footNote:st,width:d,styles:{footnote:l?.footnote,source:l?.source},classNames:{footnote:o?.footnote,source:o?.source}}):null,t[77]=o?.footnote,t[78]=o?.source,t[79]=st,t[80]=h,t[81]=l?.footnote,t[82]=l?.source,t[83]=d,t[84]=Pt):Pt=t[84];let ie;return t[85]!==Lt||t[86]!==Y||t[87]!==Ut||t[88]!==Ft||t[89]!==y||t[90]!==xt||t[91]!==wt||t[92]!==v||t[93]!==nt||t[94]!==Kt||t[95]!==D||t[96]!==Dt||t[97]!==It||t[98]!==Pt||t[99]!==p||t[100]!==d?(ie=s.jsxRuntimeExports.jsxs(re.GraphContainer,{className:nt,style:Kt,id:Ut,ref:e,"aria-label":Lt,backgroundColor:Y,theme:p,language:y,minHeight:xt,width:d,height:Ft,relativeHeight:v,padding:wt,children:[D,Dt,It,Pt]}),t[85]=Lt,t[86]=Y,t[87]=Ut,t[88]=Ft,t[89]=y,t[90]=xt,t[91]=wt,t[92]=v,t[93]=nt,t[94]=Kt,t[95]=D,t[96]=Dt,t[97]=It,t[98]=Pt,t[99]=p,t[100]=d,t[101]=ie):ie=t[101],ie}function Pe(i){return i.color}function ze(i){return i.color}function Ge(i){return i.color}function We(i){return i!==void 0}function Fe(i){return i!==void 0}function He(i){return i.data}function Ue(i){return i!==void 0}function Ye(i){return i.data}exports.WaterfallChart=Ie;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-D4pAp7u0.cjs"),E=require("react"),re=require("./index-DQA8q5sC.cjs"),oe=require("./numberFormattingFunction-Cn9R7CM9.cjs"),le=require("./Tooltip-Hr46paWP.cjs"),Gt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),vt=require("./Colors.cjs"),ae=require("./AxisTitle-DP_evhbe.cjs"),ce=require("./Axis-BTaS9oPQ.cjs"),ue=require("./ReferenceLine-CpU4G01Y.cjs"),de=require("./YTicksAndGridLines-DFjm8RCc.cjs"),me=require("./XAxesLabels-C03jHniq.cjs"),xe=require("./DetailsModal-jmmKRMRM.cjs"),Pt=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),fe=require("./linear-CgUCbw9F.cjs"),he=require("./band-VYfcZeJ2.cjs"),ie=require("./proxy-CqH8m8IQ.cjs"),ge=require("./use-in-view-dnRv_qqF.cjs"),pe=require("./index-FXfr51ZM.cjs"),ve=require("./ColorLegendWithMouseOver.cjs"),be=require("./EmptyState-CFmiFPHz.cjs"),ne=require("./GraphContainer-Cul9b74X.cjs"),ye=require("./GraphFooter.cjs"),Ce=require("./GraphHeader.cjs"),se=require("./uniqBy-O05lp2S5.cjs");function we(i){let t=0,n=0,y=0;for(const x of i)t+=x||0,t>n&&(n=t),t<y&&(y=t);return{max:n,min:y}}function je(i){const t=s.compilerRuntimeExports.c(46),{leftMargin:n,rightMargin:y,topMargin:x,bottomMargin:Wt,data:f,width:bt,height:I,barColor:h,suffix:yt,prefix:Ct,barPadding:Jt,showLabels:Ft,showValues:d,showTicks:ot,colorDomain:g,truncateBy:wt,tooltip:z,onSeriesMouseOver:jt,refValues:Ht,selectedColor:P,maxValue:Ot,minValue:Et,highlightedDataPoints:G,onSeriesMouseClick:Mt,labelOrder:p,maxBarThickness:At,minBarThickness:Rt,detailsOnClick:T,barAxisTitle:nt,noOfTicks:Ut,styles:m,classNames:c,dimmedOpacity:M,animate:u,precision:kt,customLayers:A,naLabel:Kt,hideAxisLine:Qt,locale:Lt}=i,R=n===void 0?20:n,st=y===void 0?20:y,W=x===void 0?20:x,rt=Wt===void 0?25:Wt,Tt=E.useRef(null);let F;t[0]!==u.amount||t[1]!==u.once?(F={once:u.once,amount:u.amount},t[0]=u.amount,t[1]=u.once,t[2]=F):F=t[2];const N=ge.useInView(Tt,F),Nt=nt?R+30:R;let l;t[3]!==rt||t[4]!==st||t[5]!==Nt||t[6]!==W?(l={top:W,bottom:rt,left:Nt,right:st},t[3]=rt,t[4]=st,t[5]=Nt,t[6]=W,t[7]=l):l=t[7];const o=l,{max:Zt,min:_t}=we(f.map(De)),Yt=Gt.checkIfNullOrUndefined(Ot)?Zt:Ot,v=Gt.checkIfNullOrUndefined(Et)?_t:Et,[q,qt]=E.useState(void 0),[H,U]=E.useState(void 0),[Y,lt]=E.useState(void 0),[X,at]=E.useState(void 0),k=bt-o.left-o.right,$t=I-o.top-o.bottom;let J;if(t[8]!==f||t[9]!==p){const e=new Set,L=f.map((O,it)=>{const V=p?`${O.label}`:`${it}`;return e.add(V),{...O,id:V}}),j=p?p.filter(O=>!e.has(O)):[];J=[...L,...j.map(Be)],t[8]=f,t[9]=p,t[10]=J}else J=t[10];const K=J;let Q;t[11]!==K||t[12]!==p?(Q=p??K.map($e),t[11]=K,t[12]=p,t[13]=Q):Q=t[13];const Z=Q,r=fe.linear().domain([v,Yt]).range([$t,0]).nice(),a=he.band().domain(Z).range([0,Rt?Math.max(k,Rt*Z.length):At?Math.min(k,At*Z.length):k]).paddingInner(Jt),Bt=r.ticks(Ut);let _=0;const C=K.map(e=>{const L=_;return _=_+(e.size||0),{...e,start:L,end:_}}),ct=c?.xAxis?.axis,w=c?.yAxis?.labels;let $;t[14]!==w||t[15]!==ct?($={axis:ct,label:w},t[14]=w,t[15]=ct,t[16]=$):$=t[16];const ut=m?.xAxis?.axis,dt=m?.yAxis?.labels;let B;t[17]!==ut||t[18]!==dt?(B={axis:ut,label:dt},t[17]=ut,t[18]=dt,t[19]=B):B=t[19];const mt=0-R-15,xt=$t/2,ft=m?.yAxis?.title,ht=c?.yAxis?.title;let D;t[20]!==nt||t[21]!==mt||t[22]!==xt||t[23]!==ft||t[24]!==ht?(D=s.jsxRuntimeExports.jsx(ae.AxisTitle,{x:mt,y:xt,style:ft,className:ht,text:nt,rotate90:!0}),t[20]=nt,t[21]=mt,t[22]=xt,t[23]=ft,t[24]=ht,t[25]=D):D=t[25];let Dt;t[26]!==A?(Dt=A.filter(Te).map(Le),t[26]=A,t[27]=Dt):Dt=t[27];const tt=pe.AnimatePresence,Xt=C.map((e,L)=>Gt.checkIfNullOrUndefined(a(e.id))?null:s.jsxRuntimeExports.jsxs(ie.motion.g,{className:"undp-viz-g-with-hover",initial:"initial",animate:N?"whileInView":"initial",variants:{initial:{opacity:P?e.color&&h[g.indexOf(e.color)]===P?1:M:G?G.indexOf(e.label)!==-1?.85:M:.85},whileInView:{opacity:P?e.color&&h[g.indexOf(e.color)]===P?1:M:G?G.indexOf(e.label)!==-1?.85:M:.85,transition:{duration:u.duration}}},exit:{opacity:0,transition:{duration:u.duration}},onMouseEnter:j=>{qt(e),at(j.clientY),lt(j.clientX),jt?.(e)},onClick:()=>{(Mt||T)&&(re.isEqual(H,e)?(U(void 0),Mt?.(void 0)):(U(e),Mt?.(e)))},onMouseMove:j=>{qt(e),at(j.clientY),lt(j.clientX)},onMouseLeave:()=>{qt(void 0),lt(void 0),at(void 0),jt?.(void 0)},children:[e.size?s.jsxRuntimeExports.jsx(ie.motion.rect,{width:a.bandwidth(),initial:"initial",animate:N?"whileInView":"initial",variants:{initial:{height:0,x:a(`${e.id}`),y:r(e.start),fill:f.filter(ke).length===0?h[0]:e.color?h[g.indexOf(e.color)]:vt.Colors.gray},whileInView:{height:Math.abs(r(e.start)-r(e.end)),y:r(Math.max(e.start,e.end)),x:a(`${e.id}`),fill:f.filter(Re).length===0?h[0]:e.color?h[g.indexOf(e.color)]:vt.Colors.gray,transition:{duration:u.duration}}},exit:{height:0,y:r(e.start),transition:{duration:u.duration}}}):null,Ft?s.jsxRuntimeExports.jsx(me.XAxesLabels,{value:`${e.label}`.length<wt?`${e.label}`:`${`${e.label}`.substring(0,wt)}...`,y:r(0)+5,x:a(`${e.id}`),width:a.bandwidth(),height:o.bottom,style:m?.xAxis?.labels,className:c?.xAxis?.labels,alignment:"top",animate:u,isInView:N}):null,d&&Math.abs(r(e.start)-r(e.end))>16?s.jsxRuntimeExports.jsx(ie.motion.text,{style:{textAnchor:"middle",...m?.graphObjectValues||{}},className:s.mo("graph-value text-sm",c?.graphObjectValues),dy:"0.33em",variants:{initial:{x:a(`${e.id}`)+a.bandwidth()/2,y:(r(e.start)+r(e.end))/2,opacity:0,fill:f.filter(Ae).length===0?Pt.getTextColorBasedOnBgColor(h[0]):e.color?Pt.getTextColorBasedOnBgColor(h[g.indexOf(e.color)]):Pt.getTextColorBasedOnBgColor(vt.Colors.gray)},whileInView:{x:a(`${e.id}`)+a.bandwidth()/2,y:(r(e.start)+r(e.end))/2,fill:f.filter(Me).length===0?Pt.getTextColorBasedOnBgColor(h[0]):e.color?Pt.getTextColorBasedOnBgColor(h[g.indexOf(e.color)]):Pt.getTextColorBasedOnBgColor(vt.Colors.gray),opacity:1,transition:{duration:u.duration}}},initial:"initial",animate:N?"whileInView":"initial",exit:{opacity:0,transition:{duration:u.duration}},children:oe.numberFormattingFunction(e.size?Math.abs(e.size):e.size,Kt,kt,Ct,yt,Lt)}):null]},e.label)),gt=Ht?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:Ht.map((e,L)=>s.jsxRuntimeExports.jsx(ue.RefLineY,{text:e.text,color:e.color,y:r(e.value),x1:0-R,x2:k+o.right,classNames:e.classNames,styles:e.styles,animate:u,isInView:N},L))}):null;let St;t[28]!==tt||t[29]!==Xt||t[30]!==gt?(St=s.jsxRuntimeExports.jsxs(tt,{children:[Xt,gt]}),t[28]=tt,t[29]=Xt,t[30]=gt,t[31]=St):St=t[31];let et;t[32]!==A?(et=A.filter(Ee).map(Oe),t[32]=A,t[33]=et):et=t[33];let pt;t[34]!==c?.tooltip||t[35]!==Y||t[36]!==X||t[37]!==q||t[38]!==m?.tooltip||t[39]!==z?(pt=q&&z&&Y&&X?s.jsxRuntimeExports.jsx(le.Tooltip,{data:q,body:z,xPos:Y,yPos:X,backgroundStyle:m?.tooltip,className:c?.tooltip}):null,t[34]=c?.tooltip,t[35]=Y,t[36]=X,t[37]=q,t[38]=m?.tooltip,t[39]=z,t[40]=pt):pt=t[40];let S;return t[41]!==c?.modal||t[42]!==T||t[43]!==H||t[44]!==U?(S=T&&H!==void 0?s.jsxRuntimeExports.jsx(xe.DetailsModal,{body:T,data:H,setData:U,className:c?.modal}):null,t[41]=c?.modal,t[42]=T,t[43]=H,t[44]=U,t[45]=S):S=t[45],s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(ie.motion.svg,{ref:Tt,width:`${bt}px`,height:`${I}px`,viewBox:`0 0 ${bt} ${I}`,direction:"ltr",children:s.jsxRuntimeExports.jsxs("g",{transform:`translate(${o.left},${o.top})`,children:[s.jsxRuntimeExports.jsx(ce.Axis,{y1:r(v<0?0:v),y2:r(v<0?0:v),x1:0-R,x2:k+o.right,hideAxisLine:Qt,label:ot?oe.numberFormattingFunction(v<0?0:v,void 0,kt,Ct,yt,Lt):void 0,labelPos:{x:0-R,dx:0,dy:Yt<0?"1em":-5,y:r(v<0?0:v)},classNames:$,styles:B}),ot?s.jsxRuntimeExports.jsx(de.YTicksAndGridLines,{values:Bt.filter(qe),y:Bt.filter(Ne).map(e=>r(e)),x1:0-R,x2:k+o.right,styles:{gridLines:m?.yAxis?.gridLines,labels:m?.yAxis?.labels},classNames:{gridLines:c?.yAxis?.gridLines,labels:c?.yAxis?.labels},suffix:yt,prefix:Ct,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:kt,locale:Lt}):null,D,Dt,St,et]})}),pt,S]})}function Oe(i){return i.layer}function Ee(i){return i.position==="after"}function Me(i){return i.color}function Ae(i){return i.color}function Re(i){return i.color}function ke(i){return i.color}function Le(i){return i.layer}function Te(i){return i.position==="before"}function Ne(i){return i!==0}function qe(i){return i!==0}function $e(i){return`${i.id}`}function Be(i){return{id:i,label:i,color:null,size:null}}function De(i){return i.size}function Se(i){const t=s.compilerRuntimeExports.c(100),{data:n,graphTitle:y,colors:x,suffix:Wt,sources:f,prefix:bt,graphDescription:I,barPadding:h,showValues:yt,showTicks:Ct,truncateBy:Jt,height:Ft,width:d,footNote:ot,colorDomain:g,colorLegendTitle:wt,highlightedDataPoints:z,padding:jt,backgroundColor:Ht,topMargin:P,bottomMargin:Ot,leftMargin:Et,rightMargin:G,showLabels:Mt,relativeHeight:p,tooltip:At,onSeriesMouseOver:Rt,refValues:T,showColorScale:nt,graphID:Ut,maxValue:m,minValue:c,onSeriesMouseClick:M,graphDownload:u,dataDownload:kt,labelOrder:A,language:Kt,showNAColor:Qt,minHeight:Lt,theme:R,maxBarThickness:st,maxNumberOfBars:W,minBarThickness:rt,ariaLabel:Tt,detailsOnClick:F,barAxisTitle:N,noOfTicks:Nt,styles:l,classNames:o,filterNA:Zt,animate:_t,dimmedOpacity:Yt,precision:v,customLayers:q,naLabel:qt,hideAxisLine:H,locale:U}=i,Y=Wt===void 0?"":Wt,lt=bt===void 0?"":bt,X=h===void 0?.25:h,at=yt===void 0?!0:yt,k=Ct===void 0?!0:Ct,$t=Jt===void 0?999:Jt,J=Ht===void 0?!1:Ht,K=Mt===void 0?!0:Mt,Q=nt===void 0?!0:nt,Z=u===void 0?!1:u,r=kt===void 0?!1:kt,a=Kt===void 0?"en":Kt,Bt=Qt===void 0?!0:Qt,_=Lt===void 0?0:Lt,C=R===void 0?"light":R,ct=Nt===void 0?5:Nt,w=Zt===void 0?!0:Zt,$=_t===void 0?!1:_t,ut=Yt===void 0?.3:Yt,dt=v===void 0?2:v;let B;t[0]!==q?(B=q===void 0?[]:q,t[0]=q,t[1]=B):B=t[1];const mt=B,xt=qt===void 0?"NA":qt,ft=H===void 0?!1:H,ht=U===void 0?"en":U,[D,Dt]=E.useState(0),[tt,Xt]=E.useState(0),[gt,St]=E.useState(void 0),et=E.useRef(null),pt=E.useRef(null);let S,e;t[2]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{const b=new ResizeObserver(ee=>{Dt(ee[0].target.clientWidth||620),Xt(ee[0].target.clientHeight||480)});return et.current&&b.observe(et.current),()=>b.disconnect()},e=[],t[2]=S,t[3]=e):(S=t[2],e=t[3]),E.useEffect(S,e);const L=o?.graphContainer,j=l?.graphContainer;let O;t[4]!==o?.description||t[5]!==o?.title||t[6]!==n||t[7]!==r||t[8]!==I||t[9]!==Z||t[10]!==y||t[11]!==l?.description||t[12]!==l?.title||t[13]!==d?(O=y||I||Z||r?s.jsxRuntimeExports.jsx(Ce.GraphHeader,{styles:{title:l?.title,description:l?.description},classNames:{title:o?.title,description:o?.description},graphTitle:y,graphDescription:I,width:d,graphDownload:Z?pt:void 0,dataDownload:r?n.map(He).filter(Fe).length>0?n.map(We).filter(Ge):n.filter(Pe):null}):null,t[4]=o?.description,t[5]=o?.title,t[6]=n,t[7]=r,t[8]=I,t[9]=Z,t[10]=y,t[11]=l?.description,t[12]=l?.title,t[13]=d,t[14]=O):O=t[14];let it;t[15]!==o?.colorLegend||t[16]!==g||t[17]!==wt||t[18]!==x||t[19]!==n||t[20]!==Q||t[21]!==Bt||t[22]!==C||t[23]!==d?(it=Q&&n.filter(ze).length!==0&&n.length>0?s.jsxRuntimeExports.jsx(ve.ColorLegendWithMouseOver,{width:d,colorLegendTitle:wt,colors:x||vt.Colors[C].categoricalColors.colors,colorDomain:g||se.uniqBy(n,"color",!0),setSelectedColor:St,showNAColor:Bt,className:o?.colorLegend}):null,t[15]=o?.colorLegend,t[16]=g,t[17]=wt,t[18]=x,t[19]=n,t[20]=Q,t[21]=Bt,t[22]=C,t[23]=d,t[24]=it):it=t[24];let V;t[25]!==n||t[26]!==w?(V=n.filter(b=>w?!Gt.checkIfNullOrUndefined(b.size):b).length===0&&s.jsxRuntimeExports.jsx(be.EmptyState,{}),t[25]=n,t[26]=w,t[27]=V):V=t[27];let Vt;t[28]!==$||t[29]!==N||t[30]!==X||t[31]!==Ot||t[32]!==o||t[33]!==g||t[34]!==x||t[35]!==mt||t[36]!==n||t[37]!==F||t[38]!==ut||t[39]!==w||t[40]!==ft||t[41]!==z||t[42]!==A||t[43]!==a||t[44]!==Et||t[45]!==ht||t[46]!==st||t[47]!==W||t[48]!==m||t[49]!==rt||t[50]!==c||t[51]!==xt||t[52]!==ct||t[53]!==M||t[54]!==Rt||t[55]!==dt||t[56]!==lt||t[57]!==T||t[58]!==G||t[59]!==gt||t[60]!==K||t[61]!==k||t[62]!==at||t[63]!==l||t[64]!==Y||t[65]!==tt||t[66]!==D||t[67]!==C||t[68]!==At||t[69]!==P||t[70]!==$t?(Vt=D&&tt&&n.filter(b=>w?!Gt.checkIfNullOrUndefined(b.size):b).length>0?s.jsxRuntimeExports.jsx(je,{hideAxisLine:ft,data:n.filter(b=>w?!Gt.checkIfNullOrUndefined(b.size):b).filter((b,ee)=>W?ee<W:!0),barColor:n.filter(Ie).length===0?x?[x]:[vt.Colors.primaryColors["blue-600"]]:x||vt.Colors[C].categoricalColors.colors,colorDomain:n.filter(Ve).length===0?[]:g||se.uniqBy(n,"color",!0),selectedColor:gt,width:D,height:tt,suffix:Y,prefix:lt,barPadding:X,showValues:at,showTicks:k,leftMargin:Et,rightMargin:G,topMargin:P,bottomMargin:Ot,truncateBy:$t,showLabels:K,tooltip:At,onSeriesMouseOver:Rt,refValues:T,maxValue:m,minValue:c,highlightedDataPoints:z,onSeriesMouseClick:M,labelOrder:A,rtl:a==="he"||a==="ar",maxBarThickness:st,minBarThickness:rt,detailsOnClick:F,barAxisTitle:N,noOfTicks:ct,classNames:o,styles:l,animate:$===!0?{duration:.5,once:!0,amount:.5}:$||{duration:0,once:!0,amount:0},dimmedOpacity:ut,precision:dt,customLayers:mt,naLabel:xt,locale:ht}):null,t[28]=$,t[29]=N,t[30]=X,t[31]=Ot,t[32]=o,t[33]=g,t[34]=x,t[35]=mt,t[36]=n,t[37]=F,t[38]=ut,t[39]=w,t[40]=ft,t[41]=z,t[42]=A,t[43]=a,t[44]=Et,t[45]=ht,t[46]=st,t[47]=W,t[48]=m,t[49]=rt,t[50]=c,t[51]=xt,t[52]=ct,t[53]=M,t[54]=Rt,t[55]=dt,t[56]=lt,t[57]=T,t[58]=G,t[59]=gt,t[60]=K,t[61]=k,t[62]=at,t[63]=l,t[64]=Y,t[65]=tt,t[66]=D,t[67]=C,t[68]=At,t[69]=P,t[70]=$t,t[71]=Vt):Vt=t[71];let It;t[72]!==V||t[73]!==Vt?(It=s.jsxRuntimeExports.jsxs(ne.GraphArea,{ref:et,children:[V,Vt]}),t[72]=V,t[73]=Vt,t[74]=It):It=t[74];let zt;t[75]!==o?.footnote||t[76]!==o?.source||t[77]!==ot||t[78]!==f||t[79]!==l?.footnote||t[80]!==l?.source||t[81]!==d?(zt=f||ot?s.jsxRuntimeExports.jsx(ye.GraphFooter,{sources:f,footNote:ot,width:d,styles:{footnote:l?.footnote,source:l?.source},classNames:{footnote:o?.footnote,source:o?.source}}):null,t[75]=o?.footnote,t[76]=o?.source,t[77]=ot,t[78]=f,t[79]=l?.footnote,t[80]=l?.source,t[81]=d,t[82]=zt):zt=t[82];let te;return t[83]!==Tt||t[84]!==J||t[85]!==Ut||t[86]!==Ft||t[87]!==a||t[88]!==_||t[89]!==jt||t[90]!==p||t[91]!==L||t[92]!==j||t[93]!==O||t[94]!==it||t[95]!==It||t[96]!==zt||t[97]!==C||t[98]!==d?(te=s.jsxRuntimeExports.jsxs(ne.GraphContainer,{className:L,style:j,id:Ut,ref:pt,"aria-label":Tt,backgroundColor:J,theme:C,language:a,minHeight:_,width:d,height:Ft,relativeHeight:p,padding:jt,children:[O,it,It,zt]}),t[83]=Tt,t[84]=J,t[85]=Ut,t[86]=Ft,t[87]=a,t[88]=_,t[89]=jt,t[90]=p,t[91]=L,t[92]=j,t[93]=O,t[94]=it,t[95]=It,t[96]=zt,t[97]=C,t[98]=d,t[99]=te):te=t[99],te}function Ve(i){return i.color}function Ie(i){return i.color}function ze(i){return i.color}function Pe(i){return i!==void 0}function Ge(i){return i!==void 0}function We(i){return i.data}function Fe(i){return i!==void 0}function He(i){return i.data}exports.WaterfallChart=Se;
|
|
2
2
|
//# sourceMappingURL=WaterfallChart.cjs.map
|