{"version":3,"file":"StripChart-YW4PkZMl.cjs","names":[],"sources":["../src/Utils/getTickPosition.ts","../src/Components/Graphs/StripChart/Graph.tsx","../src/Components/Graphs/StripChart/index.tsx"],"sourcesContent":["export function getTickPositions(count: number, width: number) {\r\n  if (count < 2) return [];\r\n  const step = width / (count - 1);\r\n  return Array.from({ length: count }, (_, i) => i * step);\r\n}\r\n","import { cn } from '@undp/design-system-react/cn';\r\nimport { scaleBand, scaleLinear } from 'd3-scale';\r\nimport isEqual from 'fast-deep-equal';\r\nimport orderBy from 'lodash.orderby';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { useMemo, useRef, useState } from 'react';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { XAxesLabels } from '@/Components/Elements/Axes/XAxesLabels';\r\nimport { YAxesLabels } from '@/Components/Elements/Axes/YAxesLabels';\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  DistributionMarkerDataType,\r\n  PadZerosTypes,\r\n  StripChartDataType,\r\n  StyleObject,\r\n} from '@/Types';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { getGraphDimensions } from '@/Utils/getGraphDimensions';\r\nimport { getMean, getMedian, getPercentile } from '@/Utils/getSimpleStatistics';\r\nimport { getTickPositions } from '@/Utils/getTickPosition';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\n\r\ninterface Props {\r\n  data: StripChartDataType[];\r\n  width: number;\r\n  height: number;\r\n  selectedColor?: string;\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  showDataMinMax: boolean;\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  prefix: string;\r\n  suffix: string;\r\n  stripType: 'strip' | 'dot';\r\n  highlightColor?: string;\r\n  dotOpacity: number;\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  valueColor?: string;\r\n  animate: AnimateDataType;\r\n  noOfTicks: number;\r\n  dimmedOpacity: number;\r\n  precision: number;\r\n  customLayers: CustomLayerDataType[];\r\n  locale: string;\r\n  padZeros: PadZerosTypes;\r\n  hasGroups: boolean;\r\n  groupOrder?: (string | number)[];\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  showGroups: boolean | ((_d: any) => React.ReactNode);\r\n  truncateBy: number;\r\n  distributionMarkers: DistributionMarkerDataType[];\r\n  highlightSameLabelOnHover: boolean;\r\n  minGroupThickness?: number;\r\n  maxGroupThickness?: number;\r\n  groupPadding: number;\r\n}\r\n\r\nexport function VerticalGraph(props: Props) {\r\n  const {\r\n    data,\r\n    width,\r\n    height,\r\n    colors,\r\n    colorDomain,\r\n    radius,\r\n    leftMargin = 20,\r\n    rightMargin = 20,\r\n    topMargin = 10,\r\n    bottomMargin,\r\n    tooltip,\r\n    onSeriesMouseOver,\r\n    highlightedDataPoints,\r\n    selectedColor,\r\n    minValue,\r\n    maxValue,\r\n    onSeriesMouseClick,\r\n    noOfTicks,\r\n    prefix,\r\n    suffix,\r\n    stripType,\r\n    highlightColor,\r\n    dotOpacity,\r\n    resetSelectionOnDoubleClick,\r\n    detailsOnClick,\r\n    styles,\r\n    classNames,\r\n    valueColor,\r\n    animate,\r\n    dimmedOpacity,\r\n    precision,\r\n    customLayers,\r\n    showDataMinMax,\r\n    locale,\r\n    padZeros,\r\n    hasGroups,\r\n    groupOrder,\r\n    showGroups,\r\n    truncateBy,\r\n    distributionMarkers,\r\n    highlightSameLabelOnHover,\r\n    minGroupThickness,\r\n    maxGroupThickness,\r\n    groupPadding,\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: hasGroups && showGroups ? (bottomMargin ?? 25) : (bottomMargin ?? 10),\r\n    left: leftMargin,\r\n    right: rightMargin,\r\n  };\r\n  const { graphHeight, graphWidth } = getGraphDimensions({ width, height }, margin);\r\n\r\n  const dataWithGroup = data.map((d) => ({\r\n    ...d,\r\n    group: hasGroups ? (d.group as string | number) : 'undefined',\r\n  }));\r\n\r\n  const sortedData = orderBy(\r\n    dataWithGroup,\r\n    [\r\n      (item) => {\r\n        const index = (highlightedDataPoints || []).indexOf(item.label);\r\n        return index === -1 ? Infinity : index;\r\n      },\r\n    ],\r\n    ['desc'],\r\n  );\r\n  const clusterOrder = useMemo(() => {\r\n    return (\r\n      groupOrder ?? [\r\n        ...new Set(data.map((d) => (hasGroups ? (d.group as string | number) : 'undefined'))),\r\n      ]\r\n    );\r\n  }, [groupOrder, data, hasGroups]);\r\n  const x = useMemo(() => {\r\n    return scaleBand<string | number>()\r\n      .domain(clusterOrder)\r\n      .range([\r\n        0,\r\n        minGroupThickness && clusterOrder.length > 1\r\n          ? Math.max(graphWidth, minGroupThickness * clusterOrder.length)\r\n          : maxGroupThickness && clusterOrder.length > 1\r\n            ? Math.min(graphWidth, maxGroupThickness * clusterOrder.length)\r\n            : graphWidth,\r\n      ])\r\n      .paddingInner(groupPadding);\r\n  }, [clusterOrder, graphWidth]);\r\n  const yMaxValue = !checkIfNullOrUndefined(maxValue)\r\n    ? (maxValue as number)\r\n    : Math.max(...data.filter((d) => !checkIfNullOrUndefined(d.position)).map((d) => d.position)) <\r\n        0\r\n      ? 0\r\n      : Math.max(...data.filter((d) => !checkIfNullOrUndefined(d.position)).map((d) => d.position));\r\n  const yMinValue = !checkIfNullOrUndefined(minValue)\r\n    ? (minValue as number)\r\n    : Math.min(...data.filter((d) => !checkIfNullOrUndefined(d.position)).map((d) => d.position)) >=\r\n        0\r\n      ? 0\r\n      : Math.min(...data.filter((d) => !checkIfNullOrUndefined(d.position)).map((d) => d.position));\r\n\r\n  const y = useMemo(\r\n    () => scaleLinear().domain([yMinValue, yMaxValue]).range([graphHeight, 0]).nice(),\r\n    [yMaxValue, yMaxValue, graphHeight],\r\n  );\r\n  const yTicks = getTickPositions(noOfTicks, graphHeight);\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          {customLayers.filter((d) => d.position === 'before').map((d) => d.layer)}\r\n          <AnimatePresence>\r\n            {sortedData.map((d) => {\r\n              return (\r\n                <motion.g\r\n                  key={`${d.label}-${d.group}`}\r\n                  variants={{\r\n                    initial: {\r\n                      opacity: 0,\r\n                      x: (x(d.group) ?? 0) + x.bandwidth() / 2,\r\n                      y: y(0),\r\n                    },\r\n                    whileInView: {\r\n                      x: (x(d.group) ?? 0) + x.bandwidth() / 2,\r\n                      y: y(d.position),\r\n                      opacity: selectedColor\r\n                        ? d.color\r\n                          ? colors[colorDomain.indexOf(d.color)] === selectedColor\r\n                            ? 0.95\r\n                            : dimmedOpacity\r\n                          : dimmedOpacity\r\n                        : mouseOverData\r\n                          ? mouseOverData.label === d.label &&\r\n                            (highlightSameLabelOnHover || mouseOverData.group === d.group)\r\n                            ? 1\r\n                            : dimmedOpacity\r\n                          : highlightedDataPoints\r\n                            ? highlightedDataPoints.indexOf(d.label) !== -1\r\n                              ? 0.95\r\n                              : dimmedOpacity\r\n                            : dotOpacity,\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                  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                  {stripType === 'dot' ? (\r\n                    <motion.circle\r\n                      cy={0}\r\n                      cx={0}\r\n                      variants={{\r\n                        initial: {\r\n                          fill:\r\n                            highlightColor && highlightedDataPoints\r\n                              ? highlightedDataPoints.indexOf(d.label) !== -1\r\n                                ? highlightColor\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                              : 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                          fill:\r\n                            highlightColor && highlightedDataPoints\r\n                              ? highlightedDataPoints.indexOf(d.label) !== -1\r\n                                ? highlightColor\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                              : 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                      r={radius}\r\n                    />\r\n                  ) : (\r\n                    <motion.rect\r\n                      y={-1}\r\n                      height={2}\r\n                      variants={{\r\n                        initial: {\r\n                          x: 0 - radius,\r\n                          width: radius * 2,\r\n                          fill:\r\n                            highlightColor && highlightedDataPoints\r\n                              ? highlightedDataPoints.indexOf(d.label) !== -1\r\n                                ? highlightColor\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                              : 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                          x: 0 - radius,\r\n                          width: radius * 2,\r\n                          fill:\r\n                            highlightColor && highlightedDataPoints\r\n                              ? highlightedDataPoints.indexOf(d.label) !== -1\r\n                                ? highlightColor\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                              : 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                    />\r\n                  )}\r\n                  {highlightedDataPoints ? (\r\n                    highlightedDataPoints.indexOf(d.label) !== -1 ? (\r\n                      <motion.text\r\n                        y={0}\r\n                        dy='0.33em'\r\n                        variants={{\r\n                          initial: {\r\n                            opacity: 0,\r\n                            x: 0 + radius + 3,\r\n                            fill:\r\n                              valueColor ||\r\n                              (highlightColor && highlightedDataPoints\r\n                                ? highlightedDataPoints.indexOf(d.label) !== -1\r\n                                  ? highlightColor\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                                : 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                            opacity: 1,\r\n                            x: 0 + radius + 3,\r\n                            fill:\r\n                              valueColor ||\r\n                              (highlightColor && highlightedDataPoints\r\n                                ? highlightedDataPoints.indexOf(d.label) !== -1\r\n                                  ? highlightColor\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                                : 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                        style={{\r\n                          textAnchor: 'start',\r\n                          ...(styles?.graphObjectValues || {}),\r\n                        }}\r\n                        className={cn(\r\n                          'graph-value text-sm font-bold',\r\n                          classNames?.graphObjectValues,\r\n                        )}\r\n                      >\r\n                        {numberFormattingFunction(\r\n                          d.position,\r\n                          undefined,\r\n                          precision,\r\n                          prefix,\r\n                          suffix,\r\n                          locale,\r\n                          padZeros,\r\n                        )}\r\n                      </motion.text>\r\n                    ) : null\r\n                  ) : null}\r\n                </motion.g>\r\n              );\r\n            })}\r\n            {clusterOrder.map((c) => (\r\n              <g key={c}>\r\n                {showGroups && hasGroups && clusterOrder.length > 1 && (\r\n                  <XAxesLabels\r\n                    key={c}\r\n                    value={\r\n                      typeof showGroups === 'function'\r\n                        ? showGroups(c)\r\n                        : `${c}`.length < truncateBy\r\n                          ? `${c}`\r\n                          : `${`${c}`.substring(0, truncateBy)}...`\r\n                    }\r\n                    y={y(0) + 5}\r\n                    x={x(`${c}`) ?? 0}\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={{ duration: 0, once: true, amount: 0 }}\r\n                    isInView={true}\r\n                  />\r\n                )}\r\n                {showDataMinMax\r\n                  ? [\r\n                      Math.min(\r\n                        ...sortedData\r\n                          .filter((d) => !checkIfNullOrUndefined(d.position) && d.group === c)\r\n                          .map((d) => d.position),\r\n                      ),\r\n                      Math.max(\r\n                        ...sortedData\r\n                          .filter((d) => !checkIfNullOrUndefined(d.position) && d.group === c)\r\n                          .map((d) => d.position),\r\n                      ),\r\n                    ].map((d, i) => (\r\n                      <motion.g\r\n                        key={i === 0 ? `min-value-${c}` : `max-value-${c}`}\r\n                        variants={{\r\n                          initial: {\r\n                            opacity: 0,\r\n                            x: (x(c) ?? 0) + x.bandwidth() / 2,\r\n                            y: y(d),\r\n                          },\r\n                          whileInView: {\r\n                            x: (x(c) ?? 0) + x.bandwidth() / 2,\r\n                            y: y(d),\r\n                            opacity: 1,\r\n                            transition: { duration: animate.duration },\r\n                          },\r\n                        }}\r\n                        initial='initial'\r\n                        animate={isInView ? 'whileInView' : 'initial'}\r\n                        exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                      >\r\n                        <motion.text\r\n                          y={0}\r\n                          dy='0.33em'\r\n                          variants={{\r\n                            initial: {\r\n                              opacity: 0,\r\n                              x: 0 + radius + 3,\r\n                            },\r\n                            whileInView: {\r\n                              opacity: 1,\r\n                              x: 0 + radius + 3,\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?.graphObjectValues || {}),\r\n                          }}\r\n                          className={cn(\r\n                            'graph-min-max-value text-sm text-content-secondary',\r\n                            classNames?.graphObjectValues,\r\n                          )}\r\n                        >\r\n                          {numberFormattingFunction(\r\n                            d,\r\n                            undefined,\r\n                            precision,\r\n                            prefix,\r\n                            suffix,\r\n                            locale,\r\n                            padZeros,\r\n                          )}\r\n                        </motion.text>\r\n                      </motion.g>\r\n                    ))\r\n                  : null}\r\n                {distributionMarkers.map((marker) => (\r\n                  <motion.g\r\n                    key={`${c}-${marker.type}`}\r\n                    variants={{\r\n                      initial: {\r\n                        opacity: 0,\r\n                        x:\r\n                          (x(c) ?? 0) +\r\n                          x.bandwidth() / 2 -\r\n                          (x.bandwidth() * (marker.relativeMarkerLength ?? 1)) / 2,\r\n                        y: y(\r\n                          marker.type === 'mean'\r\n                            ? getMean(\r\n                                sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                              )\r\n                            : marker.type === 'median'\r\n                              ? getMedian(\r\n                                  sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                                )\r\n                              : marker.type === 'q1'\r\n                                ? getPercentile(\r\n                                    sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                                    0.25,\r\n                                  )\r\n                                : getPercentile(\r\n                                    sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                                    0.75,\r\n                                  ),\r\n                        ),\r\n                      },\r\n                      whileInView: {\r\n                        opacity: 1,\r\n                        x:\r\n                          (x(c) ?? 0) +\r\n                          x.bandwidth() / 2 -\r\n                          (x.bandwidth() * (marker.relativeMarkerLength ?? 1)) / 2,\r\n                        y: y(\r\n                          marker.type === 'mean'\r\n                            ? getMean(\r\n                                sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                              )\r\n                            : marker.type === 'median'\r\n                              ? getMedian(\r\n                                  sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                                )\r\n                              : marker.type === 'q1'\r\n                                ? getPercentile(\r\n                                    sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                                    0.25,\r\n                                  )\r\n                                : getPercentile(\r\n                                    sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                                    0.75,\r\n                                  ),\r\n                        ),\r\n                        transition: { duration: animate.duration },\r\n                      },\r\n                    }}\r\n                    initial='initial'\r\n                    animate={isInView ? 'whileInView' : 'initial'}\r\n                    exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                  >\r\n                    {marker.markerLabel && (\r\n                      <motion.text\r\n                        y={0}\r\n                        dy='0.33em'\r\n                        variants={{\r\n                          initial: {\r\n                            opacity: 0,\r\n                            x: x.bandwidth() * (marker.relativeMarkerLength ?? 1) + 3,\r\n                          },\r\n                          whileInView: {\r\n                            opacity: 1,\r\n                            x: x.bandwidth() * (marker.relativeMarkerLength ?? 1) + 3,\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                          fill: marker.color || '#000000',\r\n                          ...marker.markerLabel?.style,\r\n                        }}\r\n                        className={`${marker.type}-marker-label text-sm text-content-secondary`}\r\n                      >\r\n                        {marker.markerLabel?.showType\r\n                          ? marker.type === 'mean'\r\n                            ? 'Mean: '\r\n                            : marker.type === 'median'\r\n                              ? 'Median: '\r\n                              : marker.type === 'q1'\r\n                                ? 'Q1: '\r\n                                : 'Q3: '\r\n                          : ''}\r\n                        {numberFormattingFunction(\r\n                          marker.type === 'mean'\r\n                            ? getMean(\r\n                                sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                              )\r\n                            : marker.type === 'median'\r\n                              ? getMedian(\r\n                                  sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                                )\r\n                              : marker.type === 'q1'\r\n                                ? getPercentile(\r\n                                    sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                                    0.25,\r\n                                  )\r\n                                : getPercentile(\r\n                                    sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                                    0.75,\r\n                                  ),\r\n                          undefined,\r\n                          precision,\r\n                          prefix,\r\n                          suffix,\r\n                          locale,\r\n                          padZeros,\r\n                        )}\r\n                      </motion.text>\r\n                    )}\r\n                    <line\r\n                      y1={0}\r\n                      x1={0}\r\n                      y2={0}\r\n                      x2={x.bandwidth() * (marker.relativeMarkerLength ?? 1)}\r\n                      className={`${marker.type}-marker`}\r\n                      style={marker.markerStyle}\r\n                      stroke={marker.color || '#000000'}\r\n                      strokeWidth={marker.strokeWidth ?? 2}\r\n                    />\r\n                  </motion.g>\r\n                ))}\r\n              </g>\r\n            ))}\r\n            {noOfTicks &&\r\n              yTicks.map((tick, i) => (\r\n                <text\r\n                  // biome-ignore lint/suspicious/noArrayIndexKey: index is the unique identifier\r\n                  key={`tick-${i}`}\r\n                  y={tick}\r\n                  x={hasGroups ? 0 : graphWidth / 2 + radius + 5}\r\n                  style={{\r\n                    textAnchor: 'start',\r\n                    ...(styles?.yAxis?.labels || {}),\r\n                  }}\r\n                  className={cn('fill-content-secondary text-xs', classNames?.yAxis?.labels)}\r\n                >\r\n                  {numberFormattingFunction(\r\n                    y.invert(tick),\r\n                    undefined,\r\n                    precision,\r\n                    prefix,\r\n                    suffix,\r\n                    locale,\r\n                    padZeros,\r\n                  )}\r\n                </text>\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\r\nexport function HorizontalGraph(props: Props) {\r\n  const {\r\n    data,\r\n    width,\r\n    height,\r\n    colors,\r\n    colorDomain,\r\n    radius,\r\n    leftMargin,\r\n    rightMargin = 5,\r\n    topMargin = 10,\r\n    bottomMargin = 10,\r\n    tooltip,\r\n    onSeriesMouseOver,\r\n    highlightedDataPoints,\r\n    selectedColor,\r\n    minValue,\r\n    maxValue,\r\n    onSeriesMouseClick,\r\n    prefix,\r\n    suffix,\r\n    stripType,\r\n    highlightColor,\r\n    dotOpacity,\r\n    resetSelectionOnDoubleClick,\r\n    detailsOnClick,\r\n    styles,\r\n    classNames,\r\n    valueColor,\r\n    animate,\r\n    noOfTicks,\r\n    dimmedOpacity,\r\n    precision,\r\n    customLayers,\r\n    showDataMinMax,\r\n    locale,\r\n    padZeros,\r\n    hasGroups,\r\n    groupOrder,\r\n    showGroups,\r\n    truncateBy,\r\n    distributionMarkers,\r\n    highlightSameLabelOnHover,\r\n    minGroupThickness,\r\n    maxGroupThickness,\r\n    groupPadding,\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: hasGroups && showGroups ? (leftMargin ?? 100) : (leftMargin ?? 5),\r\n    right: rightMargin,\r\n  };\r\n  const { graphHeight, graphWidth } = getGraphDimensions({ width, height }, margin);\r\n\r\n  const dataWithGroup = data.map((d) => ({\r\n    ...d,\r\n    group: hasGroups ? (d.group as string | number) : 'undefined',\r\n  }));\r\n\r\n  const sortedData = orderBy(\r\n    dataWithGroup,\r\n    [\r\n      (item) => {\r\n        const index = (highlightedDataPoints || []).indexOf(item.label);\r\n        return index === -1 ? Infinity : index;\r\n      },\r\n    ],\r\n    ['desc'],\r\n  );\r\n  const xMaxValue = !checkIfNullOrUndefined(maxValue)\r\n    ? (maxValue as number)\r\n    : Math.max(...data.filter((d) => !checkIfNullOrUndefined(d.position)).map((d) => d.position)) <\r\n        0\r\n      ? 0\r\n      : Math.max(...data.filter((d) => !checkIfNullOrUndefined(d.position)).map((d) => d.position));\r\n  const xMinValue = !checkIfNullOrUndefined(minValue)\r\n    ? (minValue as number)\r\n    : Math.min(...data.filter((d) => !checkIfNullOrUndefined(d.position)).map((d) => d.position)) >=\r\n        0\r\n      ? 0\r\n      : Math.min(...data.filter((d) => !checkIfNullOrUndefined(d.position)).map((d) => d.position));\r\n  const x = useMemo(\r\n    () => scaleLinear().domain([xMinValue, xMaxValue]).range([0, graphWidth]).nice(),\r\n    [xMinValue, xMaxValue, graphWidth],\r\n  );\r\n  const xTicks = getTickPositions(noOfTicks, graphWidth);\r\n\r\n  const clusterOrder = useMemo(() => {\r\n    return (\r\n      groupOrder ?? [\r\n        ...new Set(\r\n          data\r\n            .map((d) => (hasGroups ? d : { ...d, group: 'undefined' }))\r\n            .map((d) => d.group as string | number),\r\n        ),\r\n      ]\r\n    );\r\n  }, [groupOrder, data, hasGroups]);\r\n  const y = useMemo(() => {\r\n    return scaleBand<string | number>()\r\n      .domain(clusterOrder)\r\n      .range([\r\n        0,\r\n        minGroupThickness && clusterOrder.length > 1\r\n          ? Math.max(graphHeight, minGroupThickness * clusterOrder.length)\r\n          : maxGroupThickness && clusterOrder.length > 1\r\n            ? Math.min(graphHeight, maxGroupThickness * clusterOrder.length)\r\n            : graphHeight,\r\n      ])\r\n      .paddingInner(groupPadding);\r\n  }, [clusterOrder, graphHeight]);\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          {customLayers.filter((d) => d.position === 'before').map((d) => d.layer)}\r\n          <AnimatePresence>\r\n            {sortedData.map((d) => {\r\n              return (\r\n                <motion.g\r\n                  key={d.label}\r\n                  variants={{\r\n                    initial: {\r\n                      opacity: 0,\r\n                      x: x(0),\r\n                      y: (y(d.group) ?? 0) + y.bandwidth() / 2,\r\n                    },\r\n                    whileInView: {\r\n                      x: x(d.position),\r\n                      y: (y(d.group) ?? 0) + y.bandwidth() / 2,\r\n                      opacity: selectedColor\r\n                        ? d.color\r\n                          ? colors[colorDomain.indexOf(d.color)] === selectedColor\r\n                            ? 0.95\r\n                            : dimmedOpacity\r\n                          : dimmedOpacity\r\n                        : mouseOverData\r\n                          ? mouseOverData.label === d.label &&\r\n                            (highlightSameLabelOnHover || mouseOverData.group === d.group)\r\n                            ? 1\r\n                            : dimmedOpacity\r\n                          : highlightedDataPoints\r\n                            ? highlightedDataPoints.indexOf(d.label) !== -1\r\n                              ? 0.95\r\n                              : dimmedOpacity\r\n                            : dotOpacity,\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                  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                  {stripType === 'dot' ? (\r\n                    <motion.circle\r\n                      cy={0}\r\n                      cx={0}\r\n                      variants={{\r\n                        initial: {\r\n                          fill:\r\n                            highlightColor && highlightedDataPoints\r\n                              ? highlightedDataPoints.indexOf(d.label) !== -1\r\n                                ? highlightColor\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                              : 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                          fill:\r\n                            highlightColor && highlightedDataPoints\r\n                              ? highlightedDataPoints.indexOf(d.label) !== -1\r\n                                ? highlightColor\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                              : 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                      r={radius}\r\n                    />\r\n                  ) : (\r\n                    <motion.rect\r\n                      x={-1}\r\n                      width={2}\r\n                      variants={{\r\n                        initial: {\r\n                          y: 0 - radius,\r\n                          height: radius * 2,\r\n                          fill:\r\n                            highlightColor && highlightedDataPoints\r\n                              ? highlightedDataPoints.indexOf(d.label) !== -1\r\n                                ? highlightColor\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                              : 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                          y: 0 - radius,\r\n                          height: radius * 2,\r\n                          fill:\r\n                            highlightColor && highlightedDataPoints\r\n                              ? highlightedDataPoints.indexOf(d.label) !== -1\r\n                                ? highlightColor\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                              : 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                    />\r\n                  )}\r\n                  {highlightedDataPoints ? (\r\n                    highlightedDataPoints.indexOf(d.label) !== -1 ? (\r\n                      <motion.text\r\n                        x={0}\r\n                        variants={{\r\n                          initial: {\r\n                            opacity: 0,\r\n                            y: 0 - radius - 5,\r\n                            fill:\r\n                              valueColor ||\r\n                              (highlightColor && highlightedDataPoints\r\n                                ? highlightedDataPoints.indexOf(d.label) !== -1\r\n                                  ? highlightColor\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                                : 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                            opacity: 1,\r\n                            y: 0 - radius - 5,\r\n                            fill:\r\n                              valueColor ||\r\n                              (highlightColor && highlightedDataPoints\r\n                                ? highlightedDataPoints.indexOf(d.label) !== -1\r\n                                  ? highlightColor\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                                : 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                        style={{\r\n                          textAnchor: 'middle',\r\n                          ...(styles?.graphObjectValues || {}),\r\n                        }}\r\n                        className={cn(\r\n                          'graph-value text-sm font-bold',\r\n                          classNames?.graphObjectValues,\r\n                        )}\r\n                      >\r\n                        {numberFormattingFunction(\r\n                          d.position,\r\n                          undefined,\r\n                          precision,\r\n                          prefix,\r\n                          suffix,\r\n                          locale,\r\n                          padZeros,\r\n                        )}\r\n                      </motion.text>\r\n                    ) : null\r\n                  ) : null}\r\n                </motion.g>\r\n              );\r\n            })}\r\n            {clusterOrder.map((c) => (\r\n              <g key={c}>\r\n                {showGroups && hasGroups && clusterOrder.length > 1 && (\r\n                  <YAxesLabels\r\n                    key={c}\r\n                    value={\r\n                      typeof showGroups === 'function'\r\n                        ? showGroups(c)\r\n                        : `${c}`.length < truncateBy\r\n                          ? `${c}`\r\n                          : `${`${c}`.substring(0, truncateBy)}...`\r\n                    }\r\n                    y={y(c) || 0}\r\n                    x={0 - margin.left}\r\n                    width={margin.left}\r\n                    height={y.bandwidth()}\r\n                    alignment='right'\r\n                    style={styles?.yAxis?.labels}\r\n                    className={classNames?.yAxis?.labels}\r\n                    animate={{ duration: 0, once: true, amount: 0 }}\r\n                    isInView={true}\r\n                  />\r\n                )}\r\n                {showDataMinMax\r\n                  ? [\r\n                      Math.min(\r\n                        ...sortedData\r\n                          .filter((d) => !checkIfNullOrUndefined(d.position) && d.group === c)\r\n                          .map((d) => d.position),\r\n                      ),\r\n                      Math.max(\r\n                        ...sortedData\r\n                          .filter((d) => !checkIfNullOrUndefined(d.position) && d.group === c)\r\n                          .map((d) => d.position),\r\n                      ),\r\n                    ].map((d, i) => (\r\n                      <motion.g\r\n                        key={i === 0 ? `min-value-${c}` : `max-value-${c}`}\r\n                        variants={{\r\n                          initial: {\r\n                            opacity: 0,\r\n                            x: x(d),\r\n                            y: (y(c) ?? 0) + y.bandwidth() / 2,\r\n                          },\r\n                          whileInView: {\r\n                            x: x(d),\r\n                            y: (y(c) ?? 0) + y.bandwidth() / 2,\r\n                            opacity: 1,\r\n                            transition: { duration: animate.duration },\r\n                          },\r\n                        }}\r\n                        initial='initial'\r\n                        animate={isInView ? 'whileInView' : 'initial'}\r\n                        exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                      >\r\n                        <motion.text\r\n                          x={0}\r\n                          variants={{\r\n                            initial: {\r\n                              opacity: 0,\r\n                              y: 0 - radius - 5,\r\n                            },\r\n                            whileInView: {\r\n                              opacity: 1,\r\n                              y: 0 - radius - 5,\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: 'middle',\r\n                            ...(styles?.graphObjectValues || {}),\r\n                          }}\r\n                          className={cn(\r\n                            'graph-min-max-value text-sm text-content-secondary',\r\n                            classNames?.graphObjectValues,\r\n                          )}\r\n                        >\r\n                          {numberFormattingFunction(\r\n                            d,\r\n                            undefined,\r\n                            precision,\r\n                            prefix,\r\n                            suffix,\r\n                            locale,\r\n                            padZeros,\r\n                          )}\r\n                        </motion.text>\r\n                      </motion.g>\r\n                    ))\r\n                  : null}\r\n                {distributionMarkers.map((marker) => (\r\n                  <motion.g\r\n                    key={`${c}-${marker.type}`}\r\n                    variants={{\r\n                      initial: {\r\n                        opacity: 0,\r\n                        x: x(\r\n                          marker.type === 'mean'\r\n                            ? getMean(\r\n                                sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                              )\r\n                            : marker.type === 'median'\r\n                              ? getMedian(\r\n                                  sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                                )\r\n                              : marker.type === 'q1'\r\n                                ? getPercentile(\r\n                                    sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                                    0.25,\r\n                                  )\r\n                                : getPercentile(\r\n                                    sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                                    0.75,\r\n                                  ),\r\n                        ),\r\n                        y:\r\n                          (y(c) ?? 0) +\r\n                          y.bandwidth() / 2 -\r\n                          (y.bandwidth() * (marker.relativeMarkerLength ?? 1)) / 2,\r\n                      },\r\n                      whileInView: {\r\n                        opacity: 1,\r\n                        x: x(\r\n                          marker.type === 'mean'\r\n                            ? getMean(\r\n                                sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                              )\r\n                            : marker.type === 'median'\r\n                              ? getMedian(\r\n                                  sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                                )\r\n                              : marker.type === 'q1'\r\n                                ? getPercentile(\r\n                                    sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                                    0.25,\r\n                                  )\r\n                                : getPercentile(\r\n                                    sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                                    0.75,\r\n                                  ),\r\n                        ),\r\n                        y:\r\n                          (y(c) ?? 0) +\r\n                          y.bandwidth() / 2 -\r\n                          (y.bandwidth() * (marker.relativeMarkerLength ?? 1)) / 2,\r\n                        transition: { duration: animate.duration },\r\n                      },\r\n                    }}\r\n                    initial='initial'\r\n                    animate={isInView ? 'whileInView' : 'initial'}\r\n                    exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                  >\r\n                    <motion.text\r\n                      x={0}\r\n                      dy='-0.33em'\r\n                      variants={{\r\n                        initial: {\r\n                          opacity: 0,\r\n                          y: 0 - 3,\r\n                        },\r\n                        whileInView: {\r\n                          opacity: 1,\r\n                          y: 0 - 3,\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: 'middle',\r\n                        fill: marker.color || '#000000',\r\n                        ...marker.markerLabel?.style,\r\n                      }}\r\n                      className={`${marker.type}-marker-label text-sm text-content-secondary`}\r\n                    >\r\n                      {marker.markerLabel?.showType\r\n                        ? marker.type === 'mean'\r\n                          ? 'Mean: '\r\n                          : marker.type === 'median'\r\n                            ? 'Median: '\r\n                            : marker.type === 'q1'\r\n                              ? 'Q1: '\r\n                              : 'Q3: '\r\n                        : ''}\r\n                      {numberFormattingFunction(\r\n                        marker.type === 'mean'\r\n                          ? getMean(sortedData.filter((d) => d.group === c).map((d) => d.position))\r\n                          : marker.type === 'median'\r\n                            ? getMedian(\r\n                                sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                              )\r\n                            : marker.type === 'q1'\r\n                              ? getPercentile(\r\n                                  sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                                  0.25,\r\n                                )\r\n                              : getPercentile(\r\n                                  sortedData.filter((d) => d.group === c).map((d) => d.position),\r\n                                  0.75,\r\n                                ),\r\n                        undefined,\r\n                        precision,\r\n                        prefix,\r\n                        suffix,\r\n                        locale,\r\n                        padZeros,\r\n                      )}\r\n                    </motion.text>\r\n                    <line\r\n                      x1={0}\r\n                      y1={0}\r\n                      x2={0}\r\n                      y2={y.bandwidth() * (marker.relativeMarkerLength ?? 1)}\r\n                      className={`${marker.type}-marker`}\r\n                      style={marker.markerStyle}\r\n                      stroke={marker.color || '#000000'}\r\n                      strokeWidth={marker.strokeWidth ?? 2}\r\n                    />\r\n                  </motion.g>\r\n                ))}\r\n              </g>\r\n            ))}\r\n            {noOfTicks &&\r\n              xTicks.map((tick, i) => (\r\n                <text\r\n                  // biome-ignore lint/suspicious/noArrayIndexKey: index is the unique identifier\r\n                  key={`tick-${i}`}\r\n                  x={tick}\r\n                  y={hasGroups ? 0 : graphHeight / 2 + radius}\r\n                  style={{\r\n                    textAnchor: i === 0 ? 'start' : i === xTicks.length - 1 ? 'end' : 'middle',\r\n                    ...(styles?.xAxis?.labels || {}),\r\n                  }}\r\n                  className={cn('fill-content-secondary text-xs', classNames?.xAxis?.labels)}\r\n                  dy='1em'\r\n                >\r\n                  {numberFormattingFunction(\r\n                    x.invert(tick),\r\n                    undefined,\r\n                    precision,\r\n                    prefix,\r\n                    suffix,\r\n                    locale,\r\n                    padZeros,\r\n                  )}\r\n                </text>\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  DistributionMarkerDataType,\r\n  Languages,\r\n  NumberFormatOptions,\r\n  SourcesDataType,\r\n  StripChartDataType,\r\n  StyleObject,\r\n} from '@/Types';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { HorizontalGraph, VerticalGraph } from './Graph';\r\n\r\ninterface Props {\r\n  // Data\r\n  /** Array of data objects */\r\n  data: StripChartDataType[];\r\n\r\n  /** Orientation of the graph */\r\n  orientation?: 'vertical' | 'horizontal';\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  /** Color of the highlighted data points */\r\n  highlightColor?: string;\r\n  /** Domain of colors for the graph */\r\n  colorDomain?: string[];\r\n  /** Title for the color legend */\r\n  colorLegendTitle?: string;\r\n  /** Color of value labels */\r\n  valueColor?: 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  /** Custom order for groups. Only applicable of group is present in the data props */\r\n  groupOrder?: (string | number)[];\r\n  /** Maximum thickness of group. Only applicable of group is present in the data props  */\r\n  maxGroupThickness?: number;\r\n  /** Minimum thickness of group. Only applicable of group is present in the data props  */\r\n  minGroupThickness?: number;\r\n  /** Padding between groups. Only applicable of group is present in the data props*/\r\n  groupPadding?: number;\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  /** Number of ticks on the axis */\r\n  noOfTicks?: number;\r\n  /** Radius of the dots or width of the strips */\r\n  radius?: number;\r\n  /** Opacity of each dot or strip */\r\n  dotOpacity?: number;\r\n  /** Type of strip */\r\n  stripType?: 'strip' | 'dot';\r\n  /** Toggle visibility of groups or defines what is shown in the group label */\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  showGroups?: boolean | ((_d: any) => React.ReactNode);\r\n  /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n  showColorScale?: boolean;\r\n  /** Value by which the label are truncated. Only applicable if showGroups is true */\r\n  truncateBy?: number;\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 if all the data points with same labels are highlighted on hover */\r\n  highlightSameLabelOnHover?: boolean;\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  /** Toggles if the graph show the min and max value of the data.  */\r\n  showDataMinMax?: boolean;\r\n  /** Defines distribution markers  shown as a line for data points. */\r\n  distributionMarkers?: DistributionMarkerDataType[];\r\n  /** Configuration options for controlling number formatting, localization, prefixes/suffixes, precision, and zero padding. */\r\n  numberDisplayOptions?: NumberFormatOptions;\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 StripChart(props: Props) {\r\n  const {\r\n    data,\r\n    graphTitle,\r\n    colors,\r\n    sources,\r\n    graphDescription,\r\n    height,\r\n    width,\r\n    footNote,\r\n    colorDomain,\r\n    colorLegendTitle,\r\n    radius = 5,\r\n    padding,\r\n    backgroundColor = false,\r\n    leftMargin,\r\n    rightMargin,\r\n    topMargin,\r\n    bottomMargin,\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    noOfTicks = 2,\r\n    graphDownload = false,\r\n    dataDownload = false,\r\n    stripType = 'dot',\r\n    language = 'en',\r\n    highlightColor,\r\n    dotOpacity = 0.3,\r\n    showNAColor = true,\r\n    minHeight = 0,\r\n    theme = 'light',\r\n    ariaLabel,\r\n    valueColor,\r\n    resetSelectionOnDoubleClick = true,\r\n    detailsOnClick,\r\n    orientation = 'vertical',\r\n    styles,\r\n    classNames,\r\n    animate = false,\r\n    dimmedOpacity = 0.3,\r\n    customLayers = [],\r\n    showDataMinMax = false,\r\n    numberDisplayOptions,\r\n    truncateBy = 999,\r\n    showGroups = true,\r\n    groupOrder,\r\n    distributionMarkers = [],\r\n    highlightSameLabelOnHover = true,\r\n    minGroupThickness,\r\n    maxGroupThickness,\r\n    groupPadding = 0.1,\r\n  } = props;\r\n\r\n  const { graphDiv, svgWidth, svgHeight } = useElementSize<HTMLDivElement>();\r\n  const graphParentDiv = useRef<HTMLDivElement>(null);\r\n  const Comp = orientation === 'horizontal' ? HorizontalGraph : VerticalGraph;\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={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 !== false && 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          <Comp\r\n            data={data}\r\n            width={svgWidth}\r\n            showDataMinMax={showDataMinMax}\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            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            stripType={stripType}\r\n            highlightColor={highlightColor}\r\n            dotOpacity={dotOpacity}\r\n            resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n            detailsOnClick={detailsOnClick}\r\n            styles={styles}\r\n            classNames={classNames}\r\n            valueColor={valueColor}\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            noOfTicks={noOfTicks}\r\n            dimmedOpacity={dimmedOpacity}\r\n            customLayers={customLayers}\r\n            locale={numberDisplayOptions?.locale || 'en'}\r\n            padZeros={numberDisplayOptions?.padZeros || 'none'}\r\n            suffix={numberDisplayOptions?.suffix || ''}\r\n            prefix={numberDisplayOptions?.prefix || ''}\r\n            precision={numberDisplayOptions?.precision ?? 2}\r\n            groupOrder={groupOrder}\r\n            hasGroups={data.every((d) => d.group !== undefined)}\r\n            truncateBy={truncateBy}\r\n            showGroups={showGroups}\r\n            distributionMarkers={distributionMarkers}\r\n            highlightSameLabelOnHover={highlightSameLabelOnHover}\r\n            minGroupThickness={minGroupThickness}\r\n            maxGroupThickness={maxGroupThickness}\r\n            groupPadding={groupPadding}\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":"oiCAAA,SAAA,GAAA,EAAA,EAAA,uEAIA,CC0EA,SAAgB,GAAc,EAAc,CAC1C,GAAM,CACJ,OACA,QACA,SACA,SACA,cACA,SACA,cAAa,GACb,eAAc,GACd,aAAY,GACZ,gBACA,WACA,qBACA,wBACA,iBACA,YACA,YACA,qBACA,YACA,SACA,SACA,YACA,iBACA,cACA,+BACA,iBACA,SACA,aACA,aACA,UACA,gBACA,YACA,gBACA,kBACA,SACA,WACA,YACA,aACA,aACA,cACA,uBACA,4BACA,qBACA,qBACA,iBACE,EACE,IAAA,EAAA,EAAA,QAAgB,IAAI,EACpB,EAAW,GAAA,EAAU,GAAQ,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,GAAQ,IAAA,EAAA,EAAA,UAA0C,IAAA,EAAS,EAC5D,EAAS,CACb,IAAK,GACL,OAAQ,GAAa,EAAc,IAAgB,GAAO,IAAgB,GAC1E,KAAM,GACN,MAAO,EACT,EACM,CAAE,cAAa,cAAe,GAAA,EAAmB,CAAE,QAAO,QAAO,EAAG,CAAM,EAO1E,GAAA,EAAA,GAAA,SALg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