{"version":3,"file":"ScatterPlot-Bs_5Ig6S.cjs","names":[],"sources":["../src/Components/Graphs/ScatterPlot/Graph.tsx","../src/Components/Graphs/ScatterPlot/index.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { Delaunay } from 'd3-delaunay';\r\nimport { scaleLinear, scaleSqrt } 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 { useRef, useState } from 'react';\r\nimport { linearRegression, linearRegressionLine } from 'simple-statistics';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { Annotation } from '@/Components/Elements/Annotations';\r\nimport { Axis } from '@/Components/Elements/Axes/Axis';\r\nimport { AxisTitle } from '@/Components/Elements/Axes/AxisTitle';\r\nimport { XTicksAndGridLines } from '@/Components/Elements/Axes/XTicksAndGridLines';\r\nimport { YTicksAndGridLines } from '@/Components/Elements/Axes/YTicksAndGridLines';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\nimport { HighlightAreaForScatterPlot } from '@/Components/Elements/HighlightArea';\r\nimport { CustomArea } from '@/Components/Elements/HighlightArea/customArea';\r\nimport { RefLineX, RefLineY } from '@/Components/Elements/ReferenceLine';\r\nimport { RegressionLine } from '@/Components/Elements/RegressionLine';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport type {\r\n  AnimateDataType,\r\n  AnnotationSettingsDataType,\r\n  ClassNameObject,\r\n  CustomHighlightAreaSettingsForScatterPlotDataType,\r\n  CustomLayerDataType,\r\n  HighlightAreaSettingsForScatterPlotDataType,\r\n  NumberFormatOptions,\r\n  ReferenceDataType,\r\n  ScatterPlotDataType,\r\n  StyleObject,\r\n} from '@/Types';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { getGraphDimensions } from '@/Utils/getGraphDimensions';\r\nimport { getLineEndPoint } from '@/Utils/getLineEndPoint';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\n\r\ninterface Props {\r\n  data: ScatterPlotDataType[];\r\n  width: number;\r\n  height: number;\r\n  showLabels: boolean;\r\n  colors: string[];\r\n  colorDomain: string[];\r\n  radius: number;\r\n  xAxisTitle: string;\r\n  yAxisTitle: string;\r\n  leftMargin: number;\r\n  rightMargin: number;\r\n  topMargin: number;\r\n  bottomMargin: number;\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  refXValues: ReferenceDataType[];\r\n  refYValues: ReferenceDataType[];\r\n  highlightAreaSettings: HighlightAreaSettingsForScatterPlotDataType[];\r\n  selectedColor?: string;\r\n  highlightedDataPoints?: (string | number)[];\r\n  maxRadiusValue: number;\r\n  maxXValue: number;\r\n  minXValue: number;\r\n  maxYValue: number;\r\n  minYValue: number;\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  onSeriesMouseClick?: (_d: any) => void;\r\n  rtl: boolean;\r\n  annotations: AnnotationSettingsDataType[];\r\n  customHighlightAreaSettings: CustomHighlightAreaSettingsForScatterPlotDataType[];\r\n  regressionLine: boolean | string;\r\n  resetSelectionOnDoubleClick: boolean;\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n  noOfXTicks: number;\r\n  noOfYTicks: number;\r\n  labelColor?: string;\r\n  styles?: StyleObject;\r\n  classNames?: ClassNameObject;\r\n  animate: AnimateDataType;\r\n  dimmedOpacity: number;\r\n  customLayers: CustomLayerDataType[];\r\n  showHighlightedDataPointsLabels: boolean;\r\n  showVoronoiTesselation: boolean;\r\n  useVoronoiInteraction: boolean;\r\n  xNumberDisplayOptions?: NumberFormatOptions;\r\n  yNumberDisplayOptions?: NumberFormatOptions;\r\n  fallbackColor: string;\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    xAxisTitle,\r\n    yAxisTitle,\r\n    leftMargin,\r\n    rightMargin,\r\n    topMargin,\r\n    bottomMargin,\r\n    tooltip,\r\n    onSeriesMouseOver,\r\n    refXValues,\r\n    refYValues,\r\n    highlightAreaSettings,\r\n    selectedColor,\r\n    highlightedDataPoints,\r\n    maxRadiusValue,\r\n    maxXValue,\r\n    minXValue,\r\n    maxYValue,\r\n    minYValue,\r\n    onSeriesMouseClick,\r\n    rtl,\r\n    annotations,\r\n    customHighlightAreaSettings,\r\n    regressionLine,\r\n    resetSelectionOnDoubleClick,\r\n    detailsOnClick,\r\n    noOfXTicks,\r\n    noOfYTicks,\r\n    labelColor,\r\n    styles,\r\n    classNames,\r\n    animate,\r\n    dimmedOpacity,\r\n    showHighlightedDataPointsLabels,\r\n    customLayers,\r\n    showVoronoiTesselation,\r\n    useVoronoiInteraction,\r\n    xNumberDisplayOptions,\r\n    yNumberDisplayOptions,\r\n    fallbackColor,\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: xAxisTitle ? bottomMargin + 50 : bottomMargin,\r\n    left: yAxisTitle ? leftMargin + 30 : leftMargin,\r\n    right: rightMargin,\r\n  };\r\n  const dataWithId = data.map((d, i) => ({ ...d, id: `${i}` }));\r\n  const { graphHeight, graphWidth } = getGraphDimensions({ width, height }, margin);\r\n  const radiusScale =\r\n    data.filter((d) => d.radius === undefined || d.radius === null).length !== data.length\r\n      ? scaleSqrt().domain([0, maxRadiusValue]).range([0.25, radius]).nice()\r\n      : undefined;\r\n  const dataOrdered =\r\n    dataWithId.filter((d) => !checkIfNullOrUndefined(d.radius)).length === 0\r\n      ? dataWithId.filter((d) => !checkIfNullOrUndefined(d.x) && !checkIfNullOrUndefined(d.y))\r\n      : orderBy(\r\n          dataWithId.filter(\r\n            (d) =>\r\n              !checkIfNullOrUndefined(d.radius) &&\r\n              !checkIfNullOrUndefined(d.x) &&\r\n              !checkIfNullOrUndefined(d.y),\r\n          ),\r\n          'radius',\r\n          'desc',\r\n        );\r\n  const x = scaleLinear().domain([minXValue, maxXValue]).range([0, graphWidth]).nice();\r\n  const y = scaleLinear().domain([minYValue, maxYValue]).range([graphHeight, 0]).nice();\r\n  const xTicks = x.ticks(noOfXTicks);\r\n  const yTicks = y.ticks(noOfYTicks);\r\n  const voronoiDiagram = Delaunay.from(\r\n    dataOrdered,\r\n    (d) => x(d.x as number),\r\n    (d) => y(d.y as number),\r\n  ).voronoi([0, 0, graphWidth < 0 ? 0 : graphWidth, graphHeight < 0 ? 0 : graphHeight]);\r\n  const regressionLineParam = linearRegression(\r\n    data\r\n      .filter((d) => !checkIfNullOrUndefined(d.x) && !checkIfNullOrUndefined(d.y))\r\n      .map((d) => [x(d.x as number), y(d.y as number)]),\r\n  );\r\n  const predict = linearRegressionLine(regressionLineParam);\r\n  return (\r\n    <>\r\n      <motion.svg\r\n        width={`${width}px`}\r\n        height={`${height}px`}\r\n        viewBox={`0 0 ${width} ${height}`}\r\n        direction='ltr'\r\n        ref={svgRef}\r\n      >\r\n        <g transform={`translate(${margin.left},${margin.top})`}>\r\n          <AnimatePresence>\r\n            <HighlightAreaForScatterPlot\r\n              key='highlight-area'\r\n              areaSettings={highlightAreaSettings}\r\n              width={graphWidth}\r\n              height={graphHeight}\r\n              scaleX={x}\r\n              scaleY={y}\r\n              animate={animate}\r\n              isInView={isInView}\r\n            />\r\n            <CustomArea\r\n              key='custom-area'\r\n              areaSettings={customHighlightAreaSettings}\r\n              scaleX={x}\r\n              scaleY={y}\r\n              animate={animate}\r\n              isInView={isInView}\r\n            />\r\n          </AnimatePresence>\r\n          <g>\r\n            <YTicksAndGridLines\r\n              values={yTicks.filter((d) => d !== 0)}\r\n              y={yTicks.filter((d) => d !== 0).map((d) => y(d))}\r\n              x1={0}\r\n              x2={graphWidth + margin.right}\r\n              styles={{\r\n                gridLines: styles?.yAxis?.gridLines,\r\n                labels: styles?.yAxis?.labels,\r\n              }}\r\n              classNames={{\r\n                gridLines: classNames?.yAxis?.gridLines,\r\n                labels: classNames?.yAxis?.labels,\r\n              }}\r\n              labelType='secondary'\r\n              showGridLines\r\n              labelPos='side'\r\n              suffix={yNumberDisplayOptions?.suffix || ''}\r\n              prefix={yNumberDisplayOptions?.prefix || ''}\r\n              precision={yNumberDisplayOptions?.precision ?? 2}\r\n              locale={yNumberDisplayOptions?.locale || 'en'}\r\n              padZeros={yNumberDisplayOptions?.padZeros || 'none'}\r\n            />\r\n            <Axis\r\n              y1={y(minYValue < 0 ? 0 : minYValue)}\r\n              y2={y(minYValue < 0 ? 0 : minYValue)}\r\n              x1={0}\r\n              x2={graphWidth + margin.right}\r\n              label={numberFormattingFunction(\r\n                minYValue < 0 ? 0 : minYValue,\r\n                undefined,\r\n                yNumberDisplayOptions?.precision ?? 2,\r\n                yNumberDisplayOptions?.prefix || '',\r\n                yNumberDisplayOptions?.suffix || '',\r\n                yNumberDisplayOptions?.locale || 'en',\r\n                yNumberDisplayOptions?.padZeros || 'none',\r\n              )}\r\n              labelPos={{\r\n                x: 0,\r\n                y: y(minYValue < 0 ? 0 : minYValue),\r\n                dy: '0.33em',\r\n                dx: -4,\r\n              }}\r\n              classNames={{\r\n                axis: classNames?.xAxis?.axis,\r\n                label: classNames?.yAxis?.labels,\r\n              }}\r\n              styles={{\r\n                axis: styles?.xAxis?.axis,\r\n                label: { textAnchor: 'end', ...(styles?.yAxis?.labels || {}) },\r\n              }}\r\n            />\r\n            <AxisTitle\r\n              x={0 - leftMargin - 15}\r\n              y={graphHeight / 2}\r\n              style={styles?.yAxis?.title}\r\n              className={classNames?.yAxis?.title}\r\n              text={yAxisTitle}\r\n              rotate90\r\n            />\r\n          </g>\r\n          <g>\r\n            <XTicksAndGridLines\r\n              values={xTicks.filter((d) => d !== 0)}\r\n              x={xTicks.filter((d) => d !== 0).map((d) => x(d))}\r\n              y1={0}\r\n              y2={graphHeight}\r\n              styles={{\r\n                gridLines: styles?.xAxis?.gridLines,\r\n                labels: styles?.xAxis?.labels,\r\n              }}\r\n              classNames={{\r\n                gridLines: classNames?.xAxis?.gridLines,\r\n                labels: classNames?.xAxis?.labels,\r\n              }}\r\n              labelType='primary'\r\n              showGridLines\r\n              suffix={xNumberDisplayOptions?.suffix || ''}\r\n              prefix={xNumberDisplayOptions?.prefix || ''}\r\n              precision={xNumberDisplayOptions?.precision ?? 2}\r\n              locale={xNumberDisplayOptions?.locale || 'en'}\r\n              padZeros={xNumberDisplayOptions?.padZeros || 'none'}\r\n            />\r\n            <Axis\r\n              x1={x(minXValue < 0 ? 0 : minXValue)}\r\n              x2={x(minXValue < 0 ? 0 : minXValue)}\r\n              y1={0}\r\n              y2={graphHeight}\r\n              label={numberFormattingFunction(\r\n                minXValue < 0 ? 0 : minXValue,\r\n                undefined,\r\n                xNumberDisplayOptions?.precision ?? 2,\r\n                xNumberDisplayOptions?.prefix || '',\r\n                xNumberDisplayOptions?.suffix || '',\r\n                xNumberDisplayOptions?.locale || 'en',\r\n                xNumberDisplayOptions?.padZeros || 'none',\r\n              )}\r\n              labelPos={{\r\n                x: x(minXValue < 0 ? 0 : minXValue),\r\n                y: graphHeight,\r\n                dy: '1em',\r\n                dx: 0,\r\n              }}\r\n              classNames={{\r\n                axis: classNames?.xAxis?.axis,\r\n                label: classNames?.yAxis?.labels,\r\n              }}\r\n              styles={{\r\n                axis: styles?.xAxis?.axis,\r\n                label: {\r\n                  textAnchor: 'middle',\r\n                  ...(styles?.yAxis?.labels || {}),\r\n                },\r\n              }}\r\n            />\r\n            <AxisTitle\r\n              x={graphWidth / 2}\r\n              y={graphHeight + 30}\r\n              style={styles?.xAxis?.title}\r\n              className={classNames?.xAxis?.title}\r\n              text={xAxisTitle}\r\n            />\r\n          </g>\r\n          {customLayers.filter((d) => d.position === 'before').map((d) => d.layer)}\r\n          <AnimatePresence>\r\n            {useVoronoiInteraction &&\r\n              dataOrdered.map((d, i) => {\r\n                return (\r\n                  // biome-ignore lint/a11y/noStaticElementInteractions: interaction for graph\r\n                  <path\r\n                    key={`tesselation_${d.label || i}`}\r\n                    d={voronoiDiagram.renderCell(dataOrdered.findIndex((el) => el.id === d.id))}\r\n                    opacity={showVoronoiTesselation ? 1 : 0}\r\n                    className='stroke-foreground'\r\n                    style={{ fillOpacity: 0, strokeWidth: 1 }}\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                );\r\n              })}\r\n            {dataOrdered.map((d, i) => {\r\n              return (\r\n                <motion.g\r\n                  key={`${d.label || i}`}\r\n                  variants={{\r\n                    initial: {\r\n                      x: x(d.x as number),\r\n                      y: y(d.y as number),\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.id === d.id\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                      x: x(d.x as number),\r\n                      y: y(d.y as number),\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.id === d.id\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                    cx={0}\r\n                    cy={0}\r\n                    exit={{ r: 0, transition: { duration: animate.duration } }}\r\n                    variants={{\r\n                      initial: {\r\n                        r: 0,\r\n                        fill:\r\n                          data.filter((el) => el.color).length === 0\r\n                            ? colors[0]\r\n                            : !d.color\r\n                              ? Colors.gray\r\n                              : colorDomain.indexOf(`${d.color}`) === -1 ||\r\n                                  colorDomain.indexOf(`${d.color}`) > colors.length - 1\r\n                                ? fallbackColor\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                              : colorDomain.indexOf(`${d.color}`) === -1 ||\r\n                                  colorDomain.indexOf(`${d.color}`) > colors.length - 1\r\n                                ? fallbackColor\r\n                                : colors[colorDomain.indexOf(`${d.color}`)],\r\n                      },\r\n                      whileInView: {\r\n                        r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n                        fill:\r\n                          data.filter((el) => el.color).length === 0\r\n                            ? colors[0]\r\n                            : !d.color\r\n                              ? Colors.gray\r\n                              : colorDomain.indexOf(`${d.color}`) === -1 ||\r\n                                  colorDomain.indexOf(`${d.color}`) > colors.length - 1\r\n                                ? fallbackColor\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                              : colorDomain.indexOf(`${d.color}`) === -1 ||\r\n                                  colorDomain.indexOf(`${d.color}`) > colors.length - 1\r\n                                ? fallbackColor\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                    style={{\r\n                      fillOpacity: 0.6,\r\n                    }}\r\n                  />\r\n                  {showLabels && !checkIfNullOrUndefined(d.label) ? (\r\n                    <motion.text\r\n                      style={{\r\n                        ...(styles?.graphObjectValues || {}),\r\n                      }}\r\n                      className={cn('graph-value text-sm', classNames?.graphObjectValues)}\r\n                      y={0}\r\n                      exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                      variants={{\r\n                        initial: {\r\n                          x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n                          opacity: 0,\r\n                          fill:\r\n                            labelColor ||\r\n                            (data.filter((el) => el.color).length === 0\r\n                              ? colors[0]\r\n                              : !d.color\r\n                                ? Colors.gray\r\n                                : colorDomain.indexOf(`${d.color}`) === -1 ||\r\n                                    colorDomain.indexOf(`${d.color}`) > colors.length - 1\r\n                                  ? fallbackColor\r\n                                  : colors[colorDomain.indexOf(`${d.color}`)]),\r\n                        },\r\n                        whileInView: {\r\n                          x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n                          opacity: 1,\r\n                          fill:\r\n                            labelColor ||\r\n                            (data.filter((el) => el.color).length === 0\r\n                              ? colors[0]\r\n                              : !d.color\r\n                                ? Colors.gray\r\n                                : colorDomain.indexOf(`${d.color}`) === -1 ||\r\n                                    colorDomain.indexOf(`${d.color}`) > colors.length - 1\r\n                                  ? fallbackColor\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                      dy='0.33em'\r\n                      dx={3}\r\n                    >\r\n                      {d.label}\r\n                    </motion.text>\r\n                  ) : highlightedDataPoints &&\r\n                    !checkIfNullOrUndefined(d.label) &&\r\n                    showHighlightedDataPointsLabels ? (\r\n                    highlightedDataPoints.indexOf(d.label as string | number) !== -1 ? (\r\n                      <motion.text\r\n                        style={{\r\n                          ...(styles?.graphObjectValues || {}),\r\n                        }}\r\n                        className={cn('graph-value text-sm', classNames?.graphObjectValues)}\r\n                        y={0}\r\n                        exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                        variants={{\r\n                          initial: {\r\n                            x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n                            opacity: 0,\r\n                            fill:\r\n                              labelColor ||\r\n                              (data.filter((el) => el.color).length === 0\r\n                                ? colors[0]\r\n                                : !d.color\r\n                                  ? Colors.gray\r\n                                  : colorDomain.indexOf(`${d.color}`) === -1 ||\r\n                                      colorDomain.indexOf(`${d.color}`) > colors.length - 1\r\n                                    ? fallbackColor\r\n                                    : colors[colorDomain.indexOf(`${d.color}`)]),\r\n                          },\r\n                          whileInView: {\r\n                            x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n                            opacity: 1,\r\n                            fill:\r\n                              labelColor ||\r\n                              (data.filter((el) => el.color).length === 0\r\n                                ? colors[0]\r\n                                : !d.color\r\n                                  ? Colors.gray\r\n                                  : colorDomain.indexOf(`${d.color}`) === -1 ||\r\n                                      colorDomain.indexOf(`${d.color}`) > colors.length - 1\r\n                                    ? fallbackColor\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                        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.g>\r\n              );\r\n            })}\r\n            {refXValues?.map((el) => (\r\n              <RefLineX\r\n                key={el.text}\r\n                text={el.text}\r\n                color={el.color}\r\n                x={x(el.value as number)}\r\n                y1={0}\r\n                y2={graphHeight}\r\n                textSide={x(el.value as number) > graphWidth * 0.75 || rtl ? 'left' : 'right'}\r\n                classNames={el.classNames}\r\n                styles={el.styles}\r\n                animate={animate}\r\n                isInView={isInView}\r\n              />\r\n            ))}\r\n            {refYValues?.map((el) => (\r\n              <RefLineY\r\n                key={el.text}\r\n                text={el.text}\r\n                color={el.color}\r\n                y={y(el.value as number)}\r\n                x1={0}\r\n                x2={graphWidth}\r\n                classNames={el.classNames}\r\n                styles={el.styles}\r\n                animate={animate}\r\n                isInView={isInView}\r\n              />\r\n            ))}\r\n            <g>\r\n              {annotations.map((d) => {\r\n                const endPoints = getLineEndPoint(\r\n                  {\r\n                    x: d.xCoordinate\r\n                      ? x(d.xCoordinate as number) + (d.xOffset || 0)\r\n                      : 0 + (d.xOffset || 0),\r\n                    y: d.yCoordinate\r\n                      ? y(d.yCoordinate as number) + (d.yOffset || 0) - 8\r\n                      : 0 + (d.yOffset || 0) - 8,\r\n                  },\r\n                  {\r\n                    x: d.xCoordinate ? x(d.xCoordinate as number) : 0,\r\n                    y: d.yCoordinate ? y(d.yCoordinate as number) : 0,\r\n                  },\r\n                  checkIfNullOrUndefined(d.connectorRadius) ? 3.5 : (d.connectorRadius as number),\r\n                );\r\n                const connectorSettings = d.showConnector\r\n                  ? {\r\n                      y1: endPoints.y,\r\n                      x1: endPoints.x,\r\n                      y2: d.yCoordinate\r\n                        ? y(d.yCoordinate as number) + (d.yOffset || 0)\r\n                        : 0 + (d.yOffset || 0),\r\n                      x2: d.xCoordinate\r\n                        ? x(d.xCoordinate as number) + (d.xOffset || 0)\r\n                        : 0 + (d.xOffset || 0),\r\n                      cy: d.yCoordinate ? y(d.yCoordinate as number) : 0,\r\n                      cx: d.xCoordinate ? x(d.xCoordinate as number) : 0,\r\n                      circleRadius: checkIfNullOrUndefined(d.connectorRadius)\r\n                        ? 3.5\r\n                        : (d.connectorRadius as number),\r\n                      strokeWidth: d.showConnector === true ? 2 : Math.min(d.showConnector || 0, 1),\r\n                    }\r\n                  : undefined;\r\n                const labelSettings = {\r\n                  y: d.yCoordinate\r\n                    ? y(d.yCoordinate as number) + (d.yOffset || 0) - 8\r\n                    : 0 + (d.yOffset || 0) - 8,\r\n                  x: rtl\r\n                    ? 0\r\n                    : d.xCoordinate\r\n                      ? x(d.xCoordinate as number) + (d.xOffset || 0)\r\n                      : 0 + (d.xOffset || 0),\r\n                  width: rtl\r\n                    ? d.xCoordinate\r\n                      ? x(d.xCoordinate as number) + (d.xOffset || 0)\r\n                      : 0 + (d.xOffset || 0)\r\n                    : graphWidth +\r\n                      margin.right -\r\n                      (d.xCoordinate\r\n                        ? x(d.xCoordinate as number) + (d.xOffset || 0)\r\n                        : 0 + (d.xOffset || 0)),\r\n                  maxWidth: d.maxWidth,\r\n                  fontWeight: d.fontWeight,\r\n                  align: d.align,\r\n                };\r\n                return (\r\n                  <Annotation\r\n                    key={d.text}\r\n                    color={d.color}\r\n                    connectorsSettings={connectorSettings}\r\n                    labelSettings={labelSettings}\r\n                    text={d.text}\r\n                    classNames={d.classNames}\r\n                    styles={d.styles}\r\n                    animate={animate}\r\n                    isInView={isInView}\r\n                  />\r\n                );\r\n              })}\r\n            </g>\r\n            {regressionLine ? (\r\n              <RegressionLine\r\n                x1={0}\r\n                x2={graphWidth}\r\n                y1={predict(0)}\r\n                y2={predict(graphWidth)}\r\n                graphHeight={graphHeight}\r\n                graphWidth={graphWidth}\r\n                className={classNames?.regLine}\r\n                style={styles?.regLine}\r\n                color={typeof regressionLine === 'string' ? regressionLine : undefined}\r\n                animate={animate}\r\n                isInView={isInView}\r\n              />\r\n            ) : null}\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 { Timeline } from '@/Components/Elements/Timeline';\r\nimport { useElementSize } from '@/hooks/useElementSize';\r\nimport { useTimeline } from '@/hooks/useTimeline';\r\nimport type {\r\n  AnimateDataType,\r\n  AnnotationSettingsDataType,\r\n  ClassNameObject,\r\n  CustomHighlightAreaSettingsForScatterPlotDataType,\r\n  CustomLayerDataType,\r\n  HighlightAreaSettingsForScatterPlotDataType,\r\n  Languages,\r\n  NumberFormatOptions,\r\n  ReferenceDataType,\r\n  ScatterPlotDataType,\r\n  SourcesDataType,\r\n  StyleObject,\r\n  TimelineDataType,\r\n} from '@/Types';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { ensureCompleteDataForScatterPlot } from '@/Utils/ensureCompleteData';\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: ScatterPlotDataType[];\r\n\r\n  // Titles, Labels, and Sources\r\n  /** Title of the graph */\r\n  graphTitle?: string | React.ReactNode;\r\n  /** Description of the graph */\r\n  graphDescription?: string | React.ReactNode;\r\n  /** Footnote for the graph */\r\n  footNote?: string | React.ReactNode;\r\n  /** Source data for the graph */\r\n  sources?: SourcesDataType[];\r\n  /** Accessibility label */\r\n  ariaLabel?: string;\r\n\r\n  // Colors and Styling\r\n  /** Color or array of colors for circle */\r\n  colors?: string | string[];\r\n  /** Domain of colors for the graph */\r\n  colorDomain?: string[];\r\n  /** Color for circle if the label doesn't exist in `colorDomain`. */\r\n  fallbackColor?: 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\r\n  // Values and Ticks\r\n  /** Maximum value for the x-axis */\r\n  maxXValue?: number;\r\n  /** Minimum value for the x-axis */\r\n  minXValue?: number;\r\n  /** Maximum value for the y-axis */\r\n  maxYValue?: number;\r\n  /** Minimum value for the y-axis */\r\n  minYValue?: number;\r\n  /** Maximum value mapped to the radius chart */\r\n  maxRadiusValue?: number;\r\n  /** Reference values for comparison on x-axis */\r\n  refXValues?: ReferenceDataType[];\r\n  /** Reference values for comparison on y-axis */\r\n  refYValues?: ReferenceDataType[];\r\n  /** Number of ticks on the x-axis */\r\n  noOfXTicks?: number;\r\n  /** Number of ticks on the y-axis */\r\n  noOfYTicks?: number;\r\n\r\n  // Graph Parameters\r\n  /** Maximum radius of the circle */\r\n  radius?: number;\r\n  /** Toggle visibility of labels */\r\n  showLabels?: boolean;\r\n  /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n  showColorScale?: boolean;\r\n  /** Toggle visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n  showNAColor?: boolean;\r\n  /** Data points to highlight. Use the label value from data to highlight the data point */\r\n  highlightedDataPoints?: (string | number)[];\r\n  /** Defines if the data point labels should be shown for highlighted data points. */\r\n  showHighlightedDataPointsLabels?: boolean;\r\n  /** Defines the opacity of the non-highlighted data */\r\n  dimmedOpacity?: number;\r\n  /** Title for the x-axis */\r\n  xAxisTitle?: string;\r\n  /** Title for the y-axis */\r\n  yAxisTitle?: string;\r\n  /** Annotations on the chart */\r\n  annotations?: AnnotationSettingsDataType[];\r\n  /** Highlighted area(square) on the chart  */\r\n  highlightAreaSettings?: HighlightAreaSettingsForScatterPlotDataType[];\r\n  /** Highlighted area(custom shape) on the chart  */\r\n  customHighlightAreaSettings?: CustomHighlightAreaSettingsForScatterPlotDataType[];\r\n  /** Toggles the visibility of the regression line for the data. If the type is string then string is use to define the color of the line. */\r\n  regressionLine?: boolean | string;\r\n  /** Color of the labels */\r\n  labelColor?: string;\r\n  /** Toggles if the graph animates in when loaded.  */\r\n  animate?: boolean | AnimateDataType;\r\n  /** Configuration options for controlling number formatting, localization, prefixes/suffixes, precision, and zero padding. */\r\n  xNumberDisplayOptions?: NumberFormatOptions;\r\n  /** Configuration options for controlling number formatting, localization, prefixes/suffixes, precision, and zero padding. */\r\n  yNumberDisplayOptions?: 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  /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n  timeline?: TimelineDataType;\r\n  /** Enable graph download option as png */\r\n  graphDownload?: boolean;\r\n  /** Enable data download option as a csv */\r\n  dataDownload?: boolean;\r\n  /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n  resetSelectionOnDoubleClick?: boolean;\r\n  /** Toggle interaction of Voronoi cells */\r\n  useVoronoiInteraction?: boolean;\r\n  /** Toggle visibility of Voronoi tesselation. Should be used for debugging only */\r\n  showVoronoiTesselation?: 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 ScatterPlot(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    fallbackColor = Colors.gray,\r\n    colorLegendTitle,\r\n    radius = 5,\r\n    xAxisTitle = 'X Axis',\r\n    yAxisTitle = 'Y Axis',\r\n    padding,\r\n    backgroundColor = false,\r\n    leftMargin = 0,\r\n    rightMargin = 10,\r\n    topMargin = 20,\r\n    bottomMargin = 50,\r\n    tooltip,\r\n    relativeHeight,\r\n    onSeriesMouseOver,\r\n    refXValues = [],\r\n    refYValues = [],\r\n    highlightAreaSettings = [],\r\n    showColorScale = true,\r\n    highlightedDataPoints,\r\n    showHighlightedDataPointsLabels = false,\r\n    graphID,\r\n    maxRadiusValue,\r\n    maxXValue,\r\n    minXValue,\r\n    maxYValue,\r\n    minYValue,\r\n    onSeriesMouseClick,\r\n    graphDownload = false,\r\n    dataDownload = false,\r\n    language = 'en',\r\n    showNAColor = true,\r\n    minHeight = 0,\r\n    annotations = [],\r\n    customHighlightAreaSettings = [],\r\n    theme = 'light',\r\n    regressionLine = false,\r\n    ariaLabel,\r\n    resetSelectionOnDoubleClick = true,\r\n    detailsOnClick,\r\n    noOfXTicks = 5,\r\n    noOfYTicks = 5,\r\n    labelColor,\r\n    styles,\r\n    classNames,\r\n    animate = false,\r\n    dimmedOpacity = 0.3,\r\n    customLayers = [],\r\n    timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n    showVoronoiTesselation = false,\r\n    useVoronoiInteraction = true,\r\n    xNumberDisplayOptions,\r\n    yNumberDisplayOptions,\r\n  } = props;\r\n  const { graphDiv, svgWidth, svgHeight } = useElementSize<HTMLDivElement>();\r\n  const { uniqDatesSorted, index, setIndex, play, setPlay, markObj, dateFormat, activeDate } =\r\n    useTimeline(data, timeline);\r\n  const graphParentDiv = useRef<HTMLDivElement>(null);\r\n\r\n  const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n  return (\r\n    <GraphContainer\r\n      className={classNames?.graphContainer}\r\n      style={styles?.graphContainer}\r\n      id={graphID}\r\n      ref={graphParentDiv}\r\n      aria-label={ariaLabel}\r\n      backgroundColor={backgroundColor}\r\n      theme={theme}\r\n      language={language}\r\n      minHeight={minHeight}\r\n      width={width}\r\n      height={height}\r\n      relativeHeight={relativeHeight}\r\n      padding={padding}\r\n    >\r\n      {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n        <GraphHeader\r\n          styles={{\r\n            title: styles?.title,\r\n            description: styles?.description,\r\n          }}\r\n          classNames={{\r\n            title: classNames?.title,\r\n            description: classNames?.description,\r\n          }}\r\n          graphTitle={graphTitle}\r\n          graphDescription={graphDescription}\r\n          width={width}\r\n          graphDownload={graphDownload ? graphParentDiv : undefined}\r\n          dataDownload={\r\n            dataDownload\r\n              ? data.map((d) => d.data).filter((d) => d !== undefined).length > 0\r\n                ? data.map((d) => d.data).filter((d) => d !== undefined)\r\n                : data.filter((d) => d !== undefined)\r\n              : null\r\n          }\r\n        />\r\n      ) : null}\r\n      {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n        <Timeline\r\n          play={play}\r\n          setPlay={setPlay}\r\n          uniqDatesSorted={uniqDatesSorted}\r\n          markObj={markObj}\r\n          index={index}\r\n          setIndex={setIndex}\r\n          color={timeline.color}\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={ensureCompleteDataForScatterPlot(data, dateFormat).filter((d) =>\r\n              timeline.enabled ? `${d.date}` === activeDate : d,\r\n            )}\r\n            width={svgWidth}\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                  ? typeof colors === 'string'\r\n                    ? [colors]\r\n                    : [colors[0]]\r\n                  : [Colors.primaryColors['blue-600']]\r\n                : typeof colors === 'string'\r\n                  ? [colors]\r\n                  : colors || Colors[theme].categoricalColors.colors\r\n            }\r\n            xAxisTitle={xAxisTitle}\r\n            yAxisTitle={yAxisTitle}\r\n            refXValues={refXValues}\r\n            refYValues={refYValues}\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            highlightAreaSettings={highlightAreaSettings}\r\n            showVoronoiTesselation={showVoronoiTesselation}\r\n            highlightedDataPoints={\r\n              data.filter((el) => el.label).length === 0 ? [] : highlightedDataPoints\r\n            }\r\n            showHighlightedDataPointsLabels={showHighlightedDataPointsLabels}\r\n            selectedColor={selectedColor}\r\n            maxRadiusValue={\r\n              checkIfNullOrUndefined(maxRadiusValue)\r\n                ? Math.max(\r\n                    ...data.map((d) => d.radius).filter((d) => d !== undefined && d !== null),\r\n                  )\r\n                : (maxRadiusValue as number)\r\n            }\r\n            maxXValue={\r\n              checkIfNullOrUndefined(maxXValue)\r\n                ? Math.max(...data.map((d) => d.x).filter((d) => d !== undefined && d !== null)) > 0\r\n                  ? Math.max(...data.map((d) => d.x).filter((d) => d !== undefined && d !== null))\r\n                  : 0\r\n                : (maxXValue as number)\r\n            }\r\n            minXValue={\r\n              checkIfNullOrUndefined(minXValue)\r\n                ? Math.min(...data.map((d) => d.x).filter((d) => d !== undefined && d !== null)) > 0\r\n                  ? 0\r\n                  : Math.min(...data.map((d) => d.x).filter((d) => d !== undefined && d !== null))\r\n                : (minXValue as number)\r\n            }\r\n            maxYValue={\r\n              checkIfNullOrUndefined(maxYValue)\r\n                ? Math.max(...data.map((d) => d.y).filter((d) => d !== undefined && d !== null)) > 0\r\n                  ? Math.max(...data.map((d) => d.y).filter((d) => d !== undefined && d !== null))\r\n                  : 0\r\n                : (maxYValue as number)\r\n            }\r\n            minYValue={\r\n              checkIfNullOrUndefined(minYValue)\r\n                ? Math.min(...data.map((d) => d.y).filter((d) => d !== undefined && d !== null)) > 0\r\n                  ? 0\r\n                  : Math.min(...data.map((d) => d.y).filter((d) => d !== undefined && d !== null))\r\n                : (minYValue as number)\r\n            }\r\n            onSeriesMouseClick={onSeriesMouseClick}\r\n            rtl={language === 'he' || language === 'ar'}\r\n            annotations={annotations}\r\n            customHighlightAreaSettings={customHighlightAreaSettings}\r\n            regressionLine={regressionLine}\r\n            resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n            detailsOnClick={detailsOnClick}\r\n            noOfXTicks={noOfXTicks}\r\n            noOfYTicks={noOfYTicks}\r\n            labelColor={labelColor}\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            useVoronoiInteraction={useVoronoiInteraction}\r\n            xNumberDisplayOptions={xNumberDisplayOptions}\r\n            yNumberDisplayOptions={yNumberDisplayOptions}\r\n            fallbackColor={fallbackColor}\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":"o6CA0FA,SAAgB,GAAM,EAAc,CAClC,GAAM,CACJ,OACA,QACA,SACA,cACA,SACA,cACA,SACA,aACA,cACA,aACA,eACA,aACA,gBACA,WACA,oBACA,cACA,cACA,yBACA,gBACA,wBACA,kBACA,aACA,YACA,aACA,YACA,qBACA,MACA,cACA,+BACA,iBACA,+BACA,iBACA,aACA,cACA,aACA,SACA,aACA,UACA,gBACA,mCACA,eACA,yBACA,yBACA,wBACA,wBACA,iBACE,EACE,IAAA,EAAA,EAAA,QAAgB,IAAI,EACpB,EAAW,GAAA,EAAU,GAAQ,CACjC,KAAM,EAAQ,KACd,OAAQ,EAAQ,MAClB,CAAC,EAEK,CAAC,EAAe,IAAA,EAA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