@fluentui/react-charts 9.1.5 → 9.1.7

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 (153) hide show
  1. package/CHANGELOG.md +30 -2
  2. package/dist/index.d.ts +46 -4
  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 -1
  6. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  7. package/lib/components/CommonComponents/CartesianChart.js +42 -9
  8. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  9. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  10. package/lib/components/CommonComponents/ChartPopover.js +3 -2
  11. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  12. package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -1
  13. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +37 -9
  14. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  15. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +11 -5
  16. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  17. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +13 -13
  18. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  19. package/lib/components/DonutChart/Arc/Arc.js +10 -3
  20. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  21. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
  22. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +7 -2
  23. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  24. package/lib/components/DonutChart/useDonutChartStyles.styles.js +7 -6
  25. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  26. package/lib/components/GaugeChart/GaugeChart.js +16 -17
  27. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  28. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  29. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +15 -13
  30. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  31. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +3 -3
  32. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  33. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +2 -1
  34. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  35. package/lib/components/HeatMapChart/HeatMapChart.js +4 -1
  36. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  37. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  38. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +9 -3
  39. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  40. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +14 -3
  41. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  42. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +0 -61
  43. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  44. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +6 -31
  45. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  46. package/lib/components/Legends/useLegendsStyles.styles.js +2 -1
  47. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
  48. package/lib/components/LineChart/LineChart.js +3 -3
  49. package/lib/components/LineChart/LineChart.js.map +1 -1
  50. package/lib/components/LineChart/useLineChartStyles.styles.js +2 -1
  51. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  52. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +25 -23
  53. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  54. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  55. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +29 -0
  56. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -0
  57. package/lib/components/SankeyChart/SankeyChart.js +29 -35
  58. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  59. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  60. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +13 -7
  61. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  62. package/lib/components/ScatterChart/ScatterChart.js +15 -17
  63. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  64. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +3 -2
  65. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  66. package/lib/components/VerticalBarChart/VerticalBarChart.js +19 -21
  67. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  68. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  69. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +2 -1
  70. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  71. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +17 -14
  72. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  73. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  74. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +2 -1
  75. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  76. package/lib/utilities/utilities.js +11 -5
  77. package/lib/utilities/utilities.js.map +1 -1
  78. package/lib-commonjs/components/AreaChart/AreaChart.js +2 -2
  79. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  80. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +2 -1
  81. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  82. package/lib-commonjs/components/CommonComponents/CartesianChart.js +41 -8
  83. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  84. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  85. package/lib-commonjs/components/CommonComponents/ChartPopover.js +3 -2
  86. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
  87. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +1 -1
  88. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +55 -9
  89. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  90. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +14 -5
  91. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  92. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +13 -13
  93. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  94. package/lib-commonjs/components/DonutChart/Arc/Arc.js +10 -3
  95. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  96. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -1
  97. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +10 -2
  98. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  99. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +8 -7
  100. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  101. package/lib-commonjs/components/GaugeChart/GaugeChart.js +16 -17
  102. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  103. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  104. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +13 -23
  105. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  106. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +2 -2
  107. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  108. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +2 -1
  109. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  110. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +4 -1
  111. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  112. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  113. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +10 -3
  114. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  115. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +14 -3
  116. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  117. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +0 -61
  118. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  119. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +5 -54
  120. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  121. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +2 -0
  122. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
  123. package/lib-commonjs/components/LineChart/LineChart.js +2 -2
  124. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  125. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +2 -1
  126. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  127. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +25 -23
  128. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  129. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -1
  130. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +49 -0
  131. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -0
  132. package/lib-commonjs/components/SankeyChart/SankeyChart.js +29 -35
  133. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  134. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  135. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +15 -8
  136. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  137. package/lib-commonjs/components/ScatterChart/ScatterChart.js +13 -15
  138. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  139. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +5 -4
  140. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  141. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +18 -20
  142. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  143. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  144. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +2 -1
  145. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  146. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +16 -13
  147. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  148. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  149. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +2 -1
  150. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  151. package/lib-commonjs/utilities/utilities.js +16 -7
  152. package/lib-commonjs/utilities/utilities.js.map +1 -1
  153. package/package.json +5 -5
@@ -11,11 +11,9 @@ Object.defineProperty(exports, "HorizontalBarChartWithAxis", {
11
11
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
12
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
13
  const _d3array = require("d3-array");
14
- const _d3selection = require("d3-selection");
15
14
  const _d3scale = require("d3-scale");
16
15
  const _Legends = require("../../components/Legends/Legends");
17
16
  const _reactutilities = require("@fluentui/react-utilities");
18
- const _useHorizontalBarChartWithAxisStylesstyles = require("./useHorizontalBarChartWithAxisStyles.styles");
19
17
  const _CartesianChart = require("../CommonComponents/CartesianChart");
20
18
  const _ChartPopover = require("../CommonComponents/ChartPopover");
21
19
  const _index = require("../../utilities/index");
@@ -25,7 +23,6 @@ const HorizontalBarChartWithAxis = /*#__PURE__*/ _react.forwardRef((props, forwa
25
23
  const _refArray = [];
26
24
  const _calloutId = (0, _reactutilities.useId)('callout');
27
25
  const _isRtl = (0, _index.useRtl)();
28
- const _tooltipId = (0, _reactutilities.useId)('HBCWATooltipID_');
29
26
  const _xAxisType = props.data && props.data.length > 0 ? (0, _index.getTypeOfAxis)(props.data[0].x, true) : _index.XAxisTypes.NumericAxis;
30
27
  const _yAxisType = props.data && props.data.length > 0 ? (0, _index.getTypeOfAxis)(props.data[0].y, false) : _index.YAxisType.StringAxis;
31
28
  const _emptyChartId = (0, _reactutilities.useId)('_HBCWithAxis_empty');
@@ -38,7 +35,6 @@ const HorizontalBarChartWithAxis = /*#__PURE__*/ _react.forwardRef((props, forwa
38
35
  let _xMax;
39
36
  let _calloutAnchorPoint;
40
37
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
41
- let tooltipElement;
42
38
  let _longestBarPositiveTotalValue;
43
39
  let _longestBarNegativeTotalValue;
44
40
  let _domainMargin = _index.MIN_DOMAIN_MARGIN;
@@ -83,7 +79,6 @@ const HorizontalBarChartWithAxis = /*#__PURE__*/ _react.forwardRef((props, forwa
83
79
  chartContainer: (_cartesianChartRef_current_chartContainer = (_cartesianChartRef_current = cartesianChartRef.current) === null || _cartesianChartRef_current === void 0 ? void 0 : _cartesianChartRef_current.chartContainer) !== null && _cartesianChartRef_current_chartContainer !== void 0 ? _cartesianChartRef_current_chartContainer : null
84
80
  };
85
81
  }, []);
86
- const classes = (0, _useHorizontalBarChartWithAxisStylesstyles.useHorizontalBarChartWithAxisStyles)(props);
87
82
  function _adjustProps() {
88
83
  _points = props.data || [];
89
84
  _barHeight = props.barHeight || 32;
@@ -395,35 +390,6 @@ const HorizontalBarChartWithAxis = /*#__PURE__*/ _react.forwardRef((props, forwa
395
390
  bottom: _margins.bottom + _domainMargin
396
391
  };
397
392
  }
398
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
399
- function _tooltipOfYAxislabels(ytooltipProps) {
400
- const { tooltipCls, yAxis, id } = ytooltipProps;
401
- if (yAxis === null) {
402
- return null;
403
- }
404
- const div = (0, _d3selection.select)('body').append('div').attr('id', id).attr('class', tooltipCls).style('opacity', 0);
405
- const aa = yAxis.selectAll('#BaseSpan')._groups[0];
406
- const baseSpanLength = aa && Object.keys(aa).length;
407
- const originalDataArray = [];
408
- for(let i = 0; i < baseSpanLength; i++){
409
- const originalData = aa[i].dataset && Object.values(aa[i].dataset)[0];
410
- originalDataArray.push(originalData);
411
- }
412
- const tickObject = yAxis.selectAll('.tick')._groups[0];
413
- const tickObjectLength = tickObject && Object.keys(tickObject).length;
414
- for(let i = 0; i < tickObjectLength; i++){
415
- const d1 = tickObject[i];
416
- (0, _d3selection.select)(d1) // eslint-disable-next-line @typescript-eslint/no-explicit-any
417
- .on('mouseover', (event, d)=>{
418
- if (!tooltipElement) {
419
- div.style('opacity', 0.9);
420
- div.text(originalDataArray[i]).style('left', event.pageX + 'px').style('top', event.pageY - 28 + 'px');
421
- }
422
- }).on('mouseout', (d)=>{
423
- div.style('opacity', 0);
424
- });
425
- }
426
- }
427
393
  function _createStringBars(containerHeight, containerWidth, xElement, yElement, singleBarData, xBarScale, yBarScale) {
428
394
  const { useSingleColor = false } = props;
429
395
  let prevWidthPositive = 0;
@@ -499,33 +465,6 @@ const HorizontalBarChartWithAxis = /*#__PURE__*/ _react.forwardRef((props, forwa
499
465
  tabIndex: point.legend !== '' ? 0 : undefined
500
466
  }));
501
467
  });
502
- // Removing un wanted tooltip div from DOM, when prop not provided, for proper cleanup
503
- // of unwanted DOM elements, to prevent flacky behaviour in tooltips , that might occur
504
- // in creating tooltips when tooltips are enabled( as we try to recreate a tspan with _tooltipId)
505
- if (!props.showYAxisLablesTooltip) {
506
- try {
507
- // eslint-disable-next-line @nx/workspace-no-restricted-globals
508
- document.getElementById(_tooltipId) && document.getElementById(_tooltipId).remove();
509
- //eslint-disable-next-line no-empty
510
- } catch (e) {}
511
- }
512
- // Used to display tooltip at y axis labels.
513
- if (props.showYAxisLablesTooltip) {
514
- const yAxisElement = (0, _d3selection.select)(yElement).call(yBarScale);
515
- if (!tooltipElement) {
516
- try {
517
- // eslint-disable-next-line @nx/workspace-no-restricted-globals
518
- document.getElementById(_tooltipId) && document.getElementById(_tooltipId).remove();
519
- //eslint-disable-next-line no-empty
520
- } catch (e) {}
521
- }
522
- const ytooltipProps = {
523
- tooltipCls: classes.tooltip,
524
- id: _tooltipId,
525
- yAxis: yAxisElement
526
- };
527
- yAxisElement && _tooltipOfYAxislabels(ytooltipProps);
528
- }
529
468
  return bars;
530
469
  }
531
470
  function _onLegendHover(customMessage) {
@@ -1 +1 @@
1
- {"version":3,"sources":["HorizontalBarChartWithAxis.tsx"],"sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { select as d3Select } from 'd3-selection';\nimport { scaleLinear as d3ScaleLinear, ScaleLinear as D3ScaleLinear, scaleBand as d3ScaleBand } from 'd3-scale';\nimport { Legend } from '../../components/Legends/Legends.types';\nimport { Legends } from '../../components/Legends/Legends';\nimport { useId } from '@fluentui/react-utilities';\nimport { useHorizontalBarChartWithAxisStyles } from './useHorizontalBarChartWithAxisStyles.styles';\nimport {\n AccessibilityProps,\n HorizontalBarChartWithAxisDataPoint,\n RefArrayData,\n Margins,\n ChartPopoverProps,\n Chart,\n} from '../../index';\nimport { ChildProps } from '../CommonComponents/CartesianChart.types';\nimport { CartesianChart } from '../CommonComponents/CartesianChart';\nimport { HorizontalBarChartWithAxisProps } from './HorizontalBarChartWithAxis.types';\nimport { ChartPopover } from '../CommonComponents/ChartPopover';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n YAxisType,\n XAxisTypes,\n NumericAxis,\n StringAxis,\n getTypeOfAxis,\n getNextColor,\n areArraysEqual,\n useRtl,\n DataVizPalette,\n getColorFromToken,\n computeLongestBars,\n IDomainNRange,\n domainRangeOfNumericForHorizontalBarChartWithAxis,\n groupChartDataByYValue,\n MIN_DOMAIN_MARGIN,\n} from '../../utilities/index';\nimport { getClosestPairDiffAndRange } from '../../utilities/vbc-utils';\ntype ColorScale = (_p?: number) => string;\n\nexport const HorizontalBarChartWithAxis: React.FunctionComponent<HorizontalBarChartWithAxisProps> = React.forwardRef<\n HTMLDivElement,\n HorizontalBarChartWithAxisProps\n>((props, forwardedRef) => {\n const _refArray: RefArrayData[] = [];\n const _calloutId: string = useId('callout');\n const _isRtl: boolean = useRtl();\n const _tooltipId: string = useId('HBCWATooltipID_');\n const _xAxisType: XAxisTypes =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.NumericAxis;\n const _yAxisType: YAxisType =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data![0].y, false) as YAxisType)\n : YAxisType.StringAxis;\n const _emptyChartId: string = useId('_HBCWithAxis_empty');\n let _points: HorizontalBarChartWithAxisDataPoint[] = [];\n let _barHeight: number = 0;\n let _colors: string[] = [];\n let _margins: Margins;\n let _bars: JSX.Element[];\n let _yAxisLabels: string[];\n let _xMax: number;\n let _calloutAnchorPoint: HorizontalBarChartWithAxisDataPoint | null;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let tooltipElement: any;\n let _longestBarPositiveTotalValue: number;\n let _longestBarNegativeTotalValue: number;\n let _domainMargin: number = MIN_DOMAIN_MARGIN;\n let _yAxisPadding: number = props.yAxisPadding ?? 0.5;\n const cartesianChartRef = React.useRef<Chart>(null);\n const X_ORIGIN: number = 0;\n\n const [color, setColor] = React.useState<string>('');\n const [dataForHoverCard, setDataForHoverCard] = React.useState<number>(0);\n const [isLegendSelected, setIsLegendSelected] = React.useState<boolean>(\n (props.legendProps?.selectedLegends && props.legendProps.selectedLegends.length > 0) ||\n props.legendProps?.selectedLegend !== undefined,\n );\n const [isLegendHovered, setIsLegendHovered] = React.useState<boolean>(false);\n const [selectedLegendTitle, setSelectedLegendTitle] = React.useState<string>(props.legendProps?.selectedLegend ?? '');\n const [xCalloutValue, setXCalloutValue] = React.useState<string>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string>('');\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<HorizontalBarChartWithAxisDataPoint>();\n const [callOutAccessibilityData, setCallOutAccessibilityData] = React.useState<AccessibilityProps>();\n const [isPopoverOpen, setPopoverOpen] = React.useState<boolean>(false);\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const prevPropsRef = React.useRef<HorizontalBarChartWithAxisProps | null>(null);\n\n React.useEffect(() => {\n if (prevPropsRef.current) {\n const prevProps = prevPropsRef.current;\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, props.legendProps?.selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n }\n prevPropsRef.current = props;\n }, [props]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n }),\n [],\n );\n\n const classes = useHorizontalBarChartWithAxisStyles(props);\n function _adjustProps(): void {\n _points = props.data || [];\n _barHeight = props.barHeight || 32;\n const defaultPalette: string[] = [\n getColorFromToken(DataVizPalette.color6),\n getColorFromToken(DataVizPalette.color1),\n getColorFromToken(DataVizPalette.color5),\n getColorFromToken(DataVizPalette.color7),\n ];\n _colors = props.colors! || defaultPalette;\n }\n\n function _getMargins(margins: Margins) {\n _margins = margins;\n }\n\n function _renderContentForOnlyBars(point: HorizontalBarChartWithAxisDataPoint): JSX.Element {\n const { useSingleColor = false } = props;\n let selectedPointIndex = 0;\n props.data!.forEach((yDataPoint: HorizontalBarChartWithAxisDataPoint, index: number) => {\n if (yDataPoint.y === point.y) {\n selectedPointIndex = index;\n }\n });\n // eslint-disable-next-line @typescript-eslint/no-shadow\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = props.colors ? _createColors()(1) : getNextColor(1, 0);\n } else {\n color = point.color ? point.color : props.colors ? _createColors()(point.x) : getNextColor(selectedPointIndex, 0);\n }\n return (\n <>\n <ChartPopover\n XValue={point.xAxisCalloutData || point.x.toString()}\n legend={point.legend}\n YValue={point.yAxisCalloutData || point.y}\n color={color}\n culture={props.culture ?? 'en-us'}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n />\n </>\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n function _renderCallout(props?: HorizontalBarChartWithAxisDataPoint): JSX.Element | null {\n return props ? _renderContentForOnlyBars(props) : null;\n }\n\n function _getCustomizedCallout() {\n return props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps, _renderCallout)\n : null;\n }\n\n function _getGraphData(\n xScale: NumericAxis,\n yScale: NumericAxis | StringAxis,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n yElement?: SVGElement | null,\n ) {\n const stackedChartData = groupChartDataByYValue(_points);\n const longestBars = computeLongestBars(stackedChartData, X_ORIGIN);\n _longestBarPositiveTotalValue = longestBars.longestPositiveBar;\n _longestBarNegativeTotalValue = longestBars.longestNegativeBar;\n\n const { xBarScale, yBarScale } =\n _yAxisType === YAxisType.NumericAxis\n ? _getScales(containerHeight, containerWidth, true)\n : _getScales(containerHeight, containerWidth, false);\n const xRange = xBarScale.range();\n let allBars: JSX.Element[] = [];\n // when the chart mounts, the xRange[1] is sometimes seen to be < 0 (like -40) while xRange[0] > 0.\n if (xRange[0] < xRange[1]) {\n allBars = stackedChartData\n .map(singleBarData =>\n _yAxisType === YAxisType.NumericAxis\n ? _createNumericBars(\n containerHeight,\n containerWidth,\n xElement!,\n yElement!,\n singleBarData,\n xBarScale,\n yBarScale,\n )\n : _createStringBars(\n containerHeight,\n containerWidth,\n xElement!,\n yElement!,\n singleBarData,\n xBarScale,\n yBarScale,\n ),\n )\n .flat();\n }\n\n return (_bars = allBars);\n }\n\n function _createColors(): D3ScaleLinear<string, string> | ColorScale {\n const increment = _colors.length <= 1 ? 1 : 1 / (_colors.length - 1);\n const { useSingleColor = false } = props;\n if (useSingleColor) {\n return (_p?: number) => {\n const { colors } = props;\n return colors && colors.length > 0 ? colors[0] : getColorFromToken(DataVizPalette.color16);\n };\n }\n const domainValues = [];\n for (let i = 0; i < _colors.length; i++) {\n domainValues.push(increment * i * _xMax);\n }\n const colorScale = d3ScaleLinear<string>().domain(domainValues).range(_colors);\n return colorScale;\n }\n\n function _refCallback(element: SVGRectElement, legendTitle: string): void {\n _refArray.push({ index: legendTitle, refElement: element });\n }\n\n function _onBarHover(\n point: HorizontalBarChartWithAxisDataPoint,\n // eslint-disable-next-line @typescript-eslint/no-shadow\n color: string,\n mouseEvent: React.MouseEvent<SVGElement, MouseEvent>,\n ): void {\n mouseEvent.persist();\n // eslint-disable-next-line @typescript-eslint/no-shadow\n if ((isLegendSelected === false || _isLegendHighlighted(point.legend)) && _calloutAnchorPoint !== point) {\n _calloutAnchorPoint = point;\n setPopoverOpen(true);\n _updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n setDataForHoverCard(point.x);\n setSelectedLegendTitle(point.legend!);\n setColor(props.useSingleColor || props.enableGradient ? color : point.color!);\n // To display callout value, if no callout value given, taking given point.x value as a string.\n setXCalloutValue(point.yAxisCalloutData! || point.y.toString());\n setYCalloutValue(point.xAxisCalloutData || point.x.toString());\n setDataPointCalloutProps(point);\n setCallOutAccessibilityData(point.callOutAccessibilityData);\n }\n }\n\n function _onBarLeave(): void {\n setPopoverOpen(false);\n }\n\n function _handleChartMouseLeave(): void {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n function _onBarFocus(point: HorizontalBarChartWithAxisDataPoint, refArrayIndexNumber: number, color: string): void {\n if ((isLegendSelected === false || _isLegendHighlighted(point.legend)) && _calloutAnchorPoint !== point) {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n _refArray.forEach((obj: RefArrayData, index: number) => {\n if (refArrayIndexNumber === index) {\n setPopoverOpen(true);\n setSelectedLegendTitle(point.legend!);\n setDataForHoverCard(point.x);\n setColor(props.useSingleColor ? color : point.color!);\n setXCalloutValue(point.yAxisCalloutData || point.y.toString());\n setYCalloutValue(point.xAxisCalloutData! || point.x.toString());\n setDataPointCalloutProps(point);\n setCallOutAccessibilityData(point.callOutAccessibilityData);\n }\n });\n }\n }\n\n function _getScales(\n containerHeight: number,\n containerWidth: number,\n isNumericScale: boolean,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): { xBarScale: any; yBarScale: any } {\n const xMax = _longestBarPositiveTotalValue;\n const xMin = _longestBarNegativeTotalValue;\n const xDomain = [Math.min(X_ORIGIN, xMin), Math.max(X_ORIGIN, xMax)];\n if (isNumericScale) {\n const yMax = d3Max(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n const yMin = d3Min(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n const yDomainMax = Math.max(yMax, props.yMaxValue || 0);\n // Default to 0 if yMinValue is not provided.\n const yMinProp = props.yMinValue || 0;\n const yDomainMin = Math.min(yMin, yMinProp);\n const xBarScale = d3ScaleLinear()\n .domain(xDomain)\n .nice()\n .range([_margins.left!, containerWidth - _margins.right!]);\n const yBarScale = d3ScaleLinear()\n .domain([yDomainMin, yDomainMax])\n .range([containerHeight - (_margins.bottom! + _domainMargin), _margins.top! + _domainMargin]);\n return { xBarScale, yBarScale };\n } else {\n // please note these padding default values must be consistent in here\n // and CatrtesianChartBase w for more details refer example\n // http://using-d3js.com/04_07_ordinal_scales.html\n const yBarScale = d3ScaleBand()\n .domain(_yAxisLabels)\n .range([containerHeight - (_margins.bottom! + _domainMargin), _margins.top! + _domainMargin])\n .padding(_yAxisPadding);\n\n const xBarScale = d3ScaleLinear()\n .domain(xDomain)\n .nice()\n .range([_margins.left!, containerWidth - _margins.right!]);\n return { xBarScale, yBarScale };\n }\n }\n\n function _createNumericBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n singleBarData: HorizontalBarChartWithAxisDataPoint[],\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xBarScale: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yBarScale: any,\n ): JSX.Element[] {\n const { useSingleColor = false } = props;\n const sortedBars: HorizontalBarChartWithAxisDataPoint[] = [...singleBarData];\n sortedBars.sort((a, b) => {\n const aValue = typeof a.y === 'number' ? a.y : parseFloat(a.y);\n const bValue = typeof b.y === 'number' ? b.y : parseFloat(b.y);\n return bValue - aValue;\n });\n\n let prevWidthPositive = 0;\n let prevWidthNegative = 0;\n let prevPoint = 0;\n\n const totalPositiveBars = singleBarData.filter(\n (point: HorizontalBarChartWithAxisDataPoint) => point.x >= X_ORIGIN,\n ).length;\n const totalNegativeBars = singleBarData.length - totalPositiveBars;\n let currPositiveCounter = 0;\n let currNegativeCounter = 0;\n\n const bars = sortedBars.map((point: HorizontalBarChartWithAxisDataPoint, index: number) => {\n let shouldHighlight = true;\n if (isLegendHovered || isLegendSelected) {\n shouldHighlight = _isLegendHighlighted(point.legend);\n }\n if (point.x >= X_ORIGIN) {\n ++currPositiveCounter;\n }\n if (point.x < X_ORIGIN) {\n ++currNegativeCounter;\n }\n const barStartX = _isRtl\n ? containerWidth -\n (_margins.right! + Math.max(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN)) - _margins.left!)\n : Math.min(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN));\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let startColor: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n startColor = props.colors ? _createColors()(1) : getNextColor(1, 0);\n } else {\n startColor = props.colors ? _createColors()(point.x) : getNextColor(index, 0);\n }\n\n startColor = point.color && !useSingleColor ? point.color : startColor;\n\n const prevBarWidth = Math.abs(xBarScale(prevPoint + X_ORIGIN) - xBarScale(X_ORIGIN));\n prevPoint > X_ORIGIN ? (prevWidthPositive += prevBarWidth) : (prevWidthNegative += prevBarWidth);\n const currentWidth = Math.abs(xBarScale(point.x + X_ORIGIN) - xBarScale(X_ORIGIN));\n const gapWidthLTR =\n currentWidth > 2 &&\n ((point.x > X_ORIGIN && currPositiveCounter !== totalPositiveBars) ||\n (point.x < X_ORIGIN && (totalPositiveBars !== 0 || currNegativeCounter > 1)))\n ? 2\n : 0;\n const gapWidthRTL =\n currentWidth > 2 &&\n ((point.x > X_ORIGIN && (totalNegativeBars !== 0 || currPositiveCounter > 1)) ||\n (point.x < X_ORIGIN && currNegativeCounter !== totalNegativeBars))\n ? 2\n : 0;\n let xStart = X_ORIGIN;\n if (_isRtl) {\n xStart = point.x > X_ORIGIN ? barStartX - prevWidthPositive : barStartX + prevWidthNegative;\n } else {\n xStart = point.x > X_ORIGIN ? barStartX + prevWidthPositive : barStartX - prevWidthNegative;\n }\n prevPoint = point.x;\n\n return (\n <React.Fragment key={`${index}_${point.x}`}>\n <rect\n key={point.y}\n x={xStart}\n y={yBarScale(point.y) - _barHeight / 2}\n data-is-focusable={shouldHighlight}\n width={currentWidth - (_isRtl ? gapWidthRTL : gapWidthLTR)}\n height={_barHeight}\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n rx={props.roundCorners ? 3 : 0}\n onClick={point.onClick}\n onMouseOver={(event: React.MouseEvent<SVGElement, MouseEvent>) => _onBarHover(point, startColor, event)}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n aria-labelledby={`toolTip${_calloutId}`}\n onMouseLeave={_onBarLeave}\n onFocus={() => _onBarFocus(point, index, startColor)}\n onBlur={_onBarLeave}\n fill={startColor}\n opacity={shouldHighlight ? 1 : 0.1}\n tabIndex={point.legend !== '' ? 0 : undefined}\n />\n </React.Fragment>\n );\n });\n return bars;\n }\n\n function _getUniqueYValues() {\n const mapY: Record<string, number | string> = {};\n props.data?.forEach((point: HorizontalBarChartWithAxisDataPoint) => {\n mapY[point.y] = point.y;\n });\n const uniqueY = Object.values(mapY);\n return uniqueY;\n }\n\n function _calculateAppropriateBarHeight(data: number[] | Date[], totalWidth: number, innerPadding: number) {\n const result = getClosestPairDiffAndRange(data);\n if (!result || result[1] === 0) {\n return 16;\n }\n const closestPairDiff = result[0];\n let range = result[1];\n const yMax = d3Max(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n // Since we are always rendering from 0 to yMax, we need to ensure that the range is at least yMax\n // to calculate the bar height correctly.\n range = Math.max(range, yMax);\n // Refer to https://microsoft.github.io/fluentui-charting-contrib/docs/rfcs/fix-overlapping-bars-on-continuous-axes\n // for the derivation of the following formula.\n const barWidth = Math.floor(\n (totalWidth * closestPairDiff * (1 - innerPadding)) / (range + closestPairDiff * (1 - innerPadding)),\n );\n return barWidth;\n }\n\n function _getDomainMarginsForHorizontalBarChart(containerHeight: number): Margins {\n _domainMargin = MIN_DOMAIN_MARGIN;\n const uniqueY = _getUniqueYValues();\n /** Rate at which the space between the bars changes wrt the bar height */\n _yAxisPadding = _yAxisPadding === 1 ? 0.99 : _yAxisPadding;\n const barGapRate = _yAxisPadding / (1 - _yAxisPadding);\n const numBars = uniqueY.length + (uniqueY.length - 1) * barGapRate;\n // Total height available to render the bars\n const totalHeight = containerHeight - (_margins.top! + MIN_DOMAIN_MARGIN) - (_margins.bottom! + MIN_DOMAIN_MARGIN);\n if (_yAxisType !== YAxisType.StringAxis) {\n // Calculate bar height dynamically\n _barHeight =\n props.barHeight || _calculateAppropriateBarHeight(uniqueY as number[] | Date[], totalHeight, _yAxisPadding);\n _barHeight = Math.max(_barHeight, 1);\n _domainMargin += _barHeight / 2;\n } else {\n // Calculate the appropriate bar height\n _barHeight = props.barHeight || totalHeight / numBars;\n /** Total height required to render the bars. Directly proportional to bar height */\n const reqHeight = numBars * _barHeight;\n if (totalHeight >= reqHeight) {\n // Center align the chart by setting equal left and right margins for domain\n _domainMargin = MIN_DOMAIN_MARGIN + (totalHeight - reqHeight) / 2;\n }\n }\n\n return {\n ..._margins,\n top: _margins.top! + _domainMargin,\n bottom: _margins.bottom! + _domainMargin,\n };\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _tooltipOfYAxislabels(ytooltipProps: any) {\n const { tooltipCls, yAxis, id } = ytooltipProps;\n if (yAxis === null) {\n return null;\n }\n const div = d3Select('body').append('div').attr('id', id).attr('class', tooltipCls).style('opacity', 0);\n const aa = yAxis!.selectAll('#BaseSpan')._groups[0];\n const baseSpanLength = aa && Object.keys(aa)!.length;\n const originalDataArray: string[] = [];\n for (let i = 0; i < baseSpanLength; i++) {\n const originalData = aa[i].dataset && (Object.values(aa[i].dataset)[0] as string);\n originalDataArray.push(originalData);\n }\n const tickObject = yAxis!.selectAll('.tick')._groups[0];\n const tickObjectLength = tickObject && Object.keys(tickObject)!.length;\n for (let i = 0; i < tickObjectLength; i++) {\n const d1 = tickObject[i];\n d3Select(d1)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .on('mouseover', (event: any, d) => {\n if (!tooltipElement) {\n div.style('opacity', 0.9);\n div\n .text(originalDataArray[i])\n .style('left', event.pageX + 'px')\n .style('top', event.pageY - 28 + 'px');\n }\n })\n .on('mouseout', d => {\n div.style('opacity', 0);\n });\n }\n }\n\n function _createStringBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n singleBarData: HorizontalBarChartWithAxisDataPoint[],\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xBarScale: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yBarScale: any,\n ): JSX.Element[] {\n const { useSingleColor = false } = props;\n let prevWidthPositive = 0;\n let prevWidthNegative = 0;\n let prevPoint = 0;\n const totalPositiveBars = singleBarData.filter(\n (point: HorizontalBarChartWithAxisDataPoint) => point.x >= X_ORIGIN,\n ).length;\n const totalNegativeBars = singleBarData.length - totalPositiveBars;\n let currPositiveCounter = 0;\n let currNegativeCounter = 0;\n const bars = singleBarData.map((point: HorizontalBarChartWithAxisDataPoint, index: number) => {\n let shouldHighlight = true;\n if (isLegendHovered || isLegendSelected) {\n shouldHighlight = _isLegendHighlighted(point.legend);\n }\n if (point.x >= X_ORIGIN) {\n ++currPositiveCounter;\n }\n if (point.x < X_ORIGIN) {\n ++currNegativeCounter;\n }\n const barStartX = _isRtl\n ? containerWidth -\n (_margins.right! + Math.max(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN)) - _margins.left!)\n : Math.min(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN));\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let startColor: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n startColor = props.colors ? _createColors()(1) : getNextColor(1, 0);\n } else {\n startColor = props.colors ? _createColors()(point.x) : getNextColor(index, 0);\n }\n\n startColor = point.color && !useSingleColor ? point.color : startColor;\n const prevBarWidth = Math.abs(xBarScale(prevPoint + X_ORIGIN) - xBarScale(X_ORIGIN));\n prevPoint > 0 ? (prevWidthPositive += prevBarWidth) : (prevWidthNegative += prevBarWidth);\n const currentWidth = Math.abs(xBarScale(point.x + X_ORIGIN) - xBarScale(X_ORIGIN));\n const gapWidthLTR =\n currentWidth > 2 &&\n ((point.x > X_ORIGIN && currPositiveCounter !== totalPositiveBars) ||\n (point.x < X_ORIGIN && (totalPositiveBars !== 0 || currNegativeCounter > 1)))\n ? 2\n : 0;\n const gapWidthRTL =\n currentWidth > 2 &&\n ((point.x > X_ORIGIN && (totalNegativeBars !== 0 || currPositiveCounter > 1)) ||\n (point.x < X_ORIGIN && currNegativeCounter !== totalNegativeBars))\n ? 2\n : 0;\n prevPoint = point.x;\n let xStart = X_ORIGIN;\n if (_isRtl) {\n xStart = point.x > X_ORIGIN ? barStartX - prevWidthPositive : barStartX + prevWidthNegative;\n } else {\n xStart = point.x > X_ORIGIN ? barStartX + prevWidthPositive : barStartX - prevWidthNegative;\n }\n return (\n <React.Fragment key={`${index}_${point.x}`}>\n <rect\n transform={`translate(0,${0.5 * (yBarScale.bandwidth() - _barHeight)})`}\n key={point.x}\n x={xStart}\n y={yBarScale(point.y)}\n rx={props.roundCorners ? 3 : 0}\n width={currentWidth - (_isRtl ? gapWidthRTL : gapWidthLTR)}\n height={_barHeight}\n aria-labelledby={`toolTip${_calloutId}`}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={(event: React.MouseEvent<SVGElement, MouseEvent>) => _onBarHover(point, startColor, event)}\n onMouseLeave={_onBarLeave}\n onBlur={_onBarLeave}\n data-is-focusable={shouldHighlight}\n opacity={shouldHighlight ? 1 : 0.1}\n onFocus={() => _onBarFocus(point, index, startColor)}\n fill={startColor}\n tabIndex={point.legend !== '' ? 0 : undefined}\n />\n </React.Fragment>\n );\n });\n\n // Removing un wanted tooltip div from DOM, when prop not provided, for proper cleanup\n // of unwanted DOM elements, to prevent flacky behaviour in tooltips , that might occur\n // in creating tooltips when tooltips are enabled( as we try to recreate a tspan with _tooltipId)\n if (!props.showYAxisLablesTooltip) {\n try {\n // eslint-disable-next-line @nx/workspace-no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n //eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at y axis labels.\n if (props.showYAxisLablesTooltip) {\n const yAxisElement = d3Select(yElement).call(yBarScale);\n if (!tooltipElement) {\n try {\n // eslint-disable-next-line @nx/workspace-no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n //eslint-disable-next-line no-empty\n } catch (e) {}\n }\n const ytooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n yAxis: yAxisElement,\n };\n yAxisElement && _tooltipOfYAxislabels(ytooltipProps);\n }\n return bars;\n }\n\n function _onLegendHover(customMessage: string): void {\n if (!_isLegendSelected()) {\n setIsLegendHovered(true);\n setSelectedLegendTitle(customMessage);\n }\n }\n\n function _onLegendLeave(isLegendFocused?: boolean): void {\n if (!!isLegendFocused || !_isLegendSelected()) {\n setIsLegendHovered(false);\n setSelectedLegendTitle('');\n setIsLegendSelected(isLegendFocused ? false : _isLegendSelected());\n }\n }\n\n function _getLegendData(data: HorizontalBarChartWithAxisDataPoint[]): JSX.Element {\n const { useSingleColor } = props;\n const actions: Legend[] = [];\n const mapLegendToColor: Record<string, string> = {};\n\n data.forEach((point: HorizontalBarChartWithAxisDataPoint, _index: number) => {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const color: string = useSingleColor ? (props.colors ? _createColors()(1) : getNextColor(1, 0)) : point.color!;\n\n mapLegendToColor[point.legend!] = color;\n });\n Object.entries(mapLegendToColor).forEach(([legendTitle, color]) => {\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: legendTitle,\n color,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(legendTitle);\n },\n // eslint-disable-next-line @typescript-eslint/no-shadow\n onMouseOutAction: (isLegendSelected?: boolean) => {\n _onLegendLeave(isLegendSelected);\n },\n };\n actions.push(legend);\n });\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n onChange={_onLegendSelectionChange}\n />\n );\n return legends;\n }\n\n function _isLegendSelected(): boolean {\n return isLegendSelected!;\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n function _isLegendHighlighted(legend?: string) {\n return _getHighlightedLegend().includes(legend!);\n }\n\n function _getHighlightedLegend() {\n return selectedLegends.length > 0 ? selectedLegends : selectedLegendTitle ? [selectedLegendTitle] : [];\n }\n\n function _onLegendSelectionChange(\n // eslint-disable-next-line @typescript-eslint/no-shadow\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(selectedLegends);\n setSelectedLegendTitle(currentLegend?.title!);\n } else {\n setSelectedLegends(selectedLegends.slice(-1));\n setSelectedLegendTitle(currentLegend?.title!);\n }\n setIsLegendSelected(selectedLegends.length > 0);\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n }\n\n function _getAxisData(yAxisData: IAxisData) {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n // For HBCWA x and y Values are swapped\n const { yAxisDomainValues: domainValue } = yAxisData;\n _xMax = Math.max(domainValue[domainValue.length - 1], props.xMaxValue || 0);\n }\n }\n function _getAriaLabel(point: HorizontalBarChartWithAxisDataPoint): string {\n const xValue = point.xAxisCalloutData || point.x;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ` + `${yValue}.`;\n }\n\n function _getChartTitle(): string {\n const { chartTitle, data } = props;\n return (chartTitle ? `${chartTitle}. ` : '') + `Horizontal bar chart with ${data?.length || 0} bars. `;\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 function _getDomainNRangeValues(\n points: HorizontalBarChartWithAxisDataPoint[],\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) {\n domainNRangeValue = domainRangeOfNumericForHorizontalBarChartWithAxis(\n points,\n margins,\n width,\n isRTL,\n shiftX,\n X_ORIGIN,\n );\n } else {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n }\n return domainNRangeValue;\n }\n\n if (!_isChartEmpty()) {\n _adjustProps();\n const calloutProps: ChartPopoverProps = {\n color: color,\n legend: selectedLegendTitle,\n XValue: xCalloutValue,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData),\n customCallout: {\n customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n isCartesian: true,\n isPopoverOpen,\n clickPosition,\n };\n const tickParams = {\n tickValues: props.tickValues,\n tickFormat: props.tickFormat,\n };\n\n const reversedBars = [..._points].reverse();\n _yAxisLabels = reversedBars.map((point: HorizontalBarChartWithAxisDataPoint) => point.y as string);\n _xMax = Math.max(d3Max(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.x)!, props.xMaxValue || 0);\n const legendBars: JSX.Element = _getLegendData(_points);\n return (\n <CartesianChart\n yAxisPadding={_yAxisPadding}\n {...props}\n chartTitle={_getChartTitle()}\n points={_points}\n chartType={ChartTypes.HorizontalBarChartWithAxis}\n xAxisType={_xAxisType}\n yAxisType={_yAxisType}\n getDomainNRangeValues={_getDomainNRangeValues}\n stringDatasetForYAxisDomain={_yAxisLabels}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n barwidth={_barHeight}\n getmargins={_getMargins}\n getYDomainMargins={_getDomainMarginsForHorizontalBarChart}\n getGraphData={_getGraphData}\n getAxisData={_getAxisData}\n onChartMouseLeave={_handleChartMouseLeave}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line @typescript-eslint/no-shadow\n children={(props: ChildProps) => {\n return (\n <>\n <g>{_bars}</g>\n </>\n );\n }}\n />\n );\n } else {\n return (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n }\n});\nHorizontalBarChartWithAxis.displayName = 'HorizontalBarChartWithAxis';\n"],"names":["HorizontalBarChartWithAxis","React","forwardRef","props","forwardedRef","_refArray","_calloutId","useId","_isRtl","useRtl","_tooltipId","_xAxisType","data","length","getTypeOfAxis","x","XAxisTypes","NumericAxis","_yAxisType","y","YAxisType","StringAxis","_emptyChartId","_points","_barHeight","_colors","_margins","_bars","_yAxisLabels","_xMax","_calloutAnchorPoint","tooltipElement","_longestBarPositiveTotalValue","_longestBarNegativeTotalValue","_domainMargin","MIN_DOMAIN_MARGIN","_yAxisPadding","yAxisPadding","cartesianChartRef","useRef","X_ORIGIN","color","setColor","useState","dataForHoverCard","setDataForHoverCard","isLegendSelected","setIsLegendSelected","legendProps","selectedLegends","selectedLegend","undefined","isLegendHovered","setIsLegendHovered","selectedLegendTitle","setSelectedLegendTitle","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","setSelectedLegends","dataPointCalloutProps","setDataPointCalloutProps","callOutAccessibilityData","setCallOutAccessibilityData","isPopoverOpen","setPopoverOpen","clickPosition","setClickPosition","prevPropsRef","useEffect","current","prevProps","areArraysEqual","useImperativeHandle","componentRef","chartContainer","classes","useHorizontalBarChartWithAxisStyles","_adjustProps","barHeight","defaultPalette","getColorFromToken","DataVizPalette","color6","color1","color5","color7","colors","_getMargins","margins","_renderContentForOnlyBars","point","useSingleColor","selectedPointIndex","forEach","yDataPoint","index","_createColors","getNextColor","createElement","Fragment","ChartPopover","XValue","xAxisCalloutData","toString","legend","YValue","yAxisCalloutData","culture","_renderCallout","_getCustomizedCallout","onRenderCalloutPerDataPoint","_getGraphData","xScale","yScale","containerHeight","containerWidth","xElement","yElement","stackedChartData","groupChartDataByYValue","longestBars","computeLongestBars","longestPositiveBar","longestNegativeBar","xBarScale","yBarScale","_getScales","xRange","range","allBars","map","singleBarData","_createNumericBars","_createStringBars","flat","increment","_p","color16","domainValues","i","push","colorScale","d3ScaleLinear","domain","_refCallback","element","legendTitle","refElement","_onBarHover","mouseEvent","persist","_isLegendHighlighted","_updatePosition","clientX","clientY","enableGradient","_onBarLeave","_handleChartMouseLeave","_onBarFocus","refArrayIndexNumber","obj","isNumericScale","xMax","xMin","xDomain","Math","min","max","yMax","d3Max","yMin","d3Min","yDomainMax","yMaxValue","yMinProp","yMinValue","yDomainMin","nice","left","right","bottom","top","d3ScaleBand","padding","sortedBars","sort","a","b","aValue","parseFloat","bValue","prevWidthPositive","prevWidthNegative","prevPoint","totalPositiveBars","filter","totalNegativeBars","currPositiveCounter","currNegativeCounter","bars","shouldHighlight","barStartX","key","startColor","prevBarWidth","abs","currentWidth","gapWidthLTR","gapWidthRTL","xStart","rect","data-is-focusable","width","height","ref","e","rx","roundCorners","onClick","onMouseOver","event","aria-label","_getAriaLabel","role","aria-labelledby","onMouseLeave","onFocus","onBlur","fill","opacity","tabIndex","_getUniqueYValues","mapY","uniqueY","Object","values","_calculateAppropriateBarHeight","totalWidth","innerPadding","result","getClosestPairDiffAndRange","closestPairDiff","barWidth","floor","_getDomainMarginsForHorizontalBarChart","barGapRate","numBars","totalHeight","reqHeight","_tooltipOfYAxislabels","ytooltipProps","tooltipCls","yAxis","id","div","d3Select","append","attr","style","aa","selectAll","_groups","baseSpanLength","keys","originalDataArray","originalData","dataset","tickObject","tickObjectLength","d1","on","d","text","pageX","pageY","transform","bandwidth","showYAxisLablesTooltip","document","getElementById","remove","yAxisElement","call","tooltip","_onLegendHover","customMessage","_isLegendSelected","_onLegendLeave","isLegendFocused","_getLegendData","actions","mapLegendToColor","_index","entries","title","hoverAction","onMouseOutAction","legends","Legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onChange","_onLegendSelectionChange","_getHighlightedLegend","includes","currentLegend","canSelectMultipleLegends","slice","_getAxisData","yAxisData","yAxisDomainValues","domainValue","xMaxValue","xValue","yValue","ariaLabel","_getChartTitle","chartTitle","_isChartEmpty","newX","newY","threshold","distance","sqrt","pow","_getDomainNRangeValues","points","chartType","isRTL","xAxisType","tickValues","shiftX","domainNRangeValue","domainRangeOfNumericForHorizontalBarChartWithAxis","dStartValue","dEndValue","rStartValue","rEndValue","calloutProps","getAccessibleDataObject","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","isCartesian","tickParams","tickFormat","reversedBars","reverse","legendBars","CartesianChart","ChartTypes","yAxisType","getDomainNRangeValues","stringDatasetForYAxisDomain","barwidth","getmargins","getYDomainMargins","getGraphData","getAxisData","onChartMouseLeave","children","g","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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uBAAuB5B;YACvB6B,6BAA6B1U;YAC7B0T,cAAcA;YACdO,YAAYA;YACZI,YAAYA;YACZM,UAAU/U;YACVgV,YAAY/Q;YACZgR,mBAAmBnH;YACnBoH,cAAczP;YACd0P,aAAanD;YACboD,mBAAmB7M;YACnBpF,cAAcrC;YACd,oCAAoC,GACpC,wDAAwD;YACxDuU,UAAU,CAAC1W;gBACT,OAAA,WAAA,GACEF,OAAAmG,aAAA,CAAAnG,OAAAoG,QAAA,EAAA,MAAA,WAAA,GACEpG,OAAAmG,aAAA,CAAC0Q,KAAAA,MAAGnV;YAGV;;IAGN,OAAO;QACL,OAAA,WAAA,GACE1B,OAAAmG,aAAA,CAAC4J,OAAAA;YAAID,IAAIzO;YAAe2M,MAAM;YAASmC,OAAO;gBAAE7B,SAAS;YAAI;YAAGR,cAAY;;IAEhF;AACF;AACA/N,2BAA2B+W,WAAW,GAAG"}
1
+ {"version":3,"sources":["HorizontalBarChartWithAxis.tsx"],"sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { scaleLinear as d3ScaleLinear, ScaleLinear as D3ScaleLinear, scaleBand as d3ScaleBand } from 'd3-scale';\nimport { Legend } from '../../components/Legends/Legends.types';\nimport { Legends } from '../../components/Legends/Legends';\nimport { useId } from '@fluentui/react-utilities';\nimport {\n AccessibilityProps,\n HorizontalBarChartWithAxisDataPoint,\n RefArrayData,\n Margins,\n ChartPopoverProps,\n Chart,\n} from '../../index';\nimport { ChildProps } from '../CommonComponents/CartesianChart.types';\nimport { CartesianChart } from '../CommonComponents/CartesianChart';\nimport { HorizontalBarChartWithAxisProps } from './HorizontalBarChartWithAxis.types';\nimport { ChartPopover } from '../CommonComponents/ChartPopover';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n YAxisType,\n XAxisTypes,\n NumericAxis,\n StringAxis,\n getTypeOfAxis,\n getNextColor,\n areArraysEqual,\n useRtl,\n DataVizPalette,\n getColorFromToken,\n computeLongestBars,\n IDomainNRange,\n domainRangeOfNumericForHorizontalBarChartWithAxis,\n groupChartDataByYValue,\n MIN_DOMAIN_MARGIN,\n} from '../../utilities/index';\nimport { getClosestPairDiffAndRange } from '../../utilities/vbc-utils';\ntype ColorScale = (_p?: number) => string;\n\nexport const HorizontalBarChartWithAxis: React.FunctionComponent<HorizontalBarChartWithAxisProps> = React.forwardRef<\n HTMLDivElement,\n HorizontalBarChartWithAxisProps\n>((props, forwardedRef) => {\n const _refArray: RefArrayData[] = [];\n const _calloutId: string = useId('callout');\n const _isRtl: boolean = useRtl();\n const _xAxisType: XAxisTypes =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.NumericAxis;\n const _yAxisType: YAxisType =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data![0].y, false) as YAxisType)\n : YAxisType.StringAxis;\n const _emptyChartId: string = useId('_HBCWithAxis_empty');\n let _points: HorizontalBarChartWithAxisDataPoint[] = [];\n let _barHeight: number = 0;\n let _colors: string[] = [];\n let _margins: Margins;\n let _bars: JSX.Element[];\n let _yAxisLabels: string[];\n let _xMax: number;\n let _calloutAnchorPoint: HorizontalBarChartWithAxisDataPoint | null;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _longestBarPositiveTotalValue: number;\n let _longestBarNegativeTotalValue: number;\n let _domainMargin: number = MIN_DOMAIN_MARGIN;\n let _yAxisPadding: number = props.yAxisPadding ?? 0.5;\n const cartesianChartRef = React.useRef<Chart>(null);\n const X_ORIGIN: number = 0;\n\n const [color, setColor] = React.useState<string>('');\n const [dataForHoverCard, setDataForHoverCard] = React.useState<number>(0);\n const [isLegendSelected, setIsLegendSelected] = React.useState<boolean>(\n (props.legendProps?.selectedLegends && props.legendProps.selectedLegends.length > 0) ||\n props.legendProps?.selectedLegend !== undefined,\n );\n const [isLegendHovered, setIsLegendHovered] = React.useState<boolean>(false);\n const [selectedLegendTitle, setSelectedLegendTitle] = React.useState<string>(props.legendProps?.selectedLegend ?? '');\n const [xCalloutValue, setXCalloutValue] = React.useState<string>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string>('');\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<HorizontalBarChartWithAxisDataPoint>();\n const [callOutAccessibilityData, setCallOutAccessibilityData] = React.useState<AccessibilityProps>();\n const [isPopoverOpen, setPopoverOpen] = React.useState<boolean>(false);\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const prevPropsRef = React.useRef<HorizontalBarChartWithAxisProps | null>(null);\n\n React.useEffect(() => {\n if (prevPropsRef.current) {\n const prevProps = prevPropsRef.current;\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, props.legendProps?.selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n }\n prevPropsRef.current = props;\n }, [props]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n }),\n [],\n );\n\n function _adjustProps(): void {\n _points = props.data || [];\n _barHeight = props.barHeight || 32;\n const defaultPalette: string[] = [\n getColorFromToken(DataVizPalette.color6),\n getColorFromToken(DataVizPalette.color1),\n getColorFromToken(DataVizPalette.color5),\n getColorFromToken(DataVizPalette.color7),\n ];\n _colors = props.colors! || defaultPalette;\n }\n\n function _getMargins(margins: Margins) {\n _margins = margins;\n }\n\n function _renderContentForOnlyBars(point: HorizontalBarChartWithAxisDataPoint): JSX.Element {\n const { useSingleColor = false } = props;\n let selectedPointIndex = 0;\n props.data!.forEach((yDataPoint: HorizontalBarChartWithAxisDataPoint, index: number) => {\n if (yDataPoint.y === point.y) {\n selectedPointIndex = index;\n }\n });\n // eslint-disable-next-line @typescript-eslint/no-shadow\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = props.colors ? _createColors()(1) : getNextColor(1, 0);\n } else {\n color = point.color ? point.color : props.colors ? _createColors()(point.x) : getNextColor(selectedPointIndex, 0);\n }\n return (\n <>\n <ChartPopover\n XValue={point.xAxisCalloutData || point.x.toString()}\n legend={point.legend}\n YValue={point.yAxisCalloutData || point.y}\n color={color}\n culture={props.culture ?? 'en-us'}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n />\n </>\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n function _renderCallout(props?: HorizontalBarChartWithAxisDataPoint): JSX.Element | null {\n return props ? _renderContentForOnlyBars(props) : null;\n }\n\n function _getCustomizedCallout() {\n return props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps, _renderCallout)\n : null;\n }\n\n function _getGraphData(\n xScale: NumericAxis,\n yScale: NumericAxis | StringAxis,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n yElement?: SVGElement | null,\n ) {\n const stackedChartData = groupChartDataByYValue(_points);\n const longestBars = computeLongestBars(stackedChartData, X_ORIGIN);\n _longestBarPositiveTotalValue = longestBars.longestPositiveBar;\n _longestBarNegativeTotalValue = longestBars.longestNegativeBar;\n\n const { xBarScale, yBarScale } =\n _yAxisType === YAxisType.NumericAxis\n ? _getScales(containerHeight, containerWidth, true)\n : _getScales(containerHeight, containerWidth, false);\n const xRange = xBarScale.range();\n let allBars: JSX.Element[] = [];\n // when the chart mounts, the xRange[1] is sometimes seen to be < 0 (like -40) while xRange[0] > 0.\n if (xRange[0] < xRange[1]) {\n allBars = stackedChartData\n .map(singleBarData =>\n _yAxisType === YAxisType.NumericAxis\n ? _createNumericBars(\n containerHeight,\n containerWidth,\n xElement!,\n yElement!,\n singleBarData,\n xBarScale,\n yBarScale,\n )\n : _createStringBars(\n containerHeight,\n containerWidth,\n xElement!,\n yElement!,\n singleBarData,\n xBarScale,\n yBarScale,\n ),\n )\n .flat();\n }\n\n return (_bars = allBars);\n }\n\n function _createColors(): D3ScaleLinear<string, string> | ColorScale {\n const increment = _colors.length <= 1 ? 1 : 1 / (_colors.length - 1);\n const { useSingleColor = false } = props;\n if (useSingleColor) {\n return (_p?: number) => {\n const { colors } = props;\n return colors && colors.length > 0 ? colors[0] : getColorFromToken(DataVizPalette.color16);\n };\n }\n const domainValues = [];\n for (let i = 0; i < _colors.length; i++) {\n domainValues.push(increment * i * _xMax);\n }\n const colorScale = d3ScaleLinear<string>().domain(domainValues).range(_colors);\n return colorScale;\n }\n\n function _refCallback(element: SVGRectElement, legendTitle: string): void {\n _refArray.push({ index: legendTitle, refElement: element });\n }\n\n function _onBarHover(\n point: HorizontalBarChartWithAxisDataPoint,\n // eslint-disable-next-line @typescript-eslint/no-shadow\n color: string,\n mouseEvent: React.MouseEvent<SVGElement, MouseEvent>,\n ): void {\n mouseEvent.persist();\n // eslint-disable-next-line @typescript-eslint/no-shadow\n if ((isLegendSelected === false || _isLegendHighlighted(point.legend)) && _calloutAnchorPoint !== point) {\n _calloutAnchorPoint = point;\n setPopoverOpen(true);\n _updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n setDataForHoverCard(point.x);\n setSelectedLegendTitle(point.legend!);\n setColor(props.useSingleColor || props.enableGradient ? color : point.color!);\n // To display callout value, if no callout value given, taking given point.x value as a string.\n setXCalloutValue(point.yAxisCalloutData! || point.y.toString());\n setYCalloutValue(point.xAxisCalloutData || point.x.toString());\n setDataPointCalloutProps(point);\n setCallOutAccessibilityData(point.callOutAccessibilityData);\n }\n }\n\n function _onBarLeave(): void {\n setPopoverOpen(false);\n }\n\n function _handleChartMouseLeave(): void {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n function _onBarFocus(point: HorizontalBarChartWithAxisDataPoint, refArrayIndexNumber: number, color: string): void {\n if ((isLegendSelected === false || _isLegendHighlighted(point.legend)) && _calloutAnchorPoint !== point) {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n _refArray.forEach((obj: RefArrayData, index: number) => {\n if (refArrayIndexNumber === index) {\n setPopoverOpen(true);\n setSelectedLegendTitle(point.legend!);\n setDataForHoverCard(point.x);\n setColor(props.useSingleColor ? color : point.color!);\n setXCalloutValue(point.yAxisCalloutData || point.y.toString());\n setYCalloutValue(point.xAxisCalloutData! || point.x.toString());\n setDataPointCalloutProps(point);\n setCallOutAccessibilityData(point.callOutAccessibilityData);\n }\n });\n }\n }\n\n function _getScales(\n containerHeight: number,\n containerWidth: number,\n isNumericScale: boolean,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): { xBarScale: any; yBarScale: any } {\n const xMax = _longestBarPositiveTotalValue;\n const xMin = _longestBarNegativeTotalValue;\n const xDomain = [Math.min(X_ORIGIN, xMin), Math.max(X_ORIGIN, xMax)];\n if (isNumericScale) {\n const yMax = d3Max(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n const yMin = d3Min(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n const yDomainMax = Math.max(yMax, props.yMaxValue || 0);\n // Default to 0 if yMinValue is not provided.\n const yMinProp = props.yMinValue || 0;\n const yDomainMin = Math.min(yMin, yMinProp);\n const xBarScale = d3ScaleLinear()\n .domain(xDomain)\n .nice()\n .range([_margins.left!, containerWidth - _margins.right!]);\n const yBarScale = d3ScaleLinear()\n .domain([yDomainMin, yDomainMax])\n .range([containerHeight - (_margins.bottom! + _domainMargin), _margins.top! + _domainMargin]);\n return { xBarScale, yBarScale };\n } else {\n // please note these padding default values must be consistent in here\n // and CatrtesianChartBase w for more details refer example\n // http://using-d3js.com/04_07_ordinal_scales.html\n const yBarScale = d3ScaleBand()\n .domain(_yAxisLabels)\n .range([containerHeight - (_margins.bottom! + _domainMargin), _margins.top! + _domainMargin])\n .padding(_yAxisPadding);\n\n const xBarScale = d3ScaleLinear()\n .domain(xDomain)\n .nice()\n .range([_margins.left!, containerWidth - _margins.right!]);\n return { xBarScale, yBarScale };\n }\n }\n\n function _createNumericBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n singleBarData: HorizontalBarChartWithAxisDataPoint[],\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xBarScale: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yBarScale: any,\n ): JSX.Element[] {\n const { useSingleColor = false } = props;\n const sortedBars: HorizontalBarChartWithAxisDataPoint[] = [...singleBarData];\n sortedBars.sort((a, b) => {\n const aValue = typeof a.y === 'number' ? a.y : parseFloat(a.y);\n const bValue = typeof b.y === 'number' ? b.y : parseFloat(b.y);\n return bValue - aValue;\n });\n\n let prevWidthPositive = 0;\n let prevWidthNegative = 0;\n let prevPoint = 0;\n\n const totalPositiveBars = singleBarData.filter(\n (point: HorizontalBarChartWithAxisDataPoint) => point.x >= X_ORIGIN,\n ).length;\n const totalNegativeBars = singleBarData.length - totalPositiveBars;\n let currPositiveCounter = 0;\n let currNegativeCounter = 0;\n\n const bars = sortedBars.map((point: HorizontalBarChartWithAxisDataPoint, index: number) => {\n let shouldHighlight = true;\n if (isLegendHovered || isLegendSelected) {\n shouldHighlight = _isLegendHighlighted(point.legend);\n }\n if (point.x >= X_ORIGIN) {\n ++currPositiveCounter;\n }\n if (point.x < X_ORIGIN) {\n ++currNegativeCounter;\n }\n const barStartX = _isRtl\n ? containerWidth -\n (_margins.right! + Math.max(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN)) - _margins.left!)\n : Math.min(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN));\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let startColor: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n startColor = props.colors ? _createColors()(1) : getNextColor(1, 0);\n } else {\n startColor = props.colors ? _createColors()(point.x) : getNextColor(index, 0);\n }\n\n startColor = point.color && !useSingleColor ? point.color : startColor;\n\n const prevBarWidth = Math.abs(xBarScale(prevPoint + X_ORIGIN) - xBarScale(X_ORIGIN));\n prevPoint > X_ORIGIN ? (prevWidthPositive += prevBarWidth) : (prevWidthNegative += prevBarWidth);\n const currentWidth = Math.abs(xBarScale(point.x + X_ORIGIN) - xBarScale(X_ORIGIN));\n const gapWidthLTR =\n currentWidth > 2 &&\n ((point.x > X_ORIGIN && currPositiveCounter !== totalPositiveBars) ||\n (point.x < X_ORIGIN && (totalPositiveBars !== 0 || currNegativeCounter > 1)))\n ? 2\n : 0;\n const gapWidthRTL =\n currentWidth > 2 &&\n ((point.x > X_ORIGIN && (totalNegativeBars !== 0 || currPositiveCounter > 1)) ||\n (point.x < X_ORIGIN && currNegativeCounter !== totalNegativeBars))\n ? 2\n : 0;\n let xStart = X_ORIGIN;\n if (_isRtl) {\n xStart = point.x > X_ORIGIN ? barStartX - prevWidthPositive : barStartX + prevWidthNegative;\n } else {\n xStart = point.x > X_ORIGIN ? barStartX + prevWidthPositive : barStartX - prevWidthNegative;\n }\n prevPoint = point.x;\n\n return (\n <React.Fragment key={`${index}_${point.x}`}>\n <rect\n key={point.y}\n x={xStart}\n y={yBarScale(point.y) - _barHeight / 2}\n data-is-focusable={shouldHighlight}\n width={currentWidth - (_isRtl ? gapWidthRTL : gapWidthLTR)}\n height={_barHeight}\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n rx={props.roundCorners ? 3 : 0}\n onClick={point.onClick}\n onMouseOver={(event: React.MouseEvent<SVGElement, MouseEvent>) => _onBarHover(point, startColor, event)}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n aria-labelledby={`toolTip${_calloutId}`}\n onMouseLeave={_onBarLeave}\n onFocus={() => _onBarFocus(point, index, startColor)}\n onBlur={_onBarLeave}\n fill={startColor}\n opacity={shouldHighlight ? 1 : 0.1}\n tabIndex={point.legend !== '' ? 0 : undefined}\n />\n </React.Fragment>\n );\n });\n return bars;\n }\n\n function _getUniqueYValues() {\n const mapY: Record<string, number | string> = {};\n props.data?.forEach((point: HorizontalBarChartWithAxisDataPoint) => {\n mapY[point.y] = point.y;\n });\n const uniqueY = Object.values(mapY);\n return uniqueY;\n }\n\n function _calculateAppropriateBarHeight(data: number[] | Date[], totalWidth: number, innerPadding: number) {\n const result = getClosestPairDiffAndRange(data);\n if (!result || result[1] === 0) {\n return 16;\n }\n const closestPairDiff = result[0];\n let range = result[1];\n const yMax = d3Max(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n // Since we are always rendering from 0 to yMax, we need to ensure that the range is at least yMax\n // to calculate the bar height correctly.\n range = Math.max(range, yMax);\n // Refer to https://microsoft.github.io/fluentui-charting-contrib/docs/rfcs/fix-overlapping-bars-on-continuous-axes\n // for the derivation of the following formula.\n const barWidth = Math.floor(\n (totalWidth * closestPairDiff * (1 - innerPadding)) / (range + closestPairDiff * (1 - innerPadding)),\n );\n return barWidth;\n }\n\n function _getDomainMarginsForHorizontalBarChart(containerHeight: number): Margins {\n _domainMargin = MIN_DOMAIN_MARGIN;\n const uniqueY = _getUniqueYValues();\n /** Rate at which the space between the bars changes wrt the bar height */\n _yAxisPadding = _yAxisPadding === 1 ? 0.99 : _yAxisPadding;\n const barGapRate = _yAxisPadding / (1 - _yAxisPadding);\n const numBars = uniqueY.length + (uniqueY.length - 1) * barGapRate;\n // Total height available to render the bars\n const totalHeight = containerHeight - (_margins.top! + MIN_DOMAIN_MARGIN) - (_margins.bottom! + MIN_DOMAIN_MARGIN);\n if (_yAxisType !== YAxisType.StringAxis) {\n // Calculate bar height dynamically\n _barHeight =\n props.barHeight || _calculateAppropriateBarHeight(uniqueY as number[] | Date[], totalHeight, _yAxisPadding);\n _barHeight = Math.max(_barHeight, 1);\n _domainMargin += _barHeight / 2;\n } else {\n // Calculate the appropriate bar height\n _barHeight = props.barHeight || totalHeight / numBars;\n /** Total height required to render the bars. Directly proportional to bar height */\n const reqHeight = numBars * _barHeight;\n if (totalHeight >= reqHeight) {\n // Center align the chart by setting equal left and right margins for domain\n _domainMargin = MIN_DOMAIN_MARGIN + (totalHeight - reqHeight) / 2;\n }\n }\n\n return {\n ..._margins,\n top: _margins.top! + _domainMargin,\n bottom: _margins.bottom! + _domainMargin,\n };\n }\n\n function _createStringBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n singleBarData: HorizontalBarChartWithAxisDataPoint[],\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xBarScale: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yBarScale: any,\n ): JSX.Element[] {\n const { useSingleColor = false } = props;\n let prevWidthPositive = 0;\n let prevWidthNegative = 0;\n let prevPoint = 0;\n const totalPositiveBars = singleBarData.filter(\n (point: HorizontalBarChartWithAxisDataPoint) => point.x >= X_ORIGIN,\n ).length;\n const totalNegativeBars = singleBarData.length - totalPositiveBars;\n let currPositiveCounter = 0;\n let currNegativeCounter = 0;\n const bars = singleBarData.map((point: HorizontalBarChartWithAxisDataPoint, index: number) => {\n let shouldHighlight = true;\n if (isLegendHovered || isLegendSelected) {\n shouldHighlight = _isLegendHighlighted(point.legend);\n }\n if (point.x >= X_ORIGIN) {\n ++currPositiveCounter;\n }\n if (point.x < X_ORIGIN) {\n ++currNegativeCounter;\n }\n const barStartX = _isRtl\n ? containerWidth -\n (_margins.right! + Math.max(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN)) - _margins.left!)\n : Math.min(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN));\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let startColor: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n startColor = props.colors ? _createColors()(1) : getNextColor(1, 0);\n } else {\n startColor = props.colors ? _createColors()(point.x) : getNextColor(index, 0);\n }\n\n startColor = point.color && !useSingleColor ? point.color : startColor;\n const prevBarWidth = Math.abs(xBarScale(prevPoint + X_ORIGIN) - xBarScale(X_ORIGIN));\n prevPoint > 0 ? (prevWidthPositive += prevBarWidth) : (prevWidthNegative += prevBarWidth);\n const currentWidth = Math.abs(xBarScale(point.x + X_ORIGIN) - xBarScale(X_ORIGIN));\n const gapWidthLTR =\n currentWidth > 2 &&\n ((point.x > X_ORIGIN && currPositiveCounter !== totalPositiveBars) ||\n (point.x < X_ORIGIN && (totalPositiveBars !== 0 || currNegativeCounter > 1)))\n ? 2\n : 0;\n const gapWidthRTL =\n currentWidth > 2 &&\n ((point.x > X_ORIGIN && (totalNegativeBars !== 0 || currPositiveCounter > 1)) ||\n (point.x < X_ORIGIN && currNegativeCounter !== totalNegativeBars))\n ? 2\n : 0;\n prevPoint = point.x;\n let xStart = X_ORIGIN;\n if (_isRtl) {\n xStart = point.x > X_ORIGIN ? barStartX - prevWidthPositive : barStartX + prevWidthNegative;\n } else {\n xStart = point.x > X_ORIGIN ? barStartX + prevWidthPositive : barStartX - prevWidthNegative;\n }\n return (\n <React.Fragment key={`${index}_${point.x}`}>\n <rect\n transform={`translate(0,${0.5 * (yBarScale.bandwidth() - _barHeight)})`}\n key={point.x}\n x={xStart}\n y={yBarScale(point.y)}\n rx={props.roundCorners ? 3 : 0}\n width={currentWidth - (_isRtl ? gapWidthRTL : gapWidthLTR)}\n height={_barHeight}\n aria-labelledby={`toolTip${_calloutId}`}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={(event: React.MouseEvent<SVGElement, MouseEvent>) => _onBarHover(point, startColor, event)}\n onMouseLeave={_onBarLeave}\n onBlur={_onBarLeave}\n data-is-focusable={shouldHighlight}\n opacity={shouldHighlight ? 1 : 0.1}\n onFocus={() => _onBarFocus(point, index, startColor)}\n fill={startColor}\n tabIndex={point.legend !== '' ? 0 : undefined}\n />\n </React.Fragment>\n );\n });\n return bars;\n }\n\n function _onLegendHover(customMessage: string): void {\n if (!_isLegendSelected()) {\n setIsLegendHovered(true);\n setSelectedLegendTitle(customMessage);\n }\n }\n\n function _onLegendLeave(isLegendFocused?: boolean): void {\n if (!!isLegendFocused || !_isLegendSelected()) {\n setIsLegendHovered(false);\n setSelectedLegendTitle('');\n setIsLegendSelected(isLegendFocused ? false : _isLegendSelected());\n }\n }\n\n function _getLegendData(data: HorizontalBarChartWithAxisDataPoint[]): JSX.Element {\n const { useSingleColor } = props;\n const actions: Legend[] = [];\n const mapLegendToColor: Record<string, string> = {};\n\n data.forEach((point: HorizontalBarChartWithAxisDataPoint, _index: number) => {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const color: string = useSingleColor ? (props.colors ? _createColors()(1) : getNextColor(1, 0)) : point.color!;\n\n mapLegendToColor[point.legend!] = color;\n });\n Object.entries(mapLegendToColor).forEach(([legendTitle, color]) => {\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: legendTitle,\n color,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(legendTitle);\n },\n // eslint-disable-next-line @typescript-eslint/no-shadow\n onMouseOutAction: (isLegendSelected?: boolean) => {\n _onLegendLeave(isLegendSelected);\n },\n };\n actions.push(legend);\n });\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n onChange={_onLegendSelectionChange}\n />\n );\n return legends;\n }\n\n function _isLegendSelected(): boolean {\n return isLegendSelected!;\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n function _isLegendHighlighted(legend?: string) {\n return _getHighlightedLegend().includes(legend!);\n }\n\n function _getHighlightedLegend() {\n return selectedLegends.length > 0 ? selectedLegends : selectedLegendTitle ? [selectedLegendTitle] : [];\n }\n\n function _onLegendSelectionChange(\n // eslint-disable-next-line @typescript-eslint/no-shadow\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(selectedLegends);\n setSelectedLegendTitle(currentLegend?.title!);\n } else {\n setSelectedLegends(selectedLegends.slice(-1));\n setSelectedLegendTitle(currentLegend?.title!);\n }\n setIsLegendSelected(selectedLegends.length > 0);\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n }\n\n function _getAxisData(yAxisData: IAxisData) {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n // For HBCWA x and y Values are swapped\n const { yAxisDomainValues: domainValue } = yAxisData;\n _xMax = Math.max(domainValue[domainValue.length - 1], props.xMaxValue || 0);\n }\n }\n function _getAriaLabel(point: HorizontalBarChartWithAxisDataPoint): string {\n const xValue = point.xAxisCalloutData || point.x;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ` + `${yValue}.`;\n }\n\n function _getChartTitle(): string {\n const { chartTitle, data } = props;\n return (chartTitle ? `${chartTitle}. ` : '') + `Horizontal bar chart with ${data?.length || 0} bars. `;\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 function _getDomainNRangeValues(\n points: HorizontalBarChartWithAxisDataPoint[],\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) {\n domainNRangeValue = domainRangeOfNumericForHorizontalBarChartWithAxis(\n points,\n margins,\n width,\n isRTL,\n shiftX,\n X_ORIGIN,\n );\n } else {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n }\n return domainNRangeValue;\n }\n\n if (!_isChartEmpty()) {\n _adjustProps();\n const calloutProps: ChartPopoverProps = {\n color: color,\n legend: selectedLegendTitle,\n XValue: xCalloutValue,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData),\n customCallout: {\n customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n isCartesian: true,\n isPopoverOpen,\n clickPosition,\n };\n const tickParams = {\n tickValues: props.tickValues,\n tickFormat: props.tickFormat,\n };\n\n const reversedBars = [..._points].reverse();\n _yAxisLabels = reversedBars.map((point: HorizontalBarChartWithAxisDataPoint) => point.y as string);\n _xMax = Math.max(d3Max(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.x)!, props.xMaxValue || 0);\n const legendBars: JSX.Element = _getLegendData(_points);\n return (\n <CartesianChart\n yAxisPadding={_yAxisPadding}\n {...props}\n chartTitle={_getChartTitle()}\n points={_points}\n chartType={ChartTypes.HorizontalBarChartWithAxis}\n xAxisType={_xAxisType}\n yAxisType={_yAxisType}\n getDomainNRangeValues={_getDomainNRangeValues}\n stringDatasetForYAxisDomain={_yAxisLabels}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n barwidth={_barHeight}\n getmargins={_getMargins}\n getYDomainMargins={_getDomainMarginsForHorizontalBarChart}\n getGraphData={_getGraphData}\n getAxisData={_getAxisData}\n onChartMouseLeave={_handleChartMouseLeave}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line @typescript-eslint/no-shadow\n children={(props: ChildProps) => {\n return (\n <>\n <g>{_bars}</g>\n </>\n );\n }}\n />\n );\n } else {\n return (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n }\n});\nHorizontalBarChartWithAxis.displayName = 'HorizontalBarChartWithAxis';\n"],"names":["HorizontalBarChartWithAxis","React","forwardRef","props","forwardedRef","_refArray","_calloutId","useId","_isRtl","useRtl","_xAxisType","data","length","getTypeOfAxis","x","XAxisTypes","NumericAxis","_yAxisType","y","YAxisType","StringAxis","_emptyChartId","_points","_barHeight","_colors","_margins","_bars","_yAxisLabels","_xMax","_calloutAnchorPoint","_longestBarPositiveTotalValue","_longestBarNegativeTotalValue","_domainMargin","MIN_DOMAIN_MARGIN","_yAxisPadding","yAxisPadding","cartesianChartRef","useRef","X_ORIGIN","color","setColor","useState","dataForHoverCard","setDataForHoverCard","isLegendSelected","setIsLegendSelected","legendProps","selectedLegends","selectedLegend","undefined","isLegendHovered","setIsLegendHovered","selectedLegendTitle","setSelectedLegendTitle","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","setSelectedLegends","dataPointCalloutProps","setDataPointCalloutProps","callOutAccessibilityData","setCallOutAccessibilityData","isPopoverOpen","setPopoverOpen","clickPosition","setClickPosition","prevPropsRef","useEffect","current","prevProps","areArraysEqual","useImperativeHandle","componentRef","chartContainer","_adjustProps","barHeight","defaultPalette","getColorFromToken","DataVizPalette","color6","color1","color5","color7","colors","_getMargins","margins","_renderContentForOnlyBars","point","useSingleColor","selectedPointIndex","forEach","yDataPoint","index","_createColors","getNextColor","createElement","Fragment","ChartPopover","XValue","xAxisCalloutData","toString","legend","YValue","yAxisCalloutData","culture","_renderCallout","_getCustomizedCallout","onRenderCalloutPerDataPoint","_getGraphData","xScale","yScale","containerHeight","containerWidth","xElement","yElement","stackedChartData","groupChartDataByYValue","longestBars","computeLongestBars","longestPositiveBar","longestNegativeBar","xBarScale","yBarScale","_getScales","xRange","range","allBars","map","singleBarData","_createNumericBars","_createStringBars","flat","increment","_p","color16","domainValues","i","push","colorScale","d3ScaleLinear","domain","_refCallback","element","legendTitle","refElement","_onBarHover","mouseEvent","persist","_isLegendHighlighted","_updatePosition","clientX","clientY","enableGradient","_onBarLeave","_handleChartMouseLeave","_onBarFocus","refArrayIndexNumber","obj","isNumericScale","xMax","xMin","xDomain","Math","min","max","yMax","d3Max","yMin","d3Min","yDomainMax","yMaxValue","yMinProp","yMinValue","yDomainMin","nice","left","right","bottom","top","d3ScaleBand","padding","sortedBars","sort","a","b","aValue","parseFloat","bValue","prevWidthPositive","prevWidthNegative","prevPoint","totalPositiveBars","filter","totalNegativeBars","currPositiveCounter","currNegativeCounter","bars","shouldHighlight","barStartX","key","startColor","prevBarWidth","abs","currentWidth","gapWidthLTR","gapWidthRTL","xStart","rect","data-is-focusable","width","height","ref","e","rx","roundCorners","onClick","onMouseOver","event","aria-label","_getAriaLabel","role","aria-labelledby","onMouseLeave","onFocus","onBlur","fill","opacity","tabIndex","_getUniqueYValues","mapY","uniqueY","Object","values","_calculateAppropriateBarHeight","totalWidth","innerPadding","result","getClosestPairDiffAndRange","closestPairDiff","barWidth","floor","_getDomainMarginsForHorizontalBarChart","barGapRate","numBars","totalHeight","reqHeight","transform","bandwidth","_onLegendHover","customMessage","_isLegendSelected","_onLegendLeave","isLegendFocused","_getLegendData","actions","mapLegendToColor","_index","entries","title","hoverAction","onMouseOutAction","legends","Legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onChange","_onLegendSelectionChange","_getHighlightedLegend","includes","currentLegend","canSelectMultipleLegends","slice","_getAxisData","yAxisData","yAxisDomainValues","domainValue","xMaxValue","xValue","yValue","ariaLabel","_getChartTitle","chartTitle","_isChartEmpty","newX","newY","threshold","distance","sqrt","pow","_getDomainNRangeValues","points","chartType","isRTL","xAxisType","tickValues","shiftX","domainNRangeValue","domainRangeOfNumericForHorizontalBarChartWithAxis","dStartValue","dEndValue","rStartValue","rEndValue","calloutProps","getAccessibleDataObject","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","isCartesian","tickParams","tickFormat","reversedBars","reverse","legendBars","CartesianChart","ChartTypes","yAxisType","getDomainNRangeValues","stringDatasetForYAxisDomain","barwidth","getmargins","getYDomainMargins","getGraphData","getAxisData","onChartMouseLeave","children","g","div","id","style","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAyCaA;;;eAAAA;;;;iEAzCU;yBACoB;yBAC0D;yBAE7E;gCACF;gCAUS;8BAEF;uBAoBtB;0BACoC;AAGpC,MAAMA,6BAAAA,WAAAA,GAAuFC,OAAMC,UAAU,CAGlH,CAACC,OAAOC;QAgCLD,oBACCA,qBAGyEA,q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xisClassNames = {
37
37
  chartTitle: '',
38
38
  shapeStyles: '',
39
39
  chartWrapper: '',
40
- svgTooltip: ''
40
+ svgTooltip: '',
41
+ chart: ''
41
42
  };
42
43
  const useStyles = /*#__PURE__*/ (0, _react.__styles)({
43
44
  opacityChangeOnHover: {
44
45
  abs64n: "f9das1l"
45
46
  },
46
- xAxisTicks: {},
47
- tooltip: {
48
- Bahqtrf: "fk6fouc",
49
- Be2twd7: "fkhj508",
50
- Bhrd7zp: "figsok6",
51
- Bg96gwp: "f1i3iumi",
52
- mc9l5x: "f22iagw",
53
- Beiy3e4: "f1vx9l62",
54
- z8tnut: "f17mpqex",
55
- z189sj: [
56
- "f1vdfbxk",
57
- "f1f5gg8d"
58
- ],
59
- Byoj8tv: "fdvome7",
60
- uwmqm3: [
61
- "f1f5gg8d",
62
- "f1vdfbxk"
63
- ],
64
- qhf8xq: "f1euv43f",
65
- fsow6f: "f17mccla",
66
- Bhzewxz: "fr6rvge",
67
- De3pzq: "fxugw4r",
68
- Beyfa6y: 0,
69
- Bbmb7ep: 0,
70
- Btl43ni: 0,
71
- B7oj6ja: 0,
72
- Dimara: "fq9zq91",
73
- Bkecrkj: "f1aehjj5"
74
- }
47
+ xAxisTicks: {}
75
48
  }, {
76
49
  d: [
77
- ".f9das1l{opacity:0.1;}",
78
- ".fk6fouc{font-family:var(--fontFamilyBase);}",
79
- ".fkhj508{font-size:var(--fontSizeBase300);}",
80
- ".figsok6{font-weight:var(--fontWeightRegular);}",
81
- ".f1i3iumi{line-height:var(--lineHeightBase300);}",
82
- ".f22iagw{display:flex;}",
83
- ".f1vx9l62{flex-direction:column;}",
84
- ".f17mpqex{padding-top:var(--spacingHorizontalS);}",
85
- ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}",
86
- ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}",
87
- ".fdvome7{padding-bottom:var(--spacingHorizontalS);}",
88
- ".f1euv43f{position:absolute;}",
89
- ".f17mccla{text-align:center;}",
90
- ".fr6rvge{top:var(--spacingVerticalNone);}",
91
- ".fxugw4r{background-color:var(--colorNeutralBackground1);}",
92
- [
93
- ".fq9zq91{border-radius:var(--borderRadiusSmall);}",
94
- {
95
- p: -1
96
- }
97
- ],
98
- ".f1aehjj5{pointer-events:none;}"
50
+ ".f9das1l{opacity:0.1;}"
99
51
  ]
100
52
  });
101
53
  const useHorizontalBarChartWithAxisStyles = (props)=>{
102
54
  const baseStyles = useStyles();
103
55
  return {
104
56
  opacityChangeOnHover: (0, _react.mergeClasses)(hbcWithAxisClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover),
105
- xAxisTicks: (0, _react.mergeClasses)(hbcWithAxisClassNames.xAxisTicks, baseStyles.xAxisTicks),
106
- tooltip: (0, _react.mergeClasses)(hbcWithAxisClassNames.tooltip, baseStyles.tooltip)
57
+ xAxisTicks: (0, _react.mergeClasses)(hbcWithAxisClassNames.xAxisTicks, baseStyles.xAxisTicks)
107
58
  };
108
59
  }; //# sourceMappingURL=useHorizontalBarChartWithAxisStyles.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["useHorizontalBarChartWithAxisStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const hbcWithAxisClassNames = {\n opacityChangeOnHover: 'fui-hbcwa__opacityChangeOnHover',\n xAxisTicks: 'fui-hbcwa__xAxisTicks',\n tooltip: 'fui-hbcwa__tooltip',\n chartLabel: '',\n xAxisDomain: '',\n xAxisText: '',\n yAxisDomain: '',\n yAxisTicks: '',\n yAxisText: '',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: ''\n};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {\n opacity: 0.1\n },\n xAxisTicks: {},\n tooltip: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.padding(tokens.spacingHorizontalS),\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n backgroundColor: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none'\n }\n});\n/**\n * Apply styling to the HorizontalBarChartWithAxis slots based on the state\n */ export const useHorizontalBarChartWithAxisStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n opacityChangeOnHover: mergeClasses(hbcWithAxisClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover),\n xAxisTicks: mergeClasses(hbcWithAxisClassNames.xAxisTicks, baseStyles.xAxisTicks),\n tooltip: mergeClasses(hbcWithAxisClassNames.tooltip, baseStyles.tooltip)\n };\n};\n"],"names":["hbcWithAxisClassNames","useHorizontalBarChartWithAxisStyles","opacityChangeOnHover","xAxisTicks","tooltip","chartLabel","xAxisDomain","xAxisText","yAxisDomain","yAxisTicks","yAxisText","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","useStyles","__styles","abs64n","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","De3pzq","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","d","p","props","baseStyles","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,qBAAqB;eAArBA;;IA0CIC,mCAAmC;eAAnCA;;;uBA5CoC;AAE9C,MAAMD,wBAAwB;IACjCE,sBAAsB;IACtBC,YAAY;IACZC,SAAS;IACTC,YAAY;IACZC,aAAa;IACbC,WAAW;IACXC,aAAa;IACbC,YAAY;IACZC,WAAW;IACXC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,aAAa;IACbC,cAAc;IACdC,YAAY;AAChB;AACA,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAArB,sBAAA;QAAAsB,QAAA;IAAA;IAAArB,YAAA,CAAA;IAAAC,SAAA;QAAAqB,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,SAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAAAC,GAAA,CAAA;YAAA;SAAA;QAAA;KAAA;AAAA;AAoBP,MAAM7C,sCAAuC8C,CAAAA;IACpD,MAAMC,aAAa1B;IACnB,OAAO;QACHpB,sBAAsB+C,IAAAA,mBAAY,EAACjD,sBAAsBE,oBAAoB,EAAE8C,WAAW9C,oBAAoB;QAC9GC,YAAY8C,IAAAA,mBAAY,EAACjD,sBAAsBG,UAAU,EAAE6C,WAAW7C,UAAU;QAChFC,SAAS6C,IAAAA,mBAAY,EAACjD,sBAAsBI,OAAO,EAAE4C,WAAW5C,OAAO;IAC3E;AACJ"}
1
+ {"version":3,"sources":["useHorizontalBarChartWithAxisStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nexport const hbcWithAxisClassNames = {\n opacityChangeOnHover: 'fui-hbcwa__opacityChangeOnHover',\n xAxisTicks: 'fui-hbcwa__xAxisTicks',\n tooltip: 'fui-hbcwa__tooltip',\n chartLabel: '',\n xAxisDomain: '',\n xAxisText: '',\n yAxisDomain: '',\n yAxisTicks: '',\n yAxisText: '',\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};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {\n opacity: 0.1\n },\n xAxisTicks: {}\n});\n/**\n * Apply styling to the HorizontalBarChartWithAxis slots based on the state\n */ export const useHorizontalBarChartWithAxisStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n opacityChangeOnHover: mergeClasses(hbcWithAxisClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover),\n xAxisTicks: mergeClasses(hbcWithAxisClassNames.xAxisTicks, baseStyles.xAxisTicks)\n };\n};\n"],"names":["hbcWithAxisClassNames","useHorizontalBarChartWithAxisStyles","opacityChangeOnHover","xAxisTicks","tooltip","chartLabel","xAxisDomain","xAxisText","yAxisDomain","yAxisTicks","yAxisText","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","useStyles","__styles","abs64n","d","props","baseStyles","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACaA,qBAAqB;eAArBA;;IA+BIC,mCAAmC;eAAnCA;;;uBAhCwB;AAClC,MAAMD,wBAAwB;IACjCE,sBAAsB;IACtBC,YAAY;IACZC,SAAS;IACTC,YAAY;IACZC,aAAa;IACbC,WAAW;IACXC,aAAa;IACbC,YAAY;IACZC,WAAW;IACXC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;AACX;AACA,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAtB,sBAAA;QAAAuB,QAAA;IAAA;IAAAtB,YAAA,CAAA;AAAA,GAAA;IAAAuB,GAAA;QAAA;KAAA;AAAA;AAQP,MAAMzB,sCAAuC0B,CAAAA;IACpD,MAAMC,aAAaL;IACnB,OAAO;QACHrB,sBAAsB2B,IAAAA,mBAAY,EAAC7B,sBAAsBE,oBAAoB,EAAE0B,WAAW1B,oBAAoB;QAC9GC,YAAY0B,IAAAA,mBAAY,EAAC7B,sBAAsBG,UAAU,EAAEyB,WAAWzB,UAAU;IACpF;AACJ"}
@@ -71,6 +71,7 @@ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
71
71
  "f1vdfbxk"
72
72
  ],
73
73
  B9bfxx9: "fiwaqkr",
74
+ Bf4jedk: "fy77jfu",
74
75
  Bs92zhm: "fuhkvgp",
75
76
  B93v9kj: "f15mrrko",
76
77
  Ck9m1r: "f1vu5irt",
@@ -205,6 +206,7 @@ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
205
206
  ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}",
206
207
  ".fdvome7{padding-bottom:var(--spacingHorizontalS);}",
207
208
  ".fiwaqkr{text-transform:capitalize;}",
209
+ ".fy77jfu{min-width:0;}",
208
210
  ".frx94fk{width:12px;}",
209
211
  [
210
212
  ".fpyyuzi{border:1px solid;}",
@@ -1 +1 @@
1
- {"version":3,"sources":["useLegendsStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/index';\n/**\n * @internal\n */ export const legendClassNames = {\n root: 'fui-legend__root',\n legend: 'fui-legend__legend',\n rect: 'fui-legend__rect',\n shape: 'fui-legend__shape',\n triangle: 'fui-legend__triangle',\n text: 'fui-legend__text',\n hoverChange: 'fui-legend__hoverChange',\n resizableArea: 'fui-legend__resizableArea'\n};\nconst useStyles = makeStyles({\n root: {\n whiteSpace: 'nowrap',\n width: '100%',\n alignItems: 'center',\n ...shorthands.margin('-8px 0 0 -8px')\n },\n legend: {\n // setting display to flex does not work\n // display: 'flex',\n alignItems: 'center',\n justifyContent: 'left',\n cursor: 'pointer',\n ...shorthands.border('none'),\n ...shorthands.padding(tokens.spacingHorizontalS),\n textTransform: 'capitalize',\n [HighContrastSelector]: {\n color: 'WindowText',\n forcedColorAdjust: 'none'\n },\n '&:hover': {\n [HighContrastSelector]: {\n color: 'HighlightText',\n forcedColorAdjust: 'none'\n }\n }\n },\n rect: {\n [HighContrastSelector]: {\n content: 'var(--rect-content-high-contrast)',\n opacity: 'var(--rect-opacity-high-contrast)'\n },\n width: '12px',\n border: '1px solid',\n marginRight: tokens.spacingHorizontalS\n },\n shape: {\n marginRight: tokens.spacingHorizontalS\n },\n // TO DO Add props when these styles are used in the component\n triangle: {\n width: '0',\n height: '0',\n ...shorthands.borderLeft('6px solid transparent'),\n ...shorthands.borderRight('6px solid transparent'),\n ...shorthands.borderTop('10.4px solid'),\n marginRight: tokens.spacingHorizontalS\n },\n // TO DO Add props when these styles are used in the component\n text: {\n ...typographyStyles.caption1,\n color: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n },\n // TO DO Add props when these styles are used in the component\n hoverChange: {\n width: '12px',\n height: '12px',\n marginRight: tokens.spacingHorizontalS,\n ...shorthands.border('1px solid')\n },\n resizableArea: {\n position: 'relative',\n textAlign: 'left',\n transform: 'translate(-50%, 0)',\n top: 'auto',\n left: '50%',\n minWidth: '200px',\n maxWidth: '800px',\n '::after': {\n ...shorthands.padding('1px 4px 1px'),\n ...shorthands.borderTop('-2px'),\n ...shorthands.borderLeft('-2px')\n }\n }\n});\nexport const useLegendStyles = (props)=>{\n var _props_styles, _props_styles1, _props_styles2, _props_styles3, _props_styles4, _props_styles5, _props_styles6, _props_styles7;\n const { className } = props; // ToDo - width, barHeight is non enumerable. Need to be used inline.\n const baseStyles = useStyles();\n return {\n root: mergeClasses(legendClassNames.root, baseStyles.root, className, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),\n legend: mergeClasses(legendClassNames.legend, baseStyles.legend, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.legend),\n rect: mergeClasses(legendClassNames.rect, baseStyles.rect, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.rect),\n shape: mergeClasses(legendClassNames.shape, baseStyles.shape, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.shape),\n triangle: mergeClasses(legendClassNames.triangle, baseStyles.triangle, (_props_styles4 = props.styles) === null || _props_styles4 === void 0 ? void 0 : _props_styles4.triangle),\n text: mergeClasses(legendClassNames.text, baseStyles.text, (_props_styles5 = props.styles) === null || _props_styles5 === void 0 ? void 0 : _props_styles5.text),\n hoverChange: mergeClasses(legendClassNames.hoverChange, baseStyles.hoverChange, (_props_styles6 = props.styles) === null || _props_styles6 === void 0 ? void 0 : _props_styles6.hoverChange),\n resizableArea: mergeClasses(legendClassNames.resizableArea, baseStyles.resizableArea, (_props_styles7 = props.styles) === null || _props_styles7 === void 0 ? void 0 : _props_styles7.resizableArea)\n };\n};\n"],"names":["legendClassNames","useLegendStyles","root","legend","rect","shape","triangle","text","hoverChange","resizableArea","useStyles","__styles","Huce71","a9b677","Bt984gj","B6of3ja","t21cq0","jrapky","Frg6f3","Brf1p80","Bceei9c","icvyot","vrafjx","oivjwe","wvpqe5","z8tnut","z189sj","Byoj8tv","uwmqm3","B9bfxx9","Bs92zhm","B93v9kj","Ck9m1r","mkjk8h","zpeayv","Bcwlslt","Bgfg5da","B9xav0g","Bn0qgzm","B4g9neb","zhjwy3","ibv6hh","u1mtju","h3c5rm","Bekrc4i","i8vvqc","g2u3we","B4j52fo","irswps","Bqenvij","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","sj55zd","Bvjb7m6","qhf8xq","fsow6f","Bz10aip","Bhzewxz","oyh7mz","Bf4jedk","B2u0y6b","smv486","u6pn5x","B4uzyy","Be2s5ez","xrcqlc","Bhxzhr1","d","p","m","props","_props_styles","_props_styles1","_props_styles2","_props_styles3","_props_styles4","_props_styles5","_props_styles6","_props_styles7","className","baseStyles","mergeClasses","styles"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKiBA,gBAAgB;eAAhBA;;IAsFJC,eAAe;eAAfA;;;uBA3FwC;AAK1C,MAAMD,mBAAmB;IAChCE,MAAM;IACNC,QAAQ;IACRC,MAAM;IACNC,OAAO;IACPC,UAAU;IACVC,MAAM;IACNC,aAAa;IACbC,eAAe;AACnB;AACA,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAT,MAAA;QAAAU,QAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,QAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;IAAA;IAAAf,QAAA;QAAAW,SAAA;QAAAK,SAAA;YAAA;YAAA;SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,QAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,QAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QA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les, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/index';\n/**\n * @internal\n */ export const legendClassNames = {\n root: 'fui-legend__root',\n legend: 'fui-legend__legend',\n rect: 'fui-legend__rect',\n shape: 'fui-legend__shape',\n triangle: 'fui-legend__triangle',\n text: 'fui-legend__text',\n hoverChange: 'fui-legend__hoverChange',\n resizableArea: 'fui-legend__resizableArea'\n};\nconst useStyles = makeStyles({\n root: {\n // FIXME: Removing this style allows the legend container in responsive donut chart to resize\n // properly (horizontally) within a flexbox or grid layout. But it causes vertical resizing issues\n // in responsive charts where legends consist of multiple words.\n whiteSpace: 'nowrap',\n width: '100%',\n alignItems: 'center',\n ...shorthands.margin('-8px 0 0 -8px')\n },\n legend: {\n // setting display to flex does not work\n // display: 'flex',\n alignItems: 'center',\n justifyContent: 'left',\n cursor: 'pointer',\n ...shorthands.border('none'),\n ...shorthands.padding(tokens.spacingHorizontalS),\n textTransform: 'capitalize',\n // The default min-width is 64px. Setting it to 0 allows the legend container in responsive\n // cartesian charts to resize properly within a flexbox or grid layout.\n minWidth: 0,\n [HighContrastSelector]: {\n color: 'WindowText',\n forcedColorAdjust: 'none'\n },\n '&:hover': {\n [HighContrastSelector]: {\n color: 'HighlightText',\n forcedColorAdjust: 'none'\n }\n }\n },\n rect: {\n [HighContrastSelector]: {\n content: 'var(--rect-content-high-contrast)',\n opacity: 'var(--rect-opacity-high-contrast)'\n },\n width: '12px',\n border: '1px solid',\n marginRight: tokens.spacingHorizontalS\n },\n shape: {\n marginRight: tokens.spacingHorizontalS\n },\n // TO DO Add props when these styles are used in the component\n triangle: {\n width: '0',\n height: '0',\n ...shorthands.borderLeft('6px solid transparent'),\n ...shorthands.borderRight('6px solid transparent'),\n ...shorthands.borderTop('10.4px solid'),\n marginRight: tokens.spacingHorizontalS\n },\n // TO DO Add props when these styles are used in the component\n text: {\n ...typographyStyles.caption1,\n color: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n },\n // TO DO Add props when these styles are used in the component\n hoverChange: {\n width: '12px',\n height: '12px',\n marginRight: tokens.spacingHorizontalS,\n ...shorthands.border('1px solid')\n },\n resizableArea: {\n position: 'relative',\n textAlign: 'left',\n transform: 'translate(-50%, 0)',\n top: 'auto',\n left: '50%',\n minWidth: '200px',\n maxWidth: '800px',\n '::after': {\n ...shorthands.padding('1px 4px 1px'),\n ...shorthands.borderTop('-2px'),\n ...shorthands.borderLeft('-2px')\n }\n }\n});\nexport const useLegendStyles = (props)=>{\n var _props_styles, _props_styles1, _props_styles2, _props_styles3, _props_styles4, _props_styles5, _props_styles6, _props_styles7;\n const { className } = props; // ToDo - width, barHeight is non enumerable. Need to be used inline.\n const baseStyles = useStyles();\n return {\n root: mergeClasses(legendClassNames.root, baseStyles.root, className, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),\n legend: mergeClasses(legendClassNames.legend, baseStyles.legend, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.legend),\n rect: mergeClasses(legendClassNames.rect, baseStyles.rect, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.rect),\n shape: mergeClasses(legendClassNames.shape, baseStyles.shape, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.shape),\n triangle: mergeClasses(legendClassNames.triangle, baseStyles.triangle, (_props_styles4 = props.styles) === null || _props_styles4 === void 0 ? void 0 : _props_styles4.triangle),\n text: mergeClasses(legendClassNames.text, baseStyles.text, (_props_styles5 = props.styles) === null || _props_styles5 === void 0 ? void 0 : _props_styles5.text),\n hoverChange: mergeClasses(legendClassNames.hoverChange, baseStyles.hoverChange, (_props_styles6 = props.styles) === null || _props_styles6 === void 0 ? void 0 : _props_styles6.hoverChange),\n resizableArea: mergeClasses(legendClassNames.resizableArea, baseStyles.resizableArea, (_props_styles7 = props.styles) === null || _props_styles7 === void 0 ? void 0 : _props_styles7.resizableArea)\n };\n};\n"],"names":["legendClassNames","useLegendStyles","root","legend","rect","shape","triangle","text","hoverChange","resizableArea","useStyles","__styles","Huce71","a9b677","Bt984gj","B6of3ja","t21cq0","jrapky","Frg6f3","Brf1p80","Bceei9c","icvyot","vrafjx","oivjwe","wvpqe5","z8tnut","z189sj","Byoj8tv","uwmqm3","B9bfxx9","Bf4jedk","Bs92zhm","B93v9kj","Ck9m1r","mkjk8h","zpeayv","Bcwlslt","Bgfg5da","B9xav0g","Bn0qgzm","B4g9neb","zhjwy3","ibv6hh","u1mtju","h3c5rm","Bekrc4i","i8vvqc","g2u3we","B4j52fo","irswps","Bqenvij","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","sj55zd","Bvjb7m6","qhf8xq","fsow6f","Bz10aip","Bhzewxz","oyh7mz","B2u0y6b","smv486","u6pn5x","B4uzyy","Be2s5ez","xrcqlc","Bhxzhr1","d","p","m","props","_props_styles","_props_styles1","_props_styles2","_props_styles3","_props_styles4","_props_styles5","_props_styles6","_props_styles7","className","baseStyles","mergeClasses","styles"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKiBA,gBAAgB;eAAhBA;;IA4FJC,eAAe;eAAfA;;;uBAjGwC;AAK1C,MAAMD,mBAAmB;IAChCE,MAAM;IACNC,QAAQ;IACRC,MAAM;IACNC,OAAO;IACPC,UAAU;IACVC,MAAM;IACNC,aAAa;IAC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;QAC/JC,aAAa2E,IAAAA,mBAAY,EAACnF,iBAAiBQ,WAAW,EAAE0E,WAAW1E,WAAW,EAAE,AAACuE,CAAAA,iBAAiBP,MAAMY,MAAM,AAANA,MAAY,QAAQL,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAevE,WAAW;QAC3LC,eAAe0E,IAAAA,mBAAY,EAACnF,iBAAiBS,aAAa,EAAEyE,WAAWzE,aAAa,EAAE,AAACuE,CAAAA,iBAAiBR,MAAMY,MAAM,AAANA,MAAY,QAAQJ,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAevE,aAAa;IACvM;AACJ"}
@@ -649,9 +649,9 @@ const LineChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
649
649
  const tooltipProps = {
650
650
  tooltipCls: classes.tooltip,
651
651
  id: _tooltipId,
652
- xAxis: xAxisElement
652
+ axis: xAxisElement
653
653
  };
654
- xAxisElement && (0, _index1.tooltipOfXAxislabels)(tooltipProps);
654
+ xAxisElement && (0, _index1.tooltipOfAxislabels)(tooltipProps);
655
655
  }
656
656
  return lines;
657
657
  }