@fluentui/react-charts 9.2.3 → 9.2.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 (194) hide show
  1. package/CHANGELOG.md +49 -10
  2. package/dist/index.d.ts +98 -5
  3. package/lib/components/AreaChart/AreaChart.js +3 -3
  4. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  5. package/lib/components/AreaChart/useAreaChartStyles.styles.js +2 -2
  6. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  7. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -15
  8. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  9. package/lib/components/ChartTable/ChartTable.js +89 -6
  10. package/lib/components/ChartTable/ChartTable.js.map +1 -1
  11. package/lib/components/CommonComponents/CartesianChart.js +38 -34
  12. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  13. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  14. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +17 -14
  15. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  16. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +6 -33
  17. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  18. package/lib/components/DeclarativeChart/DeclarativeChart.js +55 -16
  19. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  20. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +19 -0
  21. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  22. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +1058 -291
  23. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  24. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +8 -3
  25. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  26. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +6 -2
  27. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  28. package/lib/components/DonutChart/DonutChart.js +6 -1
  29. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  30. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  31. package/lib/components/DonutChart/useDonutChartStyles.styles.js +21 -4
  32. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  33. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +8 -4
  34. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  35. package/lib/components/FunnelChart/FunnelChart.js +4 -2
  36. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  37. package/lib/components/FunnelChart/funnelGeometry.js.map +1 -1
  38. package/lib/components/GaugeChart/GaugeChart.js +1 -2
  39. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  40. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +2 -2
  41. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  42. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +4 -17
  43. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  44. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +4 -21
  45. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  46. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +1 -1
  47. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  48. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +7 -3
  49. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  50. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +5 -2
  51. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  52. package/lib/components/LineChart/LineChart.js +271 -271
  53. package/lib/components/LineChart/LineChart.js.map +1 -1
  54. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  55. package/lib/components/LineChart/useLineChartStyles.styles.js +23 -10
  56. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  57. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +4 -21
  58. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  59. package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  60. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  61. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +12 -25
  62. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  63. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +2 -12
  64. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  65. package/lib/components/ScatterChart/ScatterChart.js +114 -75
  66. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  67. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  68. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +11 -7
  69. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  70. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +4 -22
  71. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  72. package/lib/components/VerticalBarChart/VerticalBarChart.js +2 -2
  73. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  74. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +8 -6
  75. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  76. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +5 -19
  77. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  78. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +2 -2
  79. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  80. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +7 -6
  81. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  82. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +4 -19
  83. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  84. package/lib/types/DataPoint.js +3 -1
  85. package/lib/types/DataPoint.js.map +1 -1
  86. package/lib/utilities/Common.styles.js +47 -0
  87. package/lib/utilities/Common.styles.js.map +1 -0
  88. package/lib/utilities/Common.styles.raw.js +47 -0
  89. package/lib/utilities/Common.styles.raw.js.map +1 -0
  90. package/lib/utilities/SVGTooltipText.js.map +1 -1
  91. package/lib/utilities/image-export-utils.js.map +1 -1
  92. package/lib/utilities/index.js +1 -0
  93. package/lib/utilities/index.js.map +1 -1
  94. package/lib/utilities/scatterpolar-utils.js +52 -0
  95. package/lib/utilities/scatterpolar-utils.js.map +1 -0
  96. package/lib/utilities/utilities.js +309 -142
  97. package/lib/utilities/utilities.js.map +1 -1
  98. package/lib/utilities/vbc-utils.js.map +1 -1
  99. package/lib-commonjs/components/AreaChart/AreaChart.js +2 -2
  100. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  101. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  102. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +2 -14
  103. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  104. package/lib-commonjs/components/ChartTable/ChartTable.js +89 -6
  105. package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
  106. package/lib-commonjs/components/CommonComponents/CartesianChart.js +38 -34
  107. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  108. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  109. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +15 -13
  110. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  111. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +4 -32
  112. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  113. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +58 -19
  114. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  115. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +22 -0
  116. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  117. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +1070 -291
  118. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  119. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +12 -3
  120. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  121. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +6 -2
  122. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  123. package/lib-commonjs/components/DonutChart/DonutChart.js +6 -1
  124. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  125. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  126. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +32 -4
  127. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  128. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +8 -4
  129. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  130. package/lib-commonjs/components/FunnelChart/FunnelChart.js +4 -2
  131. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
  132. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -1
  133. package/lib-commonjs/components/GaugeChart/GaugeChart.js +1 -2
  134. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  135. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +2 -2
  136. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  137. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +2 -19
  138. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  139. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +3 -20
  140. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  141. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +1 -1
  142. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  143. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +10 -3
  144. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  145. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +5 -2
  146. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  147. package/lib-commonjs/components/LineChart/LineChart.js +269 -269
  148. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  149. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  150. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +30 -9
  151. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  152. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +2 -20
  153. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  154. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  155. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  156. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +23 -33
  157. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  158. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +1 -12
  159. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  160. package/lib-commonjs/components/ScatterChart/ScatterChart.js +112 -73
  161. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  162. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  163. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +13 -7
  164. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  165. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +2 -20
  166. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  167. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +1 -1
  168. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  169. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +5 -3
  170. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  171. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +3 -17
  172. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  173. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +1 -1
  174. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  175. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +5 -3
  176. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  177. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -18
  178. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  179. package/lib-commonjs/types/DataPoint.js +3 -1
  180. package/lib-commonjs/types/DataPoint.js.map +1 -1
  181. package/lib-commonjs/utilities/Common.styles.js +71 -0
  182. package/lib-commonjs/utilities/Common.styles.js.map +1 -0
  183. package/lib-commonjs/utilities/Common.styles.raw.js +71 -0
  184. package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -0
  185. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  186. package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
  187. package/lib-commonjs/utilities/index.js +1 -0
  188. package/lib-commonjs/utilities/index.js.map +1 -1
  189. package/lib-commonjs/utilities/scatterpolar-utils.js +67 -0
  190. package/lib-commonjs/utilities/scatterpolar-utils.js.map +1 -0
  191. package/lib-commonjs/utilities/utilities.js +322 -133
  192. package/lib-commonjs/utilities/utilities.js.map +1 -1
  193. package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
  194. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/GroupedVerticalBarChart/GroupedVerticalBarChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useGroupedVerticalBarChartStyles_unstable } from './useGroupedVerticalBarChartStyles.styles';\nimport { select as d3Select } from 'd3-selection';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { ScaleLinear, scaleBand as d3ScaleBand } from 'd3-scale';\n\nimport { useId, JSXElement } from '@fluentui/react-utilities';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n tooltipOfAxislabels,\n XAxisTypes,\n getTypeOfAxis,\n formatScientificLimitWidth,\n getScalePadding,\n getBarWidth,\n isScalePaddingDefined,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfXStringAxis,\n createStringYAxis,\n getNextColor,\n areArraysEqual,\n calculateLongestLabelWidth,\n useRtl,\n YAxisType,\n calcRequiredWidth,\n calcTotalWidth,\n calcBandwidth,\n calcTotalBandUnits,\n sortAxisCategories,\n} from '../../utilities/index';\n\nimport {\n AccessibilityProps,\n CartesianChart,\n Margins,\n Legend,\n GroupedVerticalBarChartProps,\n GroupedVerticalBarChartData,\n GVBarChartSeriesPoint,\n Legends,\n YValueHover,\n ChartPopoverProps,\n Chart,\n ImageExportOptions,\n LegendContainer,\n} from '../../index';\nimport { toImage } from '../../utilities/image-export-utils';\n\ntype StringAxis = D3Axis<string>;\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\n\nconst MIN_DOMAIN_MARGIN = 8;\nconst X1_INNER_PADDING = 0.1;\nconst VERTICAL_BAR_GAP = 1;\nconst MIN_BAR_HEIGHT = 1;\n\n// This interface used for - While forming datapoints from given prop \"data\" in code\ninterface GVDataPoint {\n [key: string]: number | string;\n}\n\n// While forming datapoints from given prop \"data\" in code. These datapoints are used for to draw graph easily.\ninterface GVSingleDataPoint {\n [key: string]: GVDataPoint;\n}\n\nexport const GroupedVerticalBarChart: React.FC<GroupedVerticalBarChartProps> = React.forwardRef<\n HTMLDivElement,\n GroupedVerticalBarChartProps\n>((props = { maxBarWidth: 24, xAxisCategoryOrder: 'default' }, forwardedRef) => {\n const _tooltipId: string = useId('GVBCTooltipId_');\n const _emptyChartId: string = useId('_GVBC_empty');\n const _useRtl: boolean = useRtl();\n let _domainMargin: number = MIN_DOMAIN_MARGIN;\n let _xAxisLabels: string[] = [];\n let _datasetForBars: any[] = [];\n let _margins: Margins = { top: 0, right: 0, bottom: 0, left: 0 };\n let _groupedVerticalBarGraph: JSXElement[] = [];\n let _yMax: number = 0;\n let _calloutAnchorPoint: GVBarChartSeriesPoint | null = null;\n let _barWidth: number = 0;\n let _groupWidth: number = 0;\n let _xAxisInnerPadding: number = 0;\n let _xAxisOuterPadding: number = 0;\n let _legends: string[] = [];\n let _legendColorMap: Record<string, [string, string]> = {};\n const cartesianChartRef = React.useRef<Chart>(null);\n const Y_ORIGIN: number = 0;\n const _legendsRef = React.useRef<LegendContainer>(null);\n\n const [color, setColor] = React.useState<string>('');\n const [dataForHoverCard, setDataForHoverCard] = React.useState<number>(0);\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const [xCalloutValue, setXCalloutValue] = React.useState<string>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string>('');\n const [YValueHover, setYValueHover] = React.useState<YValueHover[]>([]);\n const [hoverXValue, setHoverXValue] = React.useState<string>('');\n const [calloutLegend, setCalloutLegend] = React.useState<string>('');\n const [activeLegend, setActiveLegend] = React.useState<string>('');\n const [callOutAccessibilityData, setCallOutAccessibilityData] = React.useState<AccessibilityProps | undefined>(\n undefined,\n );\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState<boolean>(false);\n const classes = useGroupedVerticalBarChartStyles_unstable(props);\n\n React.useEffect(() => {\n if (!areArraysEqual(props.legendProps?.selectedLegends, selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n }, [props.legendProps?.selectedLegends]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n toImage: (opts?: ImageExportOptions): Promise<string> => {\n return toImage(cartesianChartRef.current?.chartContainer, _legendsRef.current?.toSVG, _useRtl, opts);\n },\n }),\n [],\n );\n\n const _adjustProps = () => {\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n // x0_inner_padding = space_between_groups / (space_between_groups + group_width)\n // space_between_groups = 2 * bar_width\n // group_width = _legends.length * bar_width + (_legends.length - 1) * space_between_bars\n _xAxisInnerPadding = getScalePadding(\n props.xAxisInnerPadding,\n undefined,\n 2 / (2 + calcTotalBandUnits(_legends.length, X1_INNER_PADDING)),\n );\n _xAxisOuterPadding = getScalePadding(props.xAxisOuterPadding);\n };\n\n const _createDataset = (points: GroupedVerticalBarChartData[]) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const datasetForBars: any = [];\n\n points.forEach((point: GroupedVerticalBarChartData, index: number) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDatasetPointForBars: any = {};\n const legendToBarPoint: Record<string, GVBarChartSeriesPoint> = {};\n\n point.series.forEach((seriesPoint: GVBarChartSeriesPoint) => {\n if (!singleDatasetPointForBars[seriesPoint.legend]) {\n singleDatasetPointForBars[seriesPoint.legend] = [{ ...seriesPoint }];\n legendToBarPoint[seriesPoint.legend] = { ...seriesPoint };\n } else {\n singleDatasetPointForBars[seriesPoint.legend].push({ ...seriesPoint });\n legendToBarPoint[seriesPoint.legend].data += seriesPoint.data;\n }\n });\n\n singleDatasetPointForBars.xAxisPoint = point.name;\n singleDatasetPointForBars.indexNum = index;\n singleDatasetPointForBars.groupSeries = Object.values(legendToBarPoint);\n singleDatasetPointForBars.stackCallOutAccessibilityData = point.stackCallOutAccessibilityData;\n datasetForBars.push(singleDatasetPointForBars);\n });\n return datasetForBars;\n };\n\n const _createDataSetOfGVBC = (points: GroupedVerticalBarChartData[]) => {\n const legends = new Set<string>();\n const xAxisLabels: string[] = _getOrderedXAxisLabels(points);\n points.forEach((point: GroupedVerticalBarChartData) => {\n point.series.forEach((seriesPoint: GVBarChartSeriesPoint) => {\n legends.add(seriesPoint.legend);\n });\n });\n const datasetForBars = _createDataset(points);\n return {\n legends: Array.from(legends),\n xAxisLabels,\n datasetForBars,\n };\n };\n\n const 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 // eslint-disable-next-line @typescript-eslint/no-deprecated\n const _getLegendData = (points: GroupedVerticalBarChartData[]): JSXElement => {\n const actions: Legend[] = [];\n\n _legends.forEach((legendTitle: string) => {\n const legend: Legend = {\n title: legendTitle,\n color: _legendColorMap[legendTitle][0],\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(legendTitle);\n },\n onMouseOutAction: () => {\n _onLegendLeave();\n },\n };\n\n actions.push(legend);\n });\n return (\n <Legends\n legends={actions}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n onChange={onLegendSelectionChange}\n legendRef={_legendsRef}\n />\n );\n };\n\n const _addDefaultColors = (data?: GroupedVerticalBarChartData[]): GroupedVerticalBarChartData[] => {\n _legendColorMap = {};\n let colorIndex = 0;\n\n return (\n data?.map(point => {\n return {\n ...point,\n series:\n point.series?.map(seriesPoint => {\n // TODO: Add support for gradient colors\n let startColor = seriesPoint.color ? seriesPoint.color : getNextColor(colorIndex, 0);\n let endColor = startColor;\n if (!_legendColorMap[seriesPoint.legend]) {\n _legendColorMap[seriesPoint.legend] = [startColor, endColor];\n }\n colorIndex += 1;\n\n return {\n ...seriesPoint,\n color: seriesPoint.color ?? _legendColorMap[seriesPoint.legend][0],\n };\n }) ?? [],\n };\n }) ?? []\n );\n };\n\n const _getOrderedXAxisLabels = (points: GroupedVerticalBarChartData[]) => {\n if (_xAxisType !== XAxisTypes.StringAxis) {\n return [];\n }\n\n return sortAxisCategories(_mapCategoryToValues(points), props.xAxisCategoryOrder);\n };\n\n const _mapCategoryToValues = (points: GroupedVerticalBarChartData[]) => {\n const categoryToValues: Record<string, number[]> = {};\n points.forEach(point => {\n if (!categoryToValues[point.name]) {\n categoryToValues[point.name] = [];\n }\n point.series.forEach(seriesPoint => {\n categoryToValues[point.name].push(seriesPoint.data);\n });\n });\n return categoryToValues;\n };\n\n const points = _addDefaultColors(props.data);\n const _xAxisType: XAxisTypes = getTypeOfAxis(points![0].name, true) as XAxisTypes;\n const { legends, xAxisLabels, datasetForBars } = _createDataSetOfGVBC(points!);\n _legends = legends;\n _xAxisLabels = xAxisLabels;\n _datasetForBars = datasetForBars;\n const legendBars: JSXElement = _getLegendData(points);\n _adjustProps();\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- Add commentMore actions\n function _getMinMaxOfYAxis(datasetForBars: any, yAxisType?: YAxisType, useSecondaryYScale?: boolean) {\n const values: number[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n datasetForBars.forEach((data: any) => {\n data.groupSeries.forEach((point: GVBarChartSeriesPoint) => {\n if (!useSecondaryYScale === !point.useSecondaryYScale) {\n values.push(point.data);\n }\n });\n });\n\n return { startValue: d3Min(values)!, endValue: d3Max(values)! };\n }\n\n function _getDomainNRangeValues(\n points: GroupedVerticalBarChartData[],\n margins: Margins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis || xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);\n }\n return domainNRangeValue;\n }\n\n // The maxOfYVal prop is only required for the primary y-axis, so yMax should be calculated\n // using only the data points associated with the primary y-axis.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const yMax = _getMinMaxOfYAxis(_datasetForBars).endValue;\n _yMax = Math.max(yMax, props.yMaxValue || 0);\n\n const calloutProps: ChartPopoverProps = {\n clickPosition,\n isPopoverOpen,\n color,\n legend: calloutLegend,\n XValue: xCalloutValue,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n YValueHover,\n hoverXValue,\n culture: props.culture ?? 'en-us',\n isCartesian: true,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData, 'text', false),\n };\n const tickParams = {\n tickValues: props.tickValues!,\n tickFormat: props.tickFormat!,\n };\n\n const _getGraphData = (\n xScale: StringAxis | NumericAxis,\n yScalePrimary: ScaleLinear<number, number>,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n yAxisElement?: SVGElement | null,\n yScaleSecondary?: ScaleLinear<number, number>,\n ) => {\n const xScale0 = _createX0Scale(containerWidth);\n\n // Setting the bar width here is safe because there are no dependencies earlier in the code\n // that rely on the width of bars in vertical bar charts with string x-axis.\n _barWidth = getBarWidth(\n props.barWidth,\n props.maxBarWidth,\n calcBandwidth(xScale0.bandwidth(), _legends.length, X1_INNER_PADDING),\n );\n _groupWidth = calcRequiredWidth(_barWidth, _legends.length, X1_INNER_PADDING);\n\n const xScale1 = _createX1Scale();\n const allGroupsBars: JSXElement[] = [];\n _datasetForBars.forEach((singleSet: GVSingleDataPoint) => {\n allGroupsBars.push(\n _buildGraph(singleSet, xScale0, xScale1, yScalePrimary, yScaleSecondary, containerHeight, xElement!),\n );\n });\n _groupedVerticalBarGraph = allGroupsBars;\n };\n\n const _getMargins = (margins: Margins) => {\n _margins = margins;\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 const onBarHover = (\n pointData: GVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void => {\n mouseEvent.persist();\n if (_calloutAnchorPoint !== pointData) {\n _calloutAnchorPoint = pointData;\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(pointData.legend));\n setCalloutLegend(pointData.legend);\n setDataForHoverCard(pointData.data);\n setColor(pointData.color);\n setXCalloutValue(pointData.xAxisCalloutData!);\n setYCalloutValue(pointData.yAxisCalloutData!);\n setCallOutAccessibilityData(\n props.isCalloutForStack ? groupData.stackCallOutAccessibilityData : pointData.callOutAccessibilityData,\n );\n setYValueHover(groupData.groupSeries);\n setHoverXValue(pointData.xAxisCalloutData!);\n }\n };\n\n const _onBarLeave = (): void => {\n /**/\n };\n\n const _handleChartMouseLeave = (): void => {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n };\n\n const onBarFocus = (\n event: React.FocusEvent<SVGRectElement, Element>,\n pointData: GVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n ): void => {\n let x = 0;\n let y = 0;\n\n const targetRect = (event.target as SVGRectElement).getBoundingClientRect();\n x = targetRect.left + targetRect.width / 2;\n y = targetRect.top + targetRect.height / 2;\n updatePosition(x, y);\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(pointData.legend));\n setCalloutLegend(pointData.legend);\n setDataForHoverCard(pointData.data);\n setColor(pointData.color);\n setXCalloutValue(pointData.xAxisCalloutData!);\n setYCalloutValue(pointData.yAxisCalloutData!);\n setCallOutAccessibilityData(\n props.isCalloutForStack ? groupData.stackCallOutAccessibilityData : pointData.callOutAccessibilityData,\n );\n setYValueHover(groupData.groupSeries);\n setHoverXValue(pointData.xAxisCalloutData!);\n };\n\n const _buildGraph = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n singleSet: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale0: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale1: any,\n yScalePrimary: ScaleLinear<number, number>,\n yScaleSecondary: ScaleLinear<number, number> | undefined,\n containerHeight: number,\n xElement: SVGElement,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ): JSXElement => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const singleGroup: JSXElement[] = [];\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const barLabelsForGroup: JSXElement[] = [];\n\n // Get the actual legends present at this x-axis point\n const presentLegends = Object.keys(singleSet).filter(key => key in _legendColorMap);\n const effectiveGroupWidth = calcRequiredWidth(_barWidth, presentLegends.length, X1_INNER_PADDING);\n\n // For stacked bars, center the single bar group in the available space\n // Instead of using the global legend position, use the local position within present legends\n const localScale = d3ScaleBand()\n .domain(presentLegends)\n .range(_useRtl ? [effectiveGroupWidth, 0] : [0, effectiveGroupWidth])\n .paddingInner(X1_INNER_PADDING);\n _legends.forEach((legendTitle: string, legendIndex: number) => {\n const barPoints = singleSet[legendTitle];\n if (barPoints) {\n const yBarScale = barPoints[0].useSecondaryYScale && yScaleSecondary ? yScaleSecondary : yScalePrimary;\n\n const xPoint = (localScale(legendTitle) ?? 0) + (localScale.bandwidth() - _barWidth) / 2;\n const isLegendActive = _legendHighlighted(legendTitle) || _noLegendHighlighted();\n const barOpacity = isLegendActive ? '' : '0.1';\n\n let barTotalValue = 0;\n const yBaseline = yBarScale(Y_ORIGIN);\n let yPositiveStart = yBaseline;\n let yNegativeStart = yBaseline;\n let yPoint = Y_ORIGIN;\n\n barPoints.forEach((pointData: GVBarChartSeriesPoint, pointIndex: number) => {\n if (!pointData.data) {\n // Not rendering data with 0.\n return;\n }\n const barGap = (VERTICAL_BAR_GAP / 2) * (pointIndex > 0 ? 2 : 0);\n const height = Math.max(yBarScale(Y_ORIGIN) - yBarScale(Math.abs(pointData.data)), MIN_BAR_HEIGHT);\n const pointColor = pointData.color; // Use the color of the current point\n\n if (pointData.data >= Y_ORIGIN) {\n yPositiveStart -= height + barGap;\n yPoint = yPositiveStart;\n } else {\n yPoint = yNegativeStart + barGap;\n yNegativeStart = yPoint + height;\n }\n\n singleGroup.push(\n <rect\n key={`${singleSet.indexNum}-${legendIndex}-${pointIndex}`}\n className={classes.opacityChangeOnHover}\n height={height}\n width={_barWidth}\n x={xPoint}\n y={yPoint}\n opacity={barOpacity}\n fill={pointColor}\n rx={0}\n onMouseOver={event => onBarHover(pointData, singleSet, event)}\n onMouseMove={event => onBarHover(pointData, singleSet, event)}\n onMouseOut={_onBarLeave}\n onFocus={event => onBarFocus(event, pointData, singleSet)}\n onBlur={_onBarLeave}\n onClick={pointData.onClick}\n aria-label={getAriaLabel(pointData, singleSet.xAxisPoint)}\n tabIndex={_legendHighlighted(pointData.legend) || _noLegendHighlighted() ? 0 : undefined}\n role=\"img\"\n />,\n );\n\n barTotalValue += pointData.data;\n });\n if (barTotalValue !== null && !props.hideLabels && _barWidth >= 16 && isLegendActive) {\n barLabelsForGroup.push(\n <text\n key={`${singleSet.indexNum}-${legendIndex}`}\n x={xPoint + _barWidth / 2}\n y={barTotalValue >= Y_ORIGIN ? yPositiveStart - 6 : yNegativeStart + 12}\n textAnchor=\"middle\"\n className={classes.barLabel}\n aria-hidden={true}\n >\n {typeof props.yAxisTickFormat === 'function'\n ? props.yAxisTickFormat(barTotalValue)\n : formatScientificLimitWidth(barTotalValue)}\n </text>,\n );\n }\n }\n });\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xScale0);\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 axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return (\n <g\n key={singleSet.indexNum}\n transform={`translate(${xScale0(singleSet.xAxisPoint) + (xScale0.bandwidth() - effectiveGroupWidth) / 2}, 0)`}\n >\n {singleGroup}\n {barLabelsForGroup}\n </g>\n );\n };\n\n // For grouped vertical bar chart, First need to define total scale (from start to end)\n // From that need to define scale for single group of bars - done by createX1Scale\n const _createX0Scale = (containerWidth: number) => {\n const x0Axis = d3ScaleBand()\n .domain(xAxisLabels)\n .range(\n _useRtl\n ? [containerWidth! - _margins.right! - _domainMargin, _margins.left! + _domainMargin]\n : [_margins.left! + _domainMargin, containerWidth! - _margins.right! - _domainMargin],\n )\n .paddingInner(_xAxisInnerPadding)\n .paddingOuter(_xAxisOuterPadding);\n return x0Axis;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _createX1Scale = (): any => {\n return (\n d3ScaleBand()\n .domain(_legends)\n // When there is only one group, xScale0 adds padding around it,\n // causing the bandwidth to become smaller than the actual group width.\n // So to render bars in the group correctly, use groupWidth instead of the generated scale bandwidth.\n .range(_useRtl ? [_groupWidth, 0] : [0, _groupWidth])\n .paddingInner(X1_INNER_PADDING)\n );\n };\n\n const _onLegendHover = (legendTitle: string): void => {\n setActiveLegend(legendTitle);\n };\n\n const _onLegendLeave = (): void => {\n setActiveLegend('');\n };\n\n const _getAxisData = React.useCallback(\n (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 [props.yMaxValue],\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 const _legendHighlighted = (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 const _noLegendHighlighted = () => {\n return _getHighlightedLegend().length === 0;\n };\n\n const _getHighlightedLegend = () => {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n };\n\n const getAriaLabel = (point: GVBarChartSeriesPoint, xAxisPoint: string): string => {\n const xValue = point.xAxisCalloutData || xAxisPoint;\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.data;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n };\n\n const _getDomainMargins = (containerWidth: number): Margins => {\n /** Total width available to render the bars */\n const totalWidth = calcTotalWidth(containerWidth, _margins, MIN_DOMAIN_MARGIN);\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(props.xAxisOuterPadding)) {\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 group and after the last group.\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 const groupWidth = calcRequiredWidth(_barWidth, _legends.length, X1_INNER_PADDING);\n /** Total width required to render the groups. Directly proportional to group width */\n const reqWidth = calcRequiredWidth(groupWidth, _xAxisLabels.length, _xAxisInnerPadding);\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 groups at their maximum allowable width\n const groupBandwidth = calcBandwidth(totalWidth, _xAxisLabels.length, _xAxisInnerPadding);\n const barBandwidth = calcBandwidth(groupBandwidth, _legends.length, X1_INNER_PADDING);\n const barWidth = getBarWidth(props.barWidth, props.maxBarWidth, barBandwidth);\n const groupWidth = calcRequiredWidth(barWidth, _legends.length, X1_INNER_PADDING);\n let reqWidth = calcRequiredWidth(groupWidth, _xAxisLabels.length, _xAxisInnerPadding);\n const margin1 = (totalWidth - reqWidth) / 2;\n\n let margin2 = Number.POSITIVE_INFINITY;\n if (!props.hideTickOverlap) {\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 margin2 = (totalWidth - reqWidth) / 2;\n }\n\n _domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));\n }\n }\n\n return {\n ..._margins,\n left: _margins.left! + _domainMargin,\n right: _margins.right! + _domainMargin,\n };\n };\n\n const _isChartEmpty = (): boolean => {\n return !(\n props.data &&\n props.data.length > 0 &&\n props.data.filter((item: GroupedVerticalBarChartData) => item.series.length).length > 0\n );\n };\n\n const _getChartTitle = (): string => {\n return (\n (props.chartTitle ? `${props.chartTitle}. ` : '') +\n `Vertical bar chart with ${_xAxisLabels.length} groups of ${_legends.length} bars each. `\n );\n };\n\n return !_isChartEmpty() ? (\n <CartesianChart\n {...props}\n chartTitle={_getChartTitle()}\n points={_datasetForBars}\n chartType={ChartTypes.GroupedVerticalBarChart}\n getDomainNRangeValues={_getDomainNRangeValues}\n getMinMaxOfYAxis={_getMinMaxOfYAxis}\n createStringYAxis={createStringYAxis}\n calloutProps={calloutProps}\n legendBars={legendBars}\n xAxisType={_xAxisType}\n createYAxis={createNumericYAxis}\n datasetForXAxisDomain={_xAxisLabels}\n tickParams={tickParams}\n tickPadding={props.tickPadding || 5}\n maxOfYVal={_yMax}\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 barwidth={_barWidth}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n children={() => {\n return <g>{_groupedVerticalBarGraph}</g>;\n }}\n />\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n});\nGroupedVerticalBarChart.displayName = 'GroupedVerticalBarChart';\n"],"names":["React","useGroupedVerticalBarChartStyles_unstable","select","d3Select","max","d3Max","min","d3Min","scaleBand","d3ScaleBand","useId","ChartTypes","getAccessibleDataObject","tooltipOfAxislabels","XAxisTypes","getTypeOfAxis","formatScientificLimitWidth","getScalePadding","getBarWidth","isScalePaddingDefined","createNumericYAxis","domainRangeOfXStringAxis","createStringYAxis","getNextColor","areArraysEqual","calculateLongestLabelWidth","useRtl","calcRequiredWidth","calcTotalWidth","calcBandwidth","calcTotalBandUnits","sortAxisCategories","CartesianChart","Legends","toImage","MIN_DOMAIN_MARGIN","X1_INNER_PADDING","VERTICAL_BAR_GAP","MIN_BAR_HEIGHT","GroupedVerticalBarChart","forwardRef","props","maxBarWidth","xAxisCategoryOrder","forwardedRef","_tooltipId","_emptyChartId","_useRtl","_domainMargin","_xAxisLabels","_datasetForBars","_margins","top","right","bottom","left","_groupedVerticalBarGraph","_yMax","_calloutAnchorPoint","_barWidth","_groupWidth","_xAxisInnerPadding","_xAxisOuterPadding","_legends","_legendColorMap","cartesianChartRef","useRef","Y_ORIGIN","_legendsRef","color","setColor","useState","dataForHoverCard","setDataForHoverCard","selectedLegends","setSelectedLegends","legendProps","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","YValueHover","setYValueHover","hoverXValue","setHoverXValue","calloutLegend","setCalloutLegend","activeLegend","setActiveLegend","callOutAccessibilityData","setCallOutAccessibilityData","undefined","clickPosition","setClickPosition","x","y","isPopoverOpen","setPopoverOpen","classes","useEffect","useImperativeHandle","componentRef","chartContainer","current","opts","toSVG","_adjustProps","barWidth","xAxisInnerPadding","length","xAxisOuterPadding","_createDataset","points","datasetForBars","forEach","point","index","singleDatasetPointForBars","legendToBarPoint","series","seriesPoint","legend","push","data","xAxisPoint","name","indexNum","groupSeries","Object","values","stackCallOutAccessibilityData","_createDataSetOfGVBC","legends","Set","xAxisLabels","_getOrderedXAxisLabels","add","Array","from","onLegendSelectionChange","event","currentLegend","canSelectMultipleLegends","slice","onChange","_getLegendData","actions","legendTitle","title","hoverAction","_handleChartMouseLeave","_onLegendHover","onMouseOutAction","_onLegendLeave","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","legendRef","_addDefaultColors","colorIndex","map","startColor","endColor","_xAxisType","StringAxis","_mapCategoryToValues","categoryToValues","legendBars","_getMinMaxOfYAxis","yAxisType","useSecondaryYScale","startValue","endValue","_getDomainNRangeValues","margins","width","chartType","isRTL","xAxisType","tickValues","shiftX","domainNRangeValue","NumericAxis","DateAxis","dStartValue","dEndValue","rStartValue","rEndValue","yMax","Math","yMaxValue","calloutProps","XValue","YValue","culture","isCartesian","tickParams","tickFormat","_getGraphData","xScale","yScalePrimary","containerHeight","containerWidth","xElement","yAxisElement","yScaleSecondary","xScale0","_createX0Scale","bandwidth","xScale1","_createX1Scale","allGroupsBars","singleSet","_buildGraph","_getMargins","updatePosition","newX","newY","threshold","distance","sqrt","pow","onBarHover","pointData","groupData","mouseEvent","persist","clientX","clientY","_noLegendHighlighted","_legendHighlighted","xAxisCalloutData","yAxisCalloutData","isCalloutForStack","_onBarLeave","onBarFocus","targetRect","target","getBoundingClientRect","height","singleGroup","barLabelsForGroup","presentLegends","keys","filter","key","effectiveGroupWidth","localScale","domain","range","paddingInner","legendIndex","barPoints","yBarScale","xPoint","isLegendActive","barOpacity","barTotalValue","yBaseline","yPositiveStart","yNegativeStart","yPoint","pointIndex","barGap","abs","pointColor","rect","className","opacityChangeOnHover","opacity","fill","rx","onMouseOver","onMouseMove","onMouseOut","onFocus","onBlur","onClick","aria-label","getAriaLabel","tabIndex","role","hideLabels","text","textAnchor","barLabel","aria-hidden","yAxisTickFormat","wrapXAxisLables","showXAxisLablesTooltip","xAxisElement","call","document","getElementById","remove","e","tooltipProps","tooltipCls","tooltip","id","axis","g","transform","x0Axis","paddingOuter","_getAxisData","useCallback","yAxisData","yAxisDomainValues","domainValue","_getHighlightedLegend","includes","xValue","yValue","ariaLabel","_getDomainMargins","totalWidth","groupWidth","reqWidth","mode","groupBandwidth","barBandwidth","margin1","margin2","Number","POSITIVE_INFINITY","hideTickOverlap","step","_isChartEmpty","item","_getChartTitle","chartTitle","getDomainNRangeValues","getMinMaxOfYAxis","createYAxis","datasetForXAxisDomain","tickPadding","maxOfYVal","getmargins","getGraphData","getAxisData","onChartMouseLeave","getDomainMargins","barwidth","children","div","style","displayName"],"mappings":";;;;+BAsEauC;;;;;;;iEAtEU,QAAQ;wDAC2B,4CAA4C;6BACnE,eAAe;yBAEP,WAAW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3N,QAAQ9D;QACR+H,WAAWtK,iBAAAA,CAAW4B,uBAAuB;QAC7CsS,uBAAuB/J;QACvBgK,kBAAkBrK;QAClBnJ,mBAAmBA,wBAAAA;QACnB0K,cAAcA;QACdxB,YAAYA;QACZW,WAAWf;QACX2K,aAAa3T,yBAAAA;QACb4T,uBAAuB/R;QACvBoJ,YAAYA;QACZ4I,aAAaxS,MAAMwS,WAAW,IAAI;QAClCC,WAAWzR;QACX0R,YAAY5H;QACZ6H,cAAc7I;QACd8I,aAAanC;QACboC,mBAAmBhM;QACnBiM,kBAAkB3B;QACjB,GAAIxJ,eAAetJ,iBAAAA,CAAWuJ,UAAU,IAAI;YAC3CzD,mBAAmB/C;YACnBiD,mBAAmBhD;QACrB,CAAC;QACD0R,UAAU7R;QACV0C,cAAcpC;QACd,oCAAoC,GACpCwR,UAAU;YACR,OAAA,WAAA,GAAO,OAAA,aAAA,CAAC3C,KAAAA,MAAGtP;QACb;uBAGF,OAAA,aAAA,CAACkS,OAAAA;QAAI9C,IAAI9P;QAAe4O,MAAM;QAASiE,OAAO;YAAE7E,SAAS;QAAI;QAAGS,cAAY;;AAEhF,GAAG;AACHhP,wBAAwBqT,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/GroupedVerticalBarChart/GroupedVerticalBarChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useGroupedVerticalBarChartStyles_unstable } from './useGroupedVerticalBarChartStyles.styles';\nimport { select as d3Select } from 'd3-selection';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { ScaleLinear, scaleBand as d3ScaleBand } from 'd3-scale';\n\nimport { useId, JSXElement } from '@fluentui/react-utilities';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n tooltipOfAxislabels,\n XAxisTypes,\n getTypeOfAxis,\n formatScientificLimitWidth,\n getScalePadding,\n getBarWidth,\n isScalePaddingDefined,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfXStringAxis,\n createStringYAxis,\n getNextColor,\n areArraysEqual,\n calculateLongestLabelWidth,\n useRtl,\n YAxisType,\n calcRequiredWidth,\n calcTotalWidth,\n calcBandwidth,\n calcTotalBandUnits,\n sortAxisCategories,\n} from '../../utilities/index';\n\nimport {\n AccessibilityProps,\n CartesianChart,\n Margins,\n Legend,\n GroupedVerticalBarChartProps,\n GroupedVerticalBarChartData,\n GVBarChartSeriesPoint,\n Legends,\n YValueHover,\n ChartPopoverProps,\n Chart,\n ImageExportOptions,\n LegendContainer,\n} from '../../index';\nimport { toImage } from '../../utilities/image-export-utils';\n\ntype StringAxis = D3Axis<string>;\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\n\nconst MIN_DOMAIN_MARGIN = 8;\nconst X1_INNER_PADDING = 0.1;\nconst VERTICAL_BAR_GAP = 1;\nconst MIN_BAR_HEIGHT = 1;\n\n// This interface used for - While forming datapoints from given prop \"data\" in code\ninterface GVDataPoint {\n [key: string]: number | string;\n}\n\n// While forming datapoints from given prop \"data\" in code. These datapoints are used for to draw graph easily.\ninterface GVSingleDataPoint {\n [key: string]: GVDataPoint;\n}\n\nexport const GroupedVerticalBarChart: React.FC<GroupedVerticalBarChartProps> = React.forwardRef<\n HTMLDivElement,\n GroupedVerticalBarChartProps\n>((props = { maxBarWidth: 24, xAxisCategoryOrder: 'default' }, forwardedRef) => {\n const _tooltipId: string = useId('GVBCTooltipId_');\n const _emptyChartId: string = useId('_GVBC_empty');\n const _useRtl: boolean = useRtl();\n let _domainMargin: number = MIN_DOMAIN_MARGIN;\n let _xAxisLabels: string[] = [];\n let _datasetForBars: any[] = [];\n let _margins: Margins = { top: 0, right: 0, bottom: 0, left: 0 };\n let _groupedVerticalBarGraph: JSXElement[] = [];\n let _yMax: number = 0;\n let _calloutAnchorPoint: GVBarChartSeriesPoint | null = null;\n let _barWidth: number = 0;\n let _groupWidth: number = 0;\n let _xAxisInnerPadding: number = 0;\n let _xAxisOuterPadding: number = 0;\n let _legends: string[] = [];\n let _legendColorMap: Record<string, [string, string]> = {};\n const cartesianChartRef = React.useRef<Chart>(null);\n const Y_ORIGIN: number = 0;\n const _legendsRef = React.useRef<LegendContainer>(null);\n\n const [color, setColor] = React.useState<string>('');\n const [dataForHoverCard, setDataForHoverCard] = React.useState<number>(0);\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const [xCalloutValue, setXCalloutValue] = React.useState<string>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string>('');\n const [YValueHover, setYValueHover] = React.useState<YValueHover[]>([]);\n const [hoverXValue, setHoverXValue] = React.useState<string>('');\n const [calloutLegend, setCalloutLegend] = React.useState<string>('');\n const [activeLegend, setActiveLegend] = React.useState<string>('');\n const [callOutAccessibilityData, setCallOutAccessibilityData] = React.useState<AccessibilityProps | undefined>(\n undefined,\n );\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState<boolean>(false);\n const classes = useGroupedVerticalBarChartStyles_unstable(props);\n\n React.useEffect(() => {\n if (!areArraysEqual(props.legendProps?.selectedLegends, selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n }, [props.legendProps?.selectedLegends]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n toImage: (opts?: ImageExportOptions): Promise<string> => {\n return toImage(cartesianChartRef.current?.chartContainer, _legendsRef.current?.toSVG, _useRtl, opts);\n },\n }),\n [],\n );\n\n const _adjustProps = () => {\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n // x0_inner_padding = space_between_groups / (space_between_groups + group_width)\n // space_between_groups = 2 * bar_width\n // group_width = _legends.length * bar_width + (_legends.length - 1) * space_between_bars\n _xAxisInnerPadding = getScalePadding(\n props.xAxisInnerPadding,\n undefined,\n 2 / (2 + calcTotalBandUnits(_legends.length, X1_INNER_PADDING)),\n );\n _xAxisOuterPadding = getScalePadding(props.xAxisOuterPadding);\n };\n\n const _createDataset = (points: GroupedVerticalBarChartData[]) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const datasetForBars: any = [];\n\n points.forEach((point: GroupedVerticalBarChartData, index: number) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDatasetPointForBars: any = {};\n const legendToBarPoint: Record<string, GVBarChartSeriesPoint> = {};\n\n point.series.forEach((seriesPoint: GVBarChartSeriesPoint) => {\n if (!singleDatasetPointForBars[seriesPoint.legend]) {\n singleDatasetPointForBars[seriesPoint.legend] = [{ ...seriesPoint }];\n legendToBarPoint[seriesPoint.legend] = { ...seriesPoint };\n } else {\n singleDatasetPointForBars[seriesPoint.legend].push({ ...seriesPoint });\n legendToBarPoint[seriesPoint.legend].data += seriesPoint.data;\n }\n });\n\n singleDatasetPointForBars.xAxisPoint = point.name;\n singleDatasetPointForBars.indexNum = index;\n singleDatasetPointForBars.groupSeries = Object.values(legendToBarPoint);\n singleDatasetPointForBars.stackCallOutAccessibilityData = point.stackCallOutAccessibilityData;\n datasetForBars.push(singleDatasetPointForBars);\n });\n return datasetForBars;\n };\n\n const _createDataSetOfGVBC = (points: GroupedVerticalBarChartData[]) => {\n const legends = new Set<string>();\n const xAxisLabels: string[] = _getOrderedXAxisLabels(points);\n points.forEach((point: GroupedVerticalBarChartData) => {\n point.series.forEach((seriesPoint: GVBarChartSeriesPoint) => {\n legends.add(seriesPoint.legend);\n });\n });\n const datasetForBars = _createDataset(points);\n return {\n legends: Array.from(legends),\n xAxisLabels,\n datasetForBars,\n };\n };\n\n const 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 // eslint-disable-next-line @typescript-eslint/no-deprecated\n const _getLegendData = (points: GroupedVerticalBarChartData[]): JSXElement => {\n const actions: Legend[] = [];\n\n _legends.forEach((legendTitle: string) => {\n const legend: Legend = {\n title: legendTitle,\n color: _legendColorMap[legendTitle][0],\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(legendTitle);\n },\n onMouseOutAction: () => {\n _onLegendLeave();\n },\n };\n\n actions.push(legend);\n });\n return (\n <Legends\n legends={actions}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n onChange={onLegendSelectionChange}\n legendRef={_legendsRef}\n />\n );\n };\n\n const _addDefaultColors = (data?: GroupedVerticalBarChartData[]): GroupedVerticalBarChartData[] => {\n _legendColorMap = {};\n let colorIndex = 0;\n\n return (\n data?.map(point => {\n return {\n ...point,\n series:\n point.series?.map(seriesPoint => {\n // TODO: Add support for gradient colors\n let startColor = seriesPoint.color ? seriesPoint.color : getNextColor(colorIndex, 0);\n let endColor = startColor;\n if (!_legendColorMap[seriesPoint.legend]) {\n _legendColorMap[seriesPoint.legend] = [startColor, endColor];\n }\n colorIndex += 1;\n\n return {\n ...seriesPoint,\n color: seriesPoint.color ?? _legendColorMap[seriesPoint.legend][0],\n };\n }) ?? [],\n };\n }) ?? []\n );\n };\n\n const _getOrderedXAxisLabels = (points: GroupedVerticalBarChartData[]) => {\n if (_xAxisType !== XAxisTypes.StringAxis) {\n return [];\n }\n\n return sortAxisCategories(_mapCategoryToValues(points), props.xAxisCategoryOrder);\n };\n\n const _mapCategoryToValues = (points: GroupedVerticalBarChartData[]) => {\n const categoryToValues: Record<string, number[]> = {};\n points.forEach(point => {\n if (!categoryToValues[point.name]) {\n categoryToValues[point.name] = [];\n }\n point.series.forEach(seriesPoint => {\n categoryToValues[point.name].push(seriesPoint.data);\n });\n });\n return categoryToValues;\n };\n\n const points = _addDefaultColors(props.data);\n const _xAxisType: XAxisTypes = getTypeOfAxis(points![0].name, true) as XAxisTypes;\n const { legends, xAxisLabels, datasetForBars } = _createDataSetOfGVBC(points!);\n _legends = legends;\n _xAxisLabels = xAxisLabels;\n _datasetForBars = datasetForBars;\n const legendBars: JSXElement = _getLegendData(points);\n _adjustProps();\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- Add commentMore actions\n function _getMinMaxOfYAxis(datasetForBars: any, yAxisType?: YAxisType, useSecondaryYScale?: boolean) {\n const values: number[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n datasetForBars.forEach((data: any) => {\n data.groupSeries.forEach((point: GVBarChartSeriesPoint) => {\n if (!useSecondaryYScale === !point.useSecondaryYScale) {\n values.push(point.data);\n }\n });\n });\n\n return { startValue: d3Min(values)!, endValue: d3Max(values)! };\n }\n\n function _getDomainNRangeValues(\n points: GroupedVerticalBarChartData[],\n margins: Margins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis || xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);\n }\n return domainNRangeValue;\n }\n\n // The maxOfYVal prop is only required for the primary y-axis, so yMax should be calculated\n // using only the data points associated with the primary y-axis.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const yMax = _getMinMaxOfYAxis(_datasetForBars).endValue;\n _yMax = Math.max(yMax, props.yMaxValue || 0);\n\n const calloutProps: ChartPopoverProps = {\n clickPosition,\n isPopoverOpen,\n color,\n legend: calloutLegend,\n XValue: xCalloutValue,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n YValueHover,\n hoverXValue,\n culture: props.culture ?? 'en-us',\n isCartesian: true,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData, 'text', false),\n };\n const tickParams = {\n tickValues: props.tickValues!,\n tickFormat: props.tickFormat!,\n };\n\n const _getGraphData = (\n xScale: StringAxis | NumericAxis,\n yScalePrimary: ScaleLinear<number, number>,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n yAxisElement?: SVGElement | null,\n yScaleSecondary?: ScaleLinear<number, number>,\n ) => {\n const xScale0 = _createX0Scale(containerWidth);\n\n // Setting the bar width here is safe because there are no dependencies earlier in the code\n // that rely on the width of bars in vertical bar charts with string x-axis.\n _barWidth = getBarWidth(\n props.barWidth,\n props.maxBarWidth,\n calcBandwidth(xScale0.bandwidth(), _legends.length, X1_INNER_PADDING),\n );\n _groupWidth = calcRequiredWidth(_barWidth, _legends.length, X1_INNER_PADDING);\n\n const xScale1 = _createX1Scale();\n const allGroupsBars: JSXElement[] = [];\n _datasetForBars.forEach((singleSet: GVSingleDataPoint) => {\n allGroupsBars.push(\n _buildGraph(singleSet, xScale0, xScale1, yScalePrimary, yScaleSecondary, containerHeight, xElement!),\n );\n });\n _groupedVerticalBarGraph = allGroupsBars;\n };\n\n const _getMargins = (margins: Margins) => {\n _margins = margins;\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 const onBarHover = (\n pointData: GVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void => {\n mouseEvent.persist();\n if (_calloutAnchorPoint !== pointData) {\n _calloutAnchorPoint = pointData;\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(pointData.legend));\n setCalloutLegend(pointData.legend);\n setDataForHoverCard(pointData.data);\n setColor(pointData.color);\n setXCalloutValue(pointData.xAxisCalloutData!);\n setYCalloutValue(pointData.yAxisCalloutData!);\n setCallOutAccessibilityData(\n props.isCalloutForStack ? groupData.stackCallOutAccessibilityData : pointData.callOutAccessibilityData,\n );\n setYValueHover(groupData.groupSeries);\n setHoverXValue(pointData.xAxisCalloutData!);\n }\n };\n\n const _onBarLeave = (): void => {\n /**/\n };\n\n const _handleChartMouseLeave = (): void => {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n };\n\n const onBarFocus = (\n event: React.FocusEvent<SVGRectElement, Element>,\n pointData: GVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n ): void => {\n let x = 0;\n let y = 0;\n\n const targetRect = (event.target as SVGRectElement).getBoundingClientRect();\n x = targetRect.left + targetRect.width / 2;\n y = targetRect.top + targetRect.height / 2;\n updatePosition(x, y);\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(pointData.legend));\n setCalloutLegend(pointData.legend);\n setDataForHoverCard(pointData.data);\n setColor(pointData.color);\n setXCalloutValue(pointData.xAxisCalloutData!);\n setYCalloutValue(pointData.yAxisCalloutData!);\n setCallOutAccessibilityData(\n props.isCalloutForStack ? groupData.stackCallOutAccessibilityData : pointData.callOutAccessibilityData,\n );\n setYValueHover(groupData.groupSeries);\n setHoverXValue(pointData.xAxisCalloutData!);\n };\n\n const _buildGraph = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n singleSet: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale0: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale1: any,\n yScalePrimary: ScaleLinear<number, number>,\n yScaleSecondary: ScaleLinear<number, number> | undefined,\n containerHeight: number,\n xElement: SVGElement,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ): JSXElement => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const singleGroup: JSXElement[] = [];\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const barLabelsForGroup: JSXElement[] = [];\n\n // Get the actual legends present at this x-axis point\n const presentLegends = Object.keys(singleSet).filter(key => key in _legendColorMap);\n const effectiveGroupWidth = calcRequiredWidth(_barWidth, presentLegends.length, X1_INNER_PADDING);\n\n // For stacked bars, center the single bar group in the available space\n // Instead of using the global legend position, use the local position within present legends\n const localScale = d3ScaleBand()\n .domain(presentLegends)\n .range(_useRtl ? [effectiveGroupWidth, 0] : [0, effectiveGroupWidth])\n .paddingInner(X1_INNER_PADDING);\n _legends.forEach((legendTitle: string, legendIndex: number) => {\n const barPoints = singleSet[legendTitle];\n if (barPoints) {\n const yBarScale = barPoints[0].useSecondaryYScale && yScaleSecondary ? yScaleSecondary : yScalePrimary;\n\n const xPoint = (localScale(legendTitle) ?? 0) + (localScale.bandwidth() - _barWidth) / 2;\n const isLegendActive = _legendHighlighted(legendTitle) || _noLegendHighlighted();\n const barOpacity = isLegendActive ? '' : '0.1';\n\n let barTotalValue = 0;\n const yBaseline = yBarScale(Y_ORIGIN);\n let yPositiveStart = yBaseline;\n let yNegativeStart = yBaseline;\n let yPoint = Y_ORIGIN;\n\n barPoints.forEach((pointData: GVBarChartSeriesPoint, pointIndex: number) => {\n if (!pointData.data) {\n // Not rendering data with 0.\n return;\n }\n const barGap = (VERTICAL_BAR_GAP / 2) * (pointIndex > 0 ? 2 : 0);\n const height = Math.max(yBarScale(Y_ORIGIN) - yBarScale(Math.abs(pointData.data)), MIN_BAR_HEIGHT);\n const pointColor = pointData.color; // Use the color of the current point\n\n if (pointData.data >= Y_ORIGIN) {\n yPositiveStart -= height + barGap;\n yPoint = yPositiveStart;\n } else {\n yPoint = yNegativeStart + barGap;\n yNegativeStart = yPoint + height;\n }\n\n singleGroup.push(\n <rect\n key={`${singleSet.indexNum}-${legendIndex}-${pointIndex}`}\n className={classes.opacityChangeOnHover}\n height={height}\n width={_barWidth}\n x={xPoint}\n y={yPoint}\n opacity={barOpacity}\n fill={pointColor}\n rx={props.roundCorners ? 3 : 0}\n onMouseOver={event => onBarHover(pointData, singleSet, event)}\n onMouseMove={event => onBarHover(pointData, singleSet, event)}\n onMouseOut={_onBarLeave}\n onFocus={event => onBarFocus(event, pointData, singleSet)}\n onBlur={_onBarLeave}\n onClick={pointData.onClick}\n aria-label={getAriaLabel(pointData, singleSet.xAxisPoint)}\n tabIndex={_legendHighlighted(pointData.legend) || _noLegendHighlighted() ? 0 : undefined}\n role=\"img\"\n />,\n );\n\n barTotalValue += pointData.data;\n });\n if (barTotalValue !== null && !props.hideLabels && Math.ceil(_barWidth) >= 16 && isLegendActive) {\n barLabelsForGroup.push(\n <text\n key={`${singleSet.indexNum}-${legendIndex}`}\n x={xPoint + _barWidth / 2}\n y={barTotalValue >= Y_ORIGIN ? yPositiveStart - 6 : yNegativeStart + 12}\n textAnchor=\"middle\"\n className={classes.barLabel}\n aria-hidden={true}\n >\n {typeof props.yAxisTickFormat === 'function'\n ? props.yAxisTickFormat(barTotalValue)\n : formatScientificLimitWidth(barTotalValue)}\n </text>,\n );\n }\n }\n });\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xScale0);\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 axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return (\n <g\n key={singleSet.indexNum}\n transform={`translate(${xScale0(singleSet.xAxisPoint) + (xScale0.bandwidth() - effectiveGroupWidth) / 2}, 0)`}\n >\n {singleGroup}\n {barLabelsForGroup}\n </g>\n );\n };\n\n // For grouped vertical bar chart, First need to define total scale (from start to end)\n // From that need to define scale for single group of bars - done by createX1Scale\n const _createX0Scale = (containerWidth: number) => {\n const x0Axis = d3ScaleBand()\n .domain(xAxisLabels)\n .range(\n _useRtl\n ? [containerWidth! - _margins.right! - _domainMargin, _margins.left! + _domainMargin]\n : [_margins.left! + _domainMargin, containerWidth! - _margins.right! - _domainMargin],\n )\n .paddingInner(_xAxisInnerPadding)\n .paddingOuter(_xAxisOuterPadding);\n return x0Axis;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _createX1Scale = (): any => {\n return (\n d3ScaleBand()\n .domain(_legends)\n // When there is only one group, xScale0 adds padding around it,\n // causing the bandwidth to become smaller than the actual group width.\n // So to render bars in the group correctly, use groupWidth instead of the generated scale bandwidth.\n .range(_useRtl ? [_groupWidth, 0] : [0, _groupWidth])\n .paddingInner(X1_INNER_PADDING)\n );\n };\n\n const _onLegendHover = (legendTitle: string): void => {\n setActiveLegend(legendTitle);\n };\n\n const _onLegendLeave = (): void => {\n setActiveLegend('');\n };\n\n const _getAxisData = React.useCallback(\n (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 [props.yMaxValue],\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 const _legendHighlighted = (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 const _noLegendHighlighted = () => {\n return _getHighlightedLegend().length === 0;\n };\n\n const _getHighlightedLegend = () => {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n };\n\n const getAriaLabel = (point: GVBarChartSeriesPoint, xAxisPoint: string): string => {\n const xValue = point.xAxisCalloutData || xAxisPoint;\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.data;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n };\n\n const _getDomainMargins = (containerWidth: number): Margins => {\n /** Total width available to render the bars */\n const totalWidth = calcTotalWidth(containerWidth, _margins, MIN_DOMAIN_MARGIN);\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(props.xAxisOuterPadding)) {\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 group and after the last group.\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 const groupWidth = calcRequiredWidth(_barWidth, _legends.length, X1_INNER_PADDING);\n /** Total width required to render the groups. Directly proportional to group width */\n const reqWidth = calcRequiredWidth(groupWidth, _xAxisLabels.length, _xAxisInnerPadding);\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 groups at their maximum allowable width\n const groupBandwidth = calcBandwidth(totalWidth, _xAxisLabels.length, _xAxisInnerPadding);\n const barBandwidth = calcBandwidth(groupBandwidth, _legends.length, X1_INNER_PADDING);\n const barWidth = getBarWidth(props.barWidth, props.maxBarWidth, barBandwidth);\n const groupWidth = calcRequiredWidth(barWidth, _legends.length, X1_INNER_PADDING);\n let reqWidth = calcRequiredWidth(groupWidth, _xAxisLabels.length, _xAxisInnerPadding);\n const margin1 = (totalWidth - reqWidth) / 2;\n\n let margin2 = Number.POSITIVE_INFINITY;\n if (!props.hideTickOverlap) {\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 margin2 = (totalWidth - reqWidth) / 2;\n }\n\n _domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));\n }\n }\n\n return {\n ..._margins,\n left: _margins.left! + _domainMargin,\n right: _margins.right! + _domainMargin,\n };\n };\n\n const _isChartEmpty = (): boolean => {\n return !(\n props.data &&\n props.data.length > 0 &&\n props.data.filter((item: GroupedVerticalBarChartData) => item.series.length).length > 0\n );\n };\n\n const _getChartTitle = (): string => {\n return (\n (props.chartTitle ? `${props.chartTitle}. ` : '') +\n `Vertical bar chart with ${_xAxisLabels.length} groups of ${_legends.length} bars each. `\n );\n };\n\n return !_isChartEmpty() ? (\n <CartesianChart\n {...props}\n chartTitle={_getChartTitle()}\n points={_datasetForBars}\n chartType={ChartTypes.GroupedVerticalBarChart}\n getDomainNRangeValues={_getDomainNRangeValues}\n getMinMaxOfYAxis={_getMinMaxOfYAxis}\n createStringYAxis={createStringYAxis}\n calloutProps={calloutProps}\n legendBars={legendBars}\n xAxisType={_xAxisType}\n createYAxis={createNumericYAxis}\n datasetForXAxisDomain={_xAxisLabels}\n tickParams={tickParams}\n tickPadding={props.tickPadding || 5}\n maxOfYVal={_yMax}\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 barwidth={_barWidth}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n children={() => {\n return <g>{_groupedVerticalBarGraph}</g>;\n }}\n />\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n});\nGroupedVerticalBarChart.displayName = 'GroupedVerticalBarChart';\n"],"names":["React","useGroupedVerticalBarChartStyles_unstable","select","d3Select","max","d3Max","min","d3Min","scaleBand","d3ScaleBand","useId","ChartTypes","getAccessibleDataObject","tooltipOfAxislabels","XAxisTypes","getTypeOfAxis","formatScientificLimitWidth","getScalePadding","getBarWidth","isScalePaddingDefined","createNumericYAxis","domainRangeOfXStringAxis","createStringYAxis","getNextColor","areArraysEqual","calculateLongestLabelWidth","useRtl","calcRequiredWidth","calcTotalWidth","calcBandwidth","calcTotalBandUnits","sortAxisCategories","CartesianChart","Legends","toImage","MIN_DOMAIN_MARGIN","X1_INNER_PADDING","VERTICAL_BAR_GAP","MIN_BAR_HEIGHT","GroupedVerticalBarChart","forwardRef","props","maxBarWidth","xAxisCategoryOrder","forwardedRef","_tooltipId","_emptyChartId","_useRtl","_domainMargin","_xAxisLabels","_datasetForBars","_margins","top","right","bottom","left","_groupedVerticalBarGraph","_yMax","_calloutAnchorPoint","_barWidth","_groupWidth","_xAxisInnerPadding","_xAxisOuterPadding","_legends","_legendColorMap","cartesianChartRef","useRef","Y_ORIGIN","_legendsRef","color","setColor","useState","dataForHoverCard","setDataForHoverCard","selectedLegends","setSelectedLegends","legendProps","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","YValueHover","setYValueHover","hoverXValue","setHoverXValue","calloutLegend","setCalloutLegend","activeLegend","setActiveLegend","callOutAccessibilityData","setCallOutAccessibilityData","undefined","clickPosition","setClickPosition","x","y","isPopoverOpen","setPopoverOpen","classes","useEffect","useImperativeHandle","componentRef","chartContainer","current","opts","toSVG","_adjustProps","barWidth","xAxisInnerPadding","length","xAxisOuterPadding","_createDataset","points","datasetForBars","forEach","point","index","singleDatasetPointForBars","legendToBarPoint","series","seriesPoint","legend","push","data","xAxisPoint","name","indexNum","groupSeries","Object","values","stackCallOutAccessibilityData","_createDataSetOfGVBC","legends","Set","xAxisLabels","_getOrderedXAxisLabels","add","Array","from","onLegendSelectionChange","event","currentLegend","canSelectMultipleLegends","slice","onChange","_getLegendData","actions","legendTitle","title","hoverAction","_handleChartMouseLeave","_onLegendHover","onMouseOutAction","_onLegendLeave","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","legendRef","_addDefaultColors","colorIndex","map","startColor","endColor","_xAxisType","StringAxis","_mapCategoryToValues","categoryToValues","legendBars","_getMinMaxOfYAxis","yAxisType","useSecondaryYScale","startValue","endValue","_getDomainNRangeValues","margins","width","chartType","isRTL","xAxisType","tickValues","shiftX","domainNRangeValue","NumericAxis","DateAxis","dStartValue","dEndValue","rStartValue","rEndValue","yMax","Math","yMaxValue","calloutProps","XValue","YValue","culture","isCartesian","tickParams","tickFormat","_getGraphData","xScale","yScalePrimary","containerHeight","containerWidth","xElement","yAxisElement","yScaleSecondary","xScale0","_createX0Scale","bandwidth","xScale1","_createX1Scale","allGroupsBars","singleSet","_buildGraph","_getMargins","updatePosition","newX","newY","threshold","distance","sqrt","pow","onBarHover","pointData","groupData","mouseEvent","persist","clientX","clientY","_noLegendHighlighted","_legendHighlighted","xAxisCalloutData","yAxisCalloutData","isCalloutForStack","_onBarLeave","onBarFocus","targetRect","target","getBoundingClientRect","height","singleGroup","barLabelsForGroup","presentLegends","keys","filter","key","effectiveGroupWidth","localScale","domain","range","paddingInner","legendIndex","barPoints","yBarScale","xPoint","isLegendActive","barOpacity","barTotalValue","yBaseline","yPositiveStart","yNegativeStart","yPoint","pointIndex","barGap","abs","pointColor","rect","className","opacityChangeOnHover","opacity","fill","rx","roundCorners","onMouseOver","onMouseMove","onMouseOut","onFocus","onBlur","onClick","aria-label","getAriaLabel","tabIndex","role","hideLabels","ceil","text","textAnchor","barLabel","aria-hidden","yAxisTickFormat","wrapXAxisLables","showXAxisLablesTooltip","xAxisElement","call","document","getElementById","remove","e","tooltipProps","tooltipCls","tooltip","id","axis","g","transform","x0Axis","paddingOuter","_getAxisData","useCallback","yAxisData","yAxisDomainValues","domainValue","_getHighlightedLegend","includes","xValue","yValue","ariaLabel","_getDomainMargins","totalWidth","groupWidth","reqWidth","mode","groupBandwidth","barBandwidth","margin1","margin2","Number","POSITIVE_INFINITY","hideTickOverlap","step","_isChartEmpty","item","_getChartTitle","chartTitle","getDomainNRangeValues","getMinMaxOfYAxis","createYAxis","datasetForXAxisDomain","tickPadding","maxOfYVal","getmargins","getG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71
- e5kdtc: 0,
72
- Bkjc3bi: 0,
73
- ayd6f0: "fcm7iae",
62
+ De3pzq: "fxugw4r",
74
63
  Beyfa6y: 0,
75
64
  Bbmb7ep: 0,
76
65
  Btl43ni: 0,
@@ -103,13 +92,7 @@ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
103
92
  ".f1euv43f{position:absolute;}",
104
93
  ".f17mccla{text-align:center;}",
105
94
  ".fr6rvge{top:var(--spacingVerticalNone);}",
106
- ".f5q6cfr{fill:var(--colorNeutralBackground1);}",
107
- [
108
- ".fcm7iae{background:var(--colorNeutralBackground1);}",
109
- {
110
- p: -2
111
- }
112
- ],
95
+ ".fxugw4r{background-color:var(--colorNeutralBackground1);}",
113
96
  [
114
97
  ".fq9zq91{border-radius:var(--borderRadiusSmall);}",
115
98
  {
@@ -1 +1 @@
1
- {"version":3,"sources":["useGroupedVerticalBarChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const groupedVerticalBarChartClassNames = {\n opacityChangeOnHover: 'fui-gvbc**opacityChangeOnHover',\n tooltip: 'fui-gvbc**tooltip',\n barLabel: 'fui-gvbc**barLabel',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: ''\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 background: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none',\n color: tokens.colorNeutralForeground1\n },\n barLabel: {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n }\n});\n/**\n * Apply styling to the GroupedVerticalBarChart slots based on the state\n */ export const useGroupedVerticalBarChartStyles_unstable = (props)=>{\n const baseStyles = useStyles();\n return {\n opacityChangeOnHover: mergeClasses(groupedVerticalBarChartClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/ ),\n tooltip: mergeClasses(groupedVerticalBarChartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ ),\n barLabel: mergeClasses(groupedVerticalBarChartClassNames.barLabel, baseStyles.barLabel /*props.styles?.barLabel*/ )\n };\n};\n"],"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","groupedVerticalBarChartClassNames","opacityChangeOnHover","tooltip","barLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","Bceei9c","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","Bkfmm31","Bgh53k4","B2eet1l","De3pzq","Bcmaq0h","gk0gix","B20660r","B8a6bjv","Bpptf2m","e5kdtc","Bkjc3bi","ayd6f0","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","sj55zd","Bvjb7m6","d","p","useGroupedVerticalBarChartStyles_unstable","props","baseStyles"],"mappings":";;;;;;;;;;;IAEaK,iCAAiC;;;6CA4CY;;;;uBA9CL,gBAAgB;AAE9D,0CAA0C;IAC7CC,oBAAoB,EAAE,gCAAgC;IACtDC,OAAO,EAAE,mBAAmB;IAC5BC,QAAQ,EAAE,oBAAoB;IAC9BC,IAAI,EAAE,EAAE;IACRC,KAAK,EAAE,EAAE;IACTC,KAAK,EAAE,EAAE;IACTC,eAAe,EAAE,EAAE;IACnBC,KAAK,EAAE,EA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QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAAAC,CAAA,EAAA,CAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,CAAA,EAAA,CAAA;YAAA;SAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA,CAuBjB,CAAC;AAGS,MAAMC,6CAA6CC,KAAK,IAAG;IAClE,MAAMC,UAAU,GAAGvC,SAAS,CAAC,CAAC;IAC9B,OAAO;QACHhB,oBAAoB,MAAEL,mBAAY,EAACI,iCAAiC,CAACC,oBAAoB,EAAEuD,UAAU,CAACvD,oBAAoB,CAAC,oCAAA,EAAuC,CAAC;QACnKC,OAAO,MAAEN,mBAAY,EAACI,iCAAiC,CAACE,OAAO,EAAEsD,UAAU,CAACtD,OAAO,CAAC,uBAAA,EAA0B,CAAC;QAC/GC,QAAQ,MAAEP,mBAAY,EAACI,iCAAiC,CAACG,QAAQ,EAAEqD,UAAU,CAACrD,QAAQ,CAAC,wBAAA,EAA2B;IACtH,CAAC;AACL,CAAC"}
1
+ {"version":3,"sources":["useGroupedVerticalBarChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { getBarLabelStyle, getTooltipStyle } from '../../utilities/index';\nexport const groupedVerticalBarChartClassNames = {\n opacityChangeOnHover: 'fui-gvbc**opacityChangeOnHover',\n tooltip: 'fui-gvbc**tooltip',\n barLabel: 'fui-gvbc**barLabel',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: ''\n};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {\n cursor: 'default'\n },\n tooltip: getTooltipStyle(),\n barLabel: getBarLabelStyle()\n});\n/**\n * Apply styling to the GroupedVerticalBarChart slots based on the state\n */ export const useGroupedVerticalBarChartStyles_unstable = (props)=>{\n const baseStyles = useStyles();\n return {\n opacityChangeOnHover: mergeClasses(groupedVerticalBarChartClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/ ),\n tooltip: mergeClasses(groupedVerticalBarChartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ ),\n barLabel: mergeClasses(groupedVerticalBarChartClassNames.barLabel, baseStyles.barLabel /*props.styles?.barLabel*/ )\n };\n};\n"],"names":["__styles","mergeClasses","getBarLabelStyle","getTooltipStyle","groupedVerticalBarChartClassNames","opacityChangeOnHover","tooltip","barLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","Bceei9c","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","De3pzq","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","sj55zd","Bkfmm31","Bvjb7m6","d","p","useGroupedVerticalBarChartStyles_unstable","props","baseStyles"],"mappings":";;;;;;;;;;;IAEaI,iCAAiC;;;IA2B7B4C,yCAAyC;;;;uBA7BjB,gBAAgB;AAElD,0CAA0C;IAC7C3C,oBAAoB,EAAE,gCAAgC;IACtDC,OAAO,EAAE,mBAAmB;IAC5BC,QAAQ,EAAE,oBAAoB;IAC9BC,IAAI,EAAE,EAAE;IACRC,KAAK,EAAE,EAAE;IACTC,KAAK,EAAE,EAAE;IACTC,eAAe,EAAE,EAAE;IACnBC,KAAK,EAAE,EAAE;IACTC,kBAAkB,EAAE,EAAE;IACtBC,SAAS,EAAE,EAAE;IACbC,UAAU,EAAE,EAAE;IACdC,WAAW,EAAE,EAAE;IACfC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE,EAAE;IACdC,KAAK,EAAE,EAAE;IACTC,cAAc,EAAE;AACpB,CAAC;AACD,MAAMC,SA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,uBAAA,EAA0B,CAAC;QAC/GC,QAAQ,MAAEN,mBAAY,EAACG,iCAAiC,CAACG,QAAQ,EAAE2C,UAAU,CAAC3C,QAAQ,CAAC,wBAAA,EAA2B;IACtH,CAAC;AACL,CAAC"}
@@ -17,7 +17,7 @@ _export(exports, {
17
17
  }
18
18
  });
19
19
  const _react = require("@griffel/react");
20
- const _reacttheme = require("@fluentui/react-theme");
20
+ const _index = require("../../utilities/index");
21
21
  const groupedVerticalBarChartClassNames = {
22
22
  opacityChangeOnHover: 'fui-gvbc**opacityChangeOnHover',
23
23
  tooltip: 'fui-gvbc**tooltip',
@@ -40,25 +40,8 @@ const useStyles = (0, _react.makeStyles)({
40
40
  opacityChangeOnHover: {
41
41
  cursor: 'default'
42
42
  },
43
- tooltip: {
44
- ..._reacttheme.typographyStyles.body1,
45
- display: 'flex',
46
- flexDirection: 'column',
47
- ..._react.shorthands.padding(_reacttheme.tokens.spacingHorizontalS),
48
- position: 'absolute',
49
- textAlign: 'center',
50
- top: _reacttheme.tokens.spacingVerticalNone,
51
- fill: _reacttheme.tokens.colorNeutralBackground1,
52
- background: _reacttheme.tokens.colorNeutralBackground1,
53
- borderRadius: _reacttheme.tokens.borderRadiusSmall,
54
- pointerEvents: 'none',
55
- color: _reacttheme.tokens.colorNeutralForeground1
56
- },
57
- barLabel: {
58
- ..._reacttheme.typographyStyles.caption1Strong,
59
- fill: _reacttheme.tokens.colorNeutralForeground1,
60
- forcedColorAdjust: 'auto'
61
- }
43
+ tooltip: (0, _index.getTooltipStyle)(),
44
+ barLabel: (0, _index.getBarLabelStyle)()
62
45
  });
63
46
  const useGroupedVerticalBarChartStyles_unstable = (props)=>{
64
47
  const baseStyles = useStyles();
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { GroupedVerticalBarChartProps, GroupedVerticalBarChartStyles } from '../../index';\nimport { SlotClassNames } from '@fluentui/react-utilities/src/index';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\n\nexport const groupedVerticalBarChartClassNames: SlotClassNames<GroupedVerticalBarChartStyles> = {\n opacityChangeOnHover: 'fui-gvbc**opacityChangeOnHover',\n tooltip: 'fui-gvbc**tooltip',\n barLabel: 'fui-gvbc**barLabel',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n};\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, //Check this\n background: tokens.colorNeutralBackground1, //Fill or background\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none',\n color: tokens.colorNeutralForeground1, //Confirm this\n },\n barLabel: {\n ...typographyStyles.caption1Strong, // Confirm styles\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto',\n },\n});\n\n/**\n * Apply styling to the GroupedVerticalBarChart slots based on the state\n */\nexport const useGroupedVerticalBarChartStyles_unstable = (\n props: GroupedVerticalBarChartProps,\n): GroupedVerticalBarChartStyles => {\n const baseStyles = useStyles();\n\n return {\n opacityChangeOnHover: mergeClasses(\n groupedVerticalBarChartClassNames.opacityChangeOnHover,\n baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/,\n ),\n tooltip: mergeClasses(groupedVerticalBarChartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/),\n barLabel: mergeClasses(groupedVerticalBarChartClassNames.barLabel, baseStyles.barLabel /*props.styles?.barLabel*/),\n };\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","typographyStyles","groupedVerticalBarChartClassNames","opacityChangeOnHover","tooltip","barLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","cursor","body1","display","flexDirection","padding","spacingHorizontalS","position","textAlign","top","spacingVerticalNone","fill","colorNeutralBackground1","background","borderRadius","borderRadiusSmall","pointerEvents","color","colorNeutralForeground1","caption1Strong","forcedColorAdjust","useGroupedVerticalBarChartStyles_unstable","props","baseStyles"],"mappings":";;;;;;;;;;;IAKaK,iCAAAA;;;IA+CAsC,yCAAAA;;;;uBApDwC,iBAAiB;4BAG7B,wBAAwB;AAE1D,0CAAyF;IAC9FrC,sBAAsB;IACtBC,SAAS;IACTC,UAAU;IACVC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;IACPC,gBAAgB;AAClB,EAAE;AAEF,MAAMC,gBAAYtB,iBAAAA,EAAW;IAC3BM,sBAAsB;QACpBiB,QAAQ;IACV;IACAhB,SAAS;QACP,GAAGH,4BAAAA,CAAiBoB,KAAK;QACzBC,SAAS;QACTC,eAAe;QACf,GAAGxB,iBAAAA,CAAWyB,OAAO,CAACxB,kBAAAA,CAAOyB,kBAAkB,CAAC;QAChDC,UAAU;QACVC,WAAW;QACXC,KAAK5B,kBAAAA,CAAO6B,mBAAmB;QAC/BC,MAAM9B,kBAAAA,CAAO+B,uBAAuB;QACpCC,YAAYhC,kBAAAA,CAAO+B,uBAAuB;QAC1CE,cAAcjC,kBAAAA,CAAOkC,iBAAiB;QACtCC,eAAe;QACfC,OAAOpC,kBAAAA,CAAOqC,uBAAuB;IACvC;IACAhC,UAAU;QACR,GAAGJ,4BAAAA,CAAiBqC,cAAc;QAClCR,MAAM9B,kBAAAA,CAAOqC,uBAAuB;QACpCE,mBAAmB;IACrB;AACF;AAKO,kDAAkD,CACvDE;IAEA,MAAMC,aAAavB;IAEnB,OAAO;QACLhB,0BAAsBL,mBAAAA,EACpBI,kCAAkCC,oBAAoB,EACtDuC,WAAWvC,oBAAoB,CAAC,oCAAoC;QAEtEC,aAASN,mBAAAA,EAAaI,kCAAkCE,OAAO,EAAEsC,WAAWtC,OAAO,CAAC,uBAAuB;QAC3GC,cAAUP,mBAAAA,EAAaI,kCAAkCG,QAAQ,EAAEqC,WAAWrC,QAAQ,CAAC,wBAAwB;IACjH;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.ts"],"sourcesContent":["import { GriffelStyle, makeStyles, mergeClasses } from '@griffel/react';\nimport { GroupedVerticalBarChartProps, GroupedVerticalBarChartStyles } from '../../index';\nimport { SlotClassNames } from '@fluentui/react-utilities/src/index';\nimport { getBarLabelStyle, getTooltipStyle } from '../../utilities/index';\n\nexport const groupedVerticalBarChartClassNames: SlotClassNames<GroupedVerticalBarChartStyles> = {\n opacityChangeOnHover: 'fui-gvbc**opacityChangeOnHover',\n tooltip: 'fui-gvbc**tooltip',\n barLabel: 'fui-gvbc**barLabel',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n};\n\nconst useStyles = makeStyles({\n opacityChangeOnHover: {\n cursor: 'default',\n },\n tooltip: getTooltipStyle() as GriffelStyle,\n barLabel: getBarLabelStyle() as GriffelStyle,\n});\n\n/**\n * Apply styling to the GroupedVerticalBarChart slots based on the state\n */\nexport const useGroupedVerticalBarChartStyles_unstable = (\n props: GroupedVerticalBarChartProps,\n): GroupedVerticalBarChartStyles => {\n const baseStyles = useStyles();\n\n return {\n opacityChangeOnHover: mergeClasses(\n groupedVerticalBarChartClassNames.opacityChangeOnHover,\n baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/,\n ),\n tooltip: mergeClasses(groupedVerticalBarChartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/),\n barLabel: mergeClasses(groupedVerticalBarChartClassNames.barLabel, baseStyles.barLabel /*props.styles?.barLabel*/),\n };\n};\n"],"names":["makeStyles","mergeClasses","getBarLabelStyle","getTooltipStyle","groupedVerticalBarChartClassNames","opacityChangeOnHover","tooltip","barLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","cursor","useGroupedVerticalBarChartStyles_unstable","props","baseStyles"],"mappings":";;;;;;;;;;;IAKaI,iCAAAA;;;IA8BAmB,yCAAAA;;;;uBAnC0C,iBAAiB;uBAGtB,wBAAwB;AAEnE,0CAAyF;IAC9FlB,sBAAsB;IACtBC,SAAS;IACTC,UAAU;IACVC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;IACPC,gBAAgB;AAClB,EAAE;AAEF,MAAMC,gBAAYrB,iBAAAA,EAAW;IAC3BK,sBAAsB;QACpBiB,QAAQ;IACV;IACAhB,aAASH,sBAAAA;IACTI,cAAUL,uBAAAA;AACZ;AAKO,kDAAkD,CACvDsB;IAEA,MAAMC,aAAaJ;IAEnB,OAAO;QACLhB,0BAAsBJ,mBAAAA,EACpBG,kCAAkCC,oBAAoB,EACtDoB,WAAWpB,oBAAoB,CAAC,oCAAoC;QAEtEC,aAASL,mBAAAA,EAAaG,kCAAkCE,OAAO,EAAEmB,WAAWnB,OAAO,CAAC,uBAAuB;QAC3GC,cAAUN,mBAAAA,EAAaG,kCAAkCG,QAAQ,EAAEkB,WAAWlB,QAAQ,CAAC,wBAAwB;IACjH;AACF,EAAE"}
@@ -270,7 +270,7 @@ const HorizontalBarChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)
270
270
  onMouseLeave: _hoverOff,
271
271
  className: classes.barWrapper,
272
272
  opacity: isLegendSelected ? 1 : 0.1,
273
- tabIndex: point.legend !== '' ? 0 : undefined
273
+ tabIndex: _legendHighlighted(point.legend) || _noLegendHighlighted() ? 0 : undefined
274
274
  });
275
275
  });
276
276
  return bars;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/HorizontalBarChart/HorizontalBarChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useHorizontalBarChartStyles } from './useHorizontalBarChartStyles.styles';\nimport { ChartProps, HorizontalBarChartProps, ChartDataPoint, RefArrayData, HorizontalBarChartVariant } from './index';\nimport { formatToLocaleString } from '@fluentui/chart-utilities';\nimport { formatScientificLimitWidth, getAccessibleDataObject, useRtl } from '../../utilities/index';\nimport { useId } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport { ChartPopover } from '../CommonComponents/ChartPopover';\nimport { FocusableTooltipText } from '../../utilities/FocusableTooltipText';\nimport { Legend, Legends } from '../../index';\n\n/**\n * HorizontalBarChart is the context wrapper and container for all HorizontalBarChart content/controls,\n * It has no direct style or slot opinions.\n *\n * HorizontalBarChart also provides API interfaces for callbacks that will occur on navigation events.\n */\nexport const HorizontalBarChart: React.FunctionComponent<HorizontalBarChartProps> = React.forwardRef<\n HTMLDivElement,\n HorizontalBarChartProps\n>((props, forwardedRef) => {\n const legendContainer = React.useRef<HTMLDivElement | null>(null);\n const _uniqLineText: string = useId('_HorizontalLine_');\n const _refArray: RefArrayData[] = [];\n const _isRTL: boolean = useRtl();\n const barChartSvgRef: React.RefObject<SVGSVGElement> = React.createRef<SVGSVGElement>();\n const _emptyChartId: string = useId('_HBC_empty');\n let _barHeight: number;\n let _calloutAnchorPoint: ChartDataPoint | null;\n let isSingleBar: boolean = true;\n let _showToolTipOnSegment: boolean = !props.hideTooltip;\n\n const [hoverValue, setHoverValue] = React.useState<string | number | Date | null>('');\n const [lineColor, setLineColor] = React.useState<string>('');\n const [legend, setLegend] = React.useState<string | null>('');\n const [xCalloutValue, setXCalloutValue] = React.useState<string | undefined>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string | undefined>('');\n const [barCalloutProps, setBarCalloutProps] = React.useState<ChartDataPoint>();\n const [barSpacingInPercent, setBarSpacingInPercent] = React.useState<number>(0);\n const [isPopoverOpen, setPopoverOpen] = React.useState<boolean>(false);\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [selectedLegend, setSelectedLegend] = React.useState<string>('');\n const [activeLegend, setActiveLegend] = React.useState<string>('');\n\n function _refCallback(element: SVGGElement, legendTitle: string | undefined): void {\n _refArray.push({ index: legendTitle, refElement: element });\n }\n\n function _hoverOn(\n event: React.FocusEvent<SVGRectElement> | React.MouseEvent<SVGRectElement>,\n hoverVal: string | number | Date,\n point: ChartDataPoint,\n ): void {\n if (\n (!isPopoverOpen || legend !== point.legend!) &&\n _calloutAnchorPoint !== point &&\n (_legendHighlighted(point.legend) || _noLegendHighlighted())\n ) {\n _calloutAnchorPoint = point;\n let x = 0;\n let y = 0;\n\n if ('clientX' in event && event.clientX && event.clientY) {\n // Mouse event\n x = event.clientX;\n y = event.clientY;\n } else {\n // Focus event\n const targetRect = (event.target as SVGRectElement).getBoundingClientRect();\n x = targetRect.left + targetRect.width / 2;\n y = targetRect.top + targetRect.height / 2;\n }\n\n updatePosition(x, y);\n setHoverValue(hoverVal);\n setLineColor(point.color!);\n setLegend(point.legend!);\n setXCalloutValue(point.xAxisCalloutData!);\n setYCalloutValue(point.yAxisCalloutData!);\n setBarCalloutProps(point);\n // ToDo - Confirm setting multiple state variables like this is performant.\n }\n }\n\n function _hoverOff(): void {\n /*ToDo. To fix*/\n }\n\n const _handleChartMouseLeave = () => {\n _calloutAnchorPoint = null;\n if (isPopoverOpen) {\n setPopoverOpen(false);\n setHoverValue('');\n setLineColor('');\n setLegend('');\n }\n };\n\n const _adjustProps = (): void => {\n _barHeight = props.barHeight || 12;\n };\n\n const _getChartDataText = (data: ChartProps) => {\n /* return props.barChartCustomData ? (\n <div role=\"text\">{props.barChartCustomData(data)}</div>\n ) : ( */\n return _getDefaultTextData(data);\n //)\n };\n\n function _createLegends(chartProps: ChartProps[]): JSXElement {\n const legendItems: Legend[] = chartProps.flatMap(\n point =>\n point.chartData?.map((dataPoint): Legend => {\n const legend = dataPoint.legend ?? '';\n const color = dataPoint.color ?? '';\n\n return {\n title: legend,\n color,\n action: () => setSelectedLegend(selectedLegend === legend ? '' : legend),\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(legend);\n },\n onMouseOutAction: () => setActiveLegend(''),\n };\n }) ?? [],\n );\n\n return (\n <Legends legends={legendItems} centerLegends overflowText={props.legendsOverflowText} {...props.legendProps} />\n );\n }\n\n function _getDefaultTextData(data: ChartProps): JSXElement {\n const chartDataMode = props.chartDataMode || 'default';\n\n if (chartDataMode === 'hidden') {\n return <></>; // No text data for hidden mode\n }\n\n const { culture } = props;\n const accessibilityData = getAccessibleDataObject(data.chartDataAccessibilityData!, 'text', false);\n if (!isSingleBar) {\n const total = data.chartData!.reduce(\n (acc: number, point: ChartDataPoint) =>\n acc + (point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0),\n 0,\n );\n return (\n <div className={classes.chartTitleRight} {...accessibilityData}>\n {formatToLocaleString(total, culture) as React.ReactNode}\n </div>\n );\n }\n\n const chartData: ChartDataPoint = data!.chartData![0];\n const x = chartData.horizontalBarChartdata!.x;\n const y = chartData.horizontalBarChartdata!.total!;\n\n switch (chartDataMode) {\n case 'default':\n return (\n <div className={classes.chartTitleRight} {...accessibilityData}>\n {formatToLocaleString(x, culture) as React.ReactNode}\n </div>\n );\n case 'fraction':\n return (\n <div {...accessibilityData}>\n <span className={classes.chartTitleRight}>{formatToLocaleString(x, culture) as React.ReactNode}</span>\n <span className={classes.chartDataTextDenominator}>{' / ' + formatToLocaleString(y, culture)}</span>\n </div>\n );\n case 'percentage':\n const dataRatioPercentage = `${formatToLocaleString(Math.round((x / y) * 100), culture)}%`;\n return (\n <div className={classes.chartTitleRight} {...accessibilityData}>\n {dataRatioPercentage}\n </div>\n );\n }\n }\n\n function _createBenchmark(data: ChartProps): JSXElement {\n if (data.chartData![0].horizontalBarChartdata!.total === undefined) {\n return <></>;\n }\n const totalData = data.chartData![0].horizontalBarChartdata!.total!;\n const benchmarkData = data.chartData![0].data;\n const benchmarkRatio = Math.round(((benchmarkData ? benchmarkData : 0) / totalData) * 100);\n\n const benchmarkStyles = {\n left: 'calc(' + benchmarkRatio + '% - 4px)',\n };\n\n return (\n <div className={classes.benchmarkContainer}>\n <div className={classes.triangle} style={benchmarkStyles} />\n </div>\n );\n }\n\n /**\n * This functions returns an array of <rect> elements, which form the bars\n * For each bar an x value, and a width needs to be specified\n * The computations are done based on percentages\n * Extra margin is also provided, in the x value to provide some spacing in between the bars\n */\n\n function _createBars(data: ChartProps): JSXElement[] {\n const noOfBars =\n data.chartData?.reduce((count: number, point: ChartDataPoint) => (count += (point.data || 0) > 0 ? 1 : 0), 0) ||\n 1;\n const totalMarginPercent = barSpacingInPercent * (noOfBars - 1);\n const defaultColors: string[] = [\n tokens.colorPaletteBlueForeground2,\n tokens.colorPaletteCornflowerForeground2,\n tokens.colorPaletteDarkGreenForeground2,\n tokens.colorPaletteNavyForeground2,\n tokens.colorPaletteDarkOrangeForeground2,\n ];\n // calculating starting point of each bar and it's range\n const startingPoint: number[] = [];\n const total = data.chartData!.reduce(\n (acc: number, point: ChartDataPoint) =>\n acc + (point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0),\n 0,\n );\n let prevPosition = 0;\n let value = 0;\n\n let sumOfPercent = 0;\n data.chartData!.map((point: ChartDataPoint, index: number) => {\n const pointData = point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0;\n value = (pointData / total) * 100;\n if (value < 0) {\n value = 0;\n } else if (value < 1 && value !== 0) {\n value = 1;\n }\n sumOfPercent += value;\n\n return sumOfPercent;\n });\n\n /**\n * The %age of the space occupied by the margin needs to subtracted\n * while computing the scaling ratio, since the margins are not being\n * scaled down, only the data is being scaled down from a higher percentage to lower percentage\n * Eg: 95% of the space is taken by the bars, 5% by the margins\n * Now if the sumOfPercent is 120% -> This needs to be scaled down to 95%, not 100%\n * since that's only space available to the bars\n */\n const scalingRatio = sumOfPercent !== 0 ? (sumOfPercent - totalMarginPercent) / 100 : 1;\n\n const bars = data.chartData!.map((point: ChartDataPoint, index: number) => {\n const color: string = point.color ? point.color : defaultColors[Math.floor(Math.random() * 4 + 1)];\n const pointData = point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0;\n if (index > 0) {\n prevPosition += value;\n }\n value = (pointData / total) * 100;\n if (value < 0) {\n value = 0;\n } else if (value < 1 && value !== 0) {\n value = 1 / scalingRatio;\n } else {\n value = value / scalingRatio;\n }\n startingPoint.push(prevPosition);\n\n const xValue = point.horizontalBarChartdata!.x;\n const placeholderIndex = 1;\n const isLegendSelected: boolean = _legendHighlighted(point.legend) || _noLegendHighlighted();\n\n // Render bar label instead of placeholder bar for absolute-scale variant\n if (index === placeholderIndex && props.variant === HorizontalBarChartVariant.AbsoluteScale) {\n if (props.hideLabels) {\n return <text key={index} />;\n }\n\n const barValue = data.chartData![0].horizontalBarChartdata!.x;\n\n return (\n <text\n key={index}\n x={`${_isRTL ? 100 - startingPoint[index] : startingPoint[index]}%`}\n y={_barHeight / 2}\n dominantBaseline=\"central\"\n transform={`translate(${_isRTL ? -4 : 4})`}\n className={classes.barLabel}\n aria-hidden={true}\n >\n {formatScientificLimitWidth(barValue)}\n </text>\n );\n }\n\n return (\n <rect\n key={index}\n x={`${\n _isRTL\n ? 100 - startingPoint[index] - value - index * barSpacingInPercent\n : startingPoint[index] + index * barSpacingInPercent\n }%`}\n y={0}\n width={value + '%'}\n height={_barHeight}\n fill={color}\n onMouseOver={\n _showToolTipOnSegment && point.legend !== '' ? event => _hoverOn(event, xValue, point) : undefined\n }\n onFocus={_showToolTipOnSegment && point.legend !== '' ? event => _hoverOn(event, xValue, point) : undefined}\n role=\"img\"\n aria-label={_getAriaLabel(point)}\n onBlur={_hoverOff}\n onMouseLeave={_hoverOff}\n className={classes.barWrapper}\n opacity={isLegendSelected ? 1 : 0.1}\n tabIndex={point.legend !== '' ? 0 : undefined}\n />\n );\n });\n return bars;\n }\n\n const _getAriaLabel = (point: ChartDataPoint): string => {\n const legend = point.xAxisCalloutData || point.legend;\n const yValue =\n point.yAxisCalloutData ||\n (point.horizontalBarChartdata\n ? `${point.horizontalBarChartdata.x}/${point.horizontalBarChartdata.total ?? ''}`\n : 0);\n return point.callOutAccessibilityData?.ariaLabel || (legend ? `${legend}, ` : '') + `${yValue}.`;\n };\n\n function _isChartEmpty(): boolean {\n return !(props.data && props.data.length > 0);\n }\n\n function updatePosition(newX: number, newY: number): void {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n\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 React.useEffect(() => {\n const svgWidth = barChartSvgRef?.current?.getBoundingClientRect().width || 0;\n const MARGIN_WIDTH_IN_PX = 3;\n if (svgWidth) {\n const currentBarSpacing = (MARGIN_WIDTH_IN_PX / svgWidth) * 100;\n setBarSpacingInPercent(currentBarSpacing);\n }\n }, [barChartSvgRef]);\n\n function _legendHighlighted(barLegend?: string) {\n if (barLegend === undefined) {\n return false;\n }\n return selectedLegend === barLegend || (selectedLegend === '' && activeLegend === barLegend);\n }\n\n /**\n * This function checks if none of the legends is selected or hovered.*/\n\n function _noLegendHighlighted() {\n return selectedLegend === '' && activeLegend === '';\n }\n\n const { data } = props;\n _adjustProps();\n const classes = useHorizontalBarChartStyles(props);\n const focusAttributes = useFocusableGroup();\n const legendButtons = _createLegends(data!);\n\n let datapoint: number | undefined = 0;\n return !_isChartEmpty() ? (\n <div className={classes.root} onMouseLeave={_handleChartMouseLeave}>\n {data!.map((points: ChartProps, index: number) => {\n if (points.chartData && points.chartData![0] && points.chartData![0].horizontalBarChartdata!.x) {\n datapoint = points.chartData![0].horizontalBarChartdata!.x;\n } else {\n datapoint = 0;\n }\n isSingleBar = props.showLegendForSinglePointBar\n ? false\n : points.chartData!.length === 1 || (points.chartData!.length > 1 && points.chartData![1].legend === '');\n if (isSingleBar) {\n points.chartData![1] = {\n legend: '',\n horizontalBarChartdata: {\n x: points.chartData![0].horizontalBarChartdata!.total! - datapoint!,\n total: points.chartData![0].horizontalBarChartdata!.total!,\n },\n color: tokens.colorBackgroundOverlay,\n };\n }\n\n // Hide right side text of chart title for absolute-scale variant\n const chartDataText =\n props.variant === HorizontalBarChartVariant.AbsoluteScale ? null : _getChartDataText(points!);\n const bars = _createBars(points!);\n const keyVal = _uniqLineText + '_' + index;\n // ToDo - Showtriangle property is per data series. How to account for it in the new stylesheet\n /* const classes = useHorizontalBarChartStyles(props.styles!, {\n width: props.width,\n showTriangle: !!points!.chartData![0].data,\n variant: props.variant,\n }); */\n\n return (\n <div key={index}>\n <div className={classes.items} {...focusAttributes}>\n <div className={classes.chartTitle}>\n {points!.chartTitle && (\n <FocusableTooltipText\n className={classes.chartTitleLeft}\n content={points!.chartTitle}\n accessibilityData={points!.chartTitleAccessibilityData}\n />\n )}\n {chartDataText}\n </div>\n {points!.chartData![0].data && _createBenchmark(points!)}\n <svg ref={barChartSvgRef} className={classes.chart} aria-label={points!.chartTitle}>\n <g\n id={keyVal}\n ref={(e: SVGGElement) => {\n _refCallback(e, points!.chartData![0].legend);\n }}\n // NOTE: points.chartData![0] contains current data value\n onClick={() => {\n const p = points!.chartData![0];\n if (p && p.onClick) {\n p.onClick();\n }\n }}\n >\n {bars}\n </g>\n </svg>\n </div>\n </div>\n );\n })}\n <ChartPopover\n xCalloutValue={xCalloutValue}\n yCalloutValue={yCalloutValue}\n culture={props.culture ?? 'en-us'}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n legend={legend!}\n YValue={hoverValue!}\n color={lineColor}\n isCalloutForStack={false}\n customCallout={{\n customizedCallout: props.onRenderCalloutPerHorizontalBar\n ? props.onRenderCalloutPerHorizontalBar(barCalloutProps!)\n : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(barCalloutProps!)\n : undefined,\n }}\n isCartesian={false}\n />\n {!isSingleBar && (\n <div ref={(e: HTMLDivElement) => (legendContainer.current = e)} className={classes.legendContainer}>\n {legendButtons}\n </div>\n )}\n </div>\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n //TODO validate and fix focus border for issue for popover\n});\nHorizontalBarChart.displayName = 'HorizontalBarChart';\n"],"names":["React","useHorizontalBarChartStyles","HorizontalBarChartVariant","formatToLocaleString","formatScientificLimitWidth","getAccessibleDataObject","useRtl","useId","tokens","useFocusableGroup","ChartPopover","FocusableTooltipText","Legends","HorizontalBarChart","forwardRef","props","forwardedRef","legendContainer","useRef","_uniqLineText","_refArray","_isRTL","barChartSvgRef","createRef","_emptyChartId","_barHeight","_calloutAnchorPoint","isSingleBar","_showToolTipOnSegment","hideTooltip","hoverValue","setHoverValue","useState","lineColor","setLineColor","legend","setLegend","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","barCalloutProps","setBarCalloutProps","barSpacingInPercent","setBarSpacingInPercent","isPopoverOpen","setPopoverOpen","clickPosition","setClickPosition","x","y","selectedLegend","setSelectedLegend","activeLegend","setActiveLegend","_refCallback","element","legendTitle","push","index","refElement","_hoverOn","event","hoverVal","point","_legendHighlighted","_noLegendHighlighted","clientX","clientY","targetRect","target","getBoundingClientRect","left","width","top","height","updatePosition","color","xAxisCalloutData","yAxisCalloutData","_hoverOff","_handleChartMouseLeave","_adjustProps","barHeight","_getChartDataText","data","_getDefaultTextData","_createLegends","chartProps","legendItems","flatMap","chartData","map","dataPoint","title","action","hoverAction","onMouseOutAction","legends","centerLegends","overflowText","legendsOverflowText","legendProps","chartDataMode","culture","accessibilityData","chartDataAccessibilityData","total","reduce","acc","horizontalBarChartdata","div","className","classes","chartTitleRight","span","chartDataTextDenominator","dataRatioPercentage","Math","round","_createBenchmark","undefined","totalData","benchmarkData","benchmarkRatio","benchmarkStyles","benchmarkContainer","triangle","style","_createBars","noOfBars","count","totalMarginPercent","defaultColors","colorPaletteBlueForeground2","colorPaletteCornflowerForeground2","colorPaletteDarkGreenForeground2","colorPaletteNavyForeground2","colorPaletteDarkOrangeForeground2","startingPoint","prevPosition","value","sumOfPercent","pointData","scalingRatio","bars","floor","random","xValue","placeholderIndex","isLegendSelected","variant","AbsoluteScale","hideLabels","text","key","barValue","dominantBaseline","transform","barLabel","aria-hidden","rect","fill","onMouseOver","onFocus","role","aria-label","_getAriaLabel","onBlur","onMouseLeave","barWrapper","opacity","tabIndex","yValue","callOutAccessibilityData","ariaLabel","_isChartEmpty","length","newX","newY","threshold","distance","sqrt","pow","useEffect","svgWidth","current","MARGIN_WIDTH_IN_PX","currentBarSpacing","barLegend","focusAttributes","legendButtons","datapoint","root","points","showLegendForSinglePointBar","colorBackgroundOverlay","chartDataText","keyVal","items","chartTitle","chartTitleLeft","content","chartTitleAccessibilityData","svg","ref","chart","g","id","e","onClick","p","YValue","isCalloutForStack","customCallout","customizedCallout","onRenderCalloutPerHorizontalBar","customCalloutProps","calloutPropsPerDataPoint","isCartesian","displayName"],"mappings":";;;;+BAmBaa;;;;;;;iEAnBU,QAAQ;mDACa,uCAAuC;uBAC0B,UAAU;gCAClF,4BAA4B;wBACW,wBAAwB;gCAC9E,4BAA4B;4BAE3B,wBAAwB;8BACb,0BAA0B;8BAC/B,mCAAmC;sCAC3B,uCAAuC;wBAC5C,cAAc;AAQvC,2B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C;YACA,yDAAyD;YACzD+K,SAAS;gBACP,MAAMC,IAAIjB,OAAQvG,SAAU,CAAC,EAAE;gBAC/B,IAAIwH,KAAKA,EAAED,OAAO,EAAE;oBAClBC,EAAED,OAAO;gBACX;YACF;WAECjE;IAMb,IAAA,WAAA,GACA,OAAA,aAAA,CAACvI,0BAAAA,EAAAA;QACC2B,eAAeA;QACfE,eAAeA;QACfiE,SAASzF,kBAAAA,MAAMyF,OAAAA,AAAO,MAAA,QAAbzF,mBAAAA,KAAAA,IAAAA,iBAAiB;QAC1BgC,eAAeA;QACfF,eAAeA;QACfV,QAAQA;QACRiL,QAAQtL;QACR+C,OAAO5C;QACPoL,mBAAmB;QACnBC,eAAe;YACbC,mBAAmBxM,MAAMyM,+BAA+B,GACpDzM,MAAMyM,+BAA+B,CAAC/K,mBACtCgF;YACJgG,oBAAoB1M,MAAM2M,wBAAwB,GAC9C3M,MAAM2M,wBAAwB,CAACjL,mBAC/BgF;QACN;QACAkG,aAAa;QAEd,CAAChM,eAAAA,WAAAA,GACA,OAAA,aAAA,CAACoF,OAAAA;QAAI8F,KAAK,CAACI,IAAuBhM,gBAAgByK,OAAO,GAAGuB;QAAIjG,WAAWC,QAAQhG,eAAe;OAC/F8K,kBAAAA,WAAAA,GAKP,OAAA,aAAA,CAAChF,OAAAA;QAAIiG,IAAIxL;QAAe6I,MAAM;QAASrC,OAAO;YAAE2C,SAAS;QAAI;QAAGL,cAAY;;AAE9E,0DAA0D;AAC5D,GAAG;AACHzJ,mBAAmB+M,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/HorizontalBarChart/HorizontalBarChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useHorizontalBarChartStyles } from './useHorizontalBarChartStyles.styles';\nimport { ChartProps, HorizontalBarChartProps, ChartDataPoint, RefArrayData, HorizontalBarChartVariant } from './index';\nimport { formatToLocaleString } from '@fluentui/chart-utilities';\nimport { formatScientificLimitWidth, getAccessibleDataObject, useRtl } from '../../utilities/index';\nimport { useId } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport { ChartPopover } from '../CommonComponents/ChartPopover';\nimport { FocusableTooltipText } from '../../utilities/FocusableTooltipText';\nimport { Legend, Legends } from '../../index';\n\n/**\n * HorizontalBarChart is the context wrapper and container for all HorizontalBarChart content/controls,\n * It has no direct style or slot opinions.\n *\n * HorizontalBarChart also provides API interfaces for callbacks that will occur on navigation events.\n */\nexport const HorizontalBarChart: React.FunctionComponent<HorizontalBarChartProps> = React.forwardRef<\n HTMLDivElement,\n HorizontalBarChartProps\n>((props, forwardedRef) => {\n const legendContainer = React.useRef<HTMLDivElement | null>(null);\n const _uniqLineText: string = useId('_HorizontalLine_');\n const _refArray: RefArrayData[] = [];\n const _isRTL: boolean = useRtl();\n const barChartSvgRef: React.RefObject<SVGSVGElement> = React.createRef<SVGSVGElement>();\n const _emptyChartId: string = useId('_HBC_empty');\n let _barHeight: number;\n let _calloutAnchorPoint: ChartDataPoint | null;\n let isSingleBar: boolean = true;\n let _showToolTipOnSegment: boolean = !props.hideTooltip;\n\n const [hoverValue, setHoverValue] = React.useState<string | number | Date | null>('');\n const [lineColor, setLineColor] = React.useState<string>('');\n const [legend, setLegend] = React.useState<string | null>('');\n const [xCalloutValue, setXCalloutValue] = React.useState<string | undefined>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string | undefined>('');\n const [barCalloutProps, setBarCalloutProps] = React.useState<ChartDataPoint>();\n const [barSpacingInPercent, setBarSpacingInPercent] = React.useState<number>(0);\n const [isPopoverOpen, setPopoverOpen] = React.useState<boolean>(false);\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [selectedLegend, setSelectedLegend] = React.useState<string>('');\n const [activeLegend, setActiveLegend] = React.useState<string>('');\n\n function _refCallback(element: SVGGElement, legendTitle: string | undefined): void {\n _refArray.push({ index: legendTitle, refElement: element });\n }\n\n function _hoverOn(\n event: React.FocusEvent<SVGRectElement> | React.MouseEvent<SVGRectElement>,\n hoverVal: string | number | Date,\n point: ChartDataPoint,\n ): void {\n if (\n (!isPopoverOpen || legend !== point.legend!) &&\n _calloutAnchorPoint !== point &&\n (_legendHighlighted(point.legend) || _noLegendHighlighted())\n ) {\n _calloutAnchorPoint = point;\n let x = 0;\n let y = 0;\n\n if ('clientX' in event && event.clientX && event.clientY) {\n // Mouse event\n x = event.clientX;\n y = event.clientY;\n } else {\n // Focus event\n const targetRect = (event.target as SVGRectElement).getBoundingClientRect();\n x = targetRect.left + targetRect.width / 2;\n y = targetRect.top + targetRect.height / 2;\n }\n\n updatePosition(x, y);\n setHoverValue(hoverVal);\n setLineColor(point.color!);\n setLegend(point.legend!);\n setXCalloutValue(point.xAxisCalloutData!);\n setYCalloutValue(point.yAxisCalloutData!);\n setBarCalloutProps(point);\n // ToDo - Confirm setting multiple state variables like this is performant.\n }\n }\n\n function _hoverOff(): void {\n /*ToDo. To fix*/\n }\n\n const _handleChartMouseLeave = () => {\n _calloutAnchorPoint = null;\n if (isPopoverOpen) {\n setPopoverOpen(false);\n setHoverValue('');\n setLineColor('');\n setLegend('');\n }\n };\n\n const _adjustProps = (): void => {\n _barHeight = props.barHeight || 12;\n };\n\n const _getChartDataText = (data: ChartProps) => {\n /* return props.barChartCustomData ? (\n <div role=\"text\">{props.barChartCustomData(data)}</div>\n ) : ( */\n return _getDefaultTextData(data);\n //)\n };\n\n function _createLegends(chartProps: ChartProps[]): JSXElement {\n const legendItems: Legend[] = chartProps.flatMap(\n point =>\n point.chartData?.map((dataPoint): Legend => {\n const legend = dataPoint.legend ?? '';\n const color = dataPoint.color ?? '';\n\n return {\n title: legend,\n color,\n action: () => setSelectedLegend(selectedLegend === legend ? '' : legend),\n hoverAction: () => {\n _handleChartMouseLeave();\n setActiveLegend(legend);\n },\n onMouseOutAction: () => setActiveLegend(''),\n };\n }) ?? [],\n );\n\n return (\n <Legends legends={legendItems} centerLegends overflowText={props.legendsOverflowText} {...props.legendProps} />\n );\n }\n\n function _getDefaultTextData(data: ChartProps): JSXElement {\n const chartDataMode = props.chartDataMode || 'default';\n\n if (chartDataMode === 'hidden') {\n return <></>; // No text data for hidden mode\n }\n\n const { culture } = props;\n const accessibilityData = getAccessibleDataObject(data.chartDataAccessibilityData!, 'text', false);\n if (!isSingleBar) {\n const total = data.chartData!.reduce(\n (acc: number, point: ChartDataPoint) =>\n acc + (point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0),\n 0,\n );\n return (\n <div className={classes.chartTitleRight} {...accessibilityData}>\n {formatToLocaleString(total, culture) as React.ReactNode}\n </div>\n );\n }\n\n const chartData: ChartDataPoint = data!.chartData![0];\n const x = chartData.horizontalBarChartdata!.x;\n const y = chartData.horizontalBarChartdata!.total!;\n\n switch (chartDataMode) {\n case 'default':\n return (\n <div className={classes.chartTitleRight} {...accessibilityData}>\n {formatToLocaleString(x, culture) as React.ReactNode}\n </div>\n );\n case 'fraction':\n return (\n <div {...accessibilityData}>\n <span className={classes.chartTitleRight}>{formatToLocaleString(x, culture) as React.ReactNode}</span>\n <span className={classes.chartDataTextDenominator}>{' / ' + formatToLocaleString(y, culture)}</span>\n </div>\n );\n case 'percentage':\n const dataRatioPercentage = `${formatToLocaleString(Math.round((x / y) * 100), culture)}%`;\n return (\n <div className={classes.chartTitleRight} {...accessibilityData}>\n {dataRatioPercentage}\n </div>\n );\n }\n }\n\n function _createBenchmark(data: ChartProps): JSXElement {\n if (data.chartData![0].horizontalBarChartdata!.total === undefined) {\n return <></>;\n }\n const totalData = data.chartData![0].horizontalBarChartdata!.total!;\n const benchmarkData = data.chartData![0].data;\n const benchmarkRatio = Math.round(((benchmarkData ? benchmarkData : 0) / totalData) * 100);\n\n const benchmarkStyles = {\n left: 'calc(' + benchmarkRatio + '% - 4px)',\n };\n\n return (\n <div className={classes.benchmarkContainer}>\n <div className={classes.triangle} style={benchmarkStyles} />\n </div>\n );\n }\n\n /**\n * This functions returns an array of <rect> elements, which form the bars\n * For each bar an x value, and a width needs to be specified\n * The computations are done based on percentages\n * Extra margin is also provided, in the x value to provide some spacing in between the bars\n */\n\n function _createBars(data: ChartProps): JSXElement[] {\n const noOfBars =\n data.chartData?.reduce((count: number, point: ChartDataPoint) => (count += (point.data || 0) > 0 ? 1 : 0), 0) ||\n 1;\n const totalMarginPercent = barSpacingInPercent * (noOfBars - 1);\n const defaultColors: string[] = [\n tokens.colorPaletteBlueForeground2,\n tokens.colorPaletteCornflowerForeground2,\n tokens.colorPaletteDarkGreenForeground2,\n tokens.colorPaletteNavyForeground2,\n tokens.colorPaletteDarkOrangeForeground2,\n ];\n // calculating starting point of each bar and it's range\n const startingPoint: number[] = [];\n const total = data.chartData!.reduce(\n (acc: number, point: ChartDataPoint) =>\n acc + (point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0),\n 0,\n );\n let prevPosition = 0;\n let value = 0;\n\n let sumOfPercent = 0;\n data.chartData!.map((point: ChartDataPoint, index: number) => {\n const pointData = point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0;\n value = (pointData / total) * 100;\n if (value < 0) {\n value = 0;\n } else if (value < 1 && value !== 0) {\n value = 1;\n }\n sumOfPercent += value;\n\n return sumOfPercent;\n });\n\n /**\n * The %age of the space occupied by the margin needs to subtracted\n * while computing the scaling ratio, since the margins are not being\n * scaled down, only the data is being scaled down from a higher percentage to lower percentage\n * Eg: 95% of the space is taken by the bars, 5% by the margins\n * Now if the sumOfPercent is 120% -> This needs to be scaled down to 95%, not 100%\n * since that's only space available to the bars\n */\n const scalingRatio = sumOfPercent !== 0 ? (sumOfPercent - totalMarginPercent) / 100 : 1;\n\n const bars = data.chartData!.map((point: ChartDataPoint, index: number) => {\n const color: string = point.color ? point.color : defaultColors[Math.floor(Math.random() * 4 + 1)];\n const pointData = point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0;\n if (index > 0) {\n prevPosition += value;\n }\n value = (pointData / total) * 100;\n if (value < 0) {\n value = 0;\n } else if (value < 1 && value !== 0) {\n value = 1 / scalingRatio;\n } else {\n value = value / scalingRatio;\n }\n startingPoint.push(prevPosition);\n\n const xValue = point.horizontalBarChartdata!.x;\n const placeholderIndex = 1;\n const isLegendSelected: boolean = _legendHighlighted(point.legend) || _noLegendHighlighted();\n\n // Render bar label instead of placeholder bar for absolute-scale variant\n if (index === placeholderIndex && props.variant === HorizontalBarChartVariant.AbsoluteScale) {\n if (props.hideLabels) {\n return <text key={index} />;\n }\n\n const barValue = data.chartData![0].horizontalBarChartdata!.x;\n\n return (\n <text\n key={index}\n x={`${_isRTL ? 100 - startingPoint[index] : startingPoint[index]}%`}\n y={_barHeight / 2}\n dominantBaseline=\"central\"\n transform={`translate(${_isRTL ? -4 : 4})`}\n className={classes.barLabel}\n aria-hidden={true}\n >\n {formatScientificLimitWidth(barValue)}\n </text>\n );\n }\n\n return (\n <rect\n key={index}\n x={`${\n _isRTL\n ? 100 - startingPoint[index] - value - index * barSpacingInPercent\n : startingPoint[index] + index * barSpacingInPercent\n }%`}\n y={0}\n width={value + '%'}\n height={_barHeight}\n fill={color}\n onMouseOver={\n _showToolTipOnSegment && point.legend !== '' ? event => _hoverOn(event, xValue, point) : undefined\n }\n onFocus={_showToolTipOnSegment && point.legend !== '' ? event => _hoverOn(event, xValue, point) : undefined}\n role=\"img\"\n aria-label={_getAriaLabel(point)}\n onBlur={_hoverOff}\n onMouseLeave={_hoverOff}\n className={classes.barWrapper}\n opacity={isLegendSelected ? 1 : 0.1}\n tabIndex={_legendHighlighted(point.legend!) || _noLegendHighlighted() ? 0 : undefined}\n />\n );\n });\n return bars;\n }\n\n const _getAriaLabel = (point: ChartDataPoint): string => {\n const legend = point.xAxisCalloutData || point.legend;\n const yValue =\n point.yAxisCalloutData ||\n (point.horizontalBarChartdata\n ? `${point.horizontalBarChartdata.x}/${point.horizontalBarChartdata.total ?? ''}`\n : 0);\n return point.callOutAccessibilityData?.ariaLabel || (legend ? `${legend}, ` : '') + `${yValue}.`;\n };\n\n function _isChartEmpty(): boolean {\n return !(props.data && props.data.length > 0);\n }\n\n function updatePosition(newX: number, newY: number): void {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n\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 React.useEffect(() => {\n const svgWidth = barChartSvgRef?.current?.getBoundingClientRect().width || 0;\n const MARGIN_WIDTH_IN_PX = 3;\n if (svgWidth) {\n const currentBarSpacing = (MARGIN_WIDTH_IN_PX / svgWidth) * 100;\n setBarSpacingInPercent(currentBarSpacing);\n }\n }, [barChartSvgRef]);\n\n function _legendHighlighted(barLegend?: string) {\n if (barLegend === undefined) {\n return false;\n }\n return selectedLegend === barLegend || (selectedLegend === '' && activeLegend === barLegend);\n }\n\n /**\n * This function checks if none of the legends is selected or hovered.*/\n\n function _noLegendHighlighted() {\n return selectedLegend === '' && activeLegend === '';\n }\n\n const { data } = props;\n _adjustProps();\n const classes = useHorizontalBarChartStyles(props);\n const focusAttributes = useFocusableGroup();\n const legendButtons = _createLegends(data!);\n\n let datapoint: number | undefined = 0;\n return !_isChartEmpty() ? (\n <div className={classes.root} onMouseLeave={_handleChartMouseLeave}>\n {data!.map((points: ChartProps, index: number) => {\n if (points.chartData && points.chartData![0] && points.chartData![0].horizontalBarChartdata!.x) {\n datapoint = points.chartData![0].horizontalBarChartdata!.x;\n } else {\n datapoint = 0;\n }\n isSingleBar = props.showLegendForSinglePointBar\n ? false\n : points.chartData!.length === 1 || (points.chartData!.length > 1 && points.chartData![1].legend === '');\n if (isSingleBar) {\n points.chartData![1] = {\n legend: '',\n horizontalBarChartdata: {\n x: points.chartData![0].horizontalBarChartdata!.total! - datapoint!,\n total: points.chartData![0].horizontalBarChartdata!.total!,\n },\n color: tokens.colorBackgroundOverlay,\n };\n }\n\n // Hide right side text of chart title for absolute-scale variant\n const chartDataText =\n props.variant === HorizontalBarChartVariant.AbsoluteScale ? null : _getChartDataText(points!);\n const bars = _createBars(points!);\n const keyVal = _uniqLineText + '_' + index;\n // ToDo - Showtriangle property is per data series. How to account for it in the new stylesheet\n /* const classes = useHorizontalBarChartStyles(props.styles!, {\n width: props.width,\n showTriangle: !!points!.chartData![0].data,\n variant: props.variant,\n }); */\n\n return (\n <div key={index}>\n <div className={classes.items} {...focusAttributes}>\n <div className={classes.chartTitle}>\n {points!.chartTitle && (\n <FocusableTooltipText\n className={classes.chartTitleLeft}\n content={points!.chartTitle}\n accessibilityData={points!.chartTitleAccessibilityData}\n />\n )}\n {chartDataText}\n </div>\n {points!.chartData![0].data && _createBenchmark(points!)}\n <svg ref={barChartSvgRef} className={classes.chart} aria-label={points!.chartTitle}>\n <g\n id={keyVal}\n ref={(e: SVGGElement) => {\n _refCallback(e, points!.chartData![0].legend);\n }}\n // NOTE: points.chartData![0] contains current data value\n onClick={() => {\n const p = points!.chartData![0];\n if (p && p.onClick) {\n p.onClick();\n }\n }}\n >\n {bars}\n </g>\n </svg>\n </div>\n </div>\n );\n })}\n <ChartPopover\n xCalloutValue={xCalloutValue}\n yCalloutValue={yCalloutValue}\n culture={props.culture ?? 'en-us'}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n legend={legend!}\n YValue={hoverValue!}\n color={lineColor}\n isCalloutForStack={false}\n customCallout={{\n customizedCallout: props.onRenderCalloutPerHorizontalBar\n ? props.onRenderCalloutPerHorizontalBar(barCalloutProps!)\n : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(barCalloutProps!)\n : undefined,\n }}\n isCartesian={false}\n />\n {!isSingleBar && (\n <div ref={(e: HTMLDivElement) => (legendContainer.current = e)} className={classes.legendContainer}>\n {legendButtons}\n </div>\n )}\n </div>\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n //TODO validate and fix focus border for issue for popover\n});\nHorizontalBarChart.displayName = 'HorizontalBarChart';\n"],"names":["React","useHorizontalBarChartStyles","HorizontalBarChartVariant","formatToLocaleString","formatScientificLimitWidth","getAccessibleDataObject","useRtl","useId","tokens","useFocusableGroup","ChartPopover","FocusableTooltipText","Legends","HorizontalBarChart","forwardRef","props","forwardedRef","legendContainer","useRef","_uniqLineText","_refArray","_isRTL","barChartSvgRef","createRef","_emptyChartId","_barHeight","_calloutAnchorPoint","isSingleBar","_showToolTipOnSegment","hideTooltip","hoverValue","setHoverValue","useState","lineColor","setLineColor","legend","setLegend","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","barCalloutProps","setBarCalloutProps","barSpacingInPercent","setBarSpacingInPercent","isPopoverOpen","setPopoverOpen","clickPosition","setClickPosition","x","y","selectedLegend","setSelectedLegend","activeLegend","setActiveLegend","_refCallback","element","legendTitle","push","index","refElement","_hoverOn","event","hoverVal","point","_legendHighlighted","_noLegendHighlighted","clientX","clientY","targetRect","target","getBoundingClientRect","left","width","top","height","updatePosition","color","xAxisCalloutData","yAxisCalloutData","_hoverOff","_handleChartMouseLeave","_adjustProps","barHeight","_getChartDataText","data","_getDefaultTextData","_createLegends","chartProps","legendItems","flatMap","chartData","map","dataPoint","title","action","hoverAction","onMouseOutAction","legends","centerLegends","overflowText","legendsOverflowText","legendProps","chartDataMode","culture","accessibilityData","chartDataAccessibilityData","total","reduce","acc","horizontalBarChartdata","div","className","classes","chartTitleRight","span","chartDataTextDenominator","dataRatioPercentage","Math","round","_createBenchmark","undefined","totalData","benchmarkData","benchmarkRatio","benchmarkStyles","benchmarkContainer","triangle","style","_createBars","noOfBars","count","totalMarginPercent","defaultColors","colorPaletteBlueForeground2","colorPaletteCornflowerForeground2","colorPaletteDarkGreenForeground2","colorPaletteNavyForeground2","colorPaletteDarkOrangeForeground2","startingPoint","prevPosition","value","sumOfPercent","pointData","scalingRatio","bars","floor","random","xValue","placeholderIndex","isLegendSelected","variant","AbsoluteScale","hideLabels","text","key","barValue","dominantBaseline","transform","barLabel","aria-hidden","rect","fill","onMouseOver","onFocus","role","aria-label","_getAriaLabel","onBlur","onMouseLeave","barWrapper","opacity","tabIndex","yValue","callOutAccessibilityData","ariaLabel","_isChartEmpty","length","newX","newY","threshold","distance","sqrt","pow","useEffect","svgWidth","current","MARGIN_WIDTH_IN_PX","currentBarSpacing","barLegend","focusAttributes","legendButtons","datapoint","root","points","showLegendForSinglePointBar","colorBackgroundOverlay","chartDataText","keyVal","items","chartTitle","chartTitleLeft","content","chartTitleAccessibilityData","svg","ref","chart","g","id","e","onClick","p","YValue","isCalloutForStack","customCallout","customizedCallout","onRenderCalloutPerHorizontalBar","customCalloutProps","calloutPropsPerDataPoint","isCartesian","displayName"],"mappings":";;;;+BAmBaa;;;;;;;iEAnBU,QAAQ;mDACa,uCAAuC;uBAC0B,UAAU;gCAClF,4BAA4B;wBACW,wBAAwB;gCAC9E,4BAA4B;4BAE3B,wBAAwB;8BACb,0BAA0B;8BAC/B,mCAAmC;sCAC3B,uCAAuC;wBAC5C,cAAc;AAQvC,2BAAMA,WAAAA,GAAuEb,OAAMc,UAAU,CAGlG,CAACC,OAAOC;IACR,MAAMC,kBAAkBjB,OAAMkB,MAAM,CAAwB;IAC5D,MAAMC,oBAAwBZ,qBAAAA,EAAM;IACpC,MAAMa,YAA4B,EAAE;IACpC,MAAMC,aAAkBf,cAAAA;IACxB,MAAMgB,iBAAAA,WAAAA,GAAiDtB,OAAMuB,SAAS;IACtE,MAAMC,oBAAwBjB,qBAAAA,EAAM;IACpC,IAAIkB;IACJ,IAAIC;IACJ,IAAIC,cAAuB;IAC3B,IAAIC,wBAAiC,CAACb,MAAMc,WAAW;IAEvD,MAAM,CAACC,YAAYC,cAAc,GAAG/B,OAAMgC,QAAQ,CAAgC;IAClF,MAAM,CAACC,WAAWC,aAAa,GAAGlC,OAAMgC,QAAQ,CAAS;IACzD,MAAM,CAACG,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