{"version":3,"file":"SlopeChart-teCMsTfN.cjs","names":[],"sources":["../src/Components/Graphs/SlopeChart/Graph.tsx","../src/Components/Graphs/SlopeChart/index.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { scaleLinear } from 'd3-scale';\r\nimport isEqual from 'fast-deep-equal';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { useRef, useState } from 'react';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { Axis } from '@/Components/Elements/Axes/Axis';\r\nimport { AxisTitle } from '@/Components/Elements/Axes/AxisTitle';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport type {\r\n  AnimateDataType,\r\n  ClassNameObject,\r\n  CustomLayerDataType,\r\n  SlopeChartDataType,\r\n  StyleObject,\r\n} from '@/Types';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { getGraphDimensions } from '@/Utils/getGraphDimensions';\r\n\r\ninterface Props {\r\n  data: SlopeChartDataType[];\r\n  width: number;\r\n  height: number;\r\n  selectedColor?: string;\r\n  showLabels: boolean;\r\n  colors: string[];\r\n  colorDomain: string[];\r\n  radius: number;\r\n  leftMargin: number;\r\n  rightMargin: number;\r\n  topMargin: number;\r\n  bottomMargin: number;\r\n  axisTitles: [string, string];\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  tooltip?: string | ((_d: any) => React.ReactNode);\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  onSeriesMouseOver?: (_d: any) => void;\r\n  highlightedDataPoints?: (string | number)[];\r\n  maxValue?: number;\r\n  minValue?: number;\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  onSeriesMouseClick?: (_d: any) => void;\r\n  resetSelectionOnDoubleClick: boolean;\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n  styles?: StyleObject;\r\n  classNames?: ClassNameObject;\r\n  animate: AnimateDataType;\r\n  dimmedOpacity: number;\r\n  customLayers: CustomLayerDataType[];\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n  const {\r\n    data,\r\n    width,\r\n    height,\r\n    showLabels,\r\n    colors,\r\n    colorDomain,\r\n    radius,\r\n    leftMargin,\r\n    rightMargin,\r\n    topMargin,\r\n    bottomMargin,\r\n    tooltip,\r\n    onSeriesMouseOver,\r\n    axisTitles,\r\n    highlightedDataPoints,\r\n    selectedColor,\r\n    minValue,\r\n    maxValue,\r\n    onSeriesMouseClick,\r\n    resetSelectionOnDoubleClick,\r\n    detailsOnClick,\r\n    styles,\r\n    classNames,\r\n    animate,\r\n    dimmedOpacity,\r\n    customLayers,\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  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n  const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n  const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n  const margin = {\r\n    top: topMargin,\r\n    bottom: bottomMargin,\r\n    left: leftMargin,\r\n    right: rightMargin,\r\n  };\r\n  const { graphHeight, graphWidth } = getGraphDimensions({ width, height }, margin);\r\n  const minY = Math.min(Math.min(...data.map((d) => d.y1)), Math.min(...data.map((d) => d.y2)));\r\n  const maxY = Math.max(Math.max(...data.map((d) => d.y1)), Math.max(...data.map((d) => d.y2)));\r\n  const y = scaleLinear()\r\n    .domain([\r\n      checkIfNullOrUndefined(minValue) ? (minY > 0 ? 0 : minY) : (minValue as number),\r\n      checkIfNullOrUndefined(maxValue) ? (maxY > 0 ? maxY : 0) : (maxValue as number),\r\n    ])\r\n    .range([graphHeight, 0])\r\n    .nice();\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        className='mx-auto'\r\n        direction='ltr'\r\n        ref={svgRef}\r\n      >\r\n        <g transform={`translate(${margin.left},${margin.top})`}>\r\n          <g>\r\n            <Axis\r\n              y1={0}\r\n              y2={graphHeight}\r\n              x1={radius}\r\n              x2={radius}\r\n              classNames={{\r\n                axis: cn('stroke-1 stroke-stroke-lg', classNames?.yAxis?.axis),\r\n              }}\r\n            />\r\n            <AxisTitle\r\n              x={radius}\r\n              y={graphHeight + 15}\r\n              style={styles?.yAxis?.title}\r\n              className={cn('fill-content-primary text-xs', classNames?.yAxis?.title)}\r\n              text={axisTitles[0]}\r\n            />\r\n          </g>\r\n          <g>\r\n            <Axis\r\n              y1={0}\r\n              y2={graphHeight}\r\n              x1={graphWidth - radius}\r\n              x2={graphWidth - radius}\r\n              classNames={{\r\n                axis: cn('stroke-1 stroke-stroke-lg', classNames?.yAxis?.axis),\r\n              }}\r\n            />\r\n            <AxisTitle\r\n              x={graphWidth - radius}\r\n              y={graphHeight + 15}\r\n              style={styles?.yAxis?.title}\r\n              className={cn('fill-content-primary text-xs', classNames?.yAxis?.title)}\r\n              text={axisTitles[1]}\r\n            />\r\n          </g>\r\n          {customLayers.filter((d) => d.position === 'before').map((d) => d.layer)}\r\n          <AnimatePresence>\r\n            {data.map((d) => {\r\n              return (\r\n                <motion.g\r\n                  key={d.label}\r\n                  variants={{\r\n                    initial: {\r\n                      opacity: selectedColor\r\n                        ? d.color\r\n                          ? colors[colorDomain.indexOf(`${d.color}`)] === selectedColor\r\n                            ? 1\r\n                            : dimmedOpacity\r\n                          : dimmedOpacity\r\n                        : mouseOverData\r\n                          ? mouseOverData.label === d.label\r\n                            ? 1\r\n                            : dimmedOpacity\r\n                          : highlightedDataPoints\r\n                            ? highlightedDataPoints.indexOf(d.label) !== -1\r\n                              ? 1\r\n                              : dimmedOpacity\r\n                            : 1,\r\n                    },\r\n                    whileInView: {\r\n                      opacity: selectedColor\r\n                        ? d.color\r\n                          ? colors[colorDomain.indexOf(`${d.color}`)] === selectedColor\r\n                            ? 1\r\n                            : dimmedOpacity\r\n                          : dimmedOpacity\r\n                        : mouseOverData\r\n                          ? mouseOverData.label === d.label\r\n                            ? 1\r\n                            : dimmedOpacity\r\n                          : highlightedDataPoints\r\n                            ? highlightedDataPoints.indexOf(d.label) !== -1\r\n                              ? 1\r\n                              : dimmedOpacity\r\n                            : 1,\r\n                      transition: { duration: animate.duration },\r\n                    },\r\n                  }}\r\n                  initial='initial'\r\n                  animate={isInView ? 'whileInView' : 'initial'}\r\n                  exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                  onMouseEnter={(event) => {\r\n                    setMouseOverData(d);\r\n                    setEventY(event.clientY);\r\n                    setEventX(event.clientX);\r\n                    onSeriesMouseOver?.(d);\r\n                  }}\r\n                  onMouseMove={(event) => {\r\n                    setMouseOverData(d);\r\n                    setEventY(event.clientY);\r\n                    setEventX(event.clientX);\r\n                  }}\r\n                  onMouseLeave={() => {\r\n                    setMouseOverData(undefined);\r\n                    setEventX(undefined);\r\n                    setEventY(undefined);\r\n                    onSeriesMouseOver?.(undefined);\r\n                  }}\r\n                  onClick={() => {\r\n                    if (onSeriesMouseClick || detailsOnClick) {\r\n                      if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n                        setMouseClickData(undefined);\r\n                        onSeriesMouseClick?.(undefined);\r\n                      } else {\r\n                        setMouseClickData(d);\r\n                        onSeriesMouseClick?.(d);\r\n                      }\r\n                    }\r\n                  }}\r\n                >\r\n                  <motion.circle\r\n                    variants={{\r\n                      initial: {\r\n                        cx: radius,\r\n                        cy: y(d.y1),\r\n                        fill:\r\n                          data.filter((el) => el.color).length === 0\r\n                            ? colors[0]\r\n                            : !d.color\r\n                              ? Colors.gray\r\n                              : colors[colorDomain.indexOf(`${d.color}`)],\r\n                        stroke:\r\n                          data.filter((el) => el.color).length === 0\r\n                            ? colors[0]\r\n                            : !d.color\r\n                              ? Colors.gray\r\n                              : colors[colorDomain.indexOf(`${d.color}`)],\r\n                        opacity: 0,\r\n                      },\r\n                      whileInView: {\r\n                        cx: radius,\r\n                        cy: y(d.y1),\r\n                        fill:\r\n                          data.filter((el) => el.color).length === 0\r\n                            ? colors[0]\r\n                            : !d.color\r\n                              ? Colors.gray\r\n                              : colors[colorDomain.indexOf(`${d.color}`)],\r\n                        stroke:\r\n                          data.filter((el) => el.color).length === 0\r\n                            ? colors[0]\r\n                            : !d.color\r\n                              ? Colors.gray\r\n                              : colors[colorDomain.indexOf(`${d.color}`)],\r\n                        opacity: 1,\r\n                        transition: { duration: animate.duration },\r\n                      },\r\n                    }}\r\n                    initial='initial'\r\n                    animate={isInView ? 'whileInView' : 'initial'}\r\n                    exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                    r={radius}\r\n                    style={{\r\n                      fillOpacity: 0.6,\r\n                    }}\r\n                  />\r\n                  {showLabels ? (\r\n                    <motion.text\r\n                      variants={{\r\n                        initial: {\r\n                          y: y(d.y1),\r\n                          fill:\r\n                            data.filter((el) => el.color).length === 0\r\n                              ? colors[0]\r\n                              : !d.color\r\n                                ? Colors.gray\r\n                                : colors[colorDomain.indexOf(`${d.color}`)],\r\n                          opacity: 0,\r\n                        },\r\n                        whileInView: {\r\n                          y: y(d.y1),\r\n                          fill:\r\n                            data.filter((el) => el.color).length === 0\r\n                              ? colors[0]\r\n                              : !d.color\r\n                                ? Colors.gray\r\n                                : colors[colorDomain.indexOf(`${d.color}`)],\r\n                          opacity: 1,\r\n                          transition: { duration: animate.duration },\r\n                        },\r\n                      }}\r\n                      initial='initial'\r\n                      animate={isInView ? 'whileInView' : 'initial'}\r\n                      exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                      style={{\r\n                        textAnchor: 'end',\r\n                        ...(styles?.yAxis?.labels || {}),\r\n                      }}\r\n                      className={cn('text-xs', classNames?.yAxis?.labels)}\r\n                      x={5}\r\n                      dy='0.33em'\r\n                      textAnchor='end'\r\n                      dx={0 - radius - 3}\r\n                    >\r\n                      {d.label}\r\n                    </motion.text>\r\n                  ) : highlightedDataPoints ? (\r\n                    highlightedDataPoints.indexOf(d.label) !== -1 ? (\r\n                      <motion.text\r\n                        variants={{\r\n                          initial: {\r\n                            y: y(d.y1),\r\n                            fill:\r\n                              data.filter((el) => el.color).length === 0\r\n                                ? colors[0]\r\n                                : !d.color\r\n                                  ? Colors.gray\r\n                                  : colors[colorDomain.indexOf(`${d.color}`)],\r\n                            opacity: 0,\r\n                          },\r\n                          whileInView: {\r\n                            y: y(d.y1),\r\n                            fill:\r\n                              data.filter((el) => el.color).length === 0\r\n                                ? colors[0]\r\n                                : !d.color\r\n                                  ? Colors.gray\r\n                                  : colors[colorDomain.indexOf(`${d.color}`)],\r\n                            opacity: 1,\r\n                            transition: { duration: animate.duration },\r\n                          },\r\n                        }}\r\n                        initial='initial'\r\n                        animate={isInView ? 'whileInView' : 'initial'}\r\n                        exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                        style={{\r\n                          textAnchor: 'end',\r\n                          ...(styles?.yAxis?.labels || {}),\r\n                        }}\r\n                        className={cn('text-xs', classNames?.yAxis?.labels)}\r\n                        x={5}\r\n                        dy='0.33em'\r\n                        dx={-3}\r\n                      >\r\n                        {d.label}\r\n                      </motion.text>\r\n                    ) : null\r\n                  ) : null}\r\n                  <motion.circle\r\n                    variants={{\r\n                      initial: {\r\n                        cx: graphWidth - radius,\r\n                        cy: y(d.y2),\r\n                        fill:\r\n                          data.filter((el) => el.color).length === 0\r\n                            ? colors[0]\r\n                            : !d.color\r\n                              ? Colors.gray\r\n                              : colors[colorDomain.indexOf(`${d.color}`)],\r\n                        stroke:\r\n                          data.filter((el) => el.color).length === 0\r\n                            ? colors[0]\r\n                            : !d.color\r\n                              ? Colors.gray\r\n                              : colors[colorDomain.indexOf(`${d.color}`)],\r\n                        opacity: 0,\r\n                      },\r\n                      whileInView: {\r\n                        cx: graphWidth - radius,\r\n                        cy: y(d.y2),\r\n                        fill:\r\n                          data.filter((el) => el.color).length === 0\r\n                            ? colors[0]\r\n                            : !d.color\r\n                              ? Colors.gray\r\n                              : colors[colorDomain.indexOf(`${d.color}`)],\r\n                        stroke:\r\n                          data.filter((el) => el.color).length === 0\r\n                            ? colors[0]\r\n                            : !d.color\r\n                              ? Colors.gray\r\n                              : colors[colorDomain.indexOf(`${d.color}`)],\r\n                        opacity: 1,\r\n                        transition: { duration: animate.duration },\r\n                      },\r\n                    }}\r\n                    initial='initial'\r\n                    animate={isInView ? 'whileInView' : 'initial'}\r\n                    exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                    r={radius}\r\n                    style={{\r\n                      fillOpacity: 0.6,\r\n                    }}\r\n                  />\r\n                  {showLabels ? (\r\n                    <motion.text\r\n                      variants={{\r\n                        initial: {\r\n                          y: y(d.y2),\r\n                          fill:\r\n                            data.filter((el) => el.color).length === 0\r\n                              ? colors[0]\r\n                              : !d.color\r\n                                ? Colors.gray\r\n                                : colors[colorDomain.indexOf(`${d.color}`)],\r\n                          opacity: 0,\r\n                        },\r\n                        whileInView: {\r\n                          y: y(d.y2),\r\n                          fill:\r\n                            data.filter((el) => el.color).length === 0\r\n                              ? colors[0]\r\n                              : !d.color\r\n                                ? Colors.gray\r\n                                : colors[colorDomain.indexOf(`${d.color}`)],\r\n                          opacity: 1,\r\n                          transition: { duration: animate.duration },\r\n                        },\r\n                      }}\r\n                      initial='initial'\r\n                      animate={isInView ? 'whileInView' : 'initial'}\r\n                      exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                      style={{\r\n                        textAnchor: 'start',\r\n                        ...(styles?.yAxis?.labels || {}),\r\n                      }}\r\n                      className={cn('text-xs', classNames?.yAxis?.labels)}\r\n                      x={graphWidth - 5}\r\n                      dy='0.33em'\r\n                      dx={radius + 3}\r\n                    >\r\n                      {d.label}\r\n                    </motion.text>\r\n                  ) : highlightedDataPoints ? (\r\n                    highlightedDataPoints.indexOf(d.label) !== -1 ? (\r\n                      <motion.text\r\n                        variants={{\r\n                          initial: {\r\n                            y: y(d.y2),\r\n                            fill:\r\n                              data.filter((el) => el.color).length === 0\r\n                                ? colors[0]\r\n                                : !d.color\r\n                                  ? Colors.gray\r\n                                  : colors[colorDomain.indexOf(`${d.color}`)],\r\n                            opacity: 0,\r\n                          },\r\n                          whileInView: {\r\n                            y: y(d.y2),\r\n                            fill:\r\n                              data.filter((el) => el.color).length === 0\r\n                                ? colors[0]\r\n                                : !d.color\r\n                                  ? Colors.gray\r\n                                  : colors[colorDomain.indexOf(`${d.color}`)],\r\n                            opacity: 1,\r\n                            transition: { duration: animate.duration },\r\n                          },\r\n                        }}\r\n                        initial='initial'\r\n                        animate={isInView ? 'whileInView' : 'initial'}\r\n                        exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                        style={{\r\n                          textAnchor: 'start',\r\n                          ...(styles?.yAxis?.labels || {}),\r\n                        }}\r\n                        className={cn('text-xs', classNames?.yAxis?.labels)}\r\n                        x={graphWidth - 5}\r\n                        dy='0.33em'\r\n                        dx={3}\r\n                      >\r\n                        {d.label}\r\n                      </motion.text>\r\n                    ) : null\r\n                  ) : null}\r\n                  <motion.line\r\n                    variants={{\r\n                      initial: {\r\n                        x1: radius,\r\n                        x2: graphWidth - radius,\r\n                        y1: y(d.y1),\r\n                        y2: y(d.y1),\r\n                        stroke:\r\n                          data.filter((el) => el.color).length === 0\r\n                            ? colors[0]\r\n                            : !d.color\r\n                              ? Colors.gray\r\n                              : colors[colorDomain.indexOf(`${d.color}`)],\r\n                      },\r\n                      whileInView: {\r\n                        x1: radius,\r\n                        x2: graphWidth - radius,\r\n                        y1: y(d.y1),\r\n                        y2: y(d.y2),\r\n                        stroke:\r\n                          data.filter((el) => el.color).length === 0\r\n                            ? colors[0]\r\n                            : !d.color\r\n                              ? Colors.gray\r\n                              : colors[colorDomain.indexOf(`${d.color}`)],\r\n                        transition: { duration: animate.duration },\r\n                      },\r\n                    }}\r\n                    initial='initial'\r\n                    animate={isInView ? 'whileInView' : 'initial'}\r\n                    exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                    className={classNames?.dataConnectors}\r\n                    style={{\r\n                      fill: 'none',\r\n                      strokeWidth: 1,\r\n                      ...styles?.dataConnectors,\r\n                    }}\r\n                  />\r\n                </motion.g>\r\n              );\r\n            })}\r\n          </AnimatePresence>\r\n          {customLayers.filter((d) => d.position === 'after').map((d) => d.layer)}\r\n        </g>\r\n      </motion.svg>\r\n      {mouseOverData && tooltip && eventX && eventY ? (\r\n        <Tooltip\r\n          data={mouseOverData}\r\n          body={tooltip}\r\n          xPos={eventX}\r\n          yPos={eventY}\r\n          backgroundStyle={styles?.tooltip}\r\n          className={classNames?.tooltip}\r\n        />\r\n      ) : null}\r\n      {detailsOnClick && mouseClickData !== undefined ? (\r\n        <DetailsModal\r\n          body={detailsOnClick}\r\n          data={mouseClickData}\r\n          setData={setMouseClickData}\r\n          className={classNames?.modal}\r\n        />\r\n      ) : null}\r\n    </>\r\n  );\r\n}\r\n","import { useRef, useState } from 'react';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { useElementSize } from '@/hooks/useElementSize';\r\nimport type {\r\n  AnimateDataType,\r\n  ClassNameObject,\r\n  CustomLayerDataType,\r\n  Languages,\r\n  SlopeChartDataType,\r\n  SourcesDataType,\r\n  StyleObject,\r\n} from '@/Types';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { Graph } from './Graph';\r\n\r\ninterface Props {\r\n  // Data\r\n  /** Array of data objects */\r\n  data: SlopeChartDataType[];\r\n\r\n  // Titles, Labels, and Sources\r\n  /** Title of the graph */\r\n  graphTitle?: string | React.ReactNode;\r\n  /** Description of the graph */\r\n  graphDescription?: string | React.ReactNode;\r\n  /** Footnote for the graph */\r\n  footNote?: string | React.ReactNode;\r\n  /** Source data for the graph */\r\n  sources?: SourcesDataType[];\r\n  /** Accessibility label */\r\n  ariaLabel?: string;\r\n\r\n  // Colors and Styling\r\n  /** Color or array of colors for circles */\r\n  colors?: string | string[];\r\n  /** Domain of colors for the graph */\r\n  colorDomain?: string[];\r\n  /** Title for the color legend */\r\n  colorLegendTitle?: string;\r\n  /** Background color of the graph */\r\n  backgroundColor?: string | boolean;\r\n  /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n  styles?: StyleObject;\r\n  /** Custom class names */\r\n  classNames?: ClassNameObject;\r\n\r\n  // Size and Spacing\r\n  /** Width of the graph */\r\n  width?: number;\r\n  /** Height of the graph */\r\n  height?: number;\r\n  /** Minimum height of the graph */\r\n  minHeight?: number;\r\n  /** Relative height scaling factor. This overwrites the height props */\r\n  relativeHeight?: number;\r\n  /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n  padding?: string;\r\n  /** Left margin of the graph */\r\n  leftMargin?: number;\r\n  /** Right margin of the graph */\r\n  rightMargin?: number;\r\n  /** Top margin of the graph */\r\n  topMargin?: number;\r\n  /** Bottom margin of the graph */\r\n  bottomMargin?: number;\r\n  /** Toggles the background to fill the container. This only works if the width of the graph is defined. */\r\n  fillContainer?: boolean;\r\n\r\n  // Values and Ticks\r\n  /** Maximum value for the chart */\r\n  maxValue?: number;\r\n  /** Minimum value for the chart */\r\n  minValue?: number;\r\n\r\n  // Graph Parameters\r\n  /** Toggle visibility of labels */\r\n  showLabels?: boolean;\r\n  /** Radius of the circles */\r\n  radius?: number;\r\n  /** Title for the two axis */\r\n  axisTitles?: [string, string];\r\n  /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n  showColorScale?: boolean;\r\n  /** Toggle visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n  showNAColor?: boolean;\r\n  /** Data points to highlight. Use the label value from data to highlight the data point */\r\n  highlightedDataPoints?: (string | number)[];\r\n  /** Defines the opacity of the non-highlighted data */\r\n  dimmedOpacity?: number;\r\n  /** Toggles if the graph animates in when loaded.  */\r\n  animate?: boolean | AnimateDataType;\r\n  /** 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  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\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  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n  /** Callback for mouse over event */\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  onSeriesMouseOver?: (_d: any) => void;\r\n  /** Callback for mouse click event */\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\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 SlopeChart(props: Props) {\r\n  const {\r\n    data,\r\n    graphTitle,\r\n    colors,\r\n    sources,\r\n    graphDescription,\r\n    showLabels = false,\r\n    height,\r\n    width,\r\n    footNote,\r\n    colorDomain,\r\n    colorLegendTitle,\r\n    radius = 5,\r\n    axisTitles = ['', ''],\r\n    padding,\r\n    backgroundColor = false,\r\n    leftMargin = 50,\r\n    rightMargin = 50,\r\n    topMargin = 20,\r\n    bottomMargin = 20,\r\n    tooltip,\r\n    relativeHeight,\r\n    onSeriesMouseOver,\r\n    showColorScale = true,\r\n    highlightedDataPoints,\r\n    graphID,\r\n    minValue,\r\n    maxValue,\r\n    onSeriesMouseClick,\r\n    graphDownload = false,\r\n    dataDownload = false,\r\n    fillContainer = true,\r\n    language = 'en',\r\n    showNAColor = true,\r\n    minHeight = 0,\r\n    theme = 'light',\r\n    ariaLabel,\r\n    resetSelectionOnDoubleClick = true,\r\n    detailsOnClick,\r\n    styles,\r\n    classNames,\r\n    animate = false,\r\n    dimmedOpacity = 0.3,\r\n    customLayers = [],\r\n  } = props;\r\n  const { graphDiv, svgWidth, svgHeight } = useElementSize<HTMLDivElement>();\r\n  const graphParentDiv = useRef<HTMLDivElement>(null);\r\n  const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n  return (\r\n    <GraphContainer\r\n      className={classNames?.graphContainer}\r\n      style={styles?.graphContainer}\r\n      id={graphID}\r\n      ref={graphParentDiv}\r\n      aria-label={ariaLabel}\r\n      backgroundColor={backgroundColor}\r\n      theme={theme}\r\n      language={language}\r\n      minHeight={minHeight}\r\n      width={fillContainer ? undefined : width}\r\n      height={height}\r\n      relativeHeight={relativeHeight}\r\n      padding={padding}\r\n    >\r\n      {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n        <GraphHeader\r\n          styles={{\r\n            title: styles?.title,\r\n            description: styles?.description,\r\n          }}\r\n          classNames={{\r\n            title: classNames?.title,\r\n            description: classNames?.description,\r\n          }}\r\n          graphTitle={graphTitle}\r\n          graphDescription={graphDescription}\r\n          width={width}\r\n          graphDownload={graphDownload ? graphParentDiv : undefined}\r\n          dataDownload={\r\n            dataDownload\r\n              ? data.map((d) => d.data).filter((d) => d !== undefined).length > 0\r\n                ? data.map((d) => d.data).filter((d) => d !== undefined)\r\n                : data.filter((d) => d !== undefined)\r\n              : null\r\n          }\r\n        />\r\n      ) : null}\r\n      {showColorScale && data.filter((el) => el.color).length !== 0 && data.length > 0 ? (\r\n        <ColorLegendWithMouseOver\r\n          width={width}\r\n          colorLegendTitle={colorLegendTitle}\r\n          colors={(colors as string[] | undefined) || Colors[theme].categoricalColors.colors}\r\n          colorDomain={colorDomain || (uniqBy(data, 'color', true) as string[])}\r\n          setSelectedColor={setSelectedColor}\r\n          showNAColor={showNAColor}\r\n          className={classNames?.colorLegend}\r\n        />\r\n      ) : null}\r\n      <GraphArea ref={graphDiv}>\r\n        {data.length === 0 && <EmptyState />}\r\n        {svgWidth && svgHeight && data.length > 0 ? (\r\n          <Graph\r\n            data={data.filter(\r\n              (d) => !checkIfNullOrUndefined(d.y1) && !checkIfNullOrUndefined(d.y2),\r\n            )}\r\n            width={fillContainer || !width ? svgWidth : svgWidth < width ? svgWidth : width}\r\n            height={svgHeight}\r\n            colorDomain={\r\n              data.filter((el) => el.color).length === 0\r\n                ? []\r\n                : colorDomain || (uniqBy(data, 'color', true) as string[])\r\n            }\r\n            colors={\r\n              data.filter((el) => el.color).length === 0\r\n                ? colors\r\n                  ? [colors as string]\r\n                  : [Colors.primaryColors['blue-600']]\r\n                : (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n            }\r\n            selectedColor={selectedColor}\r\n            axisTitles={axisTitles}\r\n            showLabels={showLabels}\r\n            radius={radius}\r\n            leftMargin={leftMargin}\r\n            rightMargin={rightMargin}\r\n            topMargin={topMargin}\r\n            bottomMargin={bottomMargin}\r\n            tooltip={tooltip}\r\n            onSeriesMouseOver={onSeriesMouseOver}\r\n            highlightedDataPoints={highlightedDataPoints}\r\n            minValue={minValue}\r\n            maxValue={maxValue}\r\n            onSeriesMouseClick={onSeriesMouseClick}\r\n            resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n            detailsOnClick={detailsOnClick}\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            dimmedOpacity={dimmedOpacity}\r\n            customLayers={customLayers}\r\n          />\r\n        ) : null}\r\n      </GraphArea>\r\n      {sources || footNote ? (\r\n        <GraphFooter\r\n          styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n          classNames={{\r\n            footnote: classNames?.footnote,\r\n            source: classNames?.source,\r\n          }}\r\n          sources={sources}\r\n          footNote={footNote}\r\n          width={width}\r\n        />\r\n      ) : null}\r\n    </GraphContainer>\r\n  );\r\n}\r\n"],"mappings":"g1BAqDA,SAAgB,GAAM,EAAc,CAClC,GAAM,CACJ,OACA,QACA,SACA,aACA,SACA,cACA,SACA,cACA,cACA,aACA,gBACA,UACA,oBACA,aACA,wBACA,gBACA,WACA,WACA,qBACA,8BACA,iBACA,SACA,aACA,UACA,gBACA,gBACE,EACE,GAAA,EAAA,EAAA,QAAgB,IAAI,EACpB,EAAW,EAAA,EAAU,EAAQ,CACjC,KAAM,EAAQ,KACd,OAAQ,EAAQ,MAClB,CAAC,EAEK,CAAC,EAAe,IAAA,EAAA,EAAA,UAAkC,IAAA,EAAS,EAE3D,CAAC,EAAgB,IAAA,EAAA,EAAA,UAAmC,IAAA,EAAS,EAC7D,CAAC,EAAQ,IAAA,EAAA,EAAA,UAA0C,IAAA,EAAS,EAC5D,CAAC,EAAQ,IAAA,EAAA,EAAA,UAA0C,IAAA,EAAS,EAC5D,EAAS,CACb,IAAK,GACL,OAAQ,GACR,KAAM,GACN,MAAO,CACT,EACM,CAAE,cAAa,cAAe,EAAA,EAAmB,CAAE,QAAO,QAAO,EAAG,CAAM,EAC1E,EAAO,KAAK,IAAI,KAAK,IAAI,GAAG,EAAK,IAAK,GAAM,EA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