@fluentui/react-charts 9.0.3 → 9.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/CHANGELOG.md +18 -2
  2. package/dist/index.d.ts +4 -36
  3. package/lib/components/AreaChart/useAreaChartStyles.styles.js +0 -9
  4. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  5. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  6. package/lib/components/CommonComponents/ChartPopover.js +2 -2
  7. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  8. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +7 -123
  9. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  10. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +11 -22
  11. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  12. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +2 -6
  13. package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
  14. package/lib/components/GaugeChart/GaugeChart.js +1 -1
  15. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  16. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +13 -9
  17. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  18. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +0 -9
  19. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  20. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +0 -9
  21. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  22. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +2 -9
  23. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  24. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +0 -9
  25. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  26. package/lib/components/Legends/useLegendsStyles.styles.js +2 -3
  27. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
  28. package/lib/components/LineChart/useLineChartStyles.styles.js +1 -10
  29. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  30. package/lib/components/SankeyChart/SankeyChart.js +3 -2
  31. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  32. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  33. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +1 -10
  34. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  35. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +3 -11
  36. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  37. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +1 -1
  38. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  39. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +3 -11
  40. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  41. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +0 -9
  42. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  43. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  44. package/lib-commonjs/components/CommonComponents/ChartPopover.js +2 -2
  45. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
  46. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +8 -198
  47. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  48. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +12 -37
  49. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  50. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +3 -10
  51. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
  52. package/lib-commonjs/components/GaugeChart/GaugeChart.js +1 -1
  53. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  54. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +14 -8
  55. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  56. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +0 -9
  57. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  58. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +0 -9
  59. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  60. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +2 -16
  61. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  62. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +0 -9
  63. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  64. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +2 -2
  65. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
  66. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +1 -10
  67. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  68. package/lib-commonjs/components/SankeyChart/SankeyChart.js +3 -2
  69. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  70. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  71. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +1 -10
  72. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  73. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +4 -11
  74. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  75. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +1 -1
  76. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  77. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +4 -11
  78. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  79. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"sources":["VerticalStackedBarChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select } from 'd3-selection';\nimport { useVerticalStackedBarChartStyles } from './useVerticalStackedBarChartStyles.styles';\nimport {\n scaleLinear as d3ScaleLinear,\n ScaleLinear as D3ScaleLinear,\n scaleBand as d3ScaleBand,\n scaleUtc as d3ScaleUtc,\n scaleTime as d3ScaleTime,\n} from 'd3-scale';\nimport { useId } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport {\n AccessibilityProps,\n CartesianChart,\n ChildProps,\n VerticalStackedBarDataPoint,\n Margins,\n VerticalStackedBarChartProps,\n VerticalStackedChartProps,\n VSChartDataPoint,\n LineDataInVerticalStackedBarChart,\n ModifiedCartesianChartProps,\n Legend,\n ChartPopover,\n Legends,\n Chart,\n} from '../../index';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n getTypeOfAxis,\n tooltipOfXAxislabels,\n formatValueWithSIPrefix,\n getBarWidth,\n getScalePadding,\n isScalePaddingDefined,\n calculateAppropriateBarWidth,\n formatDate,\n areArraysEqual,\n calculateLongestLabelWidth,\n useRtl,\n DataVizPalette,\n getColorFromToken,\n} from '../../utilities/index';\n\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\ntype NumericScale = D3ScaleLinear<number, number>;\nconst barGapMultiplier = 0.2;\nconst barGapMin = 1;\nconst MIN_DOMAIN_MARGIN = 8;\n\ninterface RefArrayData {\n refElement?: SVGGElement | null;\n}\n\ntype LinePoint = LineDataInVerticalStackedBarChart & { index: number; xItem: VerticalStackedChartProps };\ntype LineObject = { [key: string]: LinePoint[] };\ntype LineLegends = {\n title: string;\n color: string;\n};\nenum CircleVisbility {\n show = 'visibility',\n hide = 'hidden',\n}\ntype CalloutAnchorPointData = {\n xAxisDataPoint: string;\n chartDataPoint: VSChartDataPoint;\n};\n\nexport const VerticalStackedBarChart: React.FunctionComponent<VerticalStackedBarChartProps> = props => {\n const _isRtl: boolean = useRtl();\n const _createLegendsForLine: (data: VerticalStackedChartProps[]) => LineLegends[] = (\n data: VerticalStackedChartProps[],\n ) => _getLineLegends(data);\n const _tooltipId: string = useId('VSBCTooltipId_');\n const _emptyChartId: string = useId('_VSBC_empty');\n let _points: VerticalStackedChartProps[] = [];\n let _dataset: VerticalStackedBarDataPoint[];\n let _xAxisLabels: string[] = [];\n let _bars: JSX.Element[];\n let _xAxisType: XAxisTypes =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data[0]!.xAxisPoint, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\n let _barWidth: number = 0;\n let _colors: string[];\n let _margins: Margins;\n let _lineObject: LineObject;\n let _yMax: number;\n let _calloutAnchorPoint: CalloutAnchorPointData | null;\n let _domainMargin: number = MIN_DOMAIN_MARGIN;\n let _xAxisInnerPadding: number = 0;\n let _xAxisOuterPadding: number = 0;\n const cartesianChartRef = React.useRef<Chart>(null);\n\n const [selectedLegends, setSelectedLegends] = React.useState(props.legendProps?.selectedLegends || []);\n const [activeLegend, setActiveLegend] = React.useState<string | undefined>(undefined);\n const [dataForHoverCard, setDataForHoverCard] = React.useState(0);\n const [color, setColor] = React.useState('');\n const [hoverXValue, setHoverXValue] = React.useState<string | number>('');\n const [YValueHover, setYValueHover] = React.useState<(LineDataInVerticalStackedBarChart | VSChartDataPoint)[]>([]);\n const [xCalloutValue, setXCalloutValue] = React.useState('');\n const [yCalloutValue, setYCalloutValue] = React.useState('');\n const [activeXAxisDataPoint, setActiveXAxisDataPoint] = React.useState<number | string | Date>('');\n const [calloutLegend, setCalloutLegend] = React.useState('');\n const [stackCalloutProps, setStackCalloutProps] = React.useState<VerticalStackedChartProps>();\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<VSChartDataPoint>();\n const [callOutAccessibilityData, setCallOutAccessibilityData] = React.useState<AccessibilityProps>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n const prevPropsRef = React.useRef<VerticalStackedBarChartProps | null>(null);\n React.useEffect(() => {\n if (prevPropsRef.current) {\n const prevProps = prevPropsRef.current;\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, props.legendProps?.selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n if (prevProps.height !== props.height || prevProps.width !== props.width || prevProps.data !== props.data) {\n _adjustProps();\n _dataset = _createDataSetLayer();\n }\n }\n prevPropsRef.current = props;\n }, [props]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n }),\n [],\n );\n\n function _getLegendData(data: VerticalStackedChartProps[], lineLegends: LineLegends[]): JSX.Element {\n if (props.hideLegend) {\n return <></>;\n }\n const defaultPalette: string[] = [\n getColorFromToken(DataVizPalette.color6),\n getColorFromToken(DataVizPalette.color1),\n getColorFromToken(DataVizPalette.color5),\n getColorFromToken(DataVizPalette.color7),\n getColorFromToken(DataVizPalette.color10),\n ];\n const actions: Legend[] = [];\n const { allowHoverOnLegend = true } = props;\n\n data.forEach((singleChartData: VerticalStackedChartProps) => {\n singleChartData.chartData.forEach((point: VSChartDataPoint) => {\n const color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n const checkSimilarLegends = actions.filter((leg: Legend) => leg.title === point.legend && leg.color === color);\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n\n const legend: Legend = {\n title: point.legend,\n color,\n hoverAction: allowHoverOnLegend\n ? () => {\n _handleChartMouseLeave();\n _onLegendHover(point.legend);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => _onLegendLeave() : undefined,\n };\n\n actions.push(legend);\n });\n });\n const legendsOfLine: Legend[] = [];\n if (lineLegends && lineLegends.length > 0) {\n lineLegends.forEach((point: LineLegends) => {\n const legend: Legend = {\n title: point.title,\n color: point.color,\n isLineLegendInBarChart: true,\n hoverAction: allowHoverOnLegend\n ? () => {\n _handleChartMouseLeave();\n _onLegendHover(point.title);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => _onLegendLeave() : undefined,\n };\n legendsOfLine.push(legend);\n });\n }\n const totalLegends: Legend[] = legendsOfLine.concat(actions);\n return (\n <Legends\n legends={totalLegends}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n onChange={_onLegendSelectionChange}\n />\n );\n }\n\n function _getHighlightedLegend() {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n }\n\n function _lineHoverOut() {\n setPopoverOpen(false);\n setXCalloutValue('');\n setYCalloutValue('');\n setActiveXAxisDataPoint('');\n setColor('');\n }\n\n function _lineHoverFocus(lineData: LinePoint) {\n setPopoverOpen(true);\n setXCalloutValue(`${lineData.xItem.xAxisPoint}`);\n setYCalloutValue(`${lineData.yAxisCalloutData || lineData.data || lineData.y}`);\n setActiveXAxisDataPoint(lineData.xItem.xAxisPoint);\n setColor(lineData.color);\n }\n\n function _onStackHoverFocus(\n stack: VerticalStackedChartProps,\n mouseEvent: React.MouseEvent<SVGElement> | SVGGElement,\n ): void {\n let clientX = 0;\n let clientY = 0;\n if ('clientX' in mouseEvent) {\n clientX = mouseEvent.clientX;\n clientY = mouseEvent.clientY;\n } else {\n // Handle case where mouseEvent is an SVGGElement\n const boundingRect = mouseEvent.getBoundingClientRect();\n clientX = boundingRect.left + boundingRect.width / 2;\n clientY = boundingRect.top + boundingRect.height / 2;\n }\n if (!_noLegendHighlighted()) {\n stack = {\n ...stack,\n chartData: stack.chartData.filter((dataPoint: { legend: any }) => _isLegendHighlighted(dataPoint.legend)),\n lineData: stack.lineData?.filter((dataPoint: { legend: any }) => _isLegendHighlighted(dataPoint.legend)),\n };\n }\n const lineData = stack.lineData;\n const isLinesPresent: boolean = lineData !== undefined && lineData.length > 0;\n if (isLinesPresent) {\n lineData!.forEach((item: LineDataInVerticalStackedBarChart & { shouldDrawBorderBottom?: boolean }) => {\n item.data = item.data || item.y;\n item.shouldDrawBorderBottom = true;\n });\n }\n _updatePosition(clientX, clientY);\n setPopoverOpen(stack.chartData.length > 0 || (stack.lineData?.length ?? 0) > 0);\n setYValueHover(\n isLinesPresent\n ? [...lineData!.sort((a, b) => (a.data! < b.data! ? 1 : -1)), ...stack.chartData.slice().reverse()]\n : stack.chartData.slice().reverse(),\n );\n setHoverXValue(stack.xAxisPoint instanceof Date ? formatDate(stack.xAxisPoint, props.useUTC) : stack.xAxisPoint);\n setStackCalloutProps(stack);\n setActiveXAxisDataPoint(stack.xAxisPoint);\n setCallOutAccessibilityData(stack.stackCallOutAccessibilityData);\n }\n\n function _handleChartMouseLeave(): void {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n setActiveXAxisDataPoint('');\n }\n\n const _onClick = (\n data: VerticalStackedChartProps | VSChartDataPoint,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void => {\n props.onBarClick?.(mouseEvent, data);\n props.href ? (window.location.href = props.href) : '';\n };\n\n function _adjustProps(): void {\n _points = props.data || [];\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n const defaultColors: string[] = [\n getColorFromToken(DataVizPalette.color6),\n getColorFromToken(DataVizPalette.color1),\n getColorFromToken(DataVizPalette.color5),\n getColorFromToken(DataVizPalette.color7),\n getColorFromToken(DataVizPalette.color10),\n ];\n _colors = defaultColors;\n _xAxisType = getTypeOfAxis(props.data[0].xAxisPoint, true) as XAxisTypes;\n _lineObject = _getFormattedLineData(props.data);\n _xAxisInnerPadding = getScalePadding(props.xAxisInnerPadding, props.xAxisPadding, 2 / 3);\n _xAxisOuterPadding = getScalePadding(props.xAxisOuterPadding, props.xAxisPadding, 0);\n }\n\n function _createDataSetLayer(): VerticalStackedBarDataPoint[] {\n const tempArr: string[] = [];\n const dataset: VerticalStackedBarDataPoint[] = _points.map(singlePointData => {\n let total: number = 0;\n singlePointData.chartData!.forEach((point: VSChartDataPoint) => {\n total = total + point.data;\n });\n tempArr.push(singlePointData.xAxisPoint as string);\n return {\n x: singlePointData.xAxisPoint,\n y: total,\n };\n });\n _xAxisLabels = tempArr;\n return dataset;\n }\n\n function _onLegendHover(legendTitle: string): void {\n setActiveLegend(legendTitle);\n }\n\n function _onLegendLeave(): void {\n setActiveLegend(undefined);\n }\n\n function _onLegendSelectionChange(\n _selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(_selectedLegends);\n } else {\n setSelectedLegends(_selectedLegends.slice(-1));\n }\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(_selectedLegends, event, currentLegend);\n }\n }\n\n function _getMargins(margins: Margins) {\n _margins = margins;\n }\n\n function _getGraphData(\n xScale: any,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) {\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);\n return (_bars = _createBar(xBarScale, yBarScale, containerHeight, xElement!));\n }\n\n function _getAxisData(yAxisData: IAxisData) {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n _yMax = Math.max(domainValue[domainValue.length - 1], props.yMaxValue || 0);\n }\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n function _isLegendHighlighted(legendTitle: string) {\n return _getHighlightedLegend().includes(legendTitle);\n }\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n function _noLegendHighlighted() {\n return _getHighlightedLegend().length === 0;\n }\n\n function _getAriaLabel(singleChartData: VerticalStackedChartProps, point?: VSChartDataPoint): string {\n if (!point) {\n /** if shouldFocusWholeStack is true */\n const xValue =\n singleChartData.xAxisCalloutData ||\n (singleChartData.xAxisPoint instanceof Date\n ? formatDate(singleChartData.xAxisPoint)\n : singleChartData.xAxisPoint);\n const pointValues = singleChartData.chartData\n .map(pt => {\n const legend = pt.legend;\n const yValue = pt.yAxisCalloutData || pt.data;\n return `${legend}, ${yValue}.`;\n })\n .join(' ');\n const lineValues = singleChartData.lineData\n ?.map(ln => {\n const legend = ln.legend;\n const yValue = ln.yAxisCalloutData || ln.data || ln.y;\n return `${legend}, ${yValue}.`;\n })\n .join(' ');\n return (\n singleChartData.stackCallOutAccessibilityData?.ariaLabel ||\n `${xValue}. ${pointValues}` + (lineValues ? ` ${lineValues}` : '')\n );\n }\n /** if shouldFocusWholeStack is false */\n const xValue =\n singleChartData.xAxisCalloutData ||\n point.xAxisCalloutData ||\n (singleChartData.xAxisPoint instanceof Date\n ? formatDate(singleChartData.xAxisPoint)\n : singleChartData.xAxisPoint);\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.data;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n }\n\n function _getCustomizedCallout() {\n const _isHavingLines = props.data.some(\n (item: VerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n return props.onRenderCalloutPerStack\n ? props.onRenderCalloutPerStack(stackCalloutProps)\n : props.onRenderCalloutPerDataPoint && !_isHavingLines\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps, _renderCallout)\n : null;\n }\n\n function _toFocusWholeStack(_isHavingLines: boolean): boolean {\n const { isCalloutForStack = false } = props;\n let shouldFocusStackOnly: boolean = false;\n if (_isHavingLines) {\n if (_getHighlightedLegend().length === 1) {\n shouldFocusStackOnly = false;\n } else {\n shouldFocusStackOnly = true;\n }\n } else {\n shouldFocusStackOnly = isCalloutForStack;\n }\n return shouldFocusStackOnly;\n }\n\n function _getFormattedLineData(data: VerticalStackedChartProps[]): LineObject {\n const linesData: LinePoint[] = [];\n const formattedLineData: LineObject = {};\n data.forEach((item: VerticalStackedChartProps, index: number) => {\n if (item.lineData) {\n item.lineData.forEach((line: any) => {\n linesData.push({\n ...line,\n index,\n xItem: item,\n });\n });\n }\n });\n linesData.forEach(item => {\n if (formattedLineData[item.legend]) {\n formattedLineData[item.legend].push(item);\n } else {\n formattedLineData[item.legend] = [item];\n }\n });\n return formattedLineData;\n }\n\n function _getLineLegends(data: VerticalStackedChartProps[]): LineLegends[] {\n const lineObject: LineObject = _lineObject;\n const lineLegends: LineLegends[] = [];\n Object.keys(lineObject).forEach((item: string) => {\n lineLegends.push({\n title: item,\n color: lineObject[item][0].color,\n });\n });\n return lineLegends;\n }\n\n function _createLines(\n xScale: any,\n yScale: NumericScale,\n containerHeight: number,\n containerWidth: number,\n secondaryYScale?: NumericScale,\n ): JSX.Element {\n const lineObject: LineObject = _getFormattedLineData(props.data);\n const lines: React.ReactNode[] = [];\n const borderForLines: React.ReactNode[] = [];\n const dots: React.ReactNode[] = [];\n //const { theme } = props;\n const lineBorderWidth = props.lineOptions?.lineBorderWidth\n ? Number.parseFloat(props.lineOptions!.lineBorderWidth!.toString())\n : 0;\n const xScaleBandwidthTranslate = _xAxisType !== XAxisTypes.StringAxis ? 0 : xScale.bandwidth() / 2;\n Object.keys(lineObject).forEach((item: string, index: number) => {\n const shouldHighlight = _isLegendHighlighted(item) || _noLegendHighlighted();\n for (let i = 1; i < lineObject[item].length; i++) {\n const x1 = xScale(lineObject[item][i - 1].xItem.xAxisPoint);\n const useSecondaryYScale =\n lineObject[item][i - 1].useSecondaryYScale && lineObject[item][i].useSecondaryYScale && secondaryYScale;\n const y1 = useSecondaryYScale ? secondaryYScale!(lineObject[item][i - 1].y) : yScale(lineObject[item][i - 1].y);\n const x2 = xScale(lineObject[item][i].xItem.xAxisPoint);\n const y2 = useSecondaryYScale ? secondaryYScale!(lineObject[item][i].y) : yScale(lineObject[item][i].y);\n if (lineBorderWidth > 0) {\n borderForLines.push(\n <line\n key={`${index}-${i}-BorderLine`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={3 + lineBorderWidth * 2}\n fill=\"transparent\"\n strokeLinecap=\"round\"\n stroke={tokens.colorNeutralBackground1}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />,\n );\n }\n lines.push(\n <line\n key={`${index}-${i}-line`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={lineObject[item][0].lineOptions?.strokeWidth ?? 3}\n strokeLinecap={lineObject[item][0].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={lineObject[item][0].lineOptions?.strokeDasharray}\n stroke={lineObject[item][i].color}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n {...(_isLegendHighlighted(item) && {\n onMouseOver: _lineHover.bind(lineObject[item][i - 1]),\n onMouseLeave: _lineHoverOut,\n })}\n />,\n );\n }\n });\n Object.keys(lineObject).forEach((item: string, index: number) => {\n lineObject[item].forEach((circlePoint: LinePoint, subIndex: number) => {\n const circleRef: { refElement: SVGCircleElement | null } = { refElement: null };\n dots.push(\n <circle\n key={`${index}-${subIndex}-dot`}\n cx={xScale(circlePoint.xItem.xAxisPoint)}\n cy={\n circlePoint.useSecondaryYScale && secondaryYScale ? secondaryYScale(circlePoint.y) : yScale(circlePoint.y)\n }\n onMouseOver={\n _isLegendHighlighted(item)\n ? (event: React.MouseEvent<SVGElement, MouseEvent>) => _lineHover(circlePoint, event)\n : (event: React.MouseEvent<SVGElement, MouseEvent>) => _onStackHover(circlePoint.xItem, event)\n }\n {...(_isLegendHighlighted(item) && {\n onMouseLeave: _lineHoverOut,\n })}\n r={_getCircleVisibilityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).radius}\n stroke={circlePoint.color}\n fill={tokens.colorNeutralBackground1}\n strokeWidth={3}\n visibility={_getCircleVisibilityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).visibility}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n data-is-focusable={_isLegendHighlighted(item)}\n ref={e => (circleRef.refElement = e)}\n onFocus={_lineFocus.bind(circlePoint, circleRef)}\n onBlur={_lineHoverOut}\n tabIndex={circlePoint.legend !== '' ? 0 : undefined}\n />,\n );\n });\n });\n return (\n <>\n {borderForLines}\n {lines}\n {dots}\n </>\n );\n }\n\n function _getCircleVisibilityAndRadius(\n xAxisPoint: string | number | Date,\n legend: string,\n ): { visibility: CircleVisbility; radius: number } {\n if (!_noLegendHighlighted()) {\n if (xAxisPoint === activeXAxisDataPoint && _isLegendHighlighted(legend)) {\n return { visibility: CircleVisbility.show, radius: 8 };\n } else if (_isLegendHighlighted(legend)) {\n return { visibility: CircleVisbility.show, radius: 0.3 };\n } else {\n return { visibility: CircleVisbility.hide, radius: 0 };\n }\n } else {\n return {\n visibility: activeXAxisDataPoint === xAxisPoint ? CircleVisbility.show : CircleVisbility.hide,\n radius: 8,\n };\n }\n }\n\n function _renderCallout(props?: VSChartDataPoint): JSX.Element | null {\n return props ? (\n <ChartPopover\n culture={props.culture ?? 'en-us'}\n XValue={props.xAxisCalloutData}\n xCalloutValue={xCalloutValue}\n yCalloutValue={yCalloutValue}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n legend={props.legend}\n YValue={props.yAxisCalloutData}\n color={props.color}\n />\n ) : null;\n }\n\n function _onRectHover(\n xAxisPoint: string | number | Date,\n point: VSChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n _onRectFocusHover(xAxisPoint, point, color, mouseEvent);\n }\n\n function _onRectFocusHover(\n xAxisPoint: string | number | Date,\n point: VSChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement> | SVGGElement,\n ) {\n let clientX = 0;\n let clientY = 0;\n if ('clientX' in mouseEvent) {\n clientX = mouseEvent.clientX;\n clientY = mouseEvent.clientY;\n } else {\n // Handle case where mouseEvent is an SVGGElement\n const boundingRect = mouseEvent.getBoundingClientRect();\n clientX = boundingRect.left + boundingRect.width / 2;\n clientY = boundingRect.top + boundingRect.height / 2;\n }\n if (_calloutAnchorPoint?.chartDataPoint !== point || _calloutAnchorPoint?.xAxisDataPoint !== xAxisPoint) {\n _calloutAnchorPoint = {\n chartDataPoint: point,\n xAxisDataPoint: `${xAxisPoint}`,\n };\n _updatePosition(clientX, clientY);\n setPopoverOpen(_noLegendHighlighted() || _isLegendHighlighted(point.legend));\n setCalloutLegend(point.legend);\n setDataForHoverCard(point.data);\n setColor(color);\n setXCalloutValue(point.xAxisCalloutData ? point.xAxisCalloutData : `${xAxisPoint}`);\n setYCalloutValue(point.yAxisCalloutData!);\n setDataPointCalloutProps(point);\n setCallOutAccessibilityData(point.callOutAccessibilityData);\n }\n }\n\n function _lineHover(lineData: LinePoint, mouseEvent: React.MouseEvent<SVGElement>) {\n mouseEvent.persist();\n _lineHoverFocus(lineData);\n }\n\n function _lineFocus(lineData: LinePoint, ref: { refElement: SVGCircleElement | null }) {\n if (ref.refElement) {\n _lineHoverFocus(lineData);\n }\n }\n\n function _onStackHover(stack: VerticalStackedChartProps, mouseEvent: React.MouseEvent<SVGElement>): void {\n mouseEvent.persist();\n _onStackHoverFocus(stack, mouseEvent);\n }\n\n function _onRectFocus(point: VSChartDataPoint, xAxisPoint: string, color: string, ref: RefArrayData): void {\n if (ref.refElement) {\n _onRectFocusHover(xAxisPoint, point, color, ref.refElement);\n }\n }\n\n function _onStackFocus(stack: VerticalStackedChartProps, groupRef: RefArrayData): void {\n if (groupRef.refElement) {\n _onStackHoverFocus(stack, groupRef.refElement);\n }\n }\n\n function _handleMouseOut(): void {\n setPopoverOpen(false);\n }\n\n function _getBarGapAndScale(\n bars: VSChartDataPoint[],\n yBarScale: NumericScale,\n defaultTotalHeight?: number,\n ): {\n readonly gapHeight: number;\n readonly heightValueScale: number;\n readonly adjustedTotalHeight: number;\n } {\n const { barGapMax = 0 } = props;\n // When displaying gaps between the bars, the height of each bar is\n // adjusted so that the total of all bars is not changed by the gaps\n const totalData = bars.reduce((iter, value) => iter + Math.abs(value.data), 0);\n const totalHeight = defaultTotalHeight ?? yBarScale(totalData);\n let sumOfPercent = 0;\n bars.forEach(point => {\n let value = (Math.abs(point.data) / totalData) * 100;\n if (value < 1 && value !== 0) {\n value = 1;\n }\n sumOfPercent += value;\n });\n const scalingRatio = sumOfPercent !== 0 ? sumOfPercent / 100 : 1;\n const gaps = barGapMax && bars.length - 1;\n const gapHeight = gaps && Math.max(barGapMin, Math.min(barGapMax, (totalHeight * barGapMultiplier) / gaps));\n const heightValueScale = (totalHeight - gapHeight * gaps) / (totalData * scalingRatio);\n return {\n gapHeight,\n heightValueScale,\n adjustedTotalHeight: sumOfPercent,\n } as const;\n }\n\n function _getScales(containerHeight: number, containerWidth: number) {\n const yMax = _yMax;\n const yBarScale = d3ScaleLinear()\n .domain([0, yMax])\n .range([0, containerHeight - _margins.bottom! - _margins.top!]);\n if (_xAxisType === XAxisTypes.NumericAxis) {\n const xMax = d3Max(_dataset, (point: VerticalStackedBarDataPoint) => point.x as number)!;\n const xMin = d3Min(_dataset, (point: VerticalStackedBarDataPoint) => point.x as number)!;\n\n const xBarScale = d3ScaleLinear()\n .domain(_isRtl ? [xMax, xMin] : [xMin, xMax])\n .nice()\n .range([_margins.left! + _domainMargin, containerWidth - _margins.right! - _domainMargin]);\n\n return { xBarScale, yBarScale };\n }\n if (_xAxisType === XAxisTypes.DateAxis) {\n const sDate = d3Min(_dataset, (point: VerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const lDate = d3Max(_dataset, (point: VerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const xBarScale = props.useUTC ? d3ScaleUtc() : d3ScaleTime();\n xBarScale\n .domain(_isRtl ? [lDate, sDate] : [sDate, lDate])\n .range([_margins.left! + _domainMargin, containerWidth - _margins.right! - _domainMargin]);\n\n return { xBarScale, yBarScale };\n }\n const xBarScale = d3ScaleBand()\n .domain(_xAxisLabels)\n .range(\n _isRtl\n ? [containerWidth - _margins.right! - _domainMargin, _margins.left! + _domainMargin]\n : [_margins.left! + _domainMargin, containerWidth - _margins.right! - _domainMargin],\n )\n .paddingInner(_xAxisInnerPadding)\n .paddingOuter(_xAxisOuterPadding);\n\n return { xBarScale, yBarScale };\n }\n\n const _isChartEmpty = (): boolean => {\n return !(\n props.data &&\n props.data.length > 0 &&\n props.data.some(item => item.chartData.length > 0 || (item.lineData && item.lineData.length > 0))\n );\n };\n\n function _updatePosition(newX: number, newY: number) {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n // Calculate the distance moved\n const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));\n // Update the position only if the distance moved is greater than the threshold\n if (distance > threshold) {\n setClickPosition({ x: newX, y: newY });\n setPopoverOpen(true);\n }\n }\n\n function _getDomainMargins(containerWidth: number): Margins {\n _domainMargin = MIN_DOMAIN_MARGIN;\n\n /** Total width available to render the bars */\n const totalWidth = containerWidth - (_margins.left! + MIN_DOMAIN_MARGIN) - (_margins.right! + MIN_DOMAIN_MARGIN);\n /** Rate at which the space between the bars changes wrt the bar width */\n const barGapRate = _xAxisInnerPadding / (1 - _xAxisInnerPadding);\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(props.xAxisOuterPadding, props.xAxisPadding)) {\n // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available\n // to adjust the space before the first bar and after the last bar.\n _domainMargin = 0;\n } else if (props.barWidth !== 'auto') {\n // Update the bar width so that when CartesianChart rerenders,\n // the following calculations don't use the previous bar width.\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n /** Total width required to render the bars. Directly proportional to bar width */\n const reqWidth = (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate) * _barWidth;\n\n if (totalWidth >= reqWidth) {\n // Center align the chart by setting equal left and right margins for domain\n _domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;\n }\n } else if (props.mode === 'plotly' && _xAxisLabels.length > 1) {\n // Calculate the remaining width after rendering bars at their maximum allowable width\n const bandwidth = totalWidth / (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate);\n const barWidth = getBarWidth(props.barWidth, props.maxBarWidth, bandwidth);\n let reqWidth = (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate) * barWidth;\n const margin1 = (totalWidth - reqWidth) / 2;\n\n // Calculate the remaining width after accounting for the space required to render x-axis labels\n const step = calculateLongestLabelWidth(_xAxisLabels) + 20;\n reqWidth = (_xAxisLabels.length - _xAxisInnerPadding) * step;\n const margin2 = (totalWidth - reqWidth) / 2;\n\n _domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));\n }\n } else {\n const data = (props.data?.map(point => point.xAxisPoint) as number[] | Date[] | undefined) || [];\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, calculateAppropriateBarWidth(data, totalWidth));\n _domainMargin = MIN_DOMAIN_MARGIN + _barWidth / 2;\n }\n\n return {\n ..._margins,\n left: _margins.left! + _domainMargin,\n right: _margins.right! + _domainMargin,\n };\n }\n\n function _getChartTitle(): string {\n const { chartTitle, data } = props;\n const numLines = Object.keys(_lineObject).length;\n return (\n (chartTitle ? `${chartTitle}. ` : '') +\n `Vertical bar chart with ${data?.length || 0} stacked bars` +\n (numLines > 0 ? ` and ${numLines} lines` : '') +\n '. '\n );\n }\n\n const classes = useVerticalStackedBarChartStyles(props);\n function _createBar(\n xBarScale: any,\n yBarScale: NumericScale,\n containerHeight: number,\n xElement: SVGElement,\n ): JSX.Element[] {\n const { barCornerRadius = 0, barMinimumHeight = 0 } = props;\n const _isHavingLines = props.data.some(\n (item: VerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = _toFocusWholeStack(_isHavingLines);\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, xBarScale.bandwidth());\n }\n\n const bars = _points.map((singleChartData: VerticalStackedChartProps, indexNumber: number) => {\n let yPoint = containerHeight - _margins.bottom!;\n const xPoint = xBarScale(\n _xAxisType === XAxisTypes.NumericAxis\n ? (singleChartData.xAxisPoint as number)\n : _xAxisType === XAxisTypes.DateAxis\n ? (singleChartData.xAxisPoint as Date)\n : (singleChartData.xAxisPoint as string),\n );\n const xScaleBandwidthTranslate =\n _xAxisType !== XAxisTypes.StringAxis ? -_barWidth / 2 : (xBarScale.bandwidth() - _barWidth) / 2;\n\n let barTotalValue = 0;\n\n const barsToDisplay = singleChartData.chartData.filter(point => point.data > 0);\n\n if (!barsToDisplay.length) {\n return undefined;\n }\n\n const { gapHeight, heightValueScale, adjustedTotalHeight } = _getBarGapAndScale(barsToDisplay, yBarScale);\n\n if (heightValueScale < 0) {\n return undefined;\n }\n\n const singleBar = barsToDisplay.map((point: VSChartDataPoint, index: number) => {\n const startColor = point.color ? point.color : _colors[index];\n const ref: RefArrayData = {};\n const shouldHighlight = _isLegendHighlighted(point.legend) || _noLegendHighlighted() ? true : false;\n const rectFocusProps = !shouldFocusWholeStack && {\n 'data-is-focusable': !props.hideTooltip && shouldHighlight,\n 'aria-label': _getAriaLabel(singleChartData, point),\n onMouseOver: (event: React.MouseEvent<SVGElement, MouseEvent>) =>\n _onRectHover(singleChartData.xAxisPoint, point, startColor, event),\n onMouseMove: (event: React.MouseEvent<SVGElement, MouseEvent>) =>\n _onRectHover(singleChartData.xAxisPoint, point, startColor, event),\n onMouseLeave: _handleMouseOut,\n onFocus: () => _onRectFocus(point, singleChartData.xAxisPoint as string, startColor, ref),\n onBlur: _handleMouseOut,\n onClick: (event: React.MouseEvent<SVGElement, MouseEvent>) => _onClick(point, event),\n role: 'img',\n };\n\n let barHeight = heightValueScale * point.data;\n if (barHeight < Math.max((heightValueScale * adjustedTotalHeight) / 100.0, barMinimumHeight)) {\n barHeight = Math.max((heightValueScale * adjustedTotalHeight) / 100.0, barMinimumHeight);\n }\n yPoint = yPoint - barHeight - (index ? gapHeight : 0);\n barTotalValue += point.data;\n\n if (barCornerRadius && barHeight > barCornerRadius && index === barsToDisplay.length - 1) {\n return (\n <React.Fragment key={index + indexNumber + `${shouldFocusWholeStack}`}>\n <path\n className={classes.opacityChangeOnHover}\n d={`\n M ${xPoint} ${yPoint + barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${-barCornerRadius}\n h ${_barWidth - 2 * barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${barCornerRadius}\n v ${barHeight - barCornerRadius}\n h ${-_barWidth}\n z\n `}\n fill={startColor}\n rx={props.roundCorners ? 3 : 0}\n ref={e => (ref.refElement = e)}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n cursor={props.href ? 'pointer' : 'default'}\n {...rectFocusProps}\n />\n </React.Fragment>\n );\n }\n if (barHeight < 0) {\n return <React.Fragment key={index + indexNumber}> </React.Fragment>;\n }\n return (\n <React.Fragment key={index + indexNumber}>\n <rect\n className={classes.opacityChangeOnHover}\n x={xPoint}\n y={yPoint}\n width={_barWidth}\n height={barHeight}\n fill={startColor}\n opacity={shouldHighlight ? 1 : 0.1}\n cursor={props.href ? 'pointer' : 'default'}\n rx={props.roundCorners ? 3 : 0}\n ref={e => (ref.refElement = e)}\n {...rectFocusProps}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />\n </React.Fragment>\n );\n });\n const groupRef: RefArrayData = {};\n const stackFocusProps = shouldFocusWholeStack && {\n 'data-is-focusable': !props.hideTooltip,\n 'aria-label': _getAriaLabel(singleChartData),\n onMouseOver: (event: any) => _onStackHover(singleChartData, event),\n onMouseMove: (event: any) => _onStackHover(singleChartData, event),\n onMouseLeave: _handleMouseOut,\n onFocus: () => _onStackFocus(singleChartData, groupRef),\n onBlur: _handleMouseOut,\n onClick: (event: any) => _onClick(singleChartData, event),\n role: 'img',\n };\n let showLabel = false;\n let barLabel = 0;\n if (!props.hideLabels) {\n if (_noLegendHighlighted()) {\n showLabel = true;\n barLabel = barTotalValue;\n } else {\n barsToDisplay.forEach(point => {\n if (_isLegendHighlighted(point.legend)) {\n showLabel = true;\n barLabel += point.data;\n }\n });\n }\n }\n return (\n <g key={indexNumber + `${shouldFocusWholeStack}`}>\n <g\n id={`${indexNumber}-singleBar`}\n ref={e => (groupRef.refElement = e)}\n {...stackFocusProps}\n tabIndex={!props.hideTooltip ? 0 : undefined}\n >\n {singleBar}\n </g>\n {!props.hideLabels && _barWidth >= 16 && showLabel && (\n <text\n x={xPoint + _barWidth / 2}\n y={yPoint - 6}\n textAnchor=\"middle\"\n className={classes.barLabel}\n aria-label={`Total: ${barLabel}`}\n role=\"img\"\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n >\n {formatValueWithSIPrefix(barLabel)}\n </text>\n )}\n </g>\n );\n });\n if (!props.showXAxisLablesTooltip) {\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return bars.filter((bar): bar is JSX.Element => !!bar);\n }\n\n if (!_isChartEmpty()) {\n _adjustProps();\n const _isHavingLines = props.data.some(\n (item: VerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = _toFocusWholeStack(_isHavingLines);\n _dataset = _createDataSetLayer();\n const legendBars: JSX.Element = _getLegendData(_points, _createLegendsForLine(props.data));\n const calloutProps: ModifiedCartesianChartProps['calloutProps'] = {\n color: color,\n legend: calloutLegend,\n XValue: xCalloutValue!,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n YValueHover: YValueHover,\n hoverXValue: hoverXValue,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData),\n clickPosition: clickPosition,\n isPopoverOpen: isPopoverOpen,\n isCalloutForStack: props.isCalloutForStack || (_isHavingLines && _noLegendHighlighted()),\n isCartesian: true,\n customCallout: {\n customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n };\n const tickParams = {\n tickValues: props.tickValues,\n tickFormat: props.tickFormat,\n };\n return (\n <CartesianChart\n {...props}\n chartTitle={_getChartTitle()}\n points={_dataset}\n chartType={ChartTypes.VerticalStackedBarChart}\n xAxisType={_xAxisType}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n datasetForXAxisDomain={_xAxisLabels}\n isCalloutForStack={shouldFocusWholeStack}\n barwidth={_barWidth}\n getmargins={_getMargins}\n getGraphData={_getGraphData}\n getAxisData={_getAxisData}\n onChartMouseLeave={_handleChartMouseLeave}\n getDomainMargins={_getDomainMargins}\n {...(_xAxisType === XAxisTypes.StringAxis && {\n xAxisInnerPadding: _xAxisInnerPadding,\n xAxisOuterPadding: _xAxisOuterPadding,\n })}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n children={(props: ChildProps) => {\n return (\n <>\n <g>{_bars}</g>\n <g>\n {_isHavingLines &&\n _createLines(\n props.xScale!,\n props.yScale!,\n props.containerHeight!,\n props.containerWidth!,\n props.yScaleSecondary,\n )}\n </g>\n </>\n );\n }}\n />\n );\n }\n return <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />;\n};\nVerticalStackedBarChart.displayName = 'VerticalStackedBarChart';\n"],"names":["React","max","d3Max","min","d3Min","select","d3Select","useVerticalStackedBarChartStyles","scaleLinear","d3ScaleLinear","scaleBand","d3ScaleBand","scaleUtc","d3ScaleUtc","scaleTime","d3ScaleTime","useId","tokens","CartesianChart","ChartPopover","Legends","ChartTypes","getAccessibleDataObject","XAxisTypes","getTypeOfAxis","tooltipOfXAxislabels","formatValueWithSIPrefix","getBarWidth","getScalePadding","isScalePaddingDefined","calculateAppropriateBarWidth","formatDate","areArraysEqual","calculateLongestLabelWidth","useRtl","DataVizPalette","getColorFromToken","barGapMultiplier","barGapMin","MIN_DOMAIN_MARGIN","CircleVisbility","VerticalStackedBarChart","props","_isRtl","_createLegendsForLine","data","_getLineLegends","_tooltipId","_emptyChartId","_points","_dataset","_xAxisLabels","_bars","_xAxisType","length","xAxisPoint","StringAxis","_barWidth","_colors","_margins","_lineObject","_yMax","_calloutAnchorPoint","_domainMargin","_xAxisInnerPadding","_xAxisOuterPadding","cartesianChartRef","useRef","selectedLegends","setSelectedLegends","useState","legendProps","activeLegend","setActiveLegend","undefined","dataForHoverCard","setDataForHoverCard","color","setColor","hoverXValue","setHoverXValue","YValueHover","setYValueHover","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","activeXAxisDataPoint","setActiveXAxisDataPoint","calloutLegend","setCalloutLegend","stackCalloutProps","setStackCalloutProps","dataPointCalloutProps","setDataPointCalloutProps","callOutAccessibilityData","setCallOutAccessibilityData","clickPosition","setClickPosition","x","y","isPopoverOpen","setPopoverOpen","prevPropsRef","useEffect","current","prevProps","height","width","_adjustProps","_createDataSetLayer","useImperativeHandle","componentRef","chartContainer","_getLegendData","lineLegends","hideLegend","defaultPalette","color6","color1","color5","color7","color10","actions","allowHoverOnLegend","forEach","singleChartData","chartData","point","Math","floor","random","checkSimilarLegends","filter","leg","title","legend","hoverAction","_handleChartMouseLeave","_onLegendHover","onMouseOutAction","_onLegendLeave","push","legendsOfLine","isLineLegendInBarChart","totalLegends","concat","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onChange","_onLegendSelectionChange","_getHighlightedLegend","_lineHoverOut","_lineHoverFocus","lineData","xItem","yAxisCalloutData","_onStackHoverFocus","stack","mouseEvent","clientX","clientY","boundingRect","getBoundingClientRect","left","top","_noLegendHighlighted","dataPoint","_isLegendHighlighted","isLinesPresent","item","shouldDrawBorderBottom","_updatePosition","sort","a","b","slice","reverse","Date","useUTC","stackCallOutAccessibilityData","_onClick","onBarClick","href","window","location","barWidth","maxBarWidth","defaultColors","_getFormattedLineData","xAxisInnerPadding","xAxisPadding","xAxisOuterPadding","tempArr","dataset","map","singlePointData","total","legendTitle","_selectedLegends","event","currentLegend","canSelectMultipleLegends","_getMargins","margins","_getGraphData","xScale","yScale","containerHeight","containerWidth","xElement","xBarScale","yBarScale","_getScales","_createBar","_getAxisData","yAxisData","yAxisDomainValues","domainValue","yMaxValue","includes","_getAriaLabel","xValue","xAxisCalloutData","pointValues","pt","yValue","join","lineValues","ln","ariaLabel","_getCustomizedCallout","_isHavingLines","some","onRenderCalloutPerStack","onRenderCalloutPerDataPoint","_renderCallout","_toFocusWholeStack","isCalloutForStack","shouldFocusStackOnly","linesData","formattedLineData","index","line","lineObject","Object","keys","_createLines","secondaryYScale","lines","borderForLines","dots","lineBorderWidth","lineOptions","Number","parseFloat","toString","xScaleBandwidthTranslate","bandwidth","shouldHighlight","i","x1","useSecondaryYScale","y1","x2","y2","key","opacity","strokeWidth","fill","strokeLinecap","stroke","colorNeutralBackground1","transform","strokeDasharray","onMouseOver","_lineHover","bind","onMouseLeave","circlePoint","subIndex","circleRef","refElement","circle","cx","cy","_onStackHover","r","_getCircleVisibilityAndRadius","radius","visibility","data-is-focusable","ref","e","onFocus","_lineFocus","onBlur","tabIndex","culture","XValue","YValue","_onRectHover","persist","_onRectFocusHover","chartDataPoint","xAxisDataPoint","_onRectFocus","_onStackFocus","groupRef","_handleMouseOut","_getBarGapAndScale","bars","defaultTotalHeight","barGapMax","totalData","reduce","iter","value","abs","totalHeight","sumOfPercent","scalingRatio","gaps","gapHeight","heightValueScale","adjustedTotalHeight","yMax","domain","range","bottom","NumericAxis","xMax","xMin","nice","right","DateAxis","sDate","lDate","paddingInner","paddingOuter","_isChartEmpty","newX","newY","threshold","distance","sqrt","pow","_getDomainMargins","totalWidth","barGapRate","reqWidth","mode","margin1","step","margin2","_getChartTitle","chartTitle","numLines","classes","barCornerRadius","barMinimumHeight","shouldFocusWholeStack","indexNumber","yPoint","xPoint","barTotalValue","barsToDisplay","singleBar","startColor","rectFocusProps","hideTooltip","onMouseMove","onClick","role","barHeight","Fragment","path","className","opacityChangeOnHover","d","rx","roundCorners","cursor","rect","stackFocusProps","showLabel","barLabel","hideLabels","g","id","text","textAnchor","aria-label","showXAxisLablesTooltip","document","getElementById","remove","wrapXAxisLables","xAxisElement","call","tooltipProps","tooltipCls","tooltip","xAxis","bar","legendBars","calloutProps","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","tickValues","tickFormat","points","chartType","xAxisType","datasetForXAxisDomain","barwidth","getmargins","getGraphData","getAxisData","onChartMouseLeave","getDomainMargins","children","yScaleSecondary","div","style","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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EiP,aAAa;YACbC,eAAe;gBACbC,mBAAmBlL,4BAA4B,OAAOA,0BAA2BhK;gBACjFmV,oBAAoBnX,MAAMoX,wBAAwB,GAC9CpX,MAAMoX,wBAAwB,CAACjU,yBAC/BnB;YACN;QACF;QACA,MAAMqV,aAAa;YACjBC,YAAYtX,MAAMsX,UAAU;YAC5BC,YAAYvX,MAAMuX,UAAU;QAC9B;QACA,qBACE,oBAAC/Y;YACE,GAAGwB,KAAK;YACT6T,YAAYD;YACZ4D,QAAQhX;YACRiX,WAAW9Y,WAAWoB,uBAAuB;YAC7C2X,WAAW/W;YACXoW,cAAcA;YACdM,YAAYA;YACZP,YAAYA;YACZa,uBAAuBlX;YACvB8L,mBAAmB2H;YACnB0D,UAAU7W;YACV8W,YAAYzN;YACZ0N,cAAcxN;YACdyN,aAAa/M;YACbgN,mBAAmBhS;YACnBiS,kBAAkB7E;YACjB,GAAIzS,eAAe9B,WAAWiC,UAAU,IAAI;gBAC3CyI,mBAAmBjI;gBACnBmI,mBAAmBlI;YACrB,CAAC;YACD+C,cAAc9C;YACd,oCAAoC,GACpC0W,UAAU,CAAClY;gBACT,qBACE,wDACE,oBAAC6V,WAAGnV,sBACJ,oBAACmV,WACE5J,kBACCe,aACEhN,MAAMuK,MAAM,EACZvK,MAAMwK,MAAM,EACZxK,MAAMyK,eAAe,EACrBzK,MAAM0K,cAAc,EACpB1K,MAAMmY,eAAe;YAKjC;;IAGN;IACA,qBAAO,oBAACC;QAAItC,IAAIxV;QAAewU,MAAM;QAASuD,OAAO;YAAEjK,SAAS;QAAI;QAAG6H,cAAY;;AACrF,EAAE;AACFlW,wBAAwBuY,WAAW,GAAG"}
1
+ {"version":3,"sources":["VerticalStackedBarChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select } from 'd3-selection';\nimport { useVerticalStackedBarChartStyles } from './useVerticalStackedBarChartStyles.styles';\nimport {\n scaleLinear as d3ScaleLinear,\n ScaleLinear as D3ScaleLinear,\n scaleBand as d3ScaleBand,\n scaleUtc as d3ScaleUtc,\n scaleTime as d3ScaleTime,\n} from 'd3-scale';\nimport { useId } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport {\n AccessibilityProps,\n CartesianChart,\n ChildProps,\n VerticalStackedBarDataPoint,\n Margins,\n VerticalStackedBarChartProps,\n VerticalStackedChartProps,\n VSChartDataPoint,\n LineDataInVerticalStackedBarChart,\n ModifiedCartesianChartProps,\n Legend,\n ChartPopover,\n Legends,\n Chart,\n} from '../../index';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n getTypeOfAxis,\n tooltipOfXAxislabels,\n formatValueWithSIPrefix,\n getBarWidth,\n getScalePadding,\n isScalePaddingDefined,\n calculateAppropriateBarWidth,\n formatDate,\n areArraysEqual,\n calculateLongestLabelWidth,\n useRtl,\n DataVizPalette,\n getColorFromToken,\n} from '../../utilities/index';\n\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\ntype NumericScale = D3ScaleLinear<number, number>;\nconst barGapMultiplier = 0.2;\nconst barGapMin = 1;\nconst MIN_DOMAIN_MARGIN = 8;\n\ninterface RefArrayData {\n refElement?: SVGGElement | null;\n}\n\ntype LinePoint = LineDataInVerticalStackedBarChart & { index: number; xItem: VerticalStackedChartProps };\ntype LineObject = { [key: string]: LinePoint[] };\ntype LineLegends = {\n title: string;\n color: string;\n};\nenum CircleVisbility {\n show = 'visibility',\n hide = 'hidden',\n}\ntype CalloutAnchorPointData = {\n xAxisDataPoint: string;\n chartDataPoint: VSChartDataPoint;\n};\n\nexport const VerticalStackedBarChart: React.FunctionComponent<VerticalStackedBarChartProps> = props => {\n const _isRtl: boolean = useRtl();\n const _createLegendsForLine: (data: VerticalStackedChartProps[]) => LineLegends[] = (\n data: VerticalStackedChartProps[],\n ) => _getLineLegends(data);\n const _tooltipId: string = useId('VSBCTooltipId_');\n const _emptyChartId: string = useId('_VSBC_empty');\n let _points: VerticalStackedChartProps[] = [];\n let _dataset: VerticalStackedBarDataPoint[];\n let _xAxisLabels: string[] = [];\n let _bars: JSX.Element[];\n let _xAxisType: XAxisTypes =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data[0]!.xAxisPoint, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\n let _barWidth: number = 0;\n let _colors: string[];\n let _margins: Margins;\n let _lineObject: LineObject;\n let _yMax: number;\n let _calloutAnchorPoint: CalloutAnchorPointData | null;\n let _domainMargin: number = MIN_DOMAIN_MARGIN;\n let _xAxisInnerPadding: number = 0;\n let _xAxisOuterPadding: number = 0;\n const cartesianChartRef = React.useRef<Chart>(null);\n\n const [selectedLegends, setSelectedLegends] = React.useState(props.legendProps?.selectedLegends || []);\n const [activeLegend, setActiveLegend] = React.useState<string | undefined>(undefined);\n const [dataForHoverCard, setDataForHoverCard] = React.useState(0);\n const [color, setColor] = React.useState('');\n const [hoverXValue, setHoverXValue] = React.useState<string | number>('');\n const [YValueHover, setYValueHover] = React.useState<(LineDataInVerticalStackedBarChart | VSChartDataPoint)[]>([]);\n const [xCalloutValue, setXCalloutValue] = React.useState('');\n const [yCalloutValue, setYCalloutValue] = React.useState('');\n const [activeXAxisDataPoint, setActiveXAxisDataPoint] = React.useState<number | string | Date>('');\n const [calloutLegend, setCalloutLegend] = React.useState('');\n const [stackCalloutProps, setStackCalloutProps] = React.useState<VerticalStackedChartProps>();\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<VSChartDataPoint>();\n const [callOutAccessibilityData, setCallOutAccessibilityData] = React.useState<AccessibilityProps>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n const prevPropsRef = React.useRef<VerticalStackedBarChartProps | null>(null);\n React.useEffect(() => {\n if (prevPropsRef.current) {\n const prevProps = prevPropsRef.current;\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, props.legendProps?.selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n if (prevProps.height !== props.height || prevProps.width !== props.width || prevProps.data !== props.data) {\n _adjustProps();\n _dataset = _createDataSetLayer();\n }\n }\n prevPropsRef.current = props;\n }, [props]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n }),\n [],\n );\n\n function _getLegendData(data: VerticalStackedChartProps[], lineLegends: LineLegends[]): JSX.Element {\n if (props.hideLegend) {\n return <></>;\n }\n const defaultPalette: string[] = [\n getColorFromToken(DataVizPalette.color6),\n getColorFromToken(DataVizPalette.color1),\n getColorFromToken(DataVizPalette.color5),\n getColorFromToken(DataVizPalette.color7),\n getColorFromToken(DataVizPalette.color10),\n ];\n const actions: Legend[] = [];\n const { allowHoverOnLegend = true } = props;\n\n data.forEach((singleChartData: VerticalStackedChartProps) => {\n singleChartData.chartData.forEach((point: VSChartDataPoint) => {\n const color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n const checkSimilarLegends = actions.filter((leg: Legend) => leg.title === point.legend && leg.color === color);\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n\n const legend: Legend = {\n title: point.legend,\n color,\n hoverAction: allowHoverOnLegend\n ? () => {\n _handleChartMouseLeave();\n _onLegendHover(point.legend);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => _onLegendLeave() : undefined,\n };\n\n actions.push(legend);\n });\n });\n const legendsOfLine: Legend[] = [];\n if (lineLegends && lineLegends.length > 0) {\n lineLegends.forEach((point: LineLegends) => {\n const legend: Legend = {\n title: point.title,\n color: point.color,\n isLineLegendInBarChart: true,\n hoverAction: allowHoverOnLegend\n ? () => {\n _handleChartMouseLeave();\n _onLegendHover(point.title);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => _onLegendLeave() : undefined,\n };\n legendsOfLine.push(legend);\n });\n }\n const totalLegends: Legend[] = legendsOfLine.concat(actions);\n return (\n <Legends\n legends={totalLegends}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n onChange={_onLegendSelectionChange}\n />\n );\n }\n\n function _getHighlightedLegend() {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n }\n\n function _lineHoverOut() {\n setPopoverOpen(false);\n setXCalloutValue('');\n setYCalloutValue('');\n setActiveXAxisDataPoint('');\n setColor('');\n }\n\n function _lineHoverFocus(lineData: LinePoint) {\n setPopoverOpen(true);\n setXCalloutValue(`${lineData.xItem.xAxisPoint}`);\n setYCalloutValue(`${lineData.yAxisCalloutData || lineData.data || lineData.y}`);\n setActiveXAxisDataPoint(lineData.xItem.xAxisPoint);\n setColor(lineData.color);\n }\n\n function _onStackHoverFocus(\n stack: VerticalStackedChartProps,\n mouseEvent: React.MouseEvent<SVGElement> | SVGGElement,\n ): void {\n let clientX = 0;\n let clientY = 0;\n if ('clientX' in mouseEvent) {\n clientX = mouseEvent.clientX;\n clientY = mouseEvent.clientY;\n } else {\n // Handle case where mouseEvent is an SVGGElement\n const boundingRect = mouseEvent.getBoundingClientRect();\n clientX = boundingRect.left + boundingRect.width / 2;\n clientY = boundingRect.top + boundingRect.height / 2;\n }\n if (!_noLegendHighlighted()) {\n stack = {\n ...stack,\n chartData: stack.chartData.filter((dataPoint: { legend: any }) => _isLegendHighlighted(dataPoint.legend)),\n lineData: stack.lineData?.filter((dataPoint: { legend: any }) => _isLegendHighlighted(dataPoint.legend)),\n };\n }\n const lineData = stack.lineData;\n const isLinesPresent: boolean = lineData !== undefined && lineData.length > 0;\n if (isLinesPresent) {\n lineData!.forEach((item: LineDataInVerticalStackedBarChart & { shouldDrawBorderBottom?: boolean }) => {\n item.data = item.data || item.y;\n item.shouldDrawBorderBottom = true;\n });\n }\n _updatePosition(clientX, clientY);\n setPopoverOpen(stack.chartData.length > 0 || (stack.lineData?.length ?? 0) > 0);\n setYValueHover(\n isLinesPresent\n ? [...lineData!.sort((a, b) => (a.data! < b.data! ? 1 : -1)), ...stack.chartData.slice().reverse()]\n : stack.chartData.slice().reverse(),\n );\n setHoverXValue(stack.xAxisPoint instanceof Date ? formatDate(stack.xAxisPoint, props.useUTC) : stack.xAxisPoint);\n setStackCalloutProps(stack);\n setActiveXAxisDataPoint(stack.xAxisPoint);\n setCallOutAccessibilityData(stack.stackCallOutAccessibilityData);\n }\n\n function _handleChartMouseLeave(): void {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n setActiveXAxisDataPoint('');\n }\n\n const _onClick = (\n data: VerticalStackedChartProps | VSChartDataPoint,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void => {\n props.onBarClick?.(mouseEvent, data);\n props.href ? (window.location.href = props.href) : '';\n };\n\n function _adjustProps(): void {\n _points = props.data || [];\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n const defaultColors: string[] = [\n getColorFromToken(DataVizPalette.color6),\n getColorFromToken(DataVizPalette.color1),\n getColorFromToken(DataVizPalette.color5),\n getColorFromToken(DataVizPalette.color7),\n getColorFromToken(DataVizPalette.color10),\n ];\n _colors = defaultColors;\n _xAxisType = getTypeOfAxis(props.data[0].xAxisPoint, true) as XAxisTypes;\n _lineObject = _getFormattedLineData(props.data);\n _xAxisInnerPadding = getScalePadding(props.xAxisInnerPadding, props.xAxisPadding, 2 / 3);\n _xAxisOuterPadding = getScalePadding(props.xAxisOuterPadding, props.xAxisPadding, 0);\n }\n\n function _createDataSetLayer(): VerticalStackedBarDataPoint[] {\n const tempArr: string[] = [];\n const dataset: VerticalStackedBarDataPoint[] = _points.map(singlePointData => {\n let total: number = 0;\n singlePointData.chartData!.forEach((point: VSChartDataPoint) => {\n total = total + point.data;\n });\n tempArr.push(singlePointData.xAxisPoint as string);\n return {\n x: singlePointData.xAxisPoint,\n y: total,\n };\n });\n _xAxisLabels = tempArr;\n return dataset;\n }\n\n function _onLegendHover(legendTitle: string): void {\n setActiveLegend(legendTitle);\n }\n\n function _onLegendLeave(): void {\n setActiveLegend(undefined);\n }\n\n function _onLegendSelectionChange(\n _selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(_selectedLegends);\n } else {\n setSelectedLegends(_selectedLegends.slice(-1));\n }\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(_selectedLegends, event, currentLegend);\n }\n }\n\n function _getMargins(margins: Margins) {\n _margins = margins;\n }\n\n function _getGraphData(\n xScale: any,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) {\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);\n return (_bars = _createBar(xBarScale, yBarScale, containerHeight, xElement!));\n }\n\n function _getAxisData(yAxisData: IAxisData) {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n _yMax = Math.max(domainValue[domainValue.length - 1], props.yMaxValue || 0);\n }\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n function _isLegendHighlighted(legendTitle: string) {\n return _getHighlightedLegend().includes(legendTitle);\n }\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n function _noLegendHighlighted() {\n return _getHighlightedLegend().length === 0;\n }\n\n function _getAriaLabel(singleChartData: VerticalStackedChartProps, point?: VSChartDataPoint): string {\n if (!point) {\n /** if shouldFocusWholeStack is true */\n const xValue =\n singleChartData.xAxisCalloutData ||\n (singleChartData.xAxisPoint instanceof Date\n ? formatDate(singleChartData.xAxisPoint)\n : singleChartData.xAxisPoint);\n const pointValues = singleChartData.chartData\n .map(pt => {\n const legend = pt.legend;\n const yValue = pt.yAxisCalloutData || pt.data;\n return `${legend}, ${yValue}.`;\n })\n .join(' ');\n const lineValues = singleChartData.lineData\n ?.map(ln => {\n const legend = ln.legend;\n const yValue = ln.yAxisCalloutData || ln.data || ln.y;\n return `${legend}, ${yValue}.`;\n })\n .join(' ');\n return (\n singleChartData.stackCallOutAccessibilityData?.ariaLabel ||\n `${xValue}. ${pointValues}` + (lineValues ? ` ${lineValues}` : '')\n );\n }\n /** if shouldFocusWholeStack is false */\n const xValue =\n singleChartData.xAxisCalloutData ||\n point.xAxisCalloutData ||\n (singleChartData.xAxisPoint instanceof Date\n ? formatDate(singleChartData.xAxisPoint)\n : singleChartData.xAxisPoint);\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.data;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n }\n\n function _getCustomizedCallout() {\n const _isHavingLines = props.data.some(\n (item: VerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n return props.onRenderCalloutPerStack\n ? props.onRenderCalloutPerStack(stackCalloutProps)\n : props.onRenderCalloutPerDataPoint && !_isHavingLines\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps, _renderCallout)\n : null;\n }\n\n function _toFocusWholeStack(_isHavingLines: boolean): boolean {\n const { isCalloutForStack = false } = props;\n let shouldFocusStackOnly: boolean = false;\n if (_isHavingLines) {\n if (_getHighlightedLegend().length === 1) {\n shouldFocusStackOnly = false;\n } else {\n shouldFocusStackOnly = true;\n }\n } else {\n shouldFocusStackOnly = isCalloutForStack;\n }\n return shouldFocusStackOnly;\n }\n\n function _getFormattedLineData(data: VerticalStackedChartProps[]): LineObject {\n const linesData: LinePoint[] = [];\n const formattedLineData: LineObject = {};\n data.forEach((item: VerticalStackedChartProps, index: number) => {\n if (item.lineData) {\n item.lineData.forEach((line: any) => {\n linesData.push({\n ...line,\n index,\n xItem: item,\n });\n });\n }\n });\n linesData.forEach(item => {\n if (formattedLineData[item.legend]) {\n formattedLineData[item.legend].push(item);\n } else {\n formattedLineData[item.legend] = [item];\n }\n });\n return formattedLineData;\n }\n\n function _getLineLegends(data: VerticalStackedChartProps[]): LineLegends[] {\n const lineObject: LineObject = _lineObject;\n const lineLegends: LineLegends[] = [];\n Object.keys(lineObject).forEach((item: string) => {\n lineLegends.push({\n title: item,\n color: lineObject[item][0].color,\n });\n });\n return lineLegends;\n }\n\n function _createLines(\n xScale: any,\n yScale: NumericScale,\n containerHeight: number,\n containerWidth: number,\n secondaryYScale?: NumericScale,\n ): JSX.Element {\n const lineObject: LineObject = _getFormattedLineData(props.data);\n const lines: React.ReactNode[] = [];\n const borderForLines: React.ReactNode[] = [];\n const dots: React.ReactNode[] = [];\n //const { theme } = props;\n const lineBorderWidth = props.lineOptions?.lineBorderWidth\n ? Number.parseFloat(props.lineOptions!.lineBorderWidth!.toString())\n : 0;\n const xScaleBandwidthTranslate = _xAxisType !== XAxisTypes.StringAxis ? 0 : xScale.bandwidth() / 2;\n Object.keys(lineObject).forEach((item: string, index: number) => {\n const shouldHighlight = _isLegendHighlighted(item) || _noLegendHighlighted();\n for (let i = 1; i < lineObject[item].length; i++) {\n const x1 = xScale(lineObject[item][i - 1].xItem.xAxisPoint);\n const useSecondaryYScale =\n lineObject[item][i - 1].useSecondaryYScale && lineObject[item][i].useSecondaryYScale && secondaryYScale;\n const y1 = useSecondaryYScale ? secondaryYScale!(lineObject[item][i - 1].y) : yScale(lineObject[item][i - 1].y);\n const x2 = xScale(lineObject[item][i].xItem.xAxisPoint);\n const y2 = useSecondaryYScale ? secondaryYScale!(lineObject[item][i].y) : yScale(lineObject[item][i].y);\n if (lineBorderWidth > 0) {\n borderForLines.push(\n <line\n key={`${index}-${i}-BorderLine`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={3 + lineBorderWidth * 2}\n fill=\"transparent\"\n strokeLinecap=\"round\"\n stroke={tokens.colorNeutralBackground1}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />,\n );\n }\n lines.push(\n <line\n key={`${index}-${i}-line`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={lineObject[item][0].lineOptions?.strokeWidth ?? 3}\n strokeLinecap={lineObject[item][0].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={lineObject[item][0].lineOptions?.strokeDasharray}\n stroke={lineObject[item][i].color}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n {...(_isLegendHighlighted(item) && {\n onMouseOver: _lineHover.bind(lineObject[item][i - 1]),\n onMouseLeave: _lineHoverOut,\n })}\n />,\n );\n }\n });\n Object.keys(lineObject).forEach((item: string, index: number) => {\n lineObject[item].forEach((circlePoint: LinePoint, subIndex: number) => {\n const circleRef: { refElement: SVGCircleElement | null } = { refElement: null };\n dots.push(\n <circle\n key={`${index}-${subIndex}-dot`}\n cx={xScale(circlePoint.xItem.xAxisPoint)}\n cy={\n circlePoint.useSecondaryYScale && secondaryYScale ? secondaryYScale(circlePoint.y) : yScale(circlePoint.y)\n }\n onMouseOver={\n _isLegendHighlighted(item)\n ? (event: React.MouseEvent<SVGElement, MouseEvent>) => _lineHover(circlePoint, event)\n : (event: React.MouseEvent<SVGElement, MouseEvent>) => _onStackHover(circlePoint.xItem, event)\n }\n {...(_isLegendHighlighted(item) && {\n onMouseLeave: _lineHoverOut,\n })}\n r={_getCircleVisibilityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).radius}\n stroke={circlePoint.color}\n fill={tokens.colorNeutralBackground1}\n strokeWidth={3}\n visibility={_getCircleVisibilityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).visibility}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n data-is-focusable={_isLegendHighlighted(item)}\n ref={e => (circleRef.refElement = e)}\n onFocus={_lineFocus.bind(circlePoint, circleRef)}\n onBlur={_lineHoverOut}\n tabIndex={circlePoint.legend !== '' ? 0 : undefined}\n />,\n );\n });\n });\n return (\n <>\n {borderForLines}\n {lines}\n {dots}\n </>\n );\n }\n\n function _getCircleVisibilityAndRadius(\n xAxisPoint: string | number | Date,\n legend: string,\n ): { visibility: CircleVisbility; radius: number } {\n if (!_noLegendHighlighted()) {\n if (xAxisPoint === activeXAxisDataPoint && _isLegendHighlighted(legend)) {\n return { visibility: CircleVisbility.show, radius: 8 };\n } else if (_isLegendHighlighted(legend)) {\n return { visibility: CircleVisbility.show, radius: 0.3 };\n } else {\n return { visibility: CircleVisbility.hide, radius: 0 };\n }\n } else {\n return {\n visibility: activeXAxisDataPoint === xAxisPoint ? CircleVisbility.show : CircleVisbility.hide,\n radius: 8,\n };\n }\n }\n\n function _renderCallout(props?: VSChartDataPoint): JSX.Element | null {\n return props ? (\n <ChartPopover\n culture={props.culture ?? 'en-us'}\n XValue={props.xAxisCalloutData}\n xCalloutValue={xCalloutValue}\n yCalloutValue={yCalloutValue}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n legend={props.legend}\n YValue={props.yAxisCalloutData}\n color={props.color}\n />\n ) : null;\n }\n\n function _onRectHover(\n xAxisPoint: string | number | Date,\n point: VSChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n _onRectFocusHover(xAxisPoint, point, color, mouseEvent);\n }\n\n function _onRectFocusHover(\n xAxisPoint: string | number | Date,\n point: VSChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement> | SVGGElement,\n ) {\n let clientX = 0;\n let clientY = 0;\n if ('clientX' in mouseEvent) {\n clientX = mouseEvent.clientX;\n clientY = mouseEvent.clientY;\n } else {\n // Handle case where mouseEvent is an SVGGElement\n const boundingRect = mouseEvent.getBoundingClientRect();\n clientX = boundingRect.left + boundingRect.width / 2;\n clientY = boundingRect.top + boundingRect.height / 2;\n }\n if (_calloutAnchorPoint?.chartDataPoint !== point || _calloutAnchorPoint?.xAxisDataPoint !== xAxisPoint) {\n _calloutAnchorPoint = {\n chartDataPoint: point,\n xAxisDataPoint: `${xAxisPoint}`,\n };\n _updatePosition(clientX, clientY);\n setPopoverOpen(_noLegendHighlighted() || _isLegendHighlighted(point.legend));\n setCalloutLegend(point.legend);\n setDataForHoverCard(point.data);\n setColor(color);\n setXCalloutValue(point.xAxisCalloutData ? point.xAxisCalloutData : `${xAxisPoint}`);\n setYCalloutValue(point.yAxisCalloutData!);\n setDataPointCalloutProps(point);\n setCallOutAccessibilityData(point.callOutAccessibilityData);\n }\n }\n\n function _lineHover(lineData: LinePoint, mouseEvent: React.MouseEvent<SVGElement>) {\n mouseEvent.persist();\n _lineHoverFocus(lineData);\n }\n\n function _lineFocus(lineData: LinePoint, ref: { refElement: SVGCircleElement | null }) {\n if (ref.refElement) {\n _lineHoverFocus(lineData);\n }\n }\n\n function _onStackHover(stack: VerticalStackedChartProps, mouseEvent: React.MouseEvent<SVGElement>): void {\n mouseEvent.persist();\n _onStackHoverFocus(stack, mouseEvent);\n }\n\n function _onRectFocus(point: VSChartDataPoint, xAxisPoint: string, color: string, ref: RefArrayData): void {\n if (ref.refElement) {\n _onRectFocusHover(xAxisPoint, point, color, ref.refElement);\n }\n }\n\n function _onStackFocus(stack: VerticalStackedChartProps, groupRef: RefArrayData): void {\n if (groupRef.refElement) {\n _onStackHoverFocus(stack, groupRef.refElement);\n }\n }\n\n function _handleMouseOut(): void {\n setPopoverOpen(false);\n }\n\n function _getBarGapAndScale(\n bars: VSChartDataPoint[],\n yBarScale: NumericScale,\n defaultTotalHeight?: number,\n ): {\n readonly gapHeight: number;\n readonly heightValueScale: number;\n readonly adjustedTotalHeight: number;\n } {\n const { barGapMax = 0 } = props;\n // When displaying gaps between the bars, the height of each bar is\n // adjusted so that the total of all bars is not changed by the gaps\n const totalData = bars.reduce((iter, value) => iter + Math.abs(value.data), 0);\n const totalHeight = defaultTotalHeight ?? yBarScale(totalData);\n let sumOfPercent = 0;\n bars.forEach(point => {\n let value = (Math.abs(point.data) / totalData) * 100;\n if (value < 1 && value !== 0) {\n value = 1;\n }\n sumOfPercent += value;\n });\n const scalingRatio = sumOfPercent !== 0 ? sumOfPercent / 100 : 1;\n const gaps = barGapMax && bars.length - 1;\n const gapHeight = gaps && Math.max(barGapMin, Math.min(barGapMax, (totalHeight * barGapMultiplier) / gaps));\n const heightValueScale = (totalHeight - gapHeight * gaps) / (totalData * scalingRatio);\n return {\n gapHeight,\n heightValueScale,\n adjustedTotalHeight: sumOfPercent,\n } as const;\n }\n\n function _getScales(containerHeight: number, containerWidth: number) {\n const yMax = _yMax;\n const yBarScale = d3ScaleLinear()\n .domain([0, yMax])\n .range([0, containerHeight - _margins.bottom! - _margins.top!]);\n if (_xAxisType === XAxisTypes.NumericAxis) {\n const xMax = d3Max(_dataset, (point: VerticalStackedBarDataPoint) => point.x as number)!;\n const xMin = d3Min(_dataset, (point: VerticalStackedBarDataPoint) => point.x as number)!;\n\n const xBarScale = d3ScaleLinear()\n .domain(_isRtl ? [xMax, xMin] : [xMin, xMax])\n .nice()\n .range([_margins.left! + _domainMargin, containerWidth - _margins.right! - _domainMargin]);\n\n return { xBarScale, yBarScale };\n }\n if (_xAxisType === XAxisTypes.DateAxis) {\n const sDate = d3Min(_dataset, (point: VerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const lDate = d3Max(_dataset, (point: VerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const xBarScale = props.useUTC ? d3ScaleUtc() : d3ScaleTime();\n xBarScale\n .domain(_isRtl ? [lDate, sDate] : [sDate, lDate])\n .range([_margins.left! + _domainMargin, containerWidth - _margins.right! - _domainMargin]);\n\n return { xBarScale, yBarScale };\n }\n const xBarScale = d3ScaleBand()\n .domain(_xAxisLabels)\n .range(\n _isRtl\n ? [containerWidth - _margins.right! - _domainMargin, _margins.left! + _domainMargin]\n : [_margins.left! + _domainMargin, containerWidth - _margins.right! - _domainMargin],\n )\n .paddingInner(_xAxisInnerPadding)\n .paddingOuter(_xAxisOuterPadding);\n\n return { xBarScale, yBarScale };\n }\n\n const _isChartEmpty = (): boolean => {\n return !(\n props.data &&\n props.data.length > 0 &&\n props.data.some(item => item.chartData.length > 0 || (item.lineData && item.lineData.length > 0))\n );\n };\n\n function _updatePosition(newX: number, newY: number) {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n // Calculate the distance moved\n const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));\n // Update the position only if the distance moved is greater than the threshold\n if (distance > threshold) {\n setClickPosition({ x: newX, y: newY });\n setPopoverOpen(true);\n }\n }\n\n function _getDomainMargins(containerWidth: number): Margins {\n _domainMargin = MIN_DOMAIN_MARGIN;\n\n /** Total width available to render the bars */\n const totalWidth = containerWidth - (_margins.left! + MIN_DOMAIN_MARGIN) - (_margins.right! + MIN_DOMAIN_MARGIN);\n /** Rate at which the space between the bars changes wrt the bar width */\n const barGapRate = _xAxisInnerPadding / (1 - _xAxisInnerPadding);\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(props.xAxisOuterPadding, props.xAxisPadding)) {\n // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available\n // to adjust the space before the first bar and after the last bar.\n _domainMargin = 0;\n } else if (props.barWidth !== 'auto') {\n // Update the bar width so that when CartesianChart rerenders,\n // the following calculations don't use the previous bar width.\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n /** Total width required to render the bars. Directly proportional to bar width */\n const reqWidth = (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate) * _barWidth;\n\n if (totalWidth >= reqWidth) {\n // Center align the chart by setting equal left and right margins for domain\n _domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;\n }\n } else if (props.mode === 'plotly' && _xAxisLabels.length > 1) {\n // Calculate the remaining width after rendering bars at their maximum allowable width\n const bandwidth = totalWidth / (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate);\n const barWidth = getBarWidth(props.barWidth, props.maxBarWidth, bandwidth);\n let reqWidth = (_xAxisLabels.length + (_xAxisLabels.length - 1) * barGapRate) * barWidth;\n const margin1 = (totalWidth - reqWidth) / 2;\n\n // Calculate the remaining width after accounting for the space required to render x-axis labels\n const step = calculateLongestLabelWidth(_xAxisLabels) + 20;\n reqWidth = (_xAxisLabels.length - _xAxisInnerPadding) * step;\n const margin2 = (totalWidth - reqWidth) / 2;\n\n _domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));\n }\n } else {\n const data = (props.data?.map(point => point.xAxisPoint) as number[] | Date[] | undefined) || [];\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, calculateAppropriateBarWidth(data, totalWidth));\n _domainMargin = MIN_DOMAIN_MARGIN + _barWidth / 2;\n }\n\n return {\n ..._margins,\n left: _margins.left! + _domainMargin,\n right: _margins.right! + _domainMargin,\n };\n }\n\n function _getChartTitle(): string {\n const { chartTitle, data } = props;\n const numLines = Object.keys(_lineObject).length;\n return (\n (chartTitle ? `${chartTitle}. ` : '') +\n `Vertical bar chart with ${data?.length || 0} stacked bars` +\n (numLines > 0 ? ` and ${numLines} lines` : '') +\n '. '\n );\n }\n\n const classes = useVerticalStackedBarChartStyles(props);\n function _createBar(\n xBarScale: any,\n yBarScale: NumericScale,\n containerHeight: number,\n xElement: SVGElement,\n ): JSX.Element[] {\n const { barCornerRadius = 0, barMinimumHeight = 0 } = props;\n const _isHavingLines = props.data.some(\n (item: VerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = _toFocusWholeStack(_isHavingLines);\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, xBarScale.bandwidth());\n }\n\n const bars = _points.map((singleChartData: VerticalStackedChartProps, indexNumber: number) => {\n let yPoint = containerHeight - _margins.bottom!;\n const xPoint = xBarScale(\n _xAxisType === XAxisTypes.NumericAxis\n ? (singleChartData.xAxisPoint as number)\n : _xAxisType === XAxisTypes.DateAxis\n ? (singleChartData.xAxisPoint as Date)\n : (singleChartData.xAxisPoint as string),\n );\n const xScaleBandwidthTranslate =\n _xAxisType !== XAxisTypes.StringAxis ? -_barWidth / 2 : (xBarScale.bandwidth() - _barWidth) / 2;\n\n let barTotalValue = 0;\n\n const barsToDisplay = singleChartData.chartData.filter(point => point.data > 0);\n\n if (!barsToDisplay.length) {\n return undefined;\n }\n\n const { gapHeight, heightValueScale, adjustedTotalHeight } = _getBarGapAndScale(barsToDisplay, yBarScale);\n\n if (heightValueScale < 0) {\n return undefined;\n }\n\n const singleBar = barsToDisplay.map((point: VSChartDataPoint, index: number) => {\n const startColor = point.color ? point.color : _colors[index];\n const ref: RefArrayData = {};\n const shouldHighlight = _isLegendHighlighted(point.legend) || _noLegendHighlighted() ? true : false;\n const rectFocusProps = !shouldFocusWholeStack && {\n 'data-is-focusable': !props.hideTooltip && shouldHighlight,\n 'aria-label': _getAriaLabel(singleChartData, point),\n onMouseOver: (event: React.MouseEvent<SVGElement, MouseEvent>) =>\n _onRectHover(singleChartData.xAxisPoint, point, startColor, event),\n onMouseMove: (event: React.MouseEvent<SVGElement, MouseEvent>) =>\n _onRectHover(singleChartData.xAxisPoint, point, startColor, event),\n onMouseLeave: _handleMouseOut,\n onFocus: () => _onRectFocus(point, singleChartData.xAxisPoint as string, startColor, ref),\n onBlur: _handleMouseOut,\n onClick: (event: React.MouseEvent<SVGElement, MouseEvent>) => _onClick(point, event),\n role: 'img',\n };\n\n let barHeight = heightValueScale * point.data;\n if (barHeight < Math.max((heightValueScale * adjustedTotalHeight) / 100.0, barMinimumHeight)) {\n barHeight = Math.max((heightValueScale * adjustedTotalHeight) / 100.0, barMinimumHeight);\n }\n yPoint = yPoint - barHeight - (index ? gapHeight : 0);\n barTotalValue += point.data;\n\n if (barCornerRadius && barHeight > barCornerRadius && index === barsToDisplay.length - 1) {\n return (\n <React.Fragment key={index + indexNumber + `${shouldFocusWholeStack}`}>\n <path\n className={classes.opacityChangeOnHover}\n d={`\n M ${xPoint} ${yPoint + barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${-barCornerRadius}\n h ${_barWidth - 2 * barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${barCornerRadius}\n v ${barHeight - barCornerRadius}\n h ${-_barWidth}\n z\n `}\n fill={startColor}\n rx={props.roundCorners ? 3 : 0}\n ref={e => (ref.refElement = e)}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n cursor={props.href ? 'pointer' : 'default'}\n {...rectFocusProps}\n />\n </React.Fragment>\n );\n }\n if (barHeight < 0) {\n return <React.Fragment key={index + indexNumber}> </React.Fragment>;\n }\n return (\n <React.Fragment key={index + indexNumber}>\n <rect\n className={classes.opacityChangeOnHover}\n x={xPoint}\n y={yPoint}\n width={_barWidth}\n height={barHeight}\n fill={startColor}\n opacity={shouldHighlight ? 1 : 0.1}\n cursor={props.href ? 'pointer' : 'default'}\n rx={props.roundCorners ? 3 : 0}\n ref={e => (ref.refElement = e)}\n {...rectFocusProps}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />\n </React.Fragment>\n );\n });\n const groupRef: RefArrayData = {};\n const stackFocusProps = shouldFocusWholeStack && {\n 'data-is-focusable': !props.hideTooltip,\n 'aria-label': _getAriaLabel(singleChartData),\n onMouseOver: (event: any) => _onStackHover(singleChartData, event),\n onMouseMove: (event: any) => _onStackHover(singleChartData, event),\n onMouseLeave: _handleMouseOut,\n onFocus: () => _onStackFocus(singleChartData, groupRef),\n onBlur: _handleMouseOut,\n onClick: (event: any) => _onClick(singleChartData, event),\n role: 'img',\n };\n let showLabel = false;\n let barLabel = 0;\n if (!props.hideLabels) {\n if (_noLegendHighlighted()) {\n showLabel = true;\n barLabel = barTotalValue;\n } else {\n barsToDisplay.forEach(point => {\n if (_isLegendHighlighted(point.legend)) {\n showLabel = true;\n barLabel += point.data;\n }\n });\n }\n }\n return (\n <g key={indexNumber + `${shouldFocusWholeStack}`}>\n <g\n id={`${indexNumber}-singleBar`}\n ref={e => (groupRef.refElement = e)}\n {...stackFocusProps}\n tabIndex={!props.hideTooltip ? 0 : undefined}\n >\n {singleBar}\n </g>\n {!props.hideLabels && _barWidth >= 16 && showLabel && (\n <text\n x={xPoint + _barWidth / 2}\n y={yPoint - 6}\n textAnchor=\"middle\"\n className={classes.barLabel}\n aria-label={`Total: ${barLabel}`}\n role=\"img\"\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n >\n {formatValueWithSIPrefix(barLabel)}\n </text>\n )}\n </g>\n );\n });\n if (!props.showXAxisLablesTooltip) {\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return bars.filter((bar): bar is JSX.Element => !!bar);\n }\n\n if (!_isChartEmpty()) {\n _adjustProps();\n const _isHavingLines = props.data.some(\n (item: VerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = _toFocusWholeStack(_isHavingLines);\n _dataset = _createDataSetLayer();\n const legendBars: JSX.Element = _getLegendData(_points, _createLegendsForLine(props.data));\n const calloutProps: ModifiedCartesianChartProps['calloutProps'] = {\n color: color,\n legend: calloutLegend,\n XValue: xCalloutValue!,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n YValueHover: YValueHover,\n hoverXValue: hoverXValue,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData),\n clickPosition: clickPosition,\n isPopoverOpen: isPopoverOpen,\n isCalloutForStack:\n props.isCalloutForStack || (_isHavingLines && (_noLegendHighlighted() || _getHighlightedLegend().length > 1)),\n isCartesian: true,\n customCallout: {\n customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n };\n const tickParams = {\n tickValues: props.tickValues,\n tickFormat: props.tickFormat,\n };\n return (\n <CartesianChart\n {...props}\n chartTitle={_getChartTitle()}\n points={_dataset}\n chartType={ChartTypes.VerticalStackedBarChart}\n xAxisType={_xAxisType}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n datasetForXAxisDomain={_xAxisLabels}\n isCalloutForStack={shouldFocusWholeStack}\n barwidth={_barWidth}\n getmargins={_getMargins}\n getGraphData={_getGraphData}\n getAxisData={_getAxisData}\n onChartMouseLeave={_handleChartMouseLeave}\n getDomainMargins={_getDomainMargins}\n {...(_xAxisType === XAxisTypes.StringAxis && {\n xAxisInnerPadding: _xAxisInnerPadding,\n xAxisOuterPadding: _xAxisOuterPadding,\n })}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n children={(props: ChildProps) => {\n return (\n <>\n <g>{_bars}</g>\n <g>\n {_isHavingLines &&\n _createLines(\n props.xScale!,\n props.yScale!,\n props.containerHeight!,\n props.containerWidth!,\n props.yScaleSecondary,\n )}\n </g>\n </>\n );\n }}\n />\n );\n }\n return <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />;\n};\nVerticalStackedBarChart.displayName = 'VerticalStackedBarChart';\n"],"names":["React","max","d3Max","min","d3Min","select","d3Select","useVerticalStackedBarChartStyles","scaleLinear","d3ScaleLinear","scaleBand","d3ScaleBand","scaleUtc","d3ScaleUtc","scaleTime","d3ScaleTime","useId","tokens","CartesianChart","ChartPopover","Legends","ChartTypes","getAccessibleDataObject","XAxisTypes","getTypeOfAxis","tooltipOfXAxislabels","formatValueWithSIPrefix","getBarWidth","getScalePadding","isScalePaddingDefined","calculateAppropriateBarWidth","formatDate","areArraysEqual","calculateLongestLabelWidth","useRtl","DataVizPalette","getColorFromToken","barGapMultiplier","barGapMin","MIN_DOMAIN_MARGIN","CircleVisbility","VerticalStackedBarChart","props","_isRtl","_createLegendsForLine","data","_getLineLegends","_tooltipId","_emptyChartId","_points","_dataset","_xAxisLabels","_bars","_xAxisType","length","xAxisPoint","StringAxis","_barWidth","_colors","_margins","_lineObject","_yMax","_calloutAnchorPoint","_domainMargin","_xAxisInnerPadding","_xAxisOuterPadding","cartesianChartRef","useRef","selectedLegends","setSelectedLegends","useState","legendProps","activeLegend","setActiveLegend","undefined","dataForHoverCard","setDataForHoverCard","color","setColor","hoverXValue","setHoverXValue","YValueHover","setYValueHover","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","activeXAxisDataPoint","setActiveXAxisDataPoint","calloutLegend","setCalloutLegend","stackCalloutProps","setStackCalloutProps","dataPointCalloutProps","setDataPointCalloutProps","callOutAccessibilityData","setCallOutAccessibilityData","clickPosition","setClickPosition","x","y","isPopoverOpen","setPopoverOpen","prevPropsRef","useEffect","current","prevProps","height","width","_adjustProps","_createDataSetLayer","useImperativeHandle","componentRef","chartContainer","_getLegendData","lineLegends","hideLegend","defaultPalette","color6","color1","color5","color7","color10","actions","allowHoverOnLegend","forEach","singleChartData","chartData","point","Math","floor","random","checkSimilarLegends","filter","leg","title","legend","hoverAction","_handleChartMouseLeave","_onLegendHover","onMouseOutAction","_onLegendLeave","push","legendsOfLine","isLineLegendInBarChart","totalLegends","concat","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onChange","_onLegendSelectionChange","_getHighlightedLegend","_lineHoverOut","_lineHoverFocus","lineData","xItem","yAxisCalloutData","_onStackHoverFocus","stack","mouseEvent","clientX","clientY","boundingRect","getBoundingClientRect","left","top","_noLegendHighlighted","dataPoint","_isLegendHighlighted","isLinesPresent","item","shouldDrawBorderBottom","_updatePosition","sort","a","b","slice","reverse","Date","useUTC","stackCallOutAccessibilityData","_onClick","onBarClick","href","window","location","barWidth","maxBarWidth","defaultColors","_getFormattedLineData","xAxisInnerPadding","xAxisPadding","xAxisOuterPadding","tempArr","dataset","map","singlePointData","total","legendTitle","_selectedLegends","event","currentLegend","canSelectMultipleLegends","_getMargins","margins","_getGraphData","xScale","yScale","containerHeight","containerWidth","xElement","xBarScale","yBarScale","_getScales","_createBar","_getAxisData","yAxisData","yAxisDomainValues","domainValue","yMaxValue","includes","_getAriaLabel","xValue","xAxisCalloutData","pointValues","pt","yValue","join","lineValues","ln","ariaLabel","_getCustomizedCallout","_isHavingLines","some","onRenderCalloutPerStack","onRenderCalloutPerDataPoint","_renderCallout","_toFocusWholeStack","isCalloutForStack","shouldFocusStackOnly","linesData","formattedLineData","index","line","lineObject","Object","keys","_createLines","secondaryYScale","lines","borderForLines","dots","lineBorderWidth","lineOptions","Number","parseFloat","toString","xScaleBandwidthTranslate","bandwidth","shouldHighlight","i","x1","useSecondaryYScale","y1","x2","y2","key","opacity","strokeWidth","fill","strokeLinecap","stroke","colorNeutralBackground1","transform","strokeDasharray","onMouseOver","_lineHover","bind","onMouseLeave","circlePoint","subIndex","circleRef","refElement","circle","cx","cy","_onStackHover","r","_getCircleVisibilityAndRadius","radius","visibility","data-is-focusable","ref","e","onFocus","_lineFocus","onBlur","tabIndex","culture","XValue","YValue","_onRectHover","persist","_onRectFocusHover","chartDataPoint","xAxisDataPoint","_onRectFocus","_onStackFocus","groupRef","_handleMouseOut","_getBarGapAndScale","bars","defaultTotalHeight","barGapMax","totalData","reduce","iter","value","abs","totalHeight","sumOfPercent","scalingRatio","gaps","gapHeight","heightValueScale","adjustedTotalHeight","yMax","domain","range","bottom","NumericAxis","xMax","xMin","nice","right","DateAxis","sDate","lDate","paddingInner","paddingOuter","_isChartEmpty","newX","newY","threshold","distance","sqrt","pow","_getDomainMargins","totalWidth","barGapRate","reqWidth","mode","margin1","step","margin2","_getChartTitle","chartTitle","numLines","classes","barCornerRadius","barMinimumHeight","shouldFocusWholeStack","indexNumber","yPoint","xPoint","barTotalValue","barsToDisplay","singleBar","startColor","rectFocusProps","hideTooltip","onMouseMove","onClick","role","barHeight","Fragment","path","className","opacityChangeOnHover","d","rx","roundCorners","cursor","rect","stackFocusProps","showLabel","barLabel","hideLabels","g","id","text","textAnchor","aria-label","showXAxisLablesTooltip","document","getElementById","remove","wrapXAxisLables","xAxisElement","call","tooltipProps","tooltipCls","tooltip","xAxis","bar","legendBars","calloutProps","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","tickValues","tickFormat","points","chartType","xAxisType","datasetForXAxisDomain","barwidth","getmargins","getGraphData","getAxisData","onChartMouseLeave","getDomainMargins","children","yScaleSecondary","div","style","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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Aa/M;YACbgN,mBAAmBhS;YACnBiS,kBAAkB7E;YACjB,GAAIzS,eAAe9B,WAAWiC,UAAU,IAAI;gBAC3CyI,mBAAmBjI;gBACnBmI,mBAAmBlI;YACrB,CAAC;YACD+C,cAAc9C;YACd,oCAAoC,GACpC0W,UAAU,CAAClY;gBACT,qBACE,wDACE,oBAAC6V,WAAGnV,sBACJ,oBAACmV,WACE5J,kBACCe,aACEhN,MAAMuK,MAAM,EACZvK,MAAMwK,MAAM,EACZxK,MAAMyK,eAAe,EACrBzK,MAAM0K,cAAc,EACpB1K,MAAMmY,eAAe;YAKjC;;IAGN;IACA,qBAAO,oBAACC;QAAItC,IAAIxV;QAAewU,MAAM;QAASuD,OAAO;YAAEjK,SAAS;QAAI;QAAG6H,cAAY;;AACrF,EAAE;AACFlW,wBAAwBuY,WAAW,GAAG"}
@@ -9,16 +9,7 @@ export const verticalstackedbarchartClassNames = {
9
9
  yAxis: '',
10
10
  legendContainer: '',
11
11
  hover: '',
12
- calloutContentRoot: '',
13
- calloutContentX: '',
14
- calloutContentY: '',
15
12
  descriptionMessage: '',
16
- calloutDateTimeContainer: '',
17
- calloutInfoContainer: '',
18
- calloutBlockContainer: '',
19
- calloutBlockContainertoDrawShapefalse: '',
20
- calloutBlockContainertoDrawShapetrue: '',
21
- calloutlegendText: '',
22
13
  axisTitle: '',
23
14
  chartTitle: '',
24
15
  shapeStyles: '',
@@ -55,12 +46,13 @@ const useStyles = /*#__PURE__*/__styles({
55
46
  Be2twd7: "fy9rknc",
56
47
  Bhrd7zp: "fl43uef",
57
48
  Bg96gwp: "fwrc4pm",
58
- Bkfmm31: "fhuob2q"
49
+ Bkfmm31: "fhuob2q",
50
+ Bvjb7m6: "fhv2zbx"
59
51
  }
60
52
  }, {
61
53
  d: [".f158kwzp{cursor:default;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f22iagw{display:flex;}", ".f1vx9l62{flex-direction:column;}", ".f17mpqex{padding-top:var(--spacingHorizontalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".fdvome7{padding-bottom:var(--spacingHorizontalS);}", ".f1euv43f{position:absolute;}", ".f17mccla{text-align:center;}", ".fr6rvge{top:var(--spacingVerticalNone);}", ".f5q6cfr{fill:var(--colorNeutralBackground1);}", [".fq9zq91{border-radius:var(--borderRadiusSmall);}", {
62
54
  p: -1
63
- }], ".f1aehjj5{pointer-events:none;}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fhuob2q{fill:var(--colorNeutralForeground1);}"]
55
+ }], ".f1aehjj5{pointer-events:none;}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fhuob2q{fill:var(--colorNeutralForeground1);}", ".fhv2zbx{forced-color-adjust:auto;}"]
64
56
  });
65
57
  export const useVerticalStackedBarChartStyles = props => {
66
58
  const baseStyles = useStyles();
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","verticalstackedbarchartClassNames","opacityChangeOnHover","tooltip","barLabel","root","xAxis","yAxis","legendContainer","hover","calloutContentRoot","calloutContentX","calloutContentY","descriptionMessage","calloutDateTimeContainer","calloutInfoContainer","calloutBlockContainer","calloutBlockContainertoDrawShapefalse","calloutBlockContainertoDrawShapetrue","calloutlegendText","axisTitle","chartTitle","shapeStyles","chartWrapper","useStyles","Bceei9c","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","Bkfmm31","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","d","p","useVerticalStackedBarChartStyles","props","baseStyles","href"],"sources":["useVerticalStackedBarChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const verticalstackedbarchartClassNames = {\n opacityChangeOnHover: 'fui-vsbc__opacityChangeOnHover',\n tooltip: 'fui-vsbc__tooltip',\n barLabel: 'fui-vsbc__barLabel',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n calloutContentRoot: '',\n calloutContentX: '',\n calloutContentY: '',\n descriptionMessage: '',\n calloutDateTimeContainer: '',\n calloutInfoContainer: '',\n calloutBlockContainer: '',\n calloutBlockContainertoDrawShapefalse: '',\n calloutBlockContainertoDrawShapetrue: '',\n calloutlegendText: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: ''\n};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {\n cursor: 'default'\n },\n tooltip: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.padding(tokens.spacingHorizontalS),\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n fill: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none'\n },\n barLabel: {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1\n }\n});\nexport const useVerticalStackedBarChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n opacityChangeOnHover: mergeClasses(verticalstackedbarchartClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover, props.href ? 'pointer' : 'default'),\n tooltip: mergeClasses(verticalstackedbarchartClassNames.tooltip, baseStyles.tooltip),\n barLabel: mergeClasses(verticalstackedbarchartClassNames.barLabel, baseStyles.barLabel)\n };\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,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,MAAMC,UAAU,GAAG1B,SAAS,CAAC,CAAC;EAC9B,OAAO;IACHtB,oBAAoB,EAAEL,YAAY,CAACI,iCAAiC,CAACC,oBAAoB,EAAEgD,UAAU,CAAChD,oBAAoB,EAAE+C,KAAK,CAACE,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC;IAC/JhD,OAAO,EAAEN,YAAY,CAACI,iCAAiC,CAACE,OAAO,EAAE+C,UAAU,CAAC/C,OAAO,CAAC;IACpFC,QAAQ,EAAEP,YAAY,CAACI,iCAAiC,CAACG,QAAQ,EAAE8C,UAAU,CAAC9C,QAAQ;EAC1F,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","verticalstackedbarchartClassNames","opacityChangeOnHover","tooltip","barLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","useStyles","Bceei9c","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","Bkfmm31","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","Bvjb7m6","d","p","useVerticalStackedBarChartStyles","props","baseStyles","href"],"sources":["useVerticalStackedBarChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const verticalstackedbarchartClassNames = {\n opacityChangeOnHover: 'fui-vsbc__opacityChangeOnHover',\n tooltip: 'fui-vsbc__tooltip',\n barLabel: 'fui-vsbc__barLabel',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: ''\n};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {\n cursor: 'default'\n },\n tooltip: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.padding(tokens.spacingHorizontalS),\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n fill: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none'\n },\n barLabel: {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n }\n});\nexport const useVerticalStackedBarChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n opacityChangeOnHover: mergeClasses(verticalstackedbarchartClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover, props.href ? 'pointer' : 'default'),\n tooltip: mergeClasses(verticalstackedbarchartClassNames.tooltip, baseStyles.tooltip),\n barLabel: mergeClasses(verticalstackedbarchartClassNames.barLabel, baseStyles.barLabel)\n };\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,OAAO,MAAMC,iCAAiC,GAAG;EAC7CC,oBAAoB,EAAE,gCAAgC;EACtDC,OAAO,EAAE,mBAAmB;EAC5BC,QAAQ,EAAE,oBAAoB;EAC9BC,IAAI,EAAE,EAAE;EACRC,KAAK,EAAE,EAAE;EACTC,KAAK,EAAE,EAAE;EACTC,eAAe,EAAE,EAAE;EACnBC,KAAK,EAAE,EAAE;EACTC,kBAAkB,EAAE,EAAE;EACtBC,SAAS,EAAE,EAAE;EACbC,UAAU,EAAE,EAAE;EACdC,WAAW,EAAE,EAAE;EACfC,YAAY,EAAE;AAClB,CAAC;AACD,MAAMC,SAAS,gBAAGnB,QAAA;EAAAM,oBAAA;IAAAc,OAAA;EAAA;EAAAb,OAAA;IAAAc,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAhC,QAAA;IAAAa,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAU,OAAA;IAAAO,OAAA;EAAA;AAAA;EAAAC,CAAA;IAAAC,CAAA;EAAA;AAAA,CAqBjB,CAAC;AACF,OAAO,MAAMC,gCAAgC,GAAIC,KAAK,IAAG;EACrD,MAAMC,UAAU,GAAG3B,SAAS,CAAC,CAAC;EAC9B,OAAO;IACHb,oBAAoB,EAAEL,YAAY,CAACI,iCAAiC,CAACC,oBAAoB,EAAEwC,UAAU,CAACxC,oBAAoB,EAAEuC,KAAK,CAACE,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC;IAC/JxC,OAAO,EAAEN,YAAY,CAACI,iCAAiC,CAACE,OAAO,EAAEuC,UAAU,CAACvC,OAAO,CAAC;IACpFC,QAAQ,EAAEP,YAAY,CAACI,iCAAiC,CAACG,QAAQ,EAAEsC,UAAU,CAACtC,QAAQ;EAC1F,CAAC;AACL,CAAC","ignoreList":[]}
@@ -24,16 +24,7 @@ const areaChartClassNames = {
24
24
  yAxis: '',
25
25
  legendContainer: '',
26
26
  hover: '',
27
- calloutContentRoot: '',
28
- calloutContentX: '',
29
- calloutContentY: '',
30
27
  descriptionMessage: '',
31
- calloutDateTimeContainer: '',
32
- calloutInfoContainer: '',
33
- calloutBlockContainer: '',
34
- calloutBlockContainertoDrawShapefalse: '',
35
- calloutBlockContainertoDrawShapetrue: '',
36
- calloutlegendText: '',
37
28
  axisTitle: '',
38
29
  chartTitle: '',
39
30
  opacityChangeOnHover: '',
@@ -1 +1 @@
1
- {"version":3,"sources":["useAreaChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const areaChartClassNames = {\n tooltip: 'fui-ac__tooltip',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n calloutContentRoot: '',\n calloutContentX: '',\n calloutContentY: '',\n descriptionMessage: '',\n calloutDateTimeContainer: '',\n calloutInfoContainer: '',\n calloutBlockContainer: '',\n calloutBlockContainertoDrawShapefalse: '',\n calloutBlockContainertoDrawShapetrue: '',\n calloutlegendText: '',\n axisTitle: '',\n chartTitle: '',\n opacityChangeOnHover: '',\n shapeStyles: '',\n chartWrapper: ''\n};\nconst useStyles = makeStyles({\n tooltip: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.padding(tokens.spacingHorizontalS),\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n backgroundColor: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none',\n color: tokens.colorNeutralForeground1\n }\n});\n/**\n * Apply styling to the AreaChart slots based on the state\n */ export const useAreaChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(areaChartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ )\n };\n};\n"],"names":["areaChartClassNames","useAreaChartStyles","tooltip","root","xAxis","yAxis","legendContainer","hover","calloutContentRoot","calloutContentX","calloutContentY","descriptionMessage","calloutDateTimeContainer","calloutInfoContainer","calloutBlockContainer","calloutBlockContainertoDrawShapefalse","calloutBlockContainertoDrawShapetrue","calloutlegendText","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","useStyles","__styles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","De3pzq","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","sj55zd","d","p","props","baseStyles","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;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AAA;IAC1E;AACJ"}
1
+ {"version":3,"sources":["useAreaChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const areaChartClassNames = {\n tooltip: 'fui-ac__tooltip',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n opacityChangeOnHover: '',\n shapeStyles: '',\n chartWrapper: ''\n};\nconst useStyles = makeStyles({\n tooltip: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.padding(tokens.spacingHorizontalS),\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n backgroundColor: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none',\n color: tokens.colorNeutralForeground1\n }\n});\n/**\n * Apply styling to the AreaChart slots based on the state\n */ export const useAreaChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(areaChartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ )\n };\n};\n"],"names":["areaChartClassNames","useAreaChartStyles","tooltip","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","useStyles","__styles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","De3pzq","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","sj55zd","d","p","props","baseStyles","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,mBAAmB;eAAnBA;;IA+BIC,kBAAkB;eAAlBA;;;uBAjCoC;AAE9C,MAAMD,sBAAsB;IAC/BE,SAAS;IACTC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,sBAAsB;IACtBC,aAAa;IACbC,cAAc;AAClB;AACA,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAb,SAAA;QAAAc,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,SAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,QAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAAAC,GAAA,CAAA;YAAA;SAAA;QAAA;QAAA;KAAA;AAAA;AAiBP,MAAMrC,qBAAsBsC,CAAAA;IACnC,MAAMC,aAAa1B;IACnB,OAAO;QACHZ,SAASuC,IAAAA,mBAAY,EAACzC,oBAAoBE,OAAO,EAAEsC,WAAWtC,OAAO,CAAC,uBAAA;IAC1E;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["CartesianChart.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { LegendsProps } from '../Legends/index';\nimport { AccessibilityProps, Chart, Margins } from '../../types/index';\nimport { ChartTypes, XAxisTypes, YAxisType } from '../../utilities/index';\nimport { TimeLocaleDefinition } from 'd3-time-format';\nimport { ChartPopoverProps } from './ChartPopover.types';\n/**\n * Cartesian Chart style properties\n * {@docCategory CartesianChart}\n */\nexport interface CartesianChartStyleProps {\n /**\n * Additional CSS class(es) to apply to the Chart.\n */\n className?: string;\n\n /**\n * Width of the chart.\n */\n width?: number;\n\n /**\n * Height of the chart.\n */\n height?: number;\n\n /**\n * Color of the chart.\n */\n color?: string;\n\n /**\n * Link to redirect if click action for graph\n */\n href?: string;\n\n /**\n * prop to check if the chart is selected or hovered upon to determine opacity\n */\n shouldHighlight?: boolean;\n\n /**\n * prop to check if the Page is in Rtl\n */\n useRtl?: boolean;\n\n /**\n * color of the line\n */\n lineColor?: string;\n\n /**\n * boolean flag which determines if shape is drawn in callout\n */\n toDrawShape?: boolean;\n}\n\n/**\n * Cartesian Chart styles\n * {@docCategory CartesianChart}\n */\nexport interface CartesianChartStyles {\n /**\n * Style for the root element.\n */\n root?: string;\n\n /**\n * Style for the element containing the x-axis.\n */\n xAxis?: string;\n\n /**\n * Style for the element containing the y-axis.\n */\n yAxis?: string;\n\n /**\n * Style for legend container\n */\n legendContainer?: string;\n\n /**\n * line hover box css\n */\n hover?: string;\n\n /**\n * styles for callout root-content\n */\n calloutContentRoot?: string;\n\n /**\n * styles for callout x-content\n */\n calloutContentX?: string;\n\n /**\n * styles for callout y-content\n */\n calloutContentY?: string;\n\n /**\n * styles for description message\n */\n descriptionMessage?: string;\n\n /**\n * styles for callout Date time container\n */\n calloutDateTimeContainer?: string;\n\n /**\n * styles for callout info container\n */\n calloutInfoContainer?: string;\n\n /**\n * styles for callout block container\n */\n calloutBlockContainer?: string;\n\n /**\n * Styles for callout block container when toDrawShape is false\n */\n calloutBlockContainertoDrawShapefalse?: string;\n\n /**\n * Styles for callout block container when toDrawShape is true\n */\n calloutBlockContainertoDrawShapetrue?: string;\n\n /**\n * styles for callout legend text\n */\n calloutlegendText?: string;\n\n /**\n * styles for tooltip\n */\n tooltip?: string;\n\n /**\n * styles for tooltip\n */\n axisTitle?: string;\n\n /**\n * Style for the chart Title.\n */\n chartTitle?: string;\n\n /**\n * Style to change the opacity of bars in dataviz when we hover on a single bar or legends\n */\n opacityChangeOnHover?: string;\n\n /**\n * styles for the shape object in the callout\n */\n shapeStyles?: string;\n\n /**\n * Styles for the chart wrapper div\n */\n chartWrapper?: string;\n}\n\n/**\n * Cartesian Chart properties\n * {@docCategory CartesianChart}\n */\nexport interface CartesianChartProps {\n /**\n * Below height used for resizing of the chart\n * Wrap chart in your container and send the updated height and width to these props.\n * These values decide wheather chart re render or not. Please check examples for reference\n */\n height?: number;\n\n /**\n * Below width used for resizing of the chart\n * Wrap chart in your container and send the updated height and width to these props.\n * These values decide wheather chart re render or not. Please check examples for reference\n */\n width?: number;\n\n /**\n * this prop takes its parent as a HTML element to define the width and height of the chart\n */\n parentRef?: HTMLElement | null;\n\n /**\n * Additional CSS class(es) to apply to the Chart.\n */\n className?: string;\n\n /**\n * Margins for the chart\n * @default `{ top: 20, bottom: 35, left: 40, right: 20 }`\n * To avoid edge cuttings to the chart, we recommend you use default values or greater then default values\n */\n margins?: Margins;\n\n /** decides wether to show/hide legends\n * @defaultvalue false\n */\n hideLegend?: boolean;\n\n /**\n * Do not show tooltips in chart\n * @default false\n */\n hideTooltip?: boolean;\n\n /**\n * this prop takes values that you want the chart to render on x-axis\n * This is a optional parameter if not specified D3 will decide which values appear on the x-axis for you\n * Please look at https://github.com/d3/d3-scale for more information on how D3 decides what data to appear on the axis of chart\n */\n tickValues?: number[] | Date[] | string[] | undefined;\n\n /**\n * the format for the data on x-axis. For date object this can be specified to your requirement. Eg: '%m/%d', '%d'\n * Please look at https://github.com/d3/d3-time-format for all the formats supported for date axis\n * Only applicable for date axis. For y-axis format use yAxisTickFormat prop.\n */\n tickFormat?: string;\n\n /**\n * Width of line stroke\n */\n strokeWidth?: number;\n\n /**\n * x Axis labels tick padding. This defines the gap between tick labels and tick lines.\n * @default 10\n */\n xAxisTickPadding?: number;\n\n /**\n * the format in for the data on y-axis. For data object this can be specified to your requirement.\n * Eg: d3.format(\".0%\")(0.123),d3.format(\"+20\")(42);\n * Please look at https://github.com/d3/d3-format for all the formats supported\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yAxisTickFormat?: any;\n\n /**\n * Secondary y-scale options\n * By default this is not defined, meaning there will be no secondary y-scale.\n */\n secondaryYScaleOptions?: {\n /** Minimum value (0 by default) */\n yMinValue?: number;\n /** Maximum value (100 by default) */\n yMaxValue?: number;\n };\n\n /**\n * minimum data value point in y-axis\n */\n yMinValue?: number;\n\n /**\n * maximum data value point in y-axis\n */\n yMaxValue?: number;\n\n /**\n * maximum data value point in x-axis\n */\n xMaxValue?: number;\n\n /**\n * Number of ticks on the y-axis.\n * Tick count should be factor of difference between (yMinValue, yMaxValue)?\n * @default 4\n */\n yAxisTickCount?: number;\n\n /**\n * defines the number of ticks on the x-axis. Tries to match the nearest interval satisfying the count.\n * Does not work for string axis.\n * @default 6\n */\n xAxisTickCount?: number;\n\n /**\n * define the size of the tick lines on the x-axis\n * @default 10\n */\n xAxistickSize?: number;\n\n /**\n * defines the space between the tick line and the data label\n * @default 10\n */\n tickPadding?: number;\n\n /**\n * Url that the data-viz needs to redirect to upon clicking on it\n */\n href?: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n legendsOverflowText?: any;\n\n /**\n * Enable the legends to wrap lines if there is not enough space to show all legends on a single line\n */\n enabledLegendsWrapLines?: boolean;\n\n /*\n * props for the legends in the chart\n */\n legendProps?: Partial<LegendsProps>;\n\n /**\n *@default false\n *Used for to elipse x axis labes and show tooltip on x axis labels\n */\n showXAxisLablesTooltip?: boolean;\n\n /**\n * @default 4\n * Used for X axis labels\n * While Giving showXAxisLablesTooltip prop, need to define after how many chars, we need to truncate the word.\n */\n noOfCharsToTruncate?: number;\n\n /**\n * @default false\n * Used to wrap x axis labels values (whole value)\n */\n wrapXAxisLables?: boolean;\n\n /**\n * @default false\n * Used to rotate x axis labels by 45 degrees\n */\n rotateXAxisLables?: boolean;\n\n /**\n * The prop used to define the date time localization options\n */\n dateLocalizeOptions?: Intl.DateTimeFormatOptions;\n\n /**\n * The prop used to define a custom locale for the date time format.\n */\n timeFormatLocale?: TimeLocaleDefinition;\n\n /**\n * The prop used to define a custom datetime formatter for date axis.\n */\n customDateTimeFormatter?: (dateTime: Date) => string;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: CartesianChartStyles;\n\n /**\n * Callout customization props\n */\n calloutProps?: Partial<ChartPopoverProps>;\n\n /**\n * props for the svg; use this to include aria-* or other attributes on the tag\n */\n svgProps?: React.SVGProps<SVGSVGElement>;\n\n /**\n * Props related to reflow behavior of the chart\n */\n reflowProps?: {\n /**\n * Determines the reflow behavior of the chart.\n * When set to `'min-width'`, the chart will not shrink below a certain width and will enable scrolling if it overflows.\n * @default 'none'\n */\n mode: 'none' | 'min-width';\n };\n\n /**\n * Prop to set the x axis title\n * @default undefined\n * Minimum bottom margin required for x axis title is 55px\n */\n\n xAxisTitle?: string;\n\n /**\n * Prop to set the y axis title\n * @default undefined\n * Minimum left margin required for y axis title is 60px and for RTL is 40px\n * Minimum right margin required for y axis title is 40px and for RTL is 60px\n */\n yAxisTitle?: string;\n\n /**\n * Prop to set the secondary y axis title\n * @default undefined\n * If RTL is enabled, minimum left and right margins required for secondary y axis title is 60px\n */\n secondaryYAxistitle?: string;\n\n /**\n * Whether to use UTC time for axis scale, ticks, and the time display in callouts.\n * When set to `true`, time is displayed equally, regardless of the user's timezone settings.\n * @default true\n */\n useUTC?: string | boolean;\n\n /**\n * @default false\n * The prop used to decide rounded ticks on y axis\n */\n roundedTicks?: boolean;\n\n /**\n * Determines whether overlapping x-axis tick labels should be hidden.\n * @default false\n */\n hideTickOverlap?: boolean;\n\n /**\n * Define a custom callout props override\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n calloutPropsPerDataPoint?: (dataPointCalloutProps: any) => ChartPopoverProps;\n\n /**\n * Optional callback to access the Chart interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: React.RefObject<Chart>;\n}\n\nexport interface YValueHover {\n legend?: string;\n y?: number;\n color?: string;\n data?: string | number;\n shouldDrawBorderBottom?: boolean;\n yAxisCalloutData?: string | { [id: string]: number };\n index?: number;\n callOutAccessibilityData?: AccessibilityProps;\n}\n\nexport interface ChildProps {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScale?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScaleSecondary?: any;\n containerHeight?: number;\n containerWidth?: number;\n optimizeLargeData?: boolean;\n}\n\n// Only used for Cartesian chart base\nexport interface ModifiedCartesianChartProps extends CartesianChartProps {\n /**\n * Define the chart title\n */\n chartTitle?: string;\n\n /**\n * Only used for Area chart\n * Value used to draw y axis of that chart.\n */\n maxOfYVal?: number;\n\n /**\n * Data of the chart\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n points: any;\n\n /**\n * Define type of the chart\n */\n chartType: ChartTypes;\n\n /** X axis type */\n xAxisType: XAxisTypes;\n\n /** Y axis type */\n yAxisType?: YAxisType;\n\n /**\n * Legends of the chart.\n */\n legendBars: JSX.Element | null;\n\n /**\n * Callout props\n */\n calloutProps?: ChartPopoverProps;\n\n /**\n * Callback method used for to get margins to the chart.\n */\n getmargins?: (margins: Margins) => void;\n\n /**\n * This is a call back method to the chart from cartesian chart.\n * params are xScale, yScale, containerHeight, containerWidth. These values were used to draw the graph.\n * It also contians an optional param xAxisElement - defines as x axis scale element.\n * This param used to enable feature word wrap of Xaxis.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getGraphData?: any;\n\n /**\n * Used for bar chart graphs.\n * To define width of the bar\n */\n barwidth?: number;\n\n /**\n * Used for tick styles of the x axis of the chart\n * Tick params are applicable for date axis only.\n */\n tickParams?: {\n tickValues?: number[] | Date[] | string[];\n tickFormat?: string;\n };\n\n /**\n * it's padding between bar's or lines in the graph\n */\n xAxisPadding?: number;\n\n /**\n * it's padding between bar's or lines in the graph\n */\n yAxisPadding?: number;\n\n /**\n * Children elements specific to derived chart types.\n */\n children(props: ChildProps): React.ReactNode;\n\n /**\n * To enable callout for individual bar or complete stack. Using for only Vertical stacked bar chart.\n * @default false\n * @type \\{boolean \\}\n */\n isCalloutForStack?: boolean;\n\n /** dataset values to find out domain of the String axis\n * Present using for only vertical stacked bar chart and grouped vertical bar chart\n */\n datasetForXAxisDomain?: string[];\n\n /** Own callout design */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n customizedCallout?: any;\n\n /**\n * if the data points for the y-axis is of type string, then we need to give this\n * prop to construct the y-axis\n */\n stringDatasetForYAxisDomain?: string[];\n\n /**\n * The prop used to define the culture to localize the numbers and date\n */\n culture?: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getAxisData?: any;\n\n /**\n * Callback method used when mouse leaves the chart boundary.\n */\n onChartMouseLeave?: () => void;\n\n /** Callback method to get extra margins for domain */\n getDomainMargins?: (containerWidth: number) => Margins;\n\n /** Padding between each bar/line-point */\n xAxisInnerPadding?: number;\n\n /** Padding before first bar/line-point and after last bar/line-point */\n xAxisOuterPadding?: number;\n\n /**\n *@default false\n *Used for to elipse y axis labes and show tooltip on x axis labels\n */\n showYAxisLablesTooltip?: boolean;\n\n /**\n *@default false\n *Used for showing complete y axis lables */\n showYAxisLables?: boolean;\n\n /**\n * @default false\n * Used to control the first render cycle Performance optimization code.\n */\n enableFirstRenderOptimization?: boolean;\n}\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
1
+ {"version":3,"sources":["CartesianChart.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { LegendsProps } from '../Legends/index';\nimport { AccessibilityProps, Chart, Margins } from '../../types/index';\nimport { ChartTypes, XAxisTypes, YAxisType } from '../../utilities/index';\nimport { TimeLocaleDefinition } from 'd3-time-format';\nimport { ChartPopoverProps } from './ChartPopover.types';\n/**\n * Cartesian Chart style properties\n * {@docCategory CartesianChart}\n */\nexport interface CartesianChartStyleProps {\n /**\n * Additional CSS class(es) to apply to the Chart.\n */\n className?: string;\n\n /**\n * Width of the chart.\n */\n width?: number;\n\n /**\n * Height of the chart.\n */\n height?: number;\n\n /**\n * Color of the chart.\n */\n color?: string;\n\n /**\n * Link to redirect if click action for graph\n */\n href?: string;\n\n /**\n * prop to check if the chart is selected or hovered upon to determine opacity\n */\n shouldHighlight?: boolean;\n\n /**\n * prop to check if the Page is in Rtl\n */\n useRtl?: boolean;\n\n /**\n * color of the line\n */\n lineColor?: string;\n\n /**\n * boolean flag which determines if shape is drawn in callout\n */\n toDrawShape?: boolean;\n}\n\n/**\n * Cartesian Chart styles\n * {@docCategory CartesianChart}\n */\nexport interface CartesianChartStyles {\n /**\n * Style for the root element.\n */\n root?: string;\n\n /**\n * Style for the element containing the x-axis.\n */\n xAxis?: string;\n\n /**\n * Style for the element containing the y-axis.\n */\n yAxis?: string;\n\n /**\n * Style for legend container\n */\n legendContainer?: string;\n\n /**\n * line hover box css\n */\n hover?: string;\n\n /**\n * styles for description message\n */\n descriptionMessage?: string;\n\n /**\n * styles for tooltip\n */\n tooltip?: string;\n\n /**\n * styles for tooltip\n */\n axisTitle?: string;\n\n /**\n * Style for the chart Title.\n */\n chartTitle?: string;\n\n /**\n * Style to change the opacity of bars in dataviz when we hover on a single bar or legends\n */\n opacityChangeOnHover?: string;\n\n /**\n * styles for the shape object in the callout\n */\n shapeStyles?: string;\n\n /**\n * Styles for the chart wrapper div\n */\n chartWrapper?: string;\n}\n\n/**\n * Cartesian Chart properties\n * {@docCategory CartesianChart}\n */\nexport interface CartesianChartProps {\n /**\n * Below height used for resizing of the chart\n * Wrap chart in your container and send the updated height and width to these props.\n * These values decide wheather chart re render or not. Please check examples for reference\n */\n height?: number;\n\n /**\n * Below width used for resizing of the chart\n * Wrap chart in your container and send the updated height and width to these props.\n * These values decide wheather chart re render or not. Please check examples for reference\n */\n width?: number;\n\n /**\n * this prop takes its parent as a HTML element to define the width and height of the chart\n */\n parentRef?: HTMLElement | null;\n\n /**\n * Additional CSS class(es) to apply to the Chart.\n */\n className?: string;\n\n /**\n * Margins for the chart\n * @default `{ top: 20, bottom: 35, left: 40, right: 20 }`\n * To avoid edge cuttings to the chart, we recommend you use default values or greater then default values\n */\n margins?: Margins;\n\n /** decides wether to show/hide legends\n * @defaultvalue false\n */\n hideLegend?: boolean;\n\n /**\n * Do not show tooltips in chart\n * @default false\n */\n hideTooltip?: boolean;\n\n /**\n * this prop takes values that you want the chart to render on x-axis\n * This is a optional parameter if not specified D3 will decide which values appear on the x-axis for you\n * Please look at https://github.com/d3/d3-scale for more information on how D3 decides what data to appear on the axis of chart\n */\n tickValues?: number[] | Date[] | string[] | undefined;\n\n /**\n * the format for the data on x-axis. For date object this can be specified to your requirement. Eg: '%m/%d', '%d'\n * Please look at https://github.com/d3/d3-time-format for all the formats supported for date axis\n * Only applicable for date axis. For y-axis format use yAxisTickFormat prop.\n */\n tickFormat?: string;\n\n /**\n * Width of line stroke\n */\n strokeWidth?: number;\n\n /**\n * x Axis labels tick padding. This defines the gap between tick labels and tick lines.\n * @default 10\n */\n xAxisTickPadding?: number;\n\n /**\n * the format in for the data on y-axis. For data object this can be specified to your requirement.\n * Eg: d3.format(\".0%\")(0.123),d3.format(\"+20\")(42);\n * Please look at https://github.com/d3/d3-format for all the formats supported\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yAxisTickFormat?: any;\n\n /**\n * Secondary y-scale options\n * By default this is not defined, meaning there will be no secondary y-scale.\n */\n secondaryYScaleOptions?: {\n /** Minimum value (0 by default) */\n yMinValue?: number;\n /** Maximum value (100 by default) */\n yMaxValue?: number;\n };\n\n /**\n * minimum data value point in y-axis\n */\n yMinValue?: number;\n\n /**\n * maximum data value point in y-axis\n */\n yMaxValue?: number;\n\n /**\n * maximum data value point in x-axis\n */\n xMaxValue?: number;\n\n /**\n * Number of ticks on the y-axis.\n * Tick count should be factor of difference between (yMinValue, yMaxValue)?\n * @default 4\n */\n yAxisTickCount?: number;\n\n /**\n * defines the number of ticks on the x-axis. Tries to match the nearest interval satisfying the count.\n * Does not work for string axis.\n * @default 6\n */\n xAxisTickCount?: number;\n\n /**\n * define the size of the tick lines on the x-axis\n * @default 10\n */\n xAxistickSize?: number;\n\n /**\n * defines the space between the tick line and the data label\n * @default 10\n */\n tickPadding?: number;\n\n /**\n * Url that the data-viz needs to redirect to upon clicking on it\n */\n href?: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n legendsOverflowText?: any;\n\n /**\n * Enable the legends to wrap lines if there is not enough space to show all legends on a single line\n */\n enabledLegendsWrapLines?: boolean;\n\n /*\n * props for the legends in the chart\n */\n legendProps?: Partial<LegendsProps>;\n\n /**\n *@default false\n *Used for to elipse x axis labes and show tooltip on x axis labels\n */\n showXAxisLablesTooltip?: boolean;\n\n /**\n * @default 4\n * Used for X axis labels\n * While Giving showXAxisLablesTooltip prop, need to define after how many chars, we need to truncate the word.\n */\n noOfCharsToTruncate?: number;\n\n /**\n * @default false\n * Used to wrap x axis labels values (whole value)\n */\n wrapXAxisLables?: boolean;\n\n /**\n * @default false\n * Used to rotate x axis labels by 45 degrees\n */\n rotateXAxisLables?: boolean;\n\n /**\n * The prop used to define the date time localization options\n */\n dateLocalizeOptions?: Intl.DateTimeFormatOptions;\n\n /**\n * The prop used to define a custom locale for the date time format.\n */\n timeFormatLocale?: TimeLocaleDefinition;\n\n /**\n * The prop used to define a custom datetime formatter for date axis.\n */\n customDateTimeFormatter?: (dateTime: Date) => string;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: CartesianChartStyles;\n\n /**\n * Callout customization props\n */\n calloutProps?: Partial<ChartPopoverProps>;\n\n /**\n * props for the svg; use this to include aria-* or other attributes on the tag\n */\n svgProps?: React.SVGProps<SVGSVGElement>;\n\n /**\n * Props related to reflow behavior of the chart\n */\n reflowProps?: {\n /**\n * Determines the reflow behavior of the chart.\n * When set to `'min-width'`, the chart will not shrink below a certain width and will enable scrolling if it overflows.\n * @default 'none'\n */\n mode: 'none' | 'min-width';\n };\n\n /**\n * Prop to set the x axis title\n * @default undefined\n * Minimum bottom margin required for x axis title is 55px\n */\n\n xAxisTitle?: string;\n\n /**\n * Prop to set the y axis title\n * @default undefined\n * Minimum left margin required for y axis title is 60px and for RTL is 40px\n * Minimum right margin required for y axis title is 40px and for RTL is 60px\n */\n yAxisTitle?: string;\n\n /**\n * Prop to set the secondary y axis title\n * @default undefined\n * If RTL is enabled, minimum left and right margins required for secondary y axis title is 60px\n */\n secondaryYAxistitle?: string;\n\n /**\n * Whether to use UTC time for axis scale, ticks, and the time display in callouts.\n * When set to `true`, time is displayed equally, regardless of the user's timezone settings.\n * @default true\n */\n useUTC?: string | boolean;\n\n /**\n * @default false\n * The prop used to decide rounded ticks on y axis\n */\n roundedTicks?: boolean;\n\n /**\n * Determines whether overlapping x-axis tick labels should be hidden.\n * @default false\n */\n hideTickOverlap?: boolean;\n\n /**\n * Define a custom callout props override\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n calloutPropsPerDataPoint?: (dataPointCalloutProps: any) => ChartPopoverProps;\n\n /**\n * Optional callback to access the Chart interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: React.RefObject<Chart>;\n}\n\nexport interface YValueHover {\n legend?: string;\n y?: number;\n color?: string;\n data?: string | number;\n shouldDrawBorderBottom?: boolean;\n yAxisCalloutData?: string | { [id: string]: number };\n index?: number;\n callOutAccessibilityData?: AccessibilityProps;\n}\n\nexport interface ChildProps {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScale?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScaleSecondary?: any;\n containerHeight?: number;\n containerWidth?: number;\n optimizeLargeData?: boolean;\n}\n\n// Only used for Cartesian chart base\nexport interface ModifiedCartesianChartProps extends CartesianChartProps {\n /**\n * Define the chart title\n */\n chartTitle?: string;\n\n /**\n * Only used for Area chart\n * Value used to draw y axis of that chart.\n */\n maxOfYVal?: number;\n\n /**\n * Data of the chart\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n points: any;\n\n /**\n * Define type of the chart\n */\n chartType: ChartTypes;\n\n /** X axis type */\n xAxisType: XAxisTypes;\n\n /** Y axis type */\n yAxisType?: YAxisType;\n\n /**\n * Legends of the chart.\n */\n legendBars: JSX.Element | null;\n\n /**\n * Callout props\n */\n calloutProps?: ChartPopoverProps;\n\n /**\n * Callback method used for to get margins to the chart.\n */\n getmargins?: (margins: Margins) => void;\n\n /**\n * This is a call back method to the chart from cartesian chart.\n * params are xScale, yScale, containerHeight, containerWidth. These values were used to draw the graph.\n * It also contians an optional param xAxisElement - defines as x axis scale element.\n * This param used to enable feature word wrap of Xaxis.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getGraphData?: any;\n\n /**\n * Used for bar chart graphs.\n * To define width of the bar\n */\n barwidth?: number;\n\n /**\n * Used for tick styles of the x axis of the chart\n * Tick params are applicable for date axis only.\n */\n tickParams?: {\n tickValues?: number[] | Date[] | string[];\n tickFormat?: string;\n };\n\n /**\n * it's padding between bar's or lines in the graph\n */\n xAxisPadding?: number;\n\n /**\n * it's padding between bar's or lines in the graph\n */\n yAxisPadding?: number;\n\n /**\n * Children elements specific to derived chart types.\n */\n children(props: ChildProps): React.ReactNode;\n\n /**\n * To enable callout for individual bar or complete stack. Using for only Vertical stacked bar chart.\n * @default false\n * @type \\{boolean \\}\n */\n isCalloutForStack?: boolean;\n\n /** dataset values to find out domain of the String axis\n * Present using for only vertical stacked bar chart and grouped vertical bar chart\n */\n datasetForXAxisDomain?: string[];\n\n /** Own callout design */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n customizedCallout?: any;\n\n /**\n * if the data points for the y-axis is of type string, then we need to give this\n * prop to construct the y-axis\n */\n stringDatasetForYAxisDomain?: string[];\n\n /**\n * The prop used to define the culture to localize the numbers and date\n */\n culture?: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getAxisData?: any;\n\n /**\n * Callback method used when mouse leaves the chart boundary.\n */\n onChartMouseLeave?: () => void;\n\n /** Callback method to get extra margins for domain */\n getDomainMargins?: (containerWidth: number) => Margins;\n\n /** Padding between each bar/line-point */\n xAxisInnerPadding?: number;\n\n /** Padding before first bar/line-point and after last bar/line-point */\n xAxisOuterPadding?: number;\n\n /**\n *@default false\n *Used for to elipse y axis labes and show tooltip on x axis labels\n */\n showYAxisLablesTooltip?: boolean;\n\n /**\n *@default false\n *Used for showing complete y axis lables */\n showYAxisLables?: boolean;\n\n /**\n * @default false\n * Used to control the first render cycle Performance optimization code.\n */\n enableFirstRenderOptimization?: boolean;\n}\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
@@ -65,7 +65,7 @@ const ChartPopover = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
65
65
  display: 'flex',
66
66
  alignItems: 'flex-end'
67
67
  },
68
- borderLeft: `4px solid ${props.color}`
68
+ borderInlineStart: `4px solid ${props.color}`
69
69
  }
70
70
  }, /*#__PURE__*/ _react.createElement("div", {
71
71
  className: classes.calloutBlockContainer
@@ -151,7 +151,7 @@ const ChartPopover = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
151
151
  style: {
152
152
  marginTop: props.XValue ? '13px' : 'unset',
153
153
  ...!toDrawShape ? {
154
- borderLeft: `4px solid ${xValue.color}`
154
+ borderInlineStart: `4px solid ${xValue.color}`
155
155
  } : {}
156
156
  }
157
157
  }, toDrawShape && /*#__PURE__*/ _react.createElement(_shape.Shape, {