@undp/data-viz 1.4.12 → 1.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/DualAxisLineChart.cjs +1 -1
  2. package/dist/DualAxisLineChart.cjs.map +1 -1
  3. package/dist/DualAxisLineChart.d.ts +3 -1
  4. package/dist/DualAxisLineChart.js +232 -229
  5. package/dist/DualAxisLineChart.js.map +1 -1
  6. package/dist/{GraphEl-s3ctz7oA.js → GraphEl-B3xVlimz.js} +5 -1
  7. package/dist/GraphEl-B3xVlimz.js.map +1 -0
  8. package/dist/GraphEl-DO-juRN8.cjs +2 -0
  9. package/dist/GraphEl-DO-juRN8.cjs.map +1 -0
  10. package/dist/GriddedGraphs.cjs +1 -1
  11. package/dist/GriddedGraphs.d.ts +1 -0
  12. package/dist/GriddedGraphs.js +1 -1
  13. package/dist/GriddedGraphsFromConfig.d.ts +1 -0
  14. package/dist/MultiGraphDashboard.d.ts +1 -0
  15. package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
  16. package/dist/ParetoChart.cjs +1 -1
  17. package/dist/ParetoChart.cjs.map +1 -1
  18. package/dist/ParetoChart.d.ts +4 -0
  19. package/dist/ParetoChart.js +310 -306
  20. package/dist/ParetoChart.js.map +1 -1
  21. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
  22. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
  23. package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
  24. package/dist/ScrollStory.d.ts +1 -0
  25. package/dist/SingleGraphDashboard.cjs +1 -1
  26. package/dist/SingleGraphDashboard.d.ts +1 -0
  27. package/dist/SingleGraphDashboard.js +1 -1
  28. package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
  29. package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
  30. package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
  31. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
  32. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
  33. package/dist/Types.d.ts +1 -0
  34. package/dist/index.d.ts +8 -1
  35. package/package.json +1 -1
  36. package/dist/GraphEl-OzC-icbr.cjs +0 -2
  37. package/dist/GraphEl-OzC-icbr.cjs.map +0 -1
  38. package/dist/GraphEl-s3ctz7oA.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ParetoChart.js","sources":["../src/Components/Graphs/ParetoChart/Graph.tsx","../src/Components/Graphs/ParetoChart/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { useRef, useState } from 'react';\r\nimport {\r\n line,\r\n curveMonotoneX,\r\n curveLinear,\r\n curveStep,\r\n curveStepAfter,\r\n curveStepBefore,\r\n} from 'd3-shape';\r\nimport { scaleBand, scaleLinear } from 'd3-scale';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CurveTypes,\r\n CustomLayerDataType,\r\n ParetoChartDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Axis } from '@/Components/Elements/Axes/Axis';\r\nimport { AxisTitle } from '@/Components/Elements/Axes/AxisTitle';\r\nimport { XAxesLabels } from '@/Components/Elements/Axes/XAxesLabels';\r\n\r\ninterface Props {\r\n data: ParetoChartDataType[];\r\n barColor: string;\r\n lineColor: string;\r\n axisTitles: [string, string];\r\n width: number;\r\n height: number;\r\n rightMargin: number;\r\n leftMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\r\n sameAxes: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n barPadding: number;\r\n truncateBy: number;\r\n showLabels: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n noOfTicks: number;\r\n lineSuffix: string;\r\n barSuffix: string;\r\n linePrefix: string;\r\n showValues: boolean;\r\n barPrefix: string;\r\n curveType: CurveTypes;\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n animate: AnimateDataType;\r\n precision: number;\r\n naLabel: string;\r\n customLayers: CustomLayerDataType[];\r\n}\r\ninterface DataFormattedType {\r\n id: string;\r\n label: number | string;\r\n line?: number;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n width,\r\n height,\r\n barColor,\r\n lineColor,\r\n axisTitles,\r\n sameAxes,\r\n rightMargin,\r\n leftMargin,\r\n topMargin,\r\n bottomMargin,\r\n tooltip,\r\n showValues,\r\n onSeriesMouseOver,\r\n barPadding,\r\n truncateBy,\r\n showLabels,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n noOfTicks,\r\n lineSuffix,\r\n barSuffix,\r\n linePrefix,\r\n barPrefix,\r\n curveType,\r\n styles,\r\n classNames,\r\n animate,\r\n precision,\r\n customLayers,\r\n naLabel,\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 const curve =\r\n curveType === 'linear'\r\n ? curveLinear\r\n : curveType === 'step'\r\n ? curveStep\r\n : curveType === 'stepAfter'\r\n ? curveStepAfter\r\n : curveType === 'stepBefore'\r\n ? curveStepBefore\r\n : curveMonotoneX;\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 + 50,\r\n right: rightMargin + 65,\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 dataWithId = data.map((d, i) => ({ ...d, id: `${i}` }));\r\n const x = scaleBand()\r\n .domain(dataWithId.map(d => `${d.id}`))\r\n .range([0, graphWidth])\r\n .paddingInner(barPadding);\r\n const minParam1 =\r\n Math.min(...dataWithId.map(d => d.bar).filter(d => d !== undefined && d !== null)) !== Infinity\r\n ? Math.min(...dataWithId.map(d => d.bar).filter(d => d !== undefined && d !== null)) > 0\r\n ? 0\r\n : Math.min(...dataWithId.map(d => d.bar).filter(d => d !== undefined && d !== null))\r\n : 0;\r\n const minParam2 =\r\n Math.min(...dataWithId.map(d => d.line).filter(d => d !== undefined && d !== null)) !== Infinity\r\n ? Math.min(...dataWithId.map(d => d.line).filter(d => d !== undefined && d !== null)) > 0\r\n ? 0\r\n : Math.min(...dataWithId.map(d => d.line).filter(d => d !== undefined && d !== null))\r\n : 0;\r\n const maxParam1 =\r\n Math.max(...dataWithId.map(d => d.bar).filter(d => d !== undefined && d !== null)) !== Infinity\r\n ? Math.max(...dataWithId.map(d => d.bar).filter(d => d !== undefined && d !== null))\r\n : 0;\r\n const maxParam2 =\r\n Math.max(...dataWithId.map(d => d.line).filter(d => d !== undefined && d !== null)) !== Infinity\r\n ? Math.max(...dataWithId.map(d => d.line).filter(d => d !== undefined && d !== null))\r\n : 0;\r\n\r\n const minParam = minParam1 < minParam2 ? minParam1 : minParam2;\r\n const maxParam = maxParam1 > maxParam2 ? maxParam1 : maxParam2;\r\n\r\n const y1 = scaleLinear()\r\n .domain([\r\n sameAxes ? minParam : minParam1,\r\n sameAxes ? (maxParam > 0 ? maxParam : 0) : maxParam1 > 0 ? maxParam1 : 0,\r\n ])\r\n .range([graphHeight, 0])\r\n .nice();\r\n const y2 = scaleLinear()\r\n .domain([\r\n sameAxes ? minParam : minParam2,\r\n sameAxes ? (maxParam > 0 ? maxParam : 0) : maxParam2 > 0 ? maxParam2 : 0,\r\n ])\r\n .range([graphHeight, 0])\r\n .nice();\r\n\r\n const lineShape = line<DataFormattedType>()\r\n .defined(d => !checkIfNullOrUndefined(d.line))\r\n .x(d => (x(`${d.id}`) as number) + x.bandwidth() / 2)\r\n .y(d => y2(d.line as number))\r\n .curve(curve);\r\n const y1Ticks = y1.ticks(noOfTicks);\r\n const y2Ticks = y2.ticks(noOfTicks);\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 <g>\r\n {y1Ticks.map((d, i) => (\r\n <g key={i}>\r\n <line\r\n y1={y1(d)}\r\n y2={y1(d)}\r\n x1={-15}\r\n x2={-20}\r\n style={{\r\n stroke: barColor,\r\n strokeWidth: 1,\r\n ...(styles?.yAxis?.gridLines || {}),\r\n }}\r\n className={classNames?.yAxis?.gridLines}\r\n />\r\n <text\r\n x={0 - 25}\r\n y={y1(d)}\r\n dy='0.33em'\r\n className={cn('text-xs', classNames?.yAxis?.labels)}\r\n style={{\r\n textAnchor: 'end',\r\n fill: barColor,\r\n ...(styles?.yAxis?.labels || {}),\r\n }}\r\n >\r\n {numberFormattingFunction(d, naLabel, precision, barPrefix, barSuffix)}\r\n </text>\r\n </g>\r\n ))}\r\n <Axis\r\n y1={0}\r\n y2={graphHeight}\r\n x1={-15}\r\n x2={-15}\r\n classNames={{ axis: classNames?.xAxis?.axis }}\r\n styles={{ axis: { stroke: barColor, ...(styles?.xAxis?.axis || {}) } }}\r\n />\r\n <AxisTitle\r\n x={10 - margin.left}\r\n y={graphHeight / 2}\r\n style={{ fill: barColor, ...(styles?.yAxis?.title || {}) }}\r\n className={classNames?.yAxis?.title}\r\n text={\r\n axisTitles[0].length > 100 ? `${axisTitles[0].substring(0, 100)}...` : axisTitles[0]\r\n }\r\n rotate90\r\n />\r\n </g>\r\n <g>\r\n {y2Ticks.map((d, i) => (\r\n <g key={i}>\r\n <line\r\n y1={y2(d)}\r\n y2={y2(d)}\r\n x1={graphWidth + 15}\r\n x2={graphWidth + 20}\r\n style={{\r\n stroke: lineColor,\r\n strokeWidth: 1,\r\n ...(styles?.yAxis?.gridLines || {}),\r\n }}\r\n className={classNames?.yAxis?.gridLines}\r\n />\r\n <text\r\n x={graphWidth + 25}\r\n y={y2(d)}\r\n dy='0.33em'\r\n dx={-2}\r\n style={{\r\n textAnchor: 'start',\r\n fill: lineColor,\r\n ...(styles?.yAxis?.labels || {}),\r\n }}\r\n className={cn('text-xs', classNames?.yAxis?.labels)}\r\n >\r\n {numberFormattingFunction(d, naLabel, precision, linePrefix, lineSuffix)}\r\n </text>\r\n </g>\r\n ))}\r\n <Axis\r\n y1={0}\r\n y2={graphHeight}\r\n x1={graphWidth + 15}\r\n x2={graphWidth + 15}\r\n classNames={{ axis: classNames?.xAxis?.axis }}\r\n styles={{ axis: { stroke: lineColor, ...(styles?.xAxis?.axis || {}) } }}\r\n />\r\n <AxisTitle\r\n x={graphWidth + margin.right - 15}\r\n y={graphHeight / 2}\r\n style={{ fill: lineColor, ...(styles?.yAxis?.title || {}) }}\r\n className={classNames?.yAxis?.title}\r\n text={\r\n axisTitles[1].length > 100 ? `${axisTitles[1].substring(0, 100)}...` : axisTitles[1]\r\n }\r\n rotate90\r\n />\r\n </g>\r\n <Axis\r\n y1={sameAxes ? y1(0) : graphHeight}\r\n y2={sameAxes ? y1(0) : graphHeight}\r\n x1={-15}\r\n x2={graphWidth + 15}\r\n classNames={{ axis: classNames?.xAxis?.axis }}\r\n styles={{ axis: styles?.xAxis?.axis }}\r\n />\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n <AnimatePresence>\r\n {dataWithId.map((d, i) => {\r\n return (\r\n <motion.g\r\n className='undp-viz-g-with-hover'\r\n key={d.label}\r\n opacity={0.85}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n >\r\n <motion.rect\r\n variants={{\r\n initial: {\r\n attrY: y1(0),\r\n height: 0,\r\n opacity: 1,\r\n },\r\n whileInView: {\r\n attrY: d.bar ? (d.bar > 0 ? y1(d.bar) : y1(0)) : 0,\r\n height: d.bar ? Math.abs(y1(d.bar) - y1(0)) : 0,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n attrY: y1(0),\r\n height: 0,\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n x={x(`${i}`)}\r\n width={x.bandwidth()}\r\n style={{ fill: barColor }}\r\n />\r\n {showValues && !checkIfNullOrUndefined(d.bar) ? (\r\n <motion.text\r\n x={(x(`${d.id}`) as number) + x.bandwidth() / 2}\r\n exit={{\r\n attrY: y1(0),\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n variants={{\r\n initial: {\r\n attrY: y1(0),\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n attrY: y1(d.bar || 0),\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 style={{\r\n fill: barColor,\r\n textAnchor: 'middle',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n className={cn('graph-value text-sm', classNames?.graphObjectValues)}\r\n dy={d.bar ? (d.bar >= 0 ? '-5px' : '1em') : '-5px'}\r\n >\r\n {numberFormattingFunction(d.bar, naLabel, precision, barPrefix, barSuffix)}\r\n </motion.text>\r\n ) : null}\r\n {showLabels ? (\r\n <XAxesLabels\r\n value={\r\n `${d.label}`.length < truncateBy\r\n ? `${d.label}`\r\n : `${`${d.label}`.substring(0, truncateBy)}...`\r\n }\r\n y={graphHeight + 5}\r\n x={x(`${d.id}`) as number}\r\n width={x.bandwidth()}\r\n height={margin.bottom}\r\n style={styles?.xAxis?.labels}\r\n className={classNames?.xAxis?.labels}\r\n alignment='top'\r\n animate={animate}\r\n isInView={isInView}\r\n />\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n <motion.path\r\n exit={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n variants={{\r\n initial: {\r\n d: lineShape(dataWithId.map(d => ({ ...d, line: 0 }))) as string,\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n d: lineShape(dataWithId) as string,\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 style={{\r\n stroke: lineColor,\r\n fill: 'none',\r\n strokeWidth: 2,\r\n }}\r\n />\r\n {dataWithId.map((d, i) => (\r\n <g key={i}>\r\n {!checkIfNullOrUndefined(d.line) ? (\r\n <g\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n >\r\n <motion.circle\r\n exit={{\r\n cy: y2(0),\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n variants={{\r\n initial: {\r\n cy: y2(0),\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n cy: y2(d.line as number),\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 cx={(x(d.id) as number) + x.bandwidth() / 2}\r\n r={\r\n graphWidth / dataWithId.length < 5\r\n ? 0\r\n : graphWidth / dataWithId.length < 20\r\n ? 2\r\n : 4\r\n }\r\n style={{ fill: lineColor }}\r\n />\r\n {showValues ? (\r\n <motion.text\r\n x={(x(`${d.id}`) as number) + x.bandwidth() / 2}\r\n exit={{\r\n y: y2(0),\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n fill: lineColor,\r\n textAnchor: 'middle',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n variants={{\r\n initial: {\r\n y: y2(0),\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n y: y2(d.line as number),\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 className={cn('graph-value text-sm', classNames?.graphObjectValues)}\r\n dy='-5px'\r\n >\r\n {numberFormattingFunction(\r\n d.line,\r\n naLabel,\r\n precision,\r\n linePrefix,\r\n lineSuffix,\r\n )}\r\n </motion.text>\r\n ) : null}\r\n </g>\r\n ) : null}\r\n </g>\r\n ))}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {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 <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect } from 'react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { ColorLegend } from '@/Components/Elements/ColorLegend';\r\nimport {\r\n Languages,\r\n ParetoChartDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n CurveTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: ParetoChartDataType[];\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 of the bars */\r\n barColor?: string;\r\n /** Color of the line */\r\n lineColor?: 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 /** Padding between bars */\r\n barPadding?: number;\r\n\r\n // Values and Ticks\r\n /** Suffix for values of the lines */\r\n lineSuffix?: string;\r\n /** Suffix for values of the bars */\r\n barSuffix?: string;\r\n /** Prefix for values of the lines */\r\n linePrefix?: string;\r\n /** Prefix for values of the bars */\r\n barPrefix?: string;\r\n /** Truncate labels by specified length */\r\n truncateBy?: number;\r\n /** Number of ticks on the axis */\r\n noOfTicks?: number;\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 /** Curve type for the line */\r\n curveType?: CurveTypes;\r\n /** Enables same axis for bars and line */\r\n sameAxes?: boolean;\r\n /** Title for the bar axis */\r\n barAxisTitle?: string;\r\n /** Title for the line axis */\r\n lineAxisTitle?: string;\r\n /** Defines how “NA” values should be displayed/labelled in the graph */\r\n naLabel?: string;\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 /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\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 ParetoChart(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote,\r\n padding,\r\n lineColor = Colors.light.categoricalColors.colors[1],\r\n barColor = Colors.light.categoricalColors.colors[0],\r\n sameAxes = false,\r\n backgroundColor = false,\r\n leftMargin = 80,\r\n rightMargin = 80,\r\n topMargin = 20,\r\n bottomMargin = 25,\r\n lineAxisTitle = 'Line chart',\r\n barAxisTitle = 'Bar graph',\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n graphID,\r\n graphDownload = false,\r\n dataDownload = false,\r\n barPadding = 0.25,\r\n truncateBy = 999,\r\n showLabels = true,\r\n onSeriesMouseClick,\r\n language = 'en',\r\n colorLegendTitle,\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n showValues = true,\r\n noOfTicks = 5,\r\n lineSuffix = '',\r\n barSuffix = '',\r\n linePrefix = '',\r\n barPrefix = '',\r\n curveType = 'curve',\r\n styles,\r\n classNames,\r\n animate = false,\r\n precision = 2,\r\n customLayers = [],\r\n naLabel = 'NA',\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\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(width || entries[0].target.clientWidth || 620);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 620);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex ${width ? 'w-fit grow-0' : 'w-full grow'}`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }ml-auto mr-auto flex flex-col grow h-inherit ${language || 'en'}`,\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={\r\n ariaLabel ||\r\n `${\r\n graphTitle ? `The graph shows ${graphTitle}. ` : ''\r\n }This is a pareto chart that shows a variable as bars and another as line chart.${\r\n graphDescription ? ` ${graphDescription}` : ''\r\n }`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n <div className='flex flex-col w-full gap-4 grow justify-between'>\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.current : 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 <div className='grow flex flex-col justify-center gap-3 w-full'>\r\n {data.length === 0 ? (\r\n <EmptyState />\r\n ) : (\r\n <>\r\n <ColorLegend\r\n colorDomain={[barAxisTitle, lineAxisTitle]}\r\n colors={[\r\n barColor || Colors[theme].categoricalColors.colors[0],\r\n lineColor || Colors[theme].categoricalColors.colors[1],\r\n ]}\r\n colorLegendTitle={colorLegendTitle}\r\n showNAColor={false}\r\n />\r\n <div\r\n className='flex flex-col grow justify-center leading-0'\r\n ref={graphDiv}\r\n aria-label='Graph area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <Graph\r\n data={data}\r\n sameAxes={sameAxes}\r\n lineColor={lineColor}\r\n barColor={barColor}\r\n width={width || svgWidth}\r\n height={Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}\r\n truncateBy={truncateBy}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n axisTitles={[barAxisTitle, lineAxisTitle]}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n barPadding={barPadding}\r\n showLabels={showLabels}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n noOfTicks={noOfTicks}\r\n lineSuffix={lineSuffix}\r\n barSuffix={barSuffix}\r\n linePrefix={linePrefix}\r\n barPrefix={barPrefix}\r\n curveType={curveType}\r\n showValues={showValues}\r\n styles={styles}\r\n classNames={classNames}\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 precision={precision}\r\n customLayers={customLayers}\r\n naLabel={naLabel}\r\n />\r\n ) : null}\r\n </div>\r\n </>\r\n )}\r\n </div>\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 </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["Graph","props","data","width","height","barColor","lineColor","axisTitles","sameAxes","rightMargin","leftMargin","topMargin","bottomMargin","tooltip","showValues","onSeriesMouseOver","barPadding","truncateBy","showLabels","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","noOfTicks","lineSuffix","barSuffix","linePrefix","barPrefix","curveType","styles","classNames","animate","precision","customLayers","naLabel","svgRef","useRef","isInView","useInView","curve","curveLinear","curveStep","curveStepAfter","curveStepBefore","curveMonotoneX","mouseOverData","setMouseOverData","useState","mouseClickData","setMouseClickData","eventX","setEventX","eventY","setEventY","margin","graphWidth","graphHeight","dataWithId","d","i","x","scaleBand","minParam1","minParam2","maxParam1","maxParam2","minParam","maxParam","y1","scaleLinear","y2","lineShape","line","checkIfNullOrUndefined","y1Ticks","y2Ticks","jsxs","Fragment","jsx","motion","cn","numberFormattingFunction","Axis","AxisTitle","AnimatePresence","event","isEqual","XAxesLabels","Tooltip","Modal","string2HTML","ParetoChart","graphTitle","sources","graphDescription","footNote","padding","Colors","backgroundColor","lineAxisTitle","barAxisTitle","relativeHeight","graphID","graphDownload","dataDownload","language","colorLegendTitle","minHeight","theme","ariaLabel","svgWidth","setSvgWidth","svgHeight","setSvgHeight","graphDiv","graphParentDiv","useEffect","resizeObserver","entries","GraphHeader","EmptyState","ColorLegend","GraphFooter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA2EO,SAASA,GAAMC,IAAc;AAClC,QAAM;AAAA,IACJ,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,cAAAC;AAAA,IACA,SAAAC;AAAA,IACA,YAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,6BAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,W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art/Graph.tsx","../src/Components/Graphs/ParetoChart/index.tsx"],"sourcesContent":["import isEqual from 'fast-deep-equal';\r\nimport { useRef, useState } from 'react';\r\nimport {\r\n line,\r\n curveMonotoneX,\r\n curveLinear,\r\n curveStep,\r\n curveStepAfter,\r\n curveStepBefore,\r\n} from 'd3-shape';\r\nimport { scaleBand, scaleLinear } from 'd3-scale';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Modal } from '@undp/design-system-react/Modal';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CurveTypes,\r\n CustomLayerDataType,\r\n ParetoChartDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Axis } from '@/Components/Elements/Axes/Axis';\r\nimport { AxisTitle } from '@/Components/Elements/Axes/AxisTitle';\r\nimport { XAxesLabels } from '@/Components/Elements/Axes/XAxesLabels';\r\n\r\ninterface Props {\r\n data: ParetoChartDataType[];\r\n barColor: string;\r\n lineColor: string;\r\n axisTitles: [string, string];\r\n width: number;\r\n height: number;\r\n rightMargin: number;\r\n leftMargin: number;\r\n topMargin: number;\r\n bottomMargin: number;\r\n sameAxes: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n barPadding: number;\r\n truncateBy: number;\r\n showLabels: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n noOfTicks: number;\r\n lineSuffix: string;\r\n barSuffix: string;\r\n linePrefix: string;\r\n showValues: boolean;\r\n barPrefix: string;\r\n curveType: CurveTypes;\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n animate: AnimateDataType;\r\n precision: number;\r\n naLabel: string;\r\n customLayers: CustomLayerDataType[];\r\n showAxisLabels: boolean;\r\n}\r\ninterface DataFormattedType {\r\n id: string;\r\n label: number | string;\r\n line?: number;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n width,\r\n height,\r\n barColor,\r\n lineColor,\r\n axisTitles,\r\n sameAxes,\r\n rightMargin,\r\n leftMargin,\r\n topMargin,\r\n bottomMargin,\r\n tooltip,\r\n showValues,\r\n onSeriesMouseOver,\r\n barPadding,\r\n truncateBy,\r\n showLabels,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n noOfTicks,\r\n lineSuffix,\r\n barSuffix,\r\n linePrefix,\r\n barPrefix,\r\n curveType,\r\n styles,\r\n classNames,\r\n animate,\r\n precision,\r\n customLayers,\r\n naLabel,\r\n showAxisLabels,\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 const curve =\r\n curveType === 'linear'\r\n ? curveLinear\r\n : curveType === 'step'\r\n ? curveStep\r\n : curveType === 'stepAfter'\r\n ? curveStepAfter\r\n : curveType === 'stepBefore'\r\n ? curveStepBefore\r\n : curveMonotoneX;\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 + 50,\r\n right: rightMargin + 65,\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 dataWithId = data.map((d, i) => ({ ...d, id: `${i}` }));\r\n const x = scaleBand()\r\n .domain(dataWithId.map(d => `${d.id}`))\r\n .range([0, graphWidth])\r\n .paddingInner(barPadding);\r\n const minParam1 =\r\n Math.min(...dataWithId.map(d => d.bar).filter(d => d !== undefined && d !== null)) !== Infinity\r\n ? Math.min(...dataWithId.map(d => d.bar).filter(d => d !== undefined && d !== null)) > 0\r\n ? 0\r\n : Math.min(...dataWithId.map(d => d.bar).filter(d => d !== undefined && d !== null))\r\n : 0;\r\n const minParam2 =\r\n Math.min(...dataWithId.map(d => d.line).filter(d => d !== undefined && d !== null)) !== Infinity\r\n ? Math.min(...dataWithId.map(d => d.line).filter(d => d !== undefined && d !== null)) > 0\r\n ? 0\r\n : Math.min(...dataWithId.map(d => d.line).filter(d => d !== undefined && d !== null))\r\n : 0;\r\n const maxParam1 =\r\n Math.max(...dataWithId.map(d => d.bar).filter(d => d !== undefined && d !== null)) !== Infinity\r\n ? Math.max(...dataWithId.map(d => d.bar).filter(d => d !== undefined && d !== null))\r\n : 0;\r\n const maxParam2 =\r\n Math.max(...dataWithId.map(d => d.line).filter(d => d !== undefined && d !== null)) !== Infinity\r\n ? Math.max(...dataWithId.map(d => d.line).filter(d => d !== undefined && d !== null))\r\n : 0;\r\n\r\n const minParam = minParam1 < minParam2 ? minParam1 : minParam2;\r\n const maxParam = maxParam1 > maxParam2 ? maxParam1 : maxParam2;\r\n\r\n const y1 = scaleLinear()\r\n .domain([\r\n sameAxes ? minParam : minParam1,\r\n sameAxes ? (maxParam > 0 ? maxParam : 0) : maxParam1 > 0 ? maxParam1 : 0,\r\n ])\r\n .range([graphHeight, 0])\r\n .nice();\r\n const y2 = scaleLinear()\r\n .domain([\r\n sameAxes ? minParam : minParam2,\r\n sameAxes ? (maxParam > 0 ? maxParam : 0) : maxParam2 > 0 ? maxParam2 : 0,\r\n ])\r\n .range([graphHeight, 0])\r\n .nice();\r\n\r\n const lineShape = line<DataFormattedType>()\r\n .defined(d => !checkIfNullOrUndefined(d.line))\r\n .x(d => (x(`${d.id}`) as number) + x.bandwidth() / 2)\r\n .y(d => y2(d.line as number))\r\n .curve(curve);\r\n const y1Ticks = y1.ticks(noOfTicks);\r\n const y2Ticks = y2.ticks(noOfTicks);\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 <g>\r\n {y1Ticks.map((d, i) => (\r\n <g key={i}>\r\n <line\r\n y1={y1(d)}\r\n y2={y1(d)}\r\n x1={-15}\r\n x2={-20}\r\n style={{\r\n stroke: barColor,\r\n strokeWidth: 1,\r\n ...(styles?.yAxis?.gridLines || {}),\r\n }}\r\n className={classNames?.yAxis?.gridLines}\r\n />\r\n <text\r\n x={0 - 25}\r\n y={y1(d)}\r\n dy='0.33em'\r\n className={cn('text-xs', classNames?.yAxis?.labels)}\r\n style={{\r\n textAnchor: 'end',\r\n fill: barColor,\r\n ...(styles?.yAxis?.labels || {}),\r\n }}\r\n >\r\n {numberFormattingFunction(d, naLabel, precision, barPrefix, barSuffix)}\r\n </text>\r\n </g>\r\n ))}\r\n <Axis\r\n y1={0}\r\n y2={graphHeight}\r\n x1={-15}\r\n x2={-15}\r\n classNames={{ axis: classNames?.xAxis?.axis }}\r\n styles={{ axis: { stroke: barColor, ...(styles?.xAxis?.axis || {}) } }}\r\n />\r\n {showAxisLabels ? (\r\n <AxisTitle\r\n x={10 - margin.left}\r\n y={graphHeight / 2}\r\n style={{ fill: barColor, ...(styles?.yAxis?.title || {}) }}\r\n className={classNames?.yAxis?.title}\r\n text={\r\n axisTitles[0].length > 100\r\n ? `${axisTitles[0].substring(0, 100)}...`\r\n : axisTitles[0]\r\n }\r\n rotate90\r\n />\r\n ) : null}\r\n </g>\r\n <g>\r\n {y2Ticks.map((d, i) => (\r\n <g key={i}>\r\n <line\r\n y1={y2(d)}\r\n y2={y2(d)}\r\n x1={graphWidth + 15}\r\n x2={graphWidth + 20}\r\n style={{\r\n stroke: lineColor,\r\n strokeWidth: 1,\r\n ...(styles?.yAxis?.gridLines || {}),\r\n }}\r\n className={classNames?.yAxis?.gridLines}\r\n />\r\n <text\r\n x={graphWidth + 25}\r\n y={y2(d)}\r\n dy='0.33em'\r\n dx={-2}\r\n style={{\r\n textAnchor: 'start',\r\n fill: lineColor,\r\n ...(styles?.yAxis?.labels || {}),\r\n }}\r\n className={cn('text-xs', classNames?.yAxis?.labels)}\r\n >\r\n {numberFormattingFunction(d, naLabel, precision, linePrefix, lineSuffix)}\r\n </text>\r\n </g>\r\n ))}\r\n <Axis\r\n y1={0}\r\n y2={graphHeight}\r\n x1={graphWidth + 15}\r\n x2={graphWidth + 15}\r\n classNames={{ axis: classNames?.xAxis?.axis }}\r\n styles={{ axis: { stroke: lineColor, ...(styles?.xAxis?.axis || {}) } }}\r\n />\r\n {showAxisLabels ? (\r\n <AxisTitle\r\n x={graphWidth + margin.right - 15}\r\n y={graphHeight / 2}\r\n style={{ fill: lineColor, ...(styles?.yAxis?.title || {}) }}\r\n className={classNames?.yAxis?.title}\r\n text={\r\n axisTitles[1].length > 100\r\n ? `${axisTitles[1].substring(0, 100)}...`\r\n : axisTitles[1]\r\n }\r\n rotate90\r\n />\r\n ) : null}\r\n </g>\r\n <Axis\r\n y1={sameAxes ? y1(0) : graphHeight}\r\n y2={sameAxes ? y1(0) : graphHeight}\r\n x1={-15}\r\n x2={graphWidth + 15}\r\n classNames={{ axis: classNames?.xAxis?.axis }}\r\n styles={{ axis: styles?.xAxis?.axis }}\r\n />\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n <AnimatePresence>\r\n {dataWithId.map((d, i) => {\r\n return (\r\n <motion.g\r\n className='undp-viz-g-with-hover'\r\n key={d.label}\r\n opacity={0.85}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n >\r\n <motion.rect\r\n variants={{\r\n initial: {\r\n attrY: y1(0),\r\n height: 0,\r\n opacity: 1,\r\n },\r\n whileInView: {\r\n attrY: d.bar ? (d.bar > 0 ? y1(d.bar) : y1(0)) : 0,\r\n height: d.bar ? Math.abs(y1(d.bar) - y1(0)) : 0,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n attrY: y1(0),\r\n height: 0,\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n x={x(`${i}`)}\r\n width={x.bandwidth()}\r\n style={{ fill: barColor }}\r\n />\r\n {showValues && !checkIfNullOrUndefined(d.bar) ? (\r\n <motion.text\r\n x={(x(`${d.id}`) as number) + x.bandwidth() / 2}\r\n exit={{\r\n attrY: y1(0),\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n variants={{\r\n initial: {\r\n attrY: y1(0),\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n attrY: y1(d.bar || 0),\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 style={{\r\n fill: barColor,\r\n textAnchor: 'middle',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n className={cn('graph-value text-sm', classNames?.graphObjectValues)}\r\n dy={d.bar ? (d.bar >= 0 ? '-5px' : '1em') : '-5px'}\r\n >\r\n {numberFormattingFunction(d.bar, naLabel, precision, barPrefix, barSuffix)}\r\n </motion.text>\r\n ) : null}\r\n {showLabels ? (\r\n <XAxesLabels\r\n value={\r\n `${d.label}`.length < truncateBy\r\n ? `${d.label}`\r\n : `${`${d.label}`.substring(0, truncateBy)}...`\r\n }\r\n y={graphHeight + 5}\r\n x={x(`${d.id}`) as number}\r\n width={x.bandwidth()}\r\n height={margin.bottom}\r\n style={styles?.xAxis?.labels}\r\n className={classNames?.xAxis?.labels}\r\n alignment='top'\r\n animate={animate}\r\n isInView={isInView}\r\n />\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n <motion.path\r\n exit={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n variants={{\r\n initial: {\r\n d: lineShape(dataWithId.map(d => ({ ...d, line: 0 }))) as string,\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n d: lineShape(dataWithId) as string,\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 style={{\r\n stroke: lineColor,\r\n fill: 'none',\r\n strokeWidth: 2,\r\n }}\r\n />\r\n {dataWithId.map((d, i) => (\r\n <g key={i}>\r\n {!checkIfNullOrUndefined(d.line) ? (\r\n <g\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n >\r\n <motion.circle\r\n exit={{\r\n cy: y2(0),\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n variants={{\r\n initial: {\r\n cy: y2(0),\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n cy: y2(d.line as number),\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 cx={(x(d.id) as number) + x.bandwidth() / 2}\r\n r={\r\n graphWidth / dataWithId.length < 5\r\n ? 0\r\n : graphWidth / dataWithId.length < 20\r\n ? 2\r\n : 4\r\n }\r\n style={{ fill: lineColor }}\r\n />\r\n {showValues ? (\r\n <motion.text\r\n x={(x(`${d.id}`) as number) + x.bandwidth() / 2}\r\n exit={{\r\n y: y2(0),\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n fill: lineColor,\r\n textAnchor: 'middle',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n variants={{\r\n initial: {\r\n y: y2(0),\r\n opacity: 0,\r\n },\r\n whileInView: {\r\n y: y2(d.line as number),\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 className={cn('graph-value text-sm', classNames?.graphObjectValues)}\r\n dy='-5px'\r\n >\r\n {numberFormattingFunction(\r\n d.line,\r\n naLabel,\r\n precision,\r\n linePrefix,\r\n lineSuffix,\r\n )}\r\n </motion.text>\r\n ) : null}\r\n </g>\r\n ) : null}\r\n </g>\r\n ))}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {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 <Modal\r\n open={mouseClickData !== undefined}\r\n onClose={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n >\r\n <div\r\n className='graph-modal-content m-0'\r\n dangerouslySetInnerHTML={\r\n typeof detailsOnClick === 'string'\r\n ? { __html: string2HTML(detailsOnClick, mouseClickData) }\r\n : undefined\r\n }\r\n >\r\n {typeof detailsOnClick === 'function' ? detailsOnClick(mouseClickData) : null}\r\n </div>\r\n </Modal>\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect } from 'react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { ColorLegend } from '@/Components/Elements/ColorLegend';\r\nimport {\r\n Languages,\r\n ParetoChartDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n CurveTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: ParetoChartDataType[];\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 of the bars */\r\n barColor?: string;\r\n /** Color of the line */\r\n lineColor?: 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 /** Padding between bars */\r\n barPadding?: number;\r\n\r\n // Values and Ticks\r\n /** Suffix for values of the lines */\r\n lineSuffix?: string;\r\n /** Suffix for values of the bars */\r\n barSuffix?: string;\r\n /** Prefix for values of the lines */\r\n linePrefix?: string;\r\n /** Prefix for values of the bars */\r\n barPrefix?: string;\r\n /** Truncate labels by specified length */\r\n truncateBy?: number;\r\n /** Number of ticks on the axis */\r\n noOfTicks?: number;\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 /** Curve type for the line */\r\n curveType?: CurveTypes;\r\n /** Enables same axis for bars and line */\r\n sameAxes?: boolean;\r\n /** Toggle visibility of color scale. */\r\n showColorScale?: boolean;\r\n /** Toggle visibility of labels of the axis. */\r\n showAxisLabels?: boolean;\r\n /** Title for the bar axis */\r\n barAxisTitle?: string;\r\n /** Title for the line axis */\r\n lineAxisTitle?: string;\r\n /** Defines how “NA” values should be displayed/labelled in the graph */\r\n naLabel?: string;\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 /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\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 ParetoChart(props: Props) {\r\n const {\r\n data,\r\n graphTitle,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote,\r\n padding,\r\n lineColor = Colors.light.categoricalColors.colors[1],\r\n barColor = Colors.light.categoricalColors.colors[0],\r\n sameAxes = false,\r\n backgroundColor = false,\r\n leftMargin = 80,\r\n rightMargin = 80,\r\n topMargin = 20,\r\n bottomMargin = 25,\r\n lineAxisTitle = 'Line chart',\r\n barAxisTitle = 'Bar graph',\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n graphID,\r\n graphDownload = false,\r\n dataDownload = false,\r\n barPadding = 0.25,\r\n truncateBy = 999,\r\n showLabels = true,\r\n onSeriesMouseClick,\r\n language = 'en',\r\n colorLegendTitle,\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n showValues = true,\r\n noOfTicks = 5,\r\n lineSuffix = '',\r\n barSuffix = '',\r\n linePrefix = '',\r\n barPrefix = '',\r\n curveType = 'curve',\r\n styles,\r\n classNames,\r\n animate = false,\r\n precision = 2,\r\n customLayers = [],\r\n naLabel = 'NA',\r\n showColorScale = true,\r\n showAxisLabels = true,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\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(width || entries[0].target.clientWidth || 620);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 620);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex ${width ? 'w-fit grow-0' : 'w-full grow'}`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }ml-auto mr-auto flex flex-col grow h-inherit ${language || 'en'}`,\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={\r\n ariaLabel ||\r\n `${\r\n graphTitle ? `The graph shows ${graphTitle}. ` : ''\r\n }This is a pareto chart that shows a variable as bars and another as line chart.${\r\n graphDescription ? ` ${graphDescription}` : ''\r\n }`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n <div className='flex flex-col w-full gap-4 grow justify-between'>\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.current : 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 <div className='grow flex flex-col justify-center gap-3 w-full'>\r\n {data.length === 0 ? (\r\n <EmptyState />\r\n ) : (\r\n <>\r\n {showColorScale ? null : (\r\n <ColorLegend\r\n colorDomain={[barAxisTitle, lineAxisTitle]}\r\n colors={[\r\n barColor || Colors[theme].categoricalColors.colors[0],\r\n lineColor || Colors[theme].categoricalColors.colors[1],\r\n ]}\r\n colorLegendTitle={colorLegendTitle}\r\n showNAColor={false}\r\n />\r\n )}\r\n <div\r\n className='flex flex-col grow justify-center leading-0'\r\n ref={graphDiv}\r\n aria-label='Graph area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <Graph\r\n data={data}\r\n sameAxes={sameAxes}\r\n lineColor={lineColor}\r\n barColor={barColor}\r\n width={width || svgWidth}\r\n height={Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}\r\n truncateBy={truncateBy}\r\n leftMargin={leftMargin}\r\n rightMargin={rightMargin}\r\n topMargin={topMargin}\r\n bottomMargin={bottomMargin}\r\n axisTitles={[barAxisTitle, lineAxisTitle]}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n barPadding={barPadding}\r\n showLabels={showLabels}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n noOfTicks={noOfTicks}\r\n lineSuffix={lineSuffix}\r\n barSuffix={barSuffix}\r\n linePrefix={linePrefix}\r\n barPrefix={barPrefix}\r\n curveType={curveType}\r\n showValues={showValues}\r\n styles={styles}\r\n classNames={classNames}\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 precision={precision}\r\n customLayers={customLayers}\r\n naLabel={naLabel}\r\n showAxisLabels={showAxisLabels}\r\n />\r\n ) : null}\r\n </div>\r\n </>\r\n )}\r\n </div>\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 </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["Graph","props","data","width","height","barColor","lineColor","axisTitles","sameAxes","rightMargin","leftMargin","topMargin","bottomMargin","tooltip","showValues","onSeriesMouseOver","barPadding","truncateBy","showLabels","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","noOfTicks","lineSuffix","barSuffix","linePrefix","barPrefix","curveType","styles","classNames","animate","precision","customLayers","naLabel","showAxisLabels","svgRef","useRef","isInView","useInView","curve","curveLinear","curveStep","curveStepAfter","curveStepBefore","curveMonotoneX","mouseOverData","setMouseOverData","useState","mouseClickData","setMouseClickData","eventX","setEventX","eventY","setEventY","margin","graphWidth","graphHeight","dataWithId","d","i","x","scaleBand","minParam1","minParam2","maxParam1","maxParam2","minParam","maxParam","y1","scaleLinear","y2","lineShape","line","checkIfNullOrUndefined","y1Ticks","y2Ticks","jsxs","Fragment","jsx","motion","cn","numberFormattingFunction","Axis","AxisTitle","AnimatePresence","event","isEqual","XAxesLabels","Tooltip","Modal","string2HTML","ParetoChart","graphTitle","sources","graphDescription","footNote","padding","Colors","backgroundColor","lineAxisTitle","barAxisTitle","relativeHeight","graphID","graphDownload","dataDownload","language","colorLegendTitle","minHeight","theme","ariaLabel","showColorScale","svgWidth","setSvgWidth","svgHeight","setSvgHeight","graphDiv","graphParentDiv","useEffect","resizeObserver","entries","GraphHeader","EmptyState","ColorLegend","GraphFooter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA4EO,SAASA,GAAMC,IAAc;AAClC,QAAM;AAAA,IACJ,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,cAAAC;AAAA,IACA,SAAAC;AAAA,IACA,YAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,6BAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,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,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
@@ -455,6 +455,7 @@ declare interface GraphSettingsDataType {
455
455
  globeCurvatureResolution?: number;
456
456
  lightColor?: string;
457
457
  fogSetting?: FogDataType;
458
+ showAxisLabels?: boolean;
458
459
  }
459
460
 
460
461
  declare type GraphType = GraphTypeForGriddedGraph;
@@ -474,6 +474,7 @@ declare interface GraphSettingsDataType {
474
474
  globeCurvatureResolution?: number;
475
475
  lightColor?: string;
476
476
  fogSetting?: FogDataType;
477
+ showAxisLabels?: boolean;
477
478
  }
478
479
 
479
480
  declare type GraphType = GraphTypeForGriddedGraph;
@@ -377,6 +377,7 @@ declare interface GraphSettingsDataType {
377
377
  globeCurvatureResolution?: number;
378
378
  lightColor?: string;
379
379
  fogSetting?: FogDataType;
380
+ showAxisLabels?: boolean;
380
381
  }
381
382
 
382
383
  declare type GraphType = GraphTypeForGriddedGraph;
@@ -383,6 +383,7 @@ declare interface GraphSettingsDataType {
383
383
  globeCurvatureResolution?: number;
384
384
  lightColor?: string;
385
385
  fogSetting?: FogDataType;
386
+ showAxisLabels?: boolean;
386
387
  }
387
388
 
388
389
  declare type GraphType = GraphTypeForGriddedGraph;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-DDoeWRVt.cjs"),o=require("react"),ae=require("./index-Ds0uHjK9.cjs"),A=require("./index-B0rbzOoC.cjs"),te=require("./index-BXns0-ng.cjs"),C=require("./DropdownSelect-BmE5JaeE.cjs"),h=require("./checkIfMultiple-BXbHUCWM.cjs"),le=require("./Typography-k-kOjICQ.cjs"),ne=require("./Spinner-DA6Z5E4n.cjs"),re=require("./GraphEl-OzC-icbr.cjs"),G=require("./fetchAndParseData-CQyVGCul.cjs"),U=require("./transformDataForAggregation-Du-Hei-W.cjs"),z=require("./getUniqValue-CHqgSss5.cjs"),ie=require("./GraphHeader.cjs"),W=require("./filterData-DN6py7y_.cjs"),oe=require("./getGraphList-gf02xgT2.cjs"),Z=require("./transformDataForSelect-YmStusCI.cjs"),se=s=>{if(s.findIndex(r=>r.chartConfigId==="yMin")!==-1&&s.findIndex(r=>r.chartConfigId==="yMax")!==-1)return s;const l=[...s];return s.findIndex(r=>r.chartConfigId==="yMin")===-1&&l.push({chartConfigId:"yMin",columnId:`${s[s.findIndex(r=>r.chartConfigId==="y")].columnId}Min`}),s.findIndex(r=>r.chartConfigId==="yMax")===-1&&l.push({chartConfigId:"yMax",columnId:`${s[s.findIndex(r=>r.chartConfigId==="y")].columnId}Max`}),l},F=(s,l)=>{const r=l?.map(y=>{const f=s?.findIndex(i=>i.chartConfigId===y.chartConfigId);if(f===-1)return{};const v=s[f]?.allowedColumnIds?.findIndex(i=>i.value===y.columnId);return v===-1?{}:s[f].allowedColumnIds[v].graphSettings||{}})||[];return Object.assign({},...r)};function ue(s){const{graphSettings:l,dataSettings:r,filters:y,graphType:f,dataTransform:v,graphDataConfiguration:i,dataFilters:q,debugMode:D,dataSelectionOptions:j,advancedDataSelectionOptions:N,readableHeader:J,noOfFiltersPerRow:p=4,updateFilters:B,uiMode:g="normal",highlightDataPointSettings:I}=s,[b,K]=o.useState(void 0),[S,Q]=o.useState(void 0),[m,w]=o.useState(i),[x,R]=o.useState({}),[V,X]=o.useState(void 0),[Y,_]=o.useState([]),P=o.useRef(null),H=o.useRef(i),[E,O]=o.useState([]),k=o.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]),L=o.useCallback(async()=>{if(r)try{const d=await(r.dataURL?typeof r.dataURL=="string"?r.fileType==="json"?G.fetchAndParseJSON(r.dataURL,r.columnsToArray,r.dataTransformation,D):r.fileType==="api"?G.fetchAndTransformDataFromAPI(r.dataURL,r.apiHeaders,r.columnsToArray,r.dataTransformation,D):G.fetchAndParseCSV(r.dataURL,r.dataTransformation,r.columnsToArray,D,r.delimiter,!0):G.fetchAndParseMultipleDataSources(r.dataURL,r.idColumnTitle):G.transformColumnsToArray(r.data,r.columnsToArray));Q(d);const a=(y||[]).map(t=>({filter:t.column,label:t.label||`Filter by ${t.column}`,singleSelect:t.singleSelect,clearable:t.clearable,defaultValue:Z.transformDefaultValue(t.defaultValue),value:Z.transformDefaultValue(t.defaultValue),availableValues:z.getUniqValue(d,t.column).filter(u=>!t.excludeValues?.includes(`${u}`)).map(u=>({value:u,label:u})),allowSelectAll:t.allowSelectAll,width:t.width}));O(a)}catch(e){console.error("Data fetching error:",e)}},[r,y,D]);o.useEffect(()=>{L()},[L]);const $=o.useMemo(()=>!S||E.length===0?S:S.filter(d=>E.every(a=>a.value&&A.flattenDeep([a.value]).length>0?ae.intersection(A.flattenDeep([d[a.filter]]),A.flattenDeep([a.value]).map(t=>t.value)).length>0:!0)),[E,S]);o.useEffect(()=>{j&&R(F(j,i))},[j,i]),o.useEffect(()=>{S&&K($)},[$,f,S]),o.useEffect(()=>{I?.column&&$&&_(z.getUniqValue($,I.column).filter(e=>!I?.excludeValues?.includes(`${e}`)).map(e=>({value:e,label:e})))},[$,I]),o.useEffect(()=>{te.isEqual(H.current,i)||(w(i),H.current=i)},[i]);const M=o.useCallback((e,d)=>{O(a=>a.map(t=>t.filter===e?{...t,value:d}:t))},[]),ee=o.useMemo(()=>{if(!b)return;const e=f==="lineChartWithConfidenceInterval"&&m?se(m):m;return U.transformDataForGraph(v?U.transformDataForAggregation(W.filterData(b,q||[]),v.keyColumn,v.aggregationColumnsSetting):W.filterData(b,q||[]),f,e)},[f,m,b,q,v]);return r?n.jsxRuntimeExports.jsx("div",{className:`${l?.theme||"light"} flex ${l?.width?"w-fit grow-0":"w-full grow"}${l?.height?"":" h-full"}`,dir:l?.language==="he"||l?.language==="ar"?"rtl":void 0,children:n.jsxRuntimeExports.jsx("div",{className:n.mo(`${l?.backgroundColor?l?.backgroundColor===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${l?.language||"en"}`,l?.classNames?.graphContainer),style:{...l?.styles?.graphContainer||{},...l?.backgroundColor&&l?.backgroundColor!==!0?{backgroundColor:l?.backgroundColor}:{}},id:l?.graphID,ref:P,children:n.jsxRuntimeExports.jsx("div",{style:{padding:l?.backgroundColor?l?.padding||"1rem":l?.padding||0,flexGrow:1,display:"flex"},children:n.jsxRuntimeExports.jsx("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:b||oe.graphList.filter(e=>e.geoHubMapPresentation).map(e=>e.graphID).indexOf(f)!==-1?n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[x?.graphTitle||x?.graphDescription||l?.graphTitle||l?.graphDescription||l?.graphDownload||l?.dataDownload?n.jsxRuntimeExports.jsx(ie.GraphHeader,{styles:{title:x?.styles?.title||l?.styles?.title,description:x?.styles?.description||l?.styles?.description},classNames:{title:x?.classNames?.title||l?.classNames?.title,description:x?.classNames?.description||l?.classNames?.description},graphTitle:x?.graphTitle||l?.graphTitle,graphDescription:x?.graphDescription||l?.graphDescription,width:x?.width||l?.width,graphDownload:l?.graphDownload?P.current:void 0,dataDownload:l?.dataDownload&&b&&b.length>0?b:null}):null,E.length!==0||(j||[]).length!==0||(N||[]).length!==0||I?n.jsxRuntimeExports.jsxs("div",{style:{display:"flex",gap:"1rem",flexWrap:"wrap",alignItems:"flex-start",width:"100%"},children:[N?.map((e,d)=>n.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:1,flexShrink:e.ui!=="radio"?0:1,minWidth:"240px"},children:[n.jsxRuntimeExports.jsx(h.f,{className:"mb-2",children:e.label||"Graph by"}),e.ui!=="radio"?n.jsxRuntimeExports.jsx(C.Za,{options:e.options.map(a=>({...a,value:a.label})),size:"sm",isClearable:!1,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:e.defaultValue?{...e.defaultValue,value:e.defaultValue?.label}:{...e.options[0],value:e.options[0].label},onChange:a=>{R(a?.graphSettings||{}),w(a?.dataConfiguration)}}):n.jsxRuntimeExports.jsx(h.fe,{defaultValue:e.defaultValue?.label||e.options[0].label,variant:g,onValueChange:a=>{const t=e.options[e.options.findIndex(u=>u.label===a)];R(t.graphSettings||{}),w(t.dataConfiguration)},children:e.options.map((a,t)=>n.jsxRuntimeExports.jsx(h.ve,{label:a.label,value:a.label},t))})]},d)),j?.map((e,d)=>n.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:1,flexShrink:e.ui!=="radio"?0:1,minWidth:"240px"},children:[n.jsxRuntimeExports.jsx(h.f,{className:"mb-2",children:e.label||`Visualize ${e.chartConfigId} by`}),h.checkIfMultiple(e.chartConfigId,m||[])?e.ui!=="radio"?n.jsxRuntimeExports.jsx(C.Za,{options:e.allowedColumnIds,size:"sm",isMulti:!0,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:i?i[i.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]):void 0,filterOption:C.Hu(k),onChange:a=>{const t={columnId:(a||[]).map(c=>c.value),chartConfigId:e.chartConfigId},u=m?.map(c=>c.chartConfigId===t.chartConfigId?t:c);w(u)}}):n.jsxRuntimeExports.jsx(h.w,{variant:g,defaultValue:i?i[i.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]).map(a=>a.value):[],onValueChange:a=>{const t={columnId:a||[],chartConfigId:e.chartConfigId},u=m?.map(c=>c.chartConfigId===t.chartConfigId?t:c);w(u)},children:e.allowedColumnIds.map((a,t)=>n.jsxRuntimeExports.jsx(h.G,{label:a.label,value:a.label},t))}):e.ui!=="radio"?n.jsxRuntimeExports.jsx(C.Za,{options:e.allowedColumnIds,size:"sm",isClearable:!1,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:i?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===i[i.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)]:void 0,onChange:a=>{const t={columnId:a?.value,chartConfigId:e.chartConfigId},u=m?.map(c=>c.chartConfigId===t.chartConfigId?t:c);R(F(j,u)),w(u)}}):n.jsxRuntimeExports.jsx(h.fe,{variant:g,defaultValue:i?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===i[i.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)].label:"",onValueChange:a=>{const u={columnId:e.allowedColumnIds[e.allowedColumnIds.findIndex(T=>T.label===a)].value,chartConfigId:e.chartConfigId},c=m?.map(T=>T.chartConfigId===u.chartConfigId?u:T);R(F(j,c)),w(c)},children:e.allowedColumnIds.map((a,t)=>n.jsxRuntimeExports.jsx(h.ve,{label:a.label,value:a.label},t))})]},d)),E?.map((e,d)=>n.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:1,flexShrink:0,minWidth:"240px"},children:[n.jsxRuntimeExports.jsx(h.f,{className:"mb-2",children:e.label}),e.singleSelect?n.jsxRuntimeExports.jsx(C.Za,{options:e.availableValues,variant:g,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Hu(k),onChange:a=>{M(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[e.ui!=="radio"?n.jsxRuntimeExports.jsx(C.Za,{options:e.availableValues,variant:g,size:"sm",isMulti:!0,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Hu(k),onChange:a=>{M(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):n.jsxRuntimeExports.jsx(h.w,{variant:g,defaultValue:e.defaultValue?e.defaultValue.map(a=>`${a.value}`):[],value:e.value?e.value.map(a=>`${a.value}`):void 0,onValueChange:a=>{M(e.filter,e.availableValues.filter(t=>a.indexOf(`${t.value}`)!==-1))},children:e.availableValues.map((a,t)=>n.jsxRuntimeExports.jsx(h.G,{label:`${a.label}`,value:`${a.value}`},t))}),e.allowSelectAll?n.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",onClick:()=>{M(e.filter,e.availableValues)},children:"Select all options"}):null]})]},d)),I?n.jsxRuntimeExports.jsxs("div",{style:{width:I.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:1,flexShrink:0,minWidth:"240px"},children:[n.jsxRuntimeExports.jsx(h.f,{className:"mb-2",children:I.label||"Highlight data"}),n.jsxRuntimeExports.jsx(C.Za,{options:Y,variant:g,size:"sm",isMulti:!0,isClearable:!0,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Hu(k),onChange:e=>{X(e?.map(d=>d.value))},value:V?.map(e=>({label:e,value:e})),defaultValue:I.defaultValues?.map(e=>({label:e,value:e}))})]}):null]}):null,n.jsxRuntimeExports.jsx(re.GraphEl,{graph:f,graphData:ee,graphDataConfiguration:m,debugMode:D,readableHeader:J||[],updateFilters:B,settings:{...l||{},...x,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,padding:"0",theme:l?.theme,...V?{highlightedDataPoints:V,highlightedIds:V?.map(e=>`${e}`),highlightedLines:V?.map(e=>e)}:{}}})]}):n.jsxRuntimeExports.jsx("div",{className:"w-full flex justify-center p-4",children:n.jsxRuntimeExports.jsx(ne.y,{})})})})})}):n.jsxRuntimeExports.jsx(le.u,{size:"xs",className:"text-center text-accent-dark-red dark:text-accent-red p-2",children:"Please make sure either `dataSettings` props are present as they are required for data."})}exports.SingleGraphDashboard=ue;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-CHPV5EwG-DDoeWRVt.cjs"),o=require("react"),ae=require("./index-Ds0uHjK9.cjs"),A=require("./index-B0rbzOoC.cjs"),te=require("./index-BXns0-ng.cjs"),C=require("./DropdownSelect-BmE5JaeE.cjs"),h=require("./checkIfMultiple-BXbHUCWM.cjs"),le=require("./Typography-k-kOjICQ.cjs"),ne=require("./Spinner-DA6Z5E4n.cjs"),re=require("./GraphEl-DO-juRN8.cjs"),G=require("./fetchAndParseData-CQyVGCul.cjs"),U=require("./transformDataForAggregation-Du-Hei-W.cjs"),z=require("./getUniqValue-CHqgSss5.cjs"),ie=require("./GraphHeader.cjs"),W=require("./filterData-DN6py7y_.cjs"),oe=require("./getGraphList-gf02xgT2.cjs"),Z=require("./transformDataForSelect-YmStusCI.cjs"),se=s=>{if(s.findIndex(r=>r.chartConfigId==="yMin")!==-1&&s.findIndex(r=>r.chartConfigId==="yMax")!==-1)return s;const l=[...s];return s.findIndex(r=>r.chartConfigId==="yMin")===-1&&l.push({chartConfigId:"yMin",columnId:`${s[s.findIndex(r=>r.chartConfigId==="y")].columnId}Min`}),s.findIndex(r=>r.chartConfigId==="yMax")===-1&&l.push({chartConfigId:"yMax",columnId:`${s[s.findIndex(r=>r.chartConfigId==="y")].columnId}Max`}),l},F=(s,l)=>{const r=l?.map(y=>{const f=s?.findIndex(i=>i.chartConfigId===y.chartConfigId);if(f===-1)return{};const v=s[f]?.allowedColumnIds?.findIndex(i=>i.value===y.columnId);return v===-1?{}:s[f].allowedColumnIds[v].graphSettings||{}})||[];return Object.assign({},...r)};function ue(s){const{graphSettings:l,dataSettings:r,filters:y,graphType:f,dataTransform:v,graphDataConfiguration:i,dataFilters:q,debugMode:D,dataSelectionOptions:j,advancedDataSelectionOptions:N,readableHeader:J,noOfFiltersPerRow:p=4,updateFilters:B,uiMode:g="normal",highlightDataPointSettings:I}=s,[b,K]=o.useState(void 0),[S,Q]=o.useState(void 0),[m,w]=o.useState(i),[x,R]=o.useState({}),[V,X]=o.useState(void 0),[Y,_]=o.useState([]),P=o.useRef(null),H=o.useRef(i),[E,O]=o.useState([]),k=o.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]),L=o.useCallback(async()=>{if(r)try{const d=await(r.dataURL?typeof r.dataURL=="string"?r.fileType==="json"?G.fetchAndParseJSON(r.dataURL,r.columnsToArray,r.dataTransformation,D):r.fileType==="api"?G.fetchAndTransformDataFromAPI(r.dataURL,r.apiHeaders,r.columnsToArray,r.dataTransformation,D):G.fetchAndParseCSV(r.dataURL,r.dataTransformation,r.columnsToArray,D,r.delimiter,!0):G.fetchAndParseMultipleDataSources(r.dataURL,r.idColumnTitle):G.transformColumnsToArray(r.data,r.columnsToArray));Q(d);const a=(y||[]).map(t=>({filter:t.column,label:t.label||`Filter by ${t.column}`,singleSelect:t.singleSelect,clearable:t.clearable,defaultValue:Z.transformDefaultValue(t.defaultValue),value:Z.transformDefaultValue(t.defaultValue),availableValues:z.getUniqValue(d,t.column).filter(u=>!t.excludeValues?.includes(`${u}`)).map(u=>({value:u,label:u})),allowSelectAll:t.allowSelectAll,width:t.width}));O(a)}catch(e){console.error("Data fetching error:",e)}},[r,y,D]);o.useEffect(()=>{L()},[L]);const $=o.useMemo(()=>!S||E.length===0?S:S.filter(d=>E.every(a=>a.value&&A.flattenDeep([a.value]).length>0?ae.intersection(A.flattenDeep([d[a.filter]]),A.flattenDeep([a.value]).map(t=>t.value)).length>0:!0)),[E,S]);o.useEffect(()=>{j&&R(F(j,i))},[j,i]),o.useEffect(()=>{S&&K($)},[$,f,S]),o.useEffect(()=>{I?.column&&$&&_(z.getUniqValue($,I.column).filter(e=>!I?.excludeValues?.includes(`${e}`)).map(e=>({value:e,label:e})))},[$,I]),o.useEffect(()=>{te.isEqual(H.current,i)||(w(i),H.current=i)},[i]);const M=o.useCallback((e,d)=>{O(a=>a.map(t=>t.filter===e?{...t,value:d}:t))},[]),ee=o.useMemo(()=>{if(!b)return;const e=f==="lineChartWithConfidenceInterval"&&m?se(m):m;return U.transformDataForGraph(v?U.transformDataForAggregation(W.filterData(b,q||[]),v.keyColumn,v.aggregationColumnsSetting):W.filterData(b,q||[]),f,e)},[f,m,b,q,v]);return r?n.jsxRuntimeExports.jsx("div",{className:`${l?.theme||"light"} flex ${l?.width?"w-fit grow-0":"w-full grow"}${l?.height?"":" h-full"}`,dir:l?.language==="he"||l?.language==="ar"?"rtl":void 0,children:n.jsxRuntimeExports.jsx("div",{className:n.mo(`${l?.backgroundColor?l?.backgroundColor===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${l?.language||"en"}`,l?.classNames?.graphContainer),style:{...l?.styles?.graphContainer||{},...l?.backgroundColor&&l?.backgroundColor!==!0?{backgroundColor:l?.backgroundColor}:{}},id:l?.graphID,ref:P,children:n.jsxRuntimeExports.jsx("div",{style:{padding:l?.backgroundColor?l?.padding||"1rem":l?.padding||0,flexGrow:1,display:"flex"},children:n.jsxRuntimeExports.jsx("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:b||oe.graphList.filter(e=>e.geoHubMapPresentation).map(e=>e.graphID).indexOf(f)!==-1?n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[x?.graphTitle||x?.graphDescription||l?.graphTitle||l?.graphDescription||l?.graphDownload||l?.dataDownload?n.jsxRuntimeExports.jsx(ie.GraphHeader,{styles:{title:x?.styles?.title||l?.styles?.title,description:x?.styles?.description||l?.styles?.description},classNames:{title:x?.classNames?.title||l?.classNames?.title,description:x?.classNames?.description||l?.classNames?.description},graphTitle:x?.graphTitle||l?.graphTitle,graphDescription:x?.graphDescription||l?.graphDescription,width:x?.width||l?.width,graphDownload:l?.graphDownload?P.current:void 0,dataDownload:l?.dataDownload&&b&&b.length>0?b:null}):null,E.length!==0||(j||[]).length!==0||(N||[]).length!==0||I?n.jsxRuntimeExports.jsxs("div",{style:{display:"flex",gap:"1rem",flexWrap:"wrap",alignItems:"flex-start",width:"100%"},children:[N?.map((e,d)=>n.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:1,flexShrink:e.ui!=="radio"?0:1,minWidth:"240px"},children:[n.jsxRuntimeExports.jsx(h.f,{className:"mb-2",children:e.label||"Graph by"}),e.ui!=="radio"?n.jsxRuntimeExports.jsx(C.Za,{options:e.options.map(a=>({...a,value:a.label})),size:"sm",isClearable:!1,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:e.defaultValue?{...e.defaultValue,value:e.defaultValue?.label}:{...e.options[0],value:e.options[0].label},onChange:a=>{R(a?.graphSettings||{}),w(a?.dataConfiguration)}}):n.jsxRuntimeExports.jsx(h.fe,{defaultValue:e.defaultValue?.label||e.options[0].label,variant:g,onValueChange:a=>{const t=e.options[e.options.findIndex(u=>u.label===a)];R(t.graphSettings||{}),w(t.dataConfiguration)},children:e.options.map((a,t)=>n.jsxRuntimeExports.jsx(h.ve,{label:a.label,value:a.label},t))})]},d)),j?.map((e,d)=>n.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:1,flexShrink:e.ui!=="radio"?0:1,minWidth:"240px"},children:[n.jsxRuntimeExports.jsx(h.f,{className:"mb-2",children:e.label||`Visualize ${e.chartConfigId} by`}),h.checkIfMultiple(e.chartConfigId,m||[])?e.ui!=="radio"?n.jsxRuntimeExports.jsx(C.Za,{options:e.allowedColumnIds,size:"sm",isMulti:!0,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:i?i[i.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]):void 0,filterOption:C.Hu(k),onChange:a=>{const t={columnId:(a||[]).map(c=>c.value),chartConfigId:e.chartConfigId},u=m?.map(c=>c.chartConfigId===t.chartConfigId?t:c);w(u)}}):n.jsxRuntimeExports.jsx(h.w,{variant:g,defaultValue:i?i[i.findIndex(a=>a.chartConfigId===e.chartConfigId)].columnId.map(a=>e.allowedColumnIds[e.allowedColumnIds.findIndex(t=>t.value===a)]).map(a=>a.value):[],onValueChange:a=>{const t={columnId:a||[],chartConfigId:e.chartConfigId},u=m?.map(c=>c.chartConfigId===t.chartConfigId?t:c);w(u)},children:e.allowedColumnIds.map((a,t)=>n.jsxRuntimeExports.jsx(h.G,{label:a.label,value:a.label},t))}):e.ui!=="radio"?n.jsxRuntimeExports.jsx(C.Za,{options:e.allowedColumnIds,size:"sm",isClearable:!1,isSearchable:!0,variant:g,controlShouldRenderValue:!0,defaultValue:i?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===i[i.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)]:void 0,onChange:a=>{const t={columnId:a?.value,chartConfigId:e.chartConfigId},u=m?.map(c=>c.chartConfigId===t.chartConfigId?t:c);R(F(j,u)),w(u)}}):n.jsxRuntimeExports.jsx(h.fe,{variant:g,defaultValue:i?e.allowedColumnIds[e.allowedColumnIds.findIndex(a=>a.value===i[i.findIndex(t=>t.chartConfigId===e.chartConfigId)].columnId)].label:"",onValueChange:a=>{const u={columnId:e.allowedColumnIds[e.allowedColumnIds.findIndex(T=>T.label===a)].value,chartConfigId:e.chartConfigId},c=m?.map(T=>T.chartConfigId===u.chartConfigId?u:T);R(F(j,c)),w(c)},children:e.allowedColumnIds.map((a,t)=>n.jsxRuntimeExports.jsx(h.ve,{label:a.label,value:a.label},t))})]},d)),E?.map((e,d)=>n.jsxRuntimeExports.jsxs("div",{style:{width:e.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:1,flexShrink:0,minWidth:"240px"},children:[n.jsxRuntimeExports.jsx(h.f,{className:"mb-2",children:e.label}),e.singleSelect?n.jsxRuntimeExports.jsx(C.Za,{options:e.availableValues,variant:g,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Hu(k),onChange:a=>{M(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[e.ui!=="radio"?n.jsxRuntimeExports.jsx(C.Za,{options:e.availableValues,variant:g,size:"sm",isMulti:!0,isClearable:e.clearable===void 0?!0:e.clearable,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Hu(k),onChange:a=>{M(e.filter,a)},value:e.value,defaultValue:e.defaultValue}):n.jsxRuntimeExports.jsx(h.w,{variant:g,defaultValue:e.defaultValue?e.defaultValue.map(a=>`${a.value}`):[],value:e.value?e.value.map(a=>`${a.value}`):void 0,onValueChange:a=>{M(e.filter,e.availableValues.filter(t=>a.indexOf(`${t.value}`)!==-1))},children:e.availableValues.map((a,t)=>n.jsxRuntimeExports.jsx(h.G,{label:`${a.label}`,value:`${a.value}`},t))}),e.allowSelectAll?n.jsxRuntimeExports.jsx("button",{type:"button",className:"bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400",onClick:()=>{M(e.filter,e.availableValues)},children:"Select all options"}):null]})]},d)),I?n.jsxRuntimeExports.jsxs("div",{style:{width:I.width||`calc(${100/p}% - ${(p-1)/p}rem)`,flexGrow:1,flexShrink:0,minWidth:"240px"},children:[n.jsxRuntimeExports.jsx(h.f,{className:"mb-2",children:I.label||"Highlight data"}),n.jsxRuntimeExports.jsx(C.Za,{options:Y,variant:g,size:"sm",isMulti:!0,isClearable:!0,isSearchable:!0,controlShouldRenderValue:!0,filterOption:C.Hu(k),onChange:e=>{X(e?.map(d=>d.value))},value:V?.map(e=>({label:e,value:e})),defaultValue:I.defaultValues?.map(e=>({label:e,value:e}))})]}):null]}):null,n.jsxRuntimeExports.jsx(re.GraphEl,{graph:f,graphData:ee,graphDataConfiguration:m,debugMode:D,readableHeader:J||[],updateFilters:B,settings:{...l||{},...x,graphTitle:void 0,graphDescription:void 0,graphDownload:!1,dataDownload:!1,backgroundColor:void 0,padding:"0",theme:l?.theme,...V?{highlightedDataPoints:V,highlightedIds:V?.map(e=>`${e}`),highlightedLines:V?.map(e=>e)}:{}}})]}):n.jsxRuntimeExports.jsx("div",{className:"w-full flex justify-center p-4",children:n.jsxRuntimeExports.jsx(ne.y,{})})})})})}):n.jsxRuntimeExports.jsx(le.u,{size:"xs",className:"text-center text-accent-dark-red dark:text-accent-red p-2",children:"Please make sure either `dataSettings` props are present as they are required for data."})}exports.SingleGraphDashboard=ue;
2
2
  //# sourceMappingURL=SingleGraphDashboard.cjs.map
@@ -431,6 +431,7 @@ declare interface GraphSettingsDataType {
431
431
  globeCurvatureResolution?: number;
432
432
  lightColor?: string;
433
433
  fogSetting?: FogDataType;
434
+ showAxisLabels?: boolean;
434
435
  }
435
436
 
436
437
  declare type GraphType = GraphTypeForGriddedGraph;
@@ -7,7 +7,7 @@ import { Z as y, H as N } from "./DropdownSelect-CeHog_ih.js";
7
7
  import { f as F, a as J, v as B, c as ca, w as K, G as Q } from "./checkIfMultiple-ChTJk2Tk.js";
8
8
  import { u as ha } from "./Typography-Ctgfl1J5.js";
9
9
  import { y as fa } from "./Spinner-C85UF28E.js";
10
- import { G as ga } from "./GraphEl-s3ctz7oA.js";
10
+ import { G as ga } from "./GraphEl-B3xVlimz.js";
11
11
  import { f as pa, a as ma, b as Ca, c as xa, t as Ia } from "./fetchAndParseData-4gsYTy6_.js";
12
12
  import { a as va, t as ba } from "./transformDataForAggregation-CdcwlnNe.js";
13
13
  import { g as X } from "./getUniqValue-BtUENB2H.js";
@@ -454,6 +454,7 @@ declare interface GraphSettingsDataType {
454
454
  globeCurvatureResolution?: number;
455
455
  lightColor?: string;
456
456
  fogSetting?: FogDataType;
457
+ showAxisLabels?: boolean;
457
458
  }
458
459
 
459
460
  declare type GraphType = GraphTypeForGriddedGraph;
@@ -346,6 +346,7 @@ declare interface GraphSettingsDataType {
346
346
  globeCurvatureResolution?: number;
347
347
  lightColor?: string;
348
348
  fogSetting?: FogDataType;
349
+ showAxisLabels?: boolean;
349
350
  }
350
351
 
351
352
  declare interface HighlightAreaSettingsDataType {
@@ -353,6 +353,7 @@ declare interface GraphSettingsDataType {
353
353
  globeCurvatureResolution?: number;
354
354
  lightColor?: string;
355
355
  fogSetting?: FogDataType;
356
+ showAxisLabels?: boolean;
356
357
  }
357
358
 
358
359
  declare interface HighlightAreaSettingsDataType {
@@ -431,6 +431,7 @@ declare interface GraphSettingsDataType {
431
431
  globeCurvatureResolution?: number;
432
432
  lightColor?: string;
433
433
  fogSetting?: FogDataType;
434
+ showAxisLabels?: boolean;
434
435
  }
435
436
 
436
437
  declare interface HighlightAreaSettingsDataType {
@@ -454,6 +454,7 @@ declare interface GraphSettingsDataType {
454
454
  globeCurvatureResolution?: number;
455
455
  lightColor?: string;
456
456
  fogSetting?: FogDataType;
457
+ showAxisLabels?: boolean;
457
458
  }
458
459
 
459
460
  declare interface HighlightAreaSettingsDataType {
package/dist/Types.d.ts CHANGED
@@ -637,6 +637,7 @@ export declare interface GraphSettingsDataType {
637
637
  globeCurvatureResolution?: number;
638
638
  lightColor?: string;
639
639
  fogSetting?: FogDataType;
640
+ showAxisLabels?: boolean;
640
641
  }
641
642
 
642
643
  export declare type GraphType = GraphTypeForGriddedGraph;
package/dist/index.d.ts CHANGED
@@ -4290,6 +4290,7 @@ declare interface GraphSettingsDataType {
4290
4290
  globeCurvatureResolution?: number;
4291
4291
  lightColor?: string;
4292
4292
  fogSetting?: FogDataType;
4293
+ showAxisLabels?: boolean;
4293
4294
  }
4294
4295
 
4295
4296
  export declare function GraphTitle(props: Props_66): JSX.Element | null;
@@ -6770,6 +6771,10 @@ declare interface Props_32 {
6770
6771
  curveType?: CurveTypes;
6771
6772
  /** Enables same axis for bars and line */
6772
6773
  sameAxes?: boolean;
6774
+ /** Toggle visibility of color scale. */
6775
+ showColorScale?: boolean;
6776
+ /** Toggle visibility of labels of the axis. */
6777
+ showAxisLabels?: boolean;
6773
6778
  /** Title for the bar axis */
6774
6779
  barAxisTitle?: string;
6775
6780
  /** Title for the line axis */
@@ -7744,8 +7749,10 @@ declare interface Props_6 {
7744
7749
  animate?: boolean | AnimateDataType;
7745
7750
  /** Enables same axis for the 2 lines */
7746
7751
  sameAxes?: boolean;
7747
- /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */
7752
+ /** Toggle visibility of color scale. */
7748
7753
  showColorScale?: boolean;
7754
+ /** Toggle visibility of labels of the axis. */
7755
+ showAxisLabels?: boolean;
7749
7756
  /** Labels for the lines */
7750
7757
  labels: [string, string];
7751
7758
  /** Format of the date in the data object. Available formats can be found [here](https://date-fns.org/docs/format) */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@undp/data-viz",
3
- "version": "1.4.12",
3
+ "version": "1.4.13",
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "browser": "./dist/index.umd.js",
@@ -1,2 +0,0 @@
1
- "use strict";const n=require("./index-CHPV5EwG-DDoeWRVt.cjs"),c=require("./Typography-k-kOjICQ.cjs"),C=require("./ButterflyChart.cjs"),b=require("./index-CZLvTu6p.cjs"),w=require("./DataTable.cjs"),T=require("./DonutChart.cjs"),k=require("./HeatMap.cjs"),x=require("./Histogram.cjs"),y=require("./DualAxisLineChart.cjs"),L=require("./SimpleLineChart.cjs"),M=require("./MultiLineChart.cjs"),O=require("./MultiLineAltChart.cjs"),V=require("./SparkLine.cjs"),S=require("./BiVariateChoroplethMap.cjs"),N=require("./ChoroplethMap.cjs"),H=require("./DotDensityMap.cjs"),A=require("./ParetoChart.cjs"),v=require("./ScatterPlot.cjs"),B=require("./SlopeChart.cjs"),I=require("./AreaChart.cjs"),P=require("./StatCardFromData.cjs"),W=require("./TreeMapGraph.cjs"),j=require("./UnitChart.cjs"),q=require("./DifferenceLineChart.cjs"),z=require("./SankeyChart.cjs"),F=require("./LineChartWithConfidenceInterval.cjs"),X=require("./DataCards.cjs"),g=require("./BarGraph.cjs"),Y=require("./DumbbellChart.cjs"),E=require("./StripChart.cjs"),G=require("./BeeSwarmChart.cjs"),R=require("./RadarChart.cjs"),$=require("./BulletChart.cjs"),i=require("./checkIfMultiple-BXbHUCWM.cjs");function U(d){const{settings:e,graph:l,graphData:a,debugMode:p,graphDataConfiguration:t,readableHeader:o,updateFilters:s}=d;if(p&&(console.log(`Graph: ${l}`),console.log("Transformed data:",a),console.log("Settings:",e)),typeof a=="string")return n.jsxRuntimeExports.jsx("div",{className:`flex my-0 mx-auto grow flex-col justify-center ${e?.width?"w-fit":"w-full"}`,style:{height:"inherit"},children:n.jsxRuntimeExports.jsx(c.u,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:a})});const u={barChart:g.SimpleBarGraph,bulletChart:$.BulletChart,groupedBarChart:g.GroupedBarGraph,stackedBarChart:g.StackedBarGraph,lineChart:L.SimpleLineChart,dualAxisLineChart:y.DualAxisLineChart,multiLineChart:M.MultiLineChart,multiLineAltChart:O.MultiLineAltChart,stackedAreaChart:I.AreaChart,choroplethMap:N.ChoroplethMap,biVariateChoroplethMap:S.BiVariateChoroplethMap,dotDensityMap:H.DotDensityMap,donutChart:T.DonutChart,slopeChart:B.SlopeChart,scatterPlot:v.ScatterPlot,dumbbellChart:Y.DumbbellChart,treeMap:W.TreeMapGraph,circlePacking:b.CirclePackingGraph,heatMap:k.HeatMap,stripChart:E.StripChart,beeSwarmChart:G.BeeSwarmChart,butterflyChart:C.ButterflyChart,histogram:x.Histogram,sparkLine:V.SparkLine,paretoChart:A.ParetoChart,dataTable:w.DataTable,statCard:P.StatCardFromData,unitChart:j.UnitChart,differenceLineChart:q.DifferenceLineChart,sankeyChart:z.SankeyChart,lineChartWithConfidenceInterval:F.LineChartWithConfidenceInterval,dataCards:X.DataCards,radarChart:R.RadarChart},m=f=>{switch(f){case"barChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,height:e?.height,width:e?.width,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,maxValue:e?.maxValue,minValue:e?.minValue,labelOrder:e?.labelOrder,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,sortData:e?.sortData,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,onSeriesMouseClick:r=>{s?.(r.label)},resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,filterNA:e?.filterNA,animate:e?.animate,naLabel:e?.naLabel};case"groupedBarChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,sortParameter:e?.sortParameter,sortData:e?.sortData,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,showColorScale:e?.showColorScale,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain||i.getValues("size",t||[],o||[]),colorLegendTitle:e?.colorLegendTitle,suffix:e?.suffix,prefix:e?.prefix,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,showLabels:e?.showLabels,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,labelOrder:e?.labelOrder,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,ariaLabel:e?.ariaLabel,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,naLabel:e?.naLabel};case"stackedBarChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,showColorScale:e?.showColorScale,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain||i.getValues("size",t||[],o||[]),colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,suffix:e?.suffix,prefix:e?.prefix,labelOrder:e?.labelOrder,showValues:e?.showValues,showLabels:e?.showLabels,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,maxValue:e?.maxValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,sortParameter:e?.sortParameter,sortData:e?.sortData,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,naLabel:e?.naLabel};case"bulletChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,data:a,barColor:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,height:e?.height,width:e?.width,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,maxValue:e?.maxValue,minValue:e?.minValue,labelOrder:e?.labelOrder,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,sortData:e?.sortData,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,onSeriesMouseClick:r=>{s?.(r.label)},resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,detailsOnClick:e?.detailsOnClick,barAxisTitle:e?.barAxisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,filterNA:e?.filterNA,qualitativeRangeColors:e?.qualitativeRangeColors,targetStyle:e?.targetStyle,targetColor:e?.targetColor,measureBarWidthFactor:e?.measureBarWidthFactor,animate:e?.animate,naLabel:e?.naLabel};case"lineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,curveType:e?.curveType,data:a,graphID:e?.graphID,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames};case"lineChartWithConfidenceInterval":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:a,curveType:e?.curveType,graphID:e?.graphID,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,showIntervalDots:e?.showIntervalDots,showIntervalValues:e?.showIntervalValues,intervalLineStrokeWidth:e?.intervalLineStrokeWidth,intervalLineColors:e?.intervalLineColors,intervalAreaColor:e?.intervalAreaColor,intervalAreaOpacity:e?.intervalAreaOpacity,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,colorLegendTitle:e?.colorLegendTitle,colorLegendColors:e?.colorLegendColors,colorLegendDomain:e?.colorLegendDomain,styles:e?.styles,classNames:e?.classNames};case"dualAxisLineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:a,curveType:e?.curveType,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,labels:e?.labels||[i.getValues("y1",t||[],o||[]),i.getValues("y2",t||[],o||[])],footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,showValues:e?.showValues,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,lineColors:e?.lineColors,sameAxes:e?.sameAxes,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,ariaLabel:e?.ariaLabel,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,lineSuffixes:e?.lineSuffixes,linePrefixes:e?.linePrefixes,styles:e?.styles,classNames:e?.classNames};case"multiLineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,data:a,curveType:e?.curveType,lineColors:e?.lineColors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,showColorScale:e?.showColorScale,labels:e?.labels||i.getValues("y",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,showValues:e?.showValues,relativeHeight:e?.relativeHeight,showColorLegendAtTop:e?.showColorLegendAtTop,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,highlightedLines:e?.highlightedLines,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames,dashedLines:e?.dashedLines,dashSettings:e?.dashSettings,labelsToBeHidden:e?.labelsToBeHidden};case"multiLineAltChart":return{naLabel:e?.naLabel,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:a,dimmedOpacity:e?.dimmedOpacity,curveType:e?.curveType,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refValues:e?.refValues,showLabels:e?.showLabels,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,highlightedLines:e?.highlightedLines,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames,colorDomain:e?.colorDomain,showNAColor:e?.showNAColor};case"differenceLineChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:a,curveType:e?.curveType,lineColors:e?.lineColors,diffAreaColors:e?.diffAreaColors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,suffix:e?.suffix,prefix:e?.prefix,labels:e?.labels||[i.getValues("y1",t||[],o||[]),i.getValues("y2",t||[],o||[])],backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,showValues:e?.showValues,relativeHeight:e?.relativeHeight,showColorLegendAtTop:e?.showColorLegendAtTop,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,animate:e?.animate,strokeWidth:e?.strokeWidth,showDots:e?.showDots,colorLegendTitle:e?.colorLegendTitle,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,minDate:e?.minDate,maxDate:e?.maxDate,styles:e?.styles,classNames:e?.classNames};case"stackedAreaChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,data:a,curveType:e?.curveType,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,noOfXTicks:e?.noOfXTicks,dateFormat:e?.dateFormat,colorDomain:e?.colorDomain||i.getValues("y",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,colorLegendTitle:e?.colorLegendTitle,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,relativeHeight:e?.relativeHeight,bottomMargin:e?.bottomMargin,tooltip:e?.tooltip,refValues:e?.refValues,highlightAreaSettings:e?.highlightAreaSettings,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showColorScale:e?.showColorScale,language:e?.language,minHeight:e?.minHeight,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,ariaLabel:e?.ariaLabel,yAxisTitle:e?.yAxisTitle,noOfYTicks:e?.noOfYTicks,suffix:e?.suffix,prefix:e?.prefix,styles:e?.styles,classNames:e?.classNames};case"choroplethMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,mapData:e?.mapData,mapProjection:e?.mapProjection,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,colorDomain:e?.colorDomain,colors:e?.colors,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("x",t||[],o||[]),scaleType:e?.scaleType,categorical:e?.categorical,data:a,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,mapBorderColor:e?.mapBorderColor,relativeHeight:e?.relativeHeight,padding:e?.padding,isWorldMap:e?.isWorldMap,tooltip:e?.tooltip,showColorScale:e?.showColorScale,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedIds:e?.highlightedIds,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,mapProperty:e?.mapProperty,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,onSeriesMouseClick:r=>{s?.(r.id)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"biVariateChoroplethMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,mapData:e?.mapData,mapProjection:e?.mapProjection,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,xColorLegendTitle:Object.keys(e||{}).indexOf("xColorLegendTitle")!==-1?e?.xColorLegendTitle:i.getValues("x",t||[],o||[]),yColorLegendTitle:Object.keys(e||{}).indexOf("yColorLegendTitle")!==-1?e?.yColorLegendTitle:i.getValues("y",t||[],o||[]),xDomain:e?.xDomain,yDomain:e?.yDomain,colors:e?.colors,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,padding:e?.padding,mapBorderColor:e?.mapBorderColor,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,isWorldMap:e?.isWorldMap,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedIds:e?.highlightedIds,mapProperty:e?.mapProperty,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,onSeriesMouseClick:r=>{s?.(r.id)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"dotDensityMap":return{timeline:e?.timeline,customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,mapData:e?.mapData,mapProjection:e?.mapProjection,graphDescription:e?.graphDescription,footNote:e?.footNote,maxRadiusValue:e?.maxRadiusValue,width:e?.width,height:e?.height,radius:e?.radius,sources:e?.sources,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),data:a,scale:e?.scale,centerPoint:e?.centerPoint,backgroundColor:e?.backgroundColor,mapBorderWidth:e?.mapBorderWidth,mapNoDataColor:e?.mapNoDataColor,mapBorderColor:e?.mapBorderColor,padding:e?.padding,showLabels:e?.showLabels,relativeHeight:e?.relativeHeight,isWorldMap:e?.isWorldMap,tooltip:e?.tooltip,showColorScale:e?.showColorScale,zoomScaleExtend:e?.zoomScaleExtend,zoomTranslateExtend:e?.zoomTranslateExtend,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,showAntarctica:e?.showAntarctica,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,zoomInteraction:e?.zoomInteraction,animate:e?.animate};case"donutChart":return{precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,mainText:e?.mainText,data:a,colors:e?.colors,graphTitle:e?.graphTitle,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,graphDescription:e?.graphDescription,subNote:e?.subNote,footNote:e?.footNote,radius:e?.radius,strokeWidth:e?.strokeWidth,showColorScale:e?.showColorScale,backgroundColor:e?.backgroundColor,padding:e?.padding,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,colorDomain:e?.colorDomain,sortData:e?.sortData,language:e?.language,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,ariaLabel:e?.ariaLabel,legendMaxWidth:e?.legendMaxWidth,onSeriesMouseClick:r=>{s?.(r.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,colorScaleMaxWidth:e?.colorScaleMaxWidth};case"slopeChart":return{customLayers:e?.customLayers,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),radius:e?.radius,axisTitles:e?.axisTitles,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightedDataPoints:e?.highlightedDataPoints,showColorScale:e?.showColorScale,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"scatterPlot":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),radius:e?.radius,xAxisTitle:Object.keys(e||{}).indexOf("xAxisTitle")!==-1?e?.xAxisTitle:i.getValues("x",t||[],o||[]),yAxisTitle:Object.keys(e||{}).indexOf("yAxisTitle")!==-1?e?.yAxisTitle:i.getValues("y",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,refXValues:e?.refXValues,refYValues:e?.refYValues,highlightedDataPoints:e?.highlightedDataPoints,highlightAreaSettings:e?.highlightAreaSettings,showColorScale:e?.showColorScale,graphID:e?.graphID,maxRadiusValue:e?.maxRadiusValue,maxXValue:e?.maxXValue,minXValue:e?.minXValue,maxYValue:e?.maxYValue,minYValue:e?.minYValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,customHighlightAreaSettings:e?.customHighlightAreaSettings,annotations:e?.annotations,regressionLine:e?.regressionLine,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,noOfXTicks:e?.noOfXTicks,noOfYTicks:e?.noOfYTicks,labelColor:e?.labelColor,xSuffix:e?.xSuffix,ySuffix:e?.ySuffix,xPrefix:e?.xPrefix,yPrefix:e?.yPrefix,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dumbbellChart":return{timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,orientation:e?.orientation,refValues:e?.refValues,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,truncateBy:e?.truncateBy,labelOrder:e?.labelOrder,showColorScale:e?.showColorScale,colorDomain:e?.colorDomain||i.getValues("x",t||[],o||[]),colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,padding:e?.padding,radius:e?.radius,relativeHeight:e?.relativeHeight,showValues:e?.showValues,showLabels:e?.showLabels,tooltip:e?.tooltip,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,suffix:e?.suffix,prefix:e?.prefix,language:e?.language,minHeight:e?.minHeight,sortParameter:e?.sortParameter,sortData:e?.sortData,arrowConnector:e?.arrowConnector,connectorStrokeWidth:e?.connectorStrokeWidth,maxBarThickness:e?.maxBarThickness,minBarThickness:e?.minBarThickness,maxNumberOfBars:e?.maxNumberOfBars,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,axisTitle:e?.axisTitle,noOfTicks:e?.noOfTicks,valueColor:e?.valueColor,styles:e?.styles,classNames:e?.classNames,animate:e?.animate,highlightedDataPoints:e?.highlightedDataPoints,dimmedOpacity:e?.dimmedOpacity};case"treeMap":return{precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,tooltip:e?.tooltip,showColorScale:e?.showColorScale,showValues:e?.showValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,onSeriesMouseClick:r=>{s?.(r.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"circlePacking":return{precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,tooltip:e?.tooltip,showColorScale:e?.showColorScale,showValues:e?.showValues,graphID:e?.graphID,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,radius:e?.radius,maxRadiusValue:e?.maxRadiusValue,onSeriesMouseClick:r=>{s?.(r.label)},detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"heatMap":return{precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,scaleType:e?.scaleType,colorDomain:e?.colorDomain,showColumnLabels:e?.showColumnLabels,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,truncateBy:e?.truncateBy,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,suffix:e?.suffix,prefix:e?.prefix,showValues:e?.showValues,showRowLabels:e?.showRowLabels,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,noDataColor:e?.noDataColor,showColorScale:e?.showColorScale,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"stripChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,orientation:e?.orientation,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),radius:e?.radius,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,highlightedDataPoints:e?.highlightedDataPoints,showColorScale:e?.showColorScale,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,noOfTicks:e?.noOfTicks,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,prefix:e?.prefix,suffix:e?.suffix,stripType:e?.stripType,valueColor:e?.valueColor,language:e?.language,minHeight:e?.minHeight,highlightColor:e?.highlightColor,dotOpacity:e?.dotOpacity,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"beeSwarmChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,dimmedOpacity:e?.dimmedOpacity,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,colorDomain:e?.colorDomain,colorLegendTitle:Object.keys(e||{}).indexOf("colorLegendTitle")!==-1?e?.colorLegendTitle:i.getValues("color",t||[],o||[]),backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,showColorScale:e?.showColorScale,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,radius:e?.radius,maxRadiusValue:e?.maxRadiusValue,maxValue:e?.maxValue,minValue:e?.minValue,highlightedDataPoints:e?.highlightedDataPoints,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,showNAColor:e?.showNAColor,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,orientation:e?.orientation,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"butterflyChart":return{naLabel:e?.naLabel,timeline:e?.timeline,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,leftBarTitle:Object.keys(e||{}).indexOf("leftBarTitle")!==-1?e?.leftBarTitle:i.getValues("leftBar",t||[],o||[]),rightBarTitle:Object.keys(e||{}).indexOf("rightBarTitle")!==-1?e?.rightBarTitle:i.getValues("rightBar",t||[],o||[]),footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,barColors:e?.barColors,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,barPadding:e?.barPadding,truncateBy:e?.truncateBy,suffix:e?.suffix,prefix:e?.prefix,showTicks:e?.showTicks,showValues:e?.showValues,centerGap:e?.centerGap,maxValue:e?.maxValue,minValue:e?.minValue,showColorScale:e?.showColorScale,refValues:e?.refValues,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"histogram":return{precision:e?.precision,theme:e?.theme,data:a,colors:e?.colors,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,barPadding:e?.barPadding,showValues:e?.showValues,showTicks:e?.showTicks,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,backgroundColor:e?.backgroundColor,padding:e?.padding,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,showLabels:e?.showLabels,maxValue:e?.maxValue,tooltip:e?.tooltip,refValues:e?.refValues,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,numberOfBins:e?.numberOfBins,truncateBy:e?.truncateBy,donutStrokeWidth:e?.donutStrokeWidth,sortData:e?.sortData,barGraphLayout:e?.barGraphLayout,graphType:e?.graphType,language:e?.language,minHeight:e?.minHeight,maxBarThickness:e?.maxBarThickness,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames};case"sparkLine":return{customLayers:e?.customLayers,theme:e?.theme,data:a,curveType:e?.curveType,lineColor:e?.lineColor,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,dateFormat:e?.dateFormat,area:e?.area,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,maxValue:e?.maxValue,minValue:e?.minValue,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,styles:e?.styles,classNames:e?.classNames};case"paretoChart":return{naLabel:e?.naLabel,customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,showValues:e?.showValues,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,barTitle:Object.keys(e||{}).indexOf("barTitle")!==-1?e?.barTitle:i.getValues("barTitle",t||[],o||[]),lineTitle:Object.keys(e||{}).indexOf("lineTitle")!==-1?e?.lineTitle:i.getValues("lineTitle",t||[],o||[]),footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,backgroundColor:e?.backgroundColor,padding:e?.padding,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,barColor:e?.barColor,curveType:e?.curveType,lineColor:e?.lineColor,sameAxes:e?.sameAxes,relativeHeight:e?.relativeHeight,tooltip:e?.tooltip,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,barPadding:e?.barPadding,truncateBy:e?.truncateBy,showLabels:e?.showLabels,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,detailsOnClick:e?.detailsOnClick,noOfTicks:e?.noOfTicks,lineSuffix:e?.lineSuffix,barSuffix:e?.barSuffix,linePrefix:e?.lineSuffix,barPrefix:e?.barPrefix,barAxisTitle:e?.barAxisTitle,lineAxisTitle:e?.lineAxisTitle,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dataTable":return{naLabel:e?.naLabel,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphTitle:e?.graphTitle,sources:e?.sources,graphDescription:e?.graphDescription,footNote:e?.footNote,graphID:e?.graphID,width:e?.width,height:e?.height,columnData:e?.columnData||[],data:a,language:e?.language,ariaLabel:e?.ariaLabel,minWidth:e?.minWidth,backgroundColor:e?.backgroundColor,padding:e?.padding,styles:e?.styles,classNames:e?.classNames};case"statCard":return{precision:e?.precision,theme:e?.theme,year:e?.year,data:a,graphTitle:e?.graphTitle||"",graphDescription:e?.graphDescription,suffix:e?.suffix,prefix:e?.prefix,sources:e?.sources||[],footNote:e?.footNote,backgroundColor:e?.backgroundColor,padding:e?.padding,graphID:e?.graphID,aggregationMethod:e?.aggregationMethod,language:e?.language,minHeight:e?.minHeight,countOnly:e?.countOnly,ariaLabel:e?.ariaLabel,textBackground:e?.textBackground,headingFontSize:e?.headingFontSize,centerAlign:e?.centerAlign,verticalAlign:e?.verticalAlign,styles:e?.styles,classNames:e?.classNames,layout:e?.layout};case"unitChart":return{precision:e?.precision,theme:e?.theme,totalNoOfDots:e?.totalNoOfDots,gridSize:e?.gridSize,unitPadding:e?.unitPadding,size:e?.size,graphTitle:e?.graphTitle,sources:e?.sources,colors:e?.colors,graphDescription:e?.graphDescription,footNote:e?.footNote,backgroundColor:e?.backgroundColor,padding:e?.padding,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,language:e?.language,showColorScale:e?.showColorScale,showStrokeForWhiteDots:e?.showStrokeForWhiteDots,note:e?.note,data:a,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,ariaLabel:e?.ariaLabel,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"sankeyChart":return{customLayers:e?.customLayers,precision:e?.precision,theme:e?.theme,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,data:a,graphTitle:e?.graphTitle,graphDescription:e?.graphDescription,footNote:e?.footNote,width:e?.width,height:e?.height,sources:e?.sources,showLabels:e?.showLabels,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,truncateBy:e?.truncateBy,padding:e?.padding,backgroundColor:e?.backgroundColor,tooltip:e?.tooltip,suffix:e?.suffix,prefix:e?.prefix,relativeHeight:e?.relativeHeight,showValues:e?.showValues,graphID:e?.graphID,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,fillContainer:e?.fillContainer,language:e?.language,minHeight:e?.minHeight,ariaLabel:e?.ariaLabel,sourceColors:e?.sourceColors,targetColors:e?.targetColors,sourceColorDomain:e?.sourceColorDomain,targetColorDomain:e?.targetColorDomain,nodePadding:e?.nodePadding,nodeWidth:e?.nodeWidth,highlightedSourceDataPoints:e?.highlightedSourceDataPoints,highlightedTargetDataPoints:e?.highlightedTargetDataPoints,defaultLinkOpacity:e?.defaultLinkOpacity,sourceTitle:e?.sourceTitle,targetTitle:e?.targetTitle,sortNodes:e?.sortNodes,detailsOnClick:e?.detailsOnClick,styles:e?.styles,classNames:e?.classNames,animate:e?.animate};case"dataCards":return{theme:e?.theme,graphTitle:e?.graphTitle,sources:e?.sources,graphDescription:e?.graphDescription,footNote:e?.footNote,graphID:e?.graphID,width:e?.width,height:e?.height,columnData:e?.columnData||[],data:a,language:e?.language,ariaLabel:e?.ariaLabel,cardTemplate:e?.cardTemplate,cardBackgroundColor:e?.cardBackgroundColor,cardFilters:e?.cardFilters||[],cardSortingOptions:e?.cardSortingOptions,cardSearchColumns:e?.cardSearchColumns,cardMinWidth:e?.cardMinWidth,backgroundColor:e?.backgroundColor,padding:e?.padding,detailsOnClick:e?.detailsOnClick,allowDataDownloadOnDetail:e?.allowDataDownloadOnDetail,noOfItemsInAPage:e?.noOfItemsInAPage,uiMode:e?.uiMode,styles:e?.styles,classNames:e?.classNames};case"radarChart":return{customLayers:e?.customLayers,precision:e?.precision,graphTitle:e?.graphTitle,dimmedOpacity:e?.dimmedOpacity,graphDescription:e?.graphDescription,footNote:e?.footNote,sources:e?.sources,ariaLabel:e?.ariaLabel,colors:e?.colors,colorDomain:e?.colorDomain,colorLegendTitle:e?.colorLegendTitle,backgroundColor:e?.backgroundColor,styles:e?.styles,classNames:e?.classNames,width:e?.width,height:e?.height,minHeight:e?.minHeight,relativeHeight:e?.relativeHeight,padding:e?.padding,radius:e?.radius,leftMargin:e?.leftMargin,rightMargin:e?.rightMargin,topMargin:e?.topMargin,bottomMargin:e?.bottomMargin,maxValue:e?.maxValue,minValue:e?.minValue,showValues:e?.showValues,showDots:e?.showDots,strokeWidth:e?.strokeWidth,fillShape:e?.fillShape,noOfTicks:e?.noOfTicks,showColorScale:e?.showColorScale,showNAColor:e?.showNAColor,highlightedLines:e?.highlightedLines,axisLabels:e?.axisLabels,curveType:e?.curveType,resetSelectionOnDoubleClick:e?.resetSelectionOnDoubleClick,graphDownload:e?.graphDownload,dataDownload:e?.dataDownload,tooltip:e?.tooltip,detailsOnClick:e?.detailsOnClick,language:e?.language,theme:e?.theme,graphID:e?.graphID,animate:e?.animate};default:return{}}},h=u[l],D=m(l);return n.jsxRuntimeExports.jsx("div",{className:`grow my-0 ${l!=="statCard"?"mx-auto":"mx-0"} flex flex-col h-inherit ${e?.width?"w-fit":"w-full"} ${l!=="unitChart"&&l!=="statCard"?"justify-center":"justify-start"} ${e?.theme||"light"}`,style:{minHeight:"inherit"},children:h?n.jsxRuntimeExports.jsx(h,{...D}):n.jsxRuntimeExports.jsx(c.u,{size:"sm",marginBottom:"none",className:"p-2 text-center text-accent-dark-red dark:text-accent-red",children:`Invalid chart type: ${l}`})})}exports.GraphEl=U;
2
- //# sourceMappingURL=GraphEl-OzC-icbr.cjs.map