@fluentui/react-charting 5.23.86 → 5.23.88

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 (107) hide show
  1. package/CHANGELOG.json +67 -1
  2. package/CHANGELOG.md +26 -2
  3. package/dist/react-charting.d.ts +13 -0
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +2 -0
  7. package/lib/components/AreaChart/AreaChart.base.js +3 -3
  8. package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
  9. package/lib/components/CommonComponents/CartesianChart.base.d.ts +1 -0
  10. package/lib/components/CommonComponents/CartesianChart.base.js +51 -20
  11. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  12. package/lib/components/CommonComponents/CartesianChart.styles.js +1 -0
  13. package/lib/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  14. package/lib/components/DeclarativeChart/DeclarativeChart.d.ts +8 -0
  15. package/lib/components/DeclarativeChart/DeclarativeChart.js +11 -7
  16. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  17. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +10 -7
  18. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +95 -30
  19. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  20. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +3 -3
  21. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  22. package/lib/components/HeatMapChart/HeatMapChart.types.d.ts +5 -0
  23. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  24. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +0 -2
  25. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +0 -67
  26. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  27. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js +1 -3
  28. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -1
  29. package/lib/components/LineChart/LineChart.base.js +3 -3
  30. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  31. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +7 -7
  32. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  33. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +3 -3
  34. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  35. package/lib/utilities/SVGTooltipText.js +4 -5
  36. package/lib/utilities/SVGTooltipText.js.map +1 -1
  37. package/lib/utilities/utilities.d.ts +2 -1
  38. package/lib/utilities/utilities.js +12 -5
  39. package/lib/utilities/utilities.js.map +1 -1
  40. package/lib-amd/components/AreaChart/AreaChart.base.js +2 -2
  41. package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
  42. package/lib-amd/components/CommonComponents/CartesianChart.base.d.ts +1 -0
  43. package/lib-amd/components/CommonComponents/CartesianChart.base.js +50 -20
  44. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  45. package/lib-amd/components/CommonComponents/CartesianChart.styles.js +1 -0
  46. package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  47. package/lib-amd/components/DeclarativeChart/DeclarativeChart.d.ts +8 -0
  48. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +11 -7
  49. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  50. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +10 -7
  51. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +99 -32
  52. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  53. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +2 -2
  54. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  55. package/lib-amd/components/HeatMapChart/HeatMapChart.types.d.ts +5 -0
  56. package/lib-amd/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  57. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +0 -2
  58. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +1 -67
  59. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  60. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js +2 -3
  61. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -1
  62. package/lib-amd/components/LineChart/LineChart.base.js +2 -2
  63. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  64. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +6 -6
  65. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  66. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +2 -2
  67. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  68. package/lib-amd/utilities/SVGTooltipText.js +5 -5
  69. package/lib-amd/utilities/SVGTooltipText.js.map +1 -1
  70. package/lib-amd/utilities/utilities.d.ts +2 -1
  71. package/lib-amd/utilities/utilities.js +15 -7
  72. package/lib-amd/utilities/utilities.js.map +1 -1
  73. package/lib-commonjs/components/AreaChart/AreaChart.base.js +2 -2
  74. package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
  75. package/lib-commonjs/components/CommonComponents/CartesianChart.base.d.ts +1 -0
  76. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +50 -19
  77. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  78. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js +1 -0
  79. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  80. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.d.ts +8 -0
  81. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +11 -7
  82. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  83. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +10 -7
  84. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +99 -31
  85. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  86. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +2 -2
  87. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  88. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.d.ts +5 -0
  89. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  90. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +0 -2
  91. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +0 -67
  92. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  93. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js +1 -3
  94. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -1
  95. package/lib-commonjs/components/LineChart/LineChart.base.js +2 -2
  96. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  97. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +6 -6
  98. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  99. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +2 -2
  100. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  101. package/lib-commonjs/utilities/SVGTooltipText.js +4 -5
  102. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  103. package/lib-commonjs/utilities/utilities.d.ts +2 -1
  104. package/lib-commonjs/utilities/utilities.js +16 -8
  105. package/lib-commonjs/utilities/utilities.js.map +1 -1
  106. package/package.json +5 -5
  107. package/src/components/HeatMapChart/HeatMapChart.types.ts +6 -0
@@ -1 +1 @@
1
- {"version":3,"file":"VerticalStackedBarChart.base.js","sourceRoot":"../src/","sources":["components/VerticalStackedBarChart/VerticalStackedBarChart.base.tsx"],"names":[],"mappings":";;;;IAoEA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAsE,CAAC;IAG/G,IAAM,cAAc,GAAG,4BAA4B,CAAC;IAEpD,+EAA+E;IAC/E,+EAA+E;IAC/E,+EAA+E;IAC/E,IAAM,gBAAgB,GAAG,GAAG,CAAC;IAC7B,IAAM,SAAS,GAAG,CAAC,CAAC;IAEpB,IAAM,iBAAiB,GAAG,CAAC,CAAC;IA0B5B;QACU,uDAA6E;QAiCrF,qCAAmB,KAAoC;;YACrD,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAjBP,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;YAclB,cAAQ,GAAW,CAAC,CAAC;YAoK/B,aAAO,GAAG,UAAC,IAA0B;;gBAC1C,OAAO,IAAA,4BAAO,EAAC,MAAA,KAAI,CAAC,kBAAkB,CAAC,OAAO,0CAAE,cAAc,EAAE,MAAA,KAAI,CAAC,WAAW,CAAC,OAAO,0CAAE,KAAK,EAAE,KAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YACtH,CAAC,CAAC;YAEF;;;;;;;eAOG;YACK,wBAAkB,GAAG,UAAC,cAAuB;gBAC3C,IAAA,KAA8B,KAAI,CAAC,KAAK,kBAAf,EAAzB,iBAAiB,mBAAG,KAAK,KAAA,CAAgB;gBACjD,IAAI,oBAAoB,GAAY,KAAK,CAAC;gBAC1C,IAAI,cAAc,EAAE,CAAC;oB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,GAArB;YACE,OAAO,CAAC,CACN,IAAI,CAAC,KAAK,CAAC,IAAI;gBACf,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;gBAC1B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,EAAxE,CAAwE,CAAC,CACvG,CAAC;QACJ,CAAC;QA7rCa,wCAAY,GAA2C;YACnE,WAAW,EAAE,EAAE;YACf,MAAM,EAAE,IAAI;SACb,AAHyB,CAGxB;QA2tCJ,kCAAC;KAAA,AAluCD,CACU,KAAK,CAAC,SAAS,GAiuCxB;IAluCY,kEAA2B","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select } from 'd3-selection';\nimport {\n scaleLinear as d3ScaleLinear,\n ScaleLinear as D3ScaleLinear,\n scaleBand as d3ScaleBand,\n scaleUtc as d3ScaleUtc,\n scaleTime as d3ScaleTime,\n} from 'd3-scale';\nimport {\n classNamesFunction,\n getId,\n getRTL,\n warnDeprecations,\n memoizeFunction,\n initializeComponentRef,\n} from '@fluentui/react/lib/Utilities';\nimport { IPalette, IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { ILegend, ILegendContainer, Legends } from '../Legends/index';\nimport {\n IAccessibilityProps,\n CartesianChart,\n ChartHoverCard,\n IBasestate,\n IChildProps,\n IVerticalStackedBarDataPoint,\n IMargins,\n IVerticalStackedBarChartProps,\n IVerticalStackedBarChartStyleProps,\n IVerticalStackedBarChartStyles,\n IVerticalStackedChartProps,\n IVSChartDataPoint,\n ILineDataInVerticalStackedBarChart,\n IModifiedCartesianChartProps,\n IDataPoint,\n} from '../../index';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n getTypeOfAxis,\n tooltipOfXAxislabels,\n formatValueLimitWidth,\n getBarWidth,\n getScalePadding,\n isScalePaddingDefined,\n calculateAppropriateBarWidth,\n findVSBCNumericMinMaxOfY,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfDateForAreaLineVerticalBarChart,\n domainRangeOfVSBCNumeric,\n domainRangeOfXStringAxis,\n createStringYAxis,\n formatDate,\n getNextGradient,\n areArraysEqual,\n calculateLongestLabelWidth,\n YAxisType,\n} from '../../utilities/index';\nimport { IChart, IImageExportOptions } from '../../types/index';\nimport { toImage } from '../../utilities/image-export-utils';\n\nconst getClassNames = classNamesFunction<IVerticalStackedBarChartStyleProps, IVerticalStackedBarChartStyles>();\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\ntype NumericScale = D3ScaleLinear<number, number>;\nconst COMPONENT_NAME = 'VERTICAL STACKED BAR CHART';\n\n// When displaying gaps between bars, the max height of the gap is given in the\n// props. The actual gap is calculated with this multiplier, with a minimum gap\n// of 1 pixel. (If these values are changed, update the comment for barGapMax.)\nconst barGapMultiplier = 0.2;\nconst barGapMin = 1;\n\nconst MIN_DOMAIN_MARGIN = 8;\n\ninterface IRefArrayData {\n refElement?: SVGGElement | null;\n}\n\ntype LinePoint = ILineDataInVerticalStackedBarChart & { index: number; xItem: IVerticalStackedChartProps };\ntype LineObject = { [key: string]: LinePoint[] };\ntype LineLegends = {\n title: string;\n color: string;\n};\n\ntype CalloutAnchorPointData = {\n xAxisDataPoint: string;\n chartDataPoint: IVSChartDataPoint;\n};\n\nexport interface IVerticalStackedBarChartState extends IBasestate {\n dataPointCalloutProps?: IVSChartDataPoint;\n stackCalloutProps?: IVerticalStackedChartProps;\n activeXAxisDataPoint: number | string | Date;\n callOutAccessibilityData?: IAccessibilityProps;\n calloutLegend: string;\n selectedLegends: string[];\n}\nexport class VerticalStackedBarChartBase\n extends React.Component<IVerticalStackedBarChartProps, IVerticalStackedBarChartState>\n implements IChart\n{\n public static defaultProps: Partial<IVerticalStackedBarChartProps> = {\n maxBarWidth: 24,\n useUTC: true,\n };\n\n private _points: IVerticalStackedChartProps[];\n private _dataset: IVerticalStackedBarDataPoint[];\n private _xAxisLabels: string[];\n private _bars: JSX.Element[];\n private _xAxisType: XAxisTypes;\n private _barWidth: number;\n private _calloutId: string;\n private _colors: string[];\n private margins: IMargins;\n private _isRtl: boolean = getRTL();\n private _createLegendsForLine: (data: IVerticalStackedChartProps[]) => LineLegends[];\n private _lineObject: LineObject;\n private _tooltipId: string;\n private _yMax: number;\n private _yMin: number;\n private _calloutAnchorPoint: CalloutAnchorPointData | null;\n private _domainMargin: number;\n private _classNames: IProcessedStyleSet<IVerticalStackedBarChartStyles>;\n private _emptyChartId: string;\n private _xAxisInnerPadding: number;\n private _xAxisOuterPadding: number;\n private _cartesianChartRef: React.RefObject<IChart>;\n private _legendsRef: React.RefObject<ILegendContainer>;\n private readonly Y_ORIGIN: number = 0;\n\n public constructor(props: IVerticalStackedBarChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this.state = {\n isCalloutVisible: false,\n selectedLegends: props.legendProps?.selectedLegends || [],\n activeLegend: undefined,\n refSelected: null,\n dataForHoverCard: 0,\n color: '',\n hoverXValue: '',\n YValueHover: [],\n xCalloutValue: '',\n yCalloutValue: '',\n activeXAxisDataPoint: '',\n calloutLegend: '',\n };\n warnDeprecations(COMPONENT_NAME, props, {\n colors: 'IVSChartDataPoint.color',\n chartLabel: 'use your own title for chart',\n });\n this._handleMouseOut = this._handleMouseOut.bind(this);\n this._calloutId = getId('callout');\n this._tooltipId = getId('VSBCTooltipId_');\n if (!this._isChartEmpty()) {\n this._adjustProps();\n this._dataset = this._createDataSetLayer();\n }\n this._createLegendsForLine = memoizeFunction((data: IVerticalStackedChartProps[]) => this._getLineLegends(data));\n this._emptyChartId = getId('_VSBC_empty');\n this._domainMargin = MIN_DOMAIN_MARGIN;\n this._cartesianChartRef = React.createRef();\n this._legendsRef = React.createRef();\n }\n\n public componentDidUpdate(prevProps: IVerticalStackedBarChartProps): void {\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, this.props.legendProps?.selectedLegends)) {\n this.setState({\n selectedLegends: this.props.legendProps?.selectedLegends || [],\n });\n }\n\n if (\n prevProps.height !== this.props.height ||\n prevProps.width !== this.props.width ||\n prevProps.data !== this.props.data\n ) {\n this._adjustProps();\n this._dataset = this._createDataSetLayer();\n }\n }\n\n public render(): React.ReactNode {\n if (!this._isChartEmpty()) {\n this._adjustProps();\n const _isHavingLines = this.props.data.some(\n (item: IVerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = this._toFocusWholeStack(_isHavingLines);\n const { isCalloutForStack = false } = this.props;\n this._dataset = this._createDataSetLayer();\n const legendBars: JSX.Element = this._getLegendData(\n this._points,\n this.props.theme!.palette,\n this._createLegendsForLine(this.props.data),\n );\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n href: this.props.href!,\n });\n const calloutProps: IModifiedCartesianChartProps['calloutProps'] = {\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n id: `toolTip${this._calloutId}`,\n target: this.state.refSelected,\n isBeakVisible: false,\n gapSpace: 15,\n color: this.state.color,\n legend: this.state.calloutLegend,\n XValue: this.state.xCalloutValue!,\n YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard,\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n onDismiss: this._closeCallout,\n preventDismissOnLostFocus: true,\n ...this.props.calloutProps,\n ...getAccessibleDataObject(this.state.callOutAccessibilityData),\n };\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n\n return (\n <CartesianChart\n {...this.props}\n chartTitle={this._getChartTitle()}\n points={this._dataset}\n chartType={ChartTypes.VerticalStackedBarChart}\n xAxisType={this._xAxisType}\n calloutProps={calloutProps}\n createYAxis={createNumericYAxis}\n tickParams={tickParams}\n legendBars={legendBars}\n getMinMaxOfYAxis={this._getMinMaxOfYAxis}\n datasetForXAxisDomain={this._xAxisLabels}\n isCalloutForStack={shouldFocusWholeStack}\n getDomainNRangeValues={this._getDomainNRangeValues}\n createStringYAxis={createStringYAxis}\n barwidth={this._barWidth}\n focusZoneDirection={\n isCalloutForStack || _isHavingLines ? FocusZoneDirection.horizontal : FocusZoneDirection.vertical\n }\n getmargins={this._getMargins}\n getGraphData={this._getGraphData}\n getAxisData={this._getAxisData}\n customizedCallout={this._getCustomizedCallout()}\n onChartMouseLeave={this._handleChartMouseLeave}\n getDomainMargins={this._getDomainMargins}\n {...(this._xAxisType === XAxisTypes.StringAxis && {\n xAxisInnerPadding: this._xAxisInnerPadding,\n xAxisOuterPadding: this._xAxisOuterPadding,\n })}\n ref={this._cartesianChartRef}\n showRoundOffXTickValues={!isScalePaddingDefined(this.props.xAxisInnerPadding, this.props.xAxisPadding)}\n /* eslint-disable react/jsx-no-bind */\n children={(props: IChildProps) => {\n return (\n <>\n <g>{this._bars}</g>\n <g>\n {_isHavingLines &&\n this._createLines(\n props.xScale!,\n props.yScalePrimary!,\n props.containerHeight!,\n props.containerWidth!,\n props.yScaleSecondary,\n )}\n </g>\n </>\n );\n }}\n />\n );\n }\n return (\n <div\n id={this._emptyChartId}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\n />\n );\n }\n\n public get chartContainer(): HTMLElement | null {\n return this._cartesianChartRef.current?.chartContainer || null;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._cartesianChartRef.current?.chartContainer, this._legendsRef.current?.toSVG, this._isRtl, opts);\n };\n\n /**\n * This function tells us what to focus either the whole stack as focusable item.\n * or each individual item in the stack as focusable item. basically it depends\n * on the prop `isCalloutForStack` if it's false user can focus each individual bar\n * within the bar if it's true then user can focus whole bar as item.\n * but if we have lines in the chart then we force the user to focus only the whole\n * bar, even if isCalloutForStack is false\n */\n private _toFocusWholeStack = (_isHavingLines: boolean): boolean => {\n const { isCalloutForStack = false } = this.props;\n let shouldFocusStackOnly: boolean = false;\n if (_isHavingLines) {\n if (this._getHighlightedLegend().length === 1) {\n shouldFocusStackOnly = false;\n } else {\n shouldFocusStackOnly = true;\n }\n } else {\n shouldFocusStackOnly = isCalloutForStack;\n }\n return shouldFocusStackOnly;\n };\n\n private _getDomainNRangeValues = (\n points: IDataPoint[],\n margins: IMargins,\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 = domainRangeOfVSBCNumeric(points, margins, width, isRTL, barWidth!);\n } else if (xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = domainRangeOfDateForAreaLineVerticalBarChart(\n points,\n margins,\n width,\n isRTL,\n tickValues! as Date[],\n chartType,\n barWidth,\n );\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);\n }\n return domainNRangeValue;\n };\n\n private _getFormattedLineData = (data: IVerticalStackedChartProps[]): LineObject => {\n const linesData: LinePoint[] = [];\n const formattedLineData: LineObject = {};\n data.forEach((item: IVerticalStackedChartProps, index: number) => {\n if (item.lineData) {\n // injecting corresponding x data point in each of the line data\n // we inject index also , it will be helpful to draw lines when x axis is\n // of string type\n item.lineData.forEach(line => {\n linesData.push({\n ...line,\n index,\n xItem: item,\n });\n });\n }\n });\n linesData.forEach(item => {\n if (formattedLineData[item.legend]) {\n formattedLineData[item.legend].push(item);\n } else {\n formattedLineData[item.legend] = [item];\n }\n });\n return formattedLineData;\n };\n\n private _getLineLegends = (data: IVerticalStackedChartProps[]): LineLegends[] => {\n const lineObject: LineObject = this._lineObject;\n const lineLegends: LineLegends[] = [];\n Object.keys(lineObject).forEach((item: string) => {\n lineLegends.push({\n title: item,\n color: lineObject[item][0].color,\n });\n });\n return lineLegends;\n };\n\n private _createLines = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale: any,\n yScalePrimary: NumericScale,\n containerHeight: number,\n containerWidth: number,\n yScaleSecondary?: NumericScale,\n ): JSX.Element => {\n const lineObject: LineObject = this._getFormattedLineData(this.props.data);\n const lines: React.ReactNode[] = [];\n const borderForLines: React.ReactNode[] = [];\n const dots: React.ReactNode[] = [];\n const { theme } = this.props;\n const lineBorderWidth = this.props.lineOptions?.lineBorderWidth\n ? Number.parseFloat(this.props.lineOptions!.lineBorderWidth!.toString())\n : 0;\n\n const xScaleBandwidthTranslate = this._xAxisType !== XAxisTypes.StringAxis ? 0 : xScale.bandwidth() / 2;\n Object.keys(lineObject).forEach((item: string, index: number) => {\n const shouldHighlight = this._isLegendHighlighted(item) || this._noLegendHighlighted(); // item is legend name\n for (let i = 1; i < lineObject[item].length; i++) {\n const x1 = xScale(lineObject[item][i - 1].xItem.xAxisPoint);\n const useSecondaryYScale =\n lineObject[item][i - 1].useSecondaryYScale && lineObject[item][i].useSecondaryYScale && yScaleSecondary;\n const y1 = useSecondaryYScale\n ? yScaleSecondary!(lineObject[item][i - 1].y)\n : yScalePrimary(lineObject[item][i - 1].y);\n const x2 = xScale(lineObject[item][i].xItem.xAxisPoint);\n const y2 = useSecondaryYScale ? yScaleSecondary!(lineObject[item][i].y) : yScalePrimary(lineObject[item][i].y);\n\n if (lineBorderWidth > 0) {\n borderForLines.push(\n <line\n key={`${index}-${i}-BorderLine`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={3 + lineBorderWidth * 2}\n fill=\"transparent\"\n strokeLinecap=\"round\"\n stroke={theme!.semanticColors.bodyBackground}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />,\n );\n }\n lines.push(\n <line\n key={`${index}-${i}-line`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={lineObject[item][0].lineOptions?.strokeWidth ?? 3}\n strokeLinecap={lineObject[item][0].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={lineObject[item][0].lineOptions?.strokeDasharray}\n stroke={lineObject[item][i].color}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n onMouseOver={this._lineHover.bind(this, lineObject[item][i - 1])}\n onMouseLeave={this._handleMouseOut}\n />,\n );\n }\n });\n Object.keys(lineObject).forEach((item: string, index: number) => {\n lineObject[item].forEach((circlePoint: LinePoint, subIndex: number) => {\n // Create an object to store line point ref so that the object can be passed by reference to the focus handler\n const circleRef: { refElement: SVGCircleElement | null } = { refElement: null };\n const noBarsActive =\n circlePoint.xItem.chartData.filter(\n dataPoint => this._noLegendHighlighted() || this._isLegendHighlighted(dataPoint.legend),\n ).length === 0;\n dots.push(\n <circle\n key={`${index}-${subIndex}-dot`}\n cx={xScale(circlePoint.xItem.xAxisPoint)}\n cy={\n circlePoint.useSecondaryYScale && yScaleSecondary\n ? yScaleSecondary(circlePoint.y)\n : yScalePrimary(circlePoint.y)\n }\n onMouseOver={this._lineHover.bind(this, circlePoint)}\n onMouseLeave={this._handleMouseOut}\n r={this._getCircleOpacityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).radius}\n stroke={circlePoint.color}\n fill={this.props.theme!.semanticColors.bodyBackground}\n strokeWidth={3}\n // Elements with visibility: hidden cannot receive focus, so use opacity: 0 instead to hide them.\n // For more information, see https://fuzzbomb.github.io/accessibility-demos/visually-hidden-focus-test.html\n opacity={this._getCircleOpacityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).opacity}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n ref={e => (circleRef.refElement = e)}\n {...(noBarsActive && (this._noLegendHighlighted() || this._isLegendHighlighted(item))\n ? {\n 'data-is-focusable': !this.props.hideTooltip,\n onFocus: this._lineFocus.bind(this, circlePoint, circleRef),\n onBlur: this._handleMouseOut,\n role: 'img',\n 'aria-label': this._getAriaLabel(circlePoint.xItem, circlePoint, true),\n }\n : {})}\n />,\n );\n });\n });\n return (\n <>\n {borderForLines}\n {lines}\n {dots}\n </>\n );\n };\n\n private _getCircleOpacityAndRadius = (\n xAxisPoint: string | number | Date,\n legend: string,\n ): { opacity: number; radius: number } => {\n const { activeXAxisDataPoint } = this.state;\n if (!this._noLegendHighlighted()) {\n if (xAxisPoint === activeXAxisDataPoint && this._isLegendHighlighted(legend)) {\n return { opacity: 1, radius: 8 };\n } else if (this._isLegendHighlighted(legend)) {\n return { opacity: 1, radius: 0.3 };\n } else {\n return { opacity: 0, radius: 0 };\n }\n } else {\n return {\n opacity: activeXAxisDataPoint === xAxisPoint ? 1 : 0,\n radius: 8,\n };\n }\n };\n\n private _adjustProps(): void {\n this._points = this.props.data || [];\n this._barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth);\n const { theme } = this.props;\n const { palette } = theme!;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._colors = this.props.colors || [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n this._xAxisType = getTypeOfAxis(this.props.data[0].xAxisPoint, true) as XAxisTypes;\n this._lineObject = this._getFormattedLineData(this.props.data);\n this._xAxisInnerPadding = getScalePadding(\n this.props.xAxisInnerPadding,\n this.props.xAxisPadding,\n this._xAxisType === XAxisTypes.StringAxis ? 2 / 3 : 1 / 2,\n );\n this._xAxisOuterPadding = getScalePadding(this.props.xAxisOuterPadding, this.props.xAxisPadding, 0);\n }\n\n private _createDataSetLayer(): IVerticalStackedBarDataPoint[] {\n const tempArr: string[] = [];\n const dataset: IVerticalStackedBarDataPoint[] = this._points.map(singlePointData => {\n let total: number = 0;\n singlePointData.chartData!.forEach((point: IVSChartDataPoint) => {\n total = total + point.data;\n });\n tempArr.push(singlePointData.xAxisPoint as string);\n return {\n x: singlePointData.xAxisPoint,\n y: total,\n };\n });\n this._xAxisLabels = tempArr;\n return dataset;\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _renderCallout(props?: IVSChartDataPoint): JSX.Element | null {\n return props ? (\n <ChartHoverCard\n XValue={props.xAxisCalloutData}\n Legend={props.legend}\n YValue={props.yAxisCalloutData}\n color={props.color}\n culture={this.props.culture}\n />\n ) : null;\n }\n\n private _getCustomizedCallout = () => {\n const _isHavingLines = this.props.data.some(\n (item: IVerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n return this.props.onRenderCalloutPerStack\n ? this.props.onRenderCalloutPerStack(this.state.stackCalloutProps)\n : this.props.onRenderCalloutPerDataPoint && !_isHavingLines\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps, this._renderCallout)\n : null;\n };\n\n private _onLegendHover(legendTitle: string): void {\n this.setState({\n activeLegend: legendTitle,\n });\n }\n\n private _onLegendLeave(): void {\n this.setState({\n activeLegend: undefined,\n });\n }\n\n private _getLegendData(\n data: IVerticalStackedChartProps[],\n palette: IPalette,\n lineLegends: LineLegends[],\n ): JSX.Element {\n if (this.props.hideLegend) {\n return <></>;\n }\n const defaultPalette: string[] = [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n const actions: ILegend[] = [];\n const { allowHoverOnLegend = true, theme } = this.props;\n\n data.forEach((singleChartData: IVerticalStackedChartProps) => {\n singleChartData.chartData.forEach((point: IVSChartDataPoint) => {\n let color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n if (this.props.enableGradient) {\n const pointIndex = Math.max(\n singleChartData.chartData?.findIndex(item => item.legend === point.legend) || 0,\n 0,\n );\n color = point.gradient?.[0] || getNextGradient(pointIndex, 0, theme?.isInverted)[0];\n }\n\n const checkSimilarLegends = actions.filter((leg: ILegend) => leg.title === point.legend && leg.color === color);\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n\n const legend: ILegend = {\n title: point.legend,\n color,\n hoverAction: allowHoverOnLegend\n ? () => {\n this._handleChartMouseLeave();\n this._onLegendHover(point.legend);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => this._onLegendLeave() : undefined,\n };\n\n actions.push(legend);\n });\n });\n const legendsOfLine: ILegend[] = [];\n if (lineLegends && lineLegends.length > 0) {\n lineLegends.forEach((point: LineLegends) => {\n const legend: ILegend = {\n title: point.title,\n color: point.color,\n isLineLegendInBarChart: true,\n hoverAction: allowHoverOnLegend\n ? () => {\n this._handleChartMouseLeave();\n this._onLegendHover(point.title);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => this._onLegendLeave() : undefined,\n };\n legendsOfLine.push(legend);\n });\n }\n const totalLegends: ILegend[] = legendsOfLine.concat(actions);\n return (\n <Legends\n legends={totalLegends}\n overflowProps={this.props.legendsOverflowProps}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n onChange={this._onLegendSelectionChange.bind(this)}\n ref={this._legendsRef}\n />\n );\n }\n\n private _onLegendSelectionChange(\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: ILegend,\n ): void {\n if (this.props.legendProps?.canSelectMultipleLegends) {\n this.setState({ selectedLegends });\n } else {\n this.setState({ selectedLegends: selectedLegends.slice(-1) });\n }\n if (this.props.legendProps?.onChange) {\n this.props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n }\n\n private _getHighlightedLegend() {\n return this.state.selectedLegends.length > 0\n ? this.state.selectedLegends\n : this.state.activeLegend\n ? [this.state.activeLegend]\n : [];\n }\n\n private _onRectHover(\n xAxisPoint: string,\n point: IVSChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n this._onRectFocusHover(xAxisPoint, point, color, mouseEvent);\n }\n\n private _onRectFocusHover(\n xAxisPoint: string,\n point: IVSChartDataPoint,\n color: string,\n refSelected: React.MouseEvent<SVGElement> | SVGGElement,\n ): void {\n if (this._calloutAnchorPoint?.chartDataPoint !== point || this._calloutAnchorPoint?.xAxisDataPoint !== xAxisPoint) {\n this._calloutAnchorPoint = {\n chartDataPoint: point,\n xAxisDataPoint: xAxisPoint,\n };\n this.setState({\n refSelected,\n /**\n * Show the callout if highlighted bar is focused/hovered\n * and Hide it if unhighlighted bar is focused/hovered\n */\n isCalloutVisible: this._noLegendHighlighted() || this._isLegendHighlighted(point.legend),\n calloutLegend: point.legend,\n dataForHoverCard: point.data,\n color,\n xCalloutValue: point.xAxisCalloutData ? point.xAxisCalloutData : xAxisPoint,\n yCalloutValue: point.yAxisCalloutData,\n dataPointCalloutProps: point,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n }\n\n private _lineHover = (lineData: LinePoint, mouseEvent: React.MouseEvent<SVGElement>) => {\n mouseEvent.persist();\n this._lineHoverFocus(lineData, mouseEvent);\n };\n\n private _lineFocus = (lineData: LinePoint, ref: { refElement: SVGCircleElement | null }) => {\n if (ref.refElement) {\n this._lineHoverFocus(lineData, ref.refElement);\n }\n };\n\n private _lineHoverFocus = (lineData: LinePoint, refSelected: React.MouseEvent<SVGElement> | SVGCircleElement) => {\n if (this._getHighlightedLegend().length === 1) {\n if (this._noLegendHighlighted() || this._isLegendHighlighted(lineData.legend)) {\n this.setState({\n refSelected,\n isCalloutVisible: true,\n xCalloutValue: `${lineData.xItem.xAxisPoint}`,\n yCalloutValue: `${lineData.yAxisCalloutData || lineData.data || lineData.y}`,\n activeXAxisDataPoint: lineData.xItem.xAxisPoint,\n color: lineData.color,\n });\n }\n } else {\n this._onStackHoverFocus(lineData.xItem, refSelected);\n }\n };\n\n private _onStackHover(stack: IVerticalStackedChartProps, mouseEvent: React.MouseEvent<SVGElement>): void {\n mouseEvent.persist();\n this._onStackHoverFocus(stack, mouseEvent);\n }\n\n private _onStackHoverFocus(\n stack: IVerticalStackedChartProps,\n refSelected: React.MouseEvent<SVGElement> | SVGGElement,\n ): void {\n if (!this._noLegendHighlighted()) {\n stack = {\n ...stack,\n chartData: stack.chartData.filter(dataPoint => this._isLegendHighlighted(dataPoint.legend)),\n lineData: stack.lineData?.filter(dataPoint => this._isLegendHighlighted(dataPoint.legend)),\n };\n }\n const lineData = stack.lineData;\n const isLinesPresent: boolean = lineData !== undefined && lineData.length > 0;\n if (isLinesPresent) {\n lineData!.forEach((item: ILineDataInVerticalStackedBarChart & { shouldDrawBorderBottom?: boolean }) => {\n item.data = item.data || item.y;\n item.shouldDrawBorderBottom = true;\n });\n }\n\n this.setState({\n refSelected,\n isCalloutVisible: stack.chartData.length > 0 || (stack.lineData?.length ?? 0) > 0,\n YValueHover: isLinesPresent\n ? [...lineData!.sort((a, b) => (a.data! < b.data! ? 1 : -1)), ...stack.chartData.slice().reverse()]\n : stack.chartData.slice().reverse(),\n hoverXValue:\n stack.xAxisPoint instanceof Date ? formatDate(stack.xAxisPoint, this.props.useUTC) : stack.xAxisPoint,\n stackCalloutProps: stack,\n activeXAxisDataPoint: stack.xAxisPoint,\n callOutAccessibilityData: stack.stackCallOutAccessibilityData,\n });\n }\n\n private _onRectFocus(point: IVSChartDataPoint, xAxisPoint: string, color: string, ref: IRefArrayData): void {\n if (ref.refElement) {\n this._onRectFocusHover(xAxisPoint, point, color, ref.refElement);\n }\n }\n\n private _onStackFocus(stack: IVerticalStackedChartProps, groupRef: IRefArrayData): void {\n if (groupRef.refElement) {\n this._onStackHoverFocus(stack, groupRef.refElement);\n }\n }\n\n private _handleMouseOut = (): void => {\n /**/\n };\n\n private _handleChartMouseLeave = (): void => {\n this._calloutAnchorPoint = null;\n this.setState({\n isCalloutVisible: false,\n activeXAxisDataPoint: '',\n });\n };\n\n private _onClick(\n data: IVerticalStackedChartProps | IVSChartDataPoint,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n this.props.onBarClick?.(mouseEvent, data);\n this.props.href ? (window.location.href = this.props.href) : '';\n }\n\n private _getBarGapAndScale(\n bars: IVSChartDataPoint[],\n yBarScale: NumericScale,\n defaultTotalHeight?: number,\n ): {\n readonly gapHeight: number;\n readonly heightValueScale: number;\n readonly adjustedTotalHeight: number;\n } {\n const { barGapMax = 0 } = this.props;\n\n // When displaying gaps between the bars, the height of each bar is\n // adjusted so that the total of all bars is not changed by the gaps\n const totalData = bars.reduce((iter, value) => iter + Math.abs(value.data), 0);\n const totalHeight = defaultTotalHeight ?? Math.abs(yBarScale(totalData) - yBarScale(this.Y_ORIGIN));\n let sumOfPercent = 0;\n bars.forEach(point => {\n let value = (Math.abs(point.data) / totalData) * 100;\n if (value < 1 && value !== 0) {\n value = 1;\n }\n sumOfPercent += value;\n });\n const scalingRatio = sumOfPercent !== 0 ? sumOfPercent / 100 : 1;\n const gaps = barGapMax && bars.length - 1;\n const gapHeight = gaps && Math.max(barGapMin, Math.min(barGapMax, (totalHeight * barGapMultiplier) / gaps));\n const heightValueScale = (totalHeight - gapHeight * gaps) / (totalData * scalingRatio);\n return {\n gapHeight,\n heightValueScale,\n adjustedTotalHeight: sumOfPercent,\n } as const;\n }\n\n private _createBar = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xBarScale: any,\n yBarScale: NumericScale,\n containerHeight: number,\n xElement: SVGElement,\n ): JSX.Element[] => {\n const { barCornerRadius = 0, barMinimumHeight = 0 } = this.props;\n const _isHavingLines = this.props.data.some(\n (item: IVerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = this._toFocusWholeStack(_isHavingLines);\n\n if (this._xAxisType === XAxisTypes.StringAxis) {\n // Setting the bar width here is safe because there are no dependencies earlier in the code\n // that rely on the width of bars in vertical bar charts with string x-axis.\n this._barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth, xBarScale.bandwidth());\n }\n\n const bars = this._points.map((singleChartData: IVerticalStackedChartProps, indexNumber: number) => {\n const xPoint = xBarScale(\n this._xAxisType === XAxisTypes.NumericAxis\n ? (singleChartData.xAxisPoint as number)\n : this._xAxisType === XAxisTypes.DateAxis\n ? (singleChartData.xAxisPoint as Date)\n : (singleChartData.xAxisPoint as string),\n );\n const xScaleBandwidthTranslate =\n this._xAxisType !== XAxisTypes.StringAxis ? -this._barWidth / 2 : (xBarScale.bandwidth() - this._barWidth) / 2;\n\n let barTotalValue = 0;\n\n // Removing datapoints with zero data\n const barsToDisplay = singleChartData.chartData.filter(point => point.data !== 0);\n\n if (!barsToDisplay.length) {\n return undefined;\n }\n\n const { gapHeight, heightValueScale, adjustedTotalHeight } = this._getBarGapAndScale(barsToDisplay, yBarScale);\n\n if (heightValueScale < 0) {\n return undefined;\n }\n const yBaseline = containerHeight - this.margins.bottom! - yBarScale(this.Y_ORIGIN);\n let yPositiveStart = yBaseline;\n let yNegativeStart = yBaseline;\n let yPoint = 0;\n let heightOfLastBar = 0;\n\n const singleBar = barsToDisplay.map((point: IVSChartDataPoint, index: number) => {\n let startColor = point.color ? point.color : this._colors[index];\n let endColor = startColor;\n\n if (this.props.enableGradient) {\n startColor = point.gradient?.[0] || getNextGradient(index, 0, this.props.theme?.isInverted)[0];\n endColor = point.gradient?.[1] || getNextGradient(index, 0, this.props.theme?.isInverted)[1];\n singleChartData.chartData[index].color = startColor;\n }\n\n const ref: IRefArrayData = {};\n\n const shouldHighlight = this._isLegendHighlighted(point.legend) || this._noLegendHighlighted() ? true : false;\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n shouldHighlight,\n href: this.props.href,\n });\n const rectFocusProps = !shouldFocusWholeStack &&\n shouldHighlight && {\n 'data-is-focusable': !this.props.hideTooltip,\n 'aria-label': this._getAriaLabel(singleChartData, point),\n onMouseOver: this._onRectHover.bind(this, singleChartData.xAxisPoint, point, startColor),\n onMouseMove: this._onRectHover.bind(this, singleChartData.xAxisPoint, point, startColor),\n onMouseLeave: this._handleMouseOut,\n onFocus: this._onRectFocus.bind(this, point, singleChartData.xAxisPoint, startColor, ref),\n onBlur: this._handleMouseOut,\n onClick: this._onClick.bind(this, point),\n role: 'img',\n };\n\n let barHeight = Math.abs(heightValueScale * point.data);\n const minHeight = Math.max((heightValueScale * adjustedTotalHeight) / 100.0, barMinimumHeight);\n if (barHeight < minHeight) {\n barHeight = minHeight;\n }\n const gapOffset = index ? gapHeight : 0;\n if (point.data >= this.Y_ORIGIN) {\n yPositiveStart -= barHeight + gapOffset;\n yPoint = yPositiveStart;\n } else {\n yPoint = yNegativeStart + gapOffset;\n yNegativeStart = yPoint + barHeight;\n }\n\n barTotalValue += point.data;\n heightOfLastBar = index === barsToDisplay.length - 1 ? barHeight : 0;\n\n const gradientId = getId('VSBC_Gradient') + `_${indexNumber}_${index}`;\n\n // If set, apply the corner radius to the top of the final bar\n if (barCornerRadius && barHeight > barCornerRadius && index === barsToDisplay.length - 1) {\n return (\n <React.Fragment key={index + indexNumber + `${shouldFocusWholeStack}`}>\n {this.props.enableGradient && (\n <defs>\n <linearGradient id={gradientId} x1=\"0%\" y1=\"100%\" x2=\"0%\" y2=\"0%\">\n <stop offset=\"0\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>\n </defs>\n )}\n <path\n className={this._classNames.opacityChangeOnHover}\n d={`\n M ${xPoint} ${yPoint + barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${-barCornerRadius}\n h ${this._barWidth - 2 * barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${barCornerRadius}\n v ${barHeight - barCornerRadius}\n h ${-this._barWidth}\n z\n `}\n fill={this.props.enableGradient ? `url(#${gradientId})` : startColor}\n rx={this.props.roundCorners ? 3 : 0}\n ref={e => (ref.refElement = e)}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n {...rectFocusProps}\n />\n </React.Fragment>\n );\n }\n if (barHeight < 0) {\n return <React.Fragment key={index + indexNumber}> </React.Fragment>;\n }\n return (\n <React.Fragment key={index + indexNumber}>\n {this.props.enableGradient && (\n <defs>\n <linearGradient id={gradientId} x1=\"0%\" y1=\"100%\" x2=\"0%\" y2=\"0%\">\n <stop offset=\"0\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>\n </defs>\n )}\n <rect\n className={this._classNames.opacityChangeOnHover}\n x={xPoint}\n y={yPoint}\n width={this._barWidth}\n height={barHeight}\n fill={this.props.enableGradient ? `url(#${gradientId})` : startColor}\n rx={this.props.roundCorners ? 3 : 0}\n ref={e => (ref.refElement = e)}\n {...rectFocusProps}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />\n </React.Fragment>\n );\n });\n const groupRef: IRefArrayData = {};\n const someBarsActive =\n singleChartData.chartData.filter(\n dataPoint => this._noLegendHighlighted() || this._isLegendHighlighted(dataPoint.legend),\n ).length > 0;\n // FIXME: Making the entire stack focusable when stack callout is enabled adds unnecessary complexity\n // and can reduce usability in certain scenarios. Instead, each individual element within the stack\n // should be focusable on its own, with its own aria-label. This behavior is also seen in Highcharts.\n const stackFocusProps = shouldFocusWholeStack &&\n someBarsActive && {\n 'data-is-focusable': !this.props.hideTooltip,\n 'aria-label': this._getAriaLabel(singleChartData),\n onMouseOver: this._onStackHover.bind(this, singleChartData),\n onMouseMove: this._onStackHover.bind(this, singleChartData),\n onMouseLeave: this._handleMouseOut,\n onFocus: this._onStackFocus.bind(this, singleChartData, groupRef),\n onBlur: this._handleMouseOut,\n onClick: this._onClick.bind(this, singleChartData),\n role: 'img',\n };\n let showLabel = false;\n let barLabel = 0;\n if (!this.props.hideLabels) {\n if (this._noLegendHighlighted()) {\n showLabel = true;\n barLabel = barTotalValue;\n } else {\n barsToDisplay.forEach(point => {\n if (this._isLegendHighlighted(point.legend)) {\n showLabel = true;\n barLabel += point.data;\n }\n });\n }\n }\n return (\n <g key={indexNumber + `${shouldFocusWholeStack}`}>\n <g id={`${indexNumber}-singleBar`} ref={e => (groupRef.refElement = e)} {...stackFocusProps}>\n {singleBar}\n </g>\n {!this.props.hideLabels && this._barWidth >= 16 && showLabel && (\n <text\n x={xPoint + this._barWidth / 2}\n //if total bar value >=0, show label above top bar, otherwise below bottom bar\n y={barLabel >= this.Y_ORIGIN ? yPoint - 6 : yPoint + heightOfLastBar + 12}\n textAnchor=\"middle\"\n className={this._classNames.barLabel}\n aria-label={`Total: ${barLabel}`}\n role=\"img\"\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n >\n {formatValueLimitWidth(barLabel)}\n </text>\n )}\n </g>\n );\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!this.props.showXAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return bars.filter((bar): bar is JSX.Element => !!bar);\n };\n\n private _getScales = (containerHeight: number, containerWidth: number) => {\n const yDomain = [Math.min(this.Y_ORIGIN, this._yMin), Math.max(this.Y_ORIGIN, this._yMax)];\n const yBarScale = d3ScaleLinear()\n .domain(yDomain)\n .range([0, containerHeight - this.margins.bottom! - this.margins.top!]);\n if (this._xAxisType === XAxisTypes.NumericAxis) {\n const xMax = d3Max(this._dataset, (point: IVerticalStackedBarDataPoint) => point.x as number)!;\n const xMin = d3Min(this._dataset, (point: IVerticalStackedBarDataPoint) => point.x as number)!;\n\n const xBarScale = d3ScaleLinear()\n .domain(this._isRtl ? [xMax, xMin] : [xMin, xMax])\n .range([this.margins.left! + this._domainMargin, containerWidth - this.margins.right! - this._domainMargin]);\n if (!isScalePaddingDefined(this.props.xAxisInnerPadding, this.props.xAxisPadding)) {\n xBarScale.nice();\n }\n\n return { xBarScale, yBarScale };\n }\n if (this._xAxisType === XAxisTypes.DateAxis) {\n const sDate = d3Min(this._dataset, (point: IVerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const lDate = d3Max(this._dataset, (point: IVerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const xBarScale = this.props.useUTC ? d3ScaleUtc() : d3ScaleTime();\n xBarScale\n .domain(this._isRtl ? [lDate, sDate] : [sDate, lDate])\n .range([this.margins.left! + this._domainMargin, containerWidth - this.margins.right! - this._domainMargin]);\n\n return { xBarScale, yBarScale };\n }\n const xBarScale = d3ScaleBand()\n .domain(this._xAxisLabels)\n .range(\n this._isRtl\n ? [containerWidth - this.margins.right! - this._domainMargin, this.margins.left! + this._domainMargin]\n : [this.margins.left! + this._domainMargin, containerWidth - this.margins.right! - this._domainMargin],\n )\n .paddingInner(this._xAxisInnerPadding)\n .paddingOuter(this._xAxisOuterPadding);\n\n return { xBarScale, yBarScale };\n };\n\n private _getGraphData = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale: any,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) => {\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth);\n return (this._bars = this._createBar(xBarScale, yBarScale, containerHeight, xElement!));\n };\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _getAxisData = (yAxisData: IAxisData) => {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n this._yMax = Math.max(domainValue[domainValue.length - 1], this.props.yMaxValue || this.Y_ORIGIN);\n this._yMin = Math.min(domainValue[0], this.props.yMinValue || this.Y_ORIGIN);\n }\n };\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _isLegendHighlighted = (legendTitle: string): boolean => {\n return this._getHighlightedLegend().includes(legendTitle);\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this._getHighlightedLegend().length === 0;\n };\n\n private _getAriaLabel = (\n singleChartData: IVerticalStackedChartProps,\n point?: IVSChartDataPoint | ILineDataInVerticalStackedBarChart,\n isLinePoint?: boolean,\n ): string => {\n if (!point) {\n /** if shouldFocusWholeStack is true */\n const xValue =\n singleChartData.xAxisCalloutData ||\n (singleChartData.xAxisPoint instanceof Date\n ? formatDate(singleChartData.xAxisPoint)\n : singleChartData.xAxisPoint);\n const pointValues = singleChartData.chartData\n .map(pt => {\n const legend = pt.legend;\n const yValue = pt.yAxisCalloutData || pt.data;\n return this._noLegendHighlighted() || this._isLegendHighlighted(legend) ? `${legend}, ${yValue}.` : '';\n })\n .filter(str => str !== '')\n .join(' ');\n const lineValues = singleChartData.lineData\n ?.map(ln => {\n const legend = ln.legend;\n const yValue = ln.yAxisCalloutData || ln.data || ln.y;\n return this._noLegendHighlighted() || this._isLegendHighlighted(legend) ? `${legend}, ${yValue}.` : '';\n })\n .filter(str => str !== '')\n .join(' ');\n return (\n singleChartData.stackCallOutAccessibilityData?.ariaLabel ||\n `${xValue}. ${pointValues}` + (lineValues ? ` ${lineValues}` : '')\n );\n }\n /** if shouldFocusWholeStack is false */\n const xValue =\n singleChartData.xAxisCalloutData ||\n (!isLinePoint && (point as IVSChartDataPoint).xAxisCalloutData) ||\n (singleChartData.xAxisPoint instanceof Date\n ? formatDate(singleChartData.xAxisPoint)\n : singleChartData.xAxisPoint);\n const legend = point.legend;\n const yValue =\n point.yAxisCalloutData ||\n (isLinePoint ? point.data || (point as ILineDataInVerticalStackedBarChart).y : point.data);\n return (\n (!isLinePoint && (point as IVSChartDataPoint).callOutAccessibilityData?.ariaLabel) ||\n `${xValue}. ${legend}, ${yValue}.`\n );\n };\n\n private _getDomainMargins = (containerWidth: number): IMargins => {\n this._domainMargin = MIN_DOMAIN_MARGIN;\n\n /** Total width available to render the bars */\n const totalWidth =\n containerWidth - (this.margins.left! + MIN_DOMAIN_MARGIN) - (this.margins.right! + MIN_DOMAIN_MARGIN);\n /** Rate at which the space between the bars changes wrt the bar width */\n const barGapRate = this._xAxisInnerPadding / (1 - this._xAxisInnerPadding);\n\n if (this._xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(this.props.xAxisOuterPadding, this.props.xAxisPadding)) {\n // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available\n // to adjust the space before the first bar and after the last bar.\n this._domainMargin = 0;\n } else if (this.props.barWidth !== 'auto') {\n // Update the bar width so that when CartesianChart rerenders,\n // the following calculations don't use the previous bar width.\n this._barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth);\n /** Total width required to render the bars. Directly proportional to bar width */\n const reqWidth = (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * barGapRate) * this._barWidth;\n\n if (totalWidth >= reqWidth) {\n // Center align the chart by setting equal left and right margins for domain\n this._domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;\n }\n } else if (this.props.mode === 'plotly' && this._xAxisLabels.length > 1) {\n // Calculate the remaining width after rendering bars at their maximum allowable width\n const bandwidth = totalWidth / (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * barGapRate);\n const barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth, bandwidth);\n let reqWidth = (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * barGapRate) * barWidth;\n const margin1 = (totalWidth - reqWidth) / 2;\n\n let margin2 = Number.POSITIVE_INFINITY;\n if (!this.props.hideTickOverlap) {\n // Calculate the remaining width after accounting for the space required to render x-axis labels\n const step = calculateLongestLabelWidth(this._xAxisLabels) + 20;\n reqWidth = (this._xAxisLabels.length - this._xAxisInnerPadding) * step;\n margin2 = (totalWidth - reqWidth) / 2;\n }\n\n this._domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));\n }\n } else {\n const data = (this.props.data?.map(point => point.xAxisPoint) as number[] | Date[] | undefined) || [];\n this._barWidth = getBarWidth(\n this.props.barWidth,\n this.props.maxBarWidth,\n calculateAppropriateBarWidth(data, totalWidth, this._xAxisInnerPadding),\n );\n this._domainMargin = MIN_DOMAIN_MARGIN + this._barWidth / 2;\n }\n\n return {\n ...this.margins,\n left: this.margins.left! + this._domainMargin,\n right: this.margins.right! + this._domainMargin,\n };\n };\n\n private _isChartEmpty(): boolean {\n return !(\n this.props.data &&\n this.props.data.length > 0 &&\n this.props.data.some(item => item.chartData.length > 0 || (item.lineData && item.lineData.length > 0))\n );\n }\n\n private _getChartTitle = (): string => {\n const { chartTitle, data } = this.props;\n const numLines = Object.keys(this._lineObject).length;\n return (\n (chartTitle ? `${chartTitle}. ` : '') +\n `Vertical bar chart with ${data?.length || 0} stacked bars` +\n (numLines > 0 ? ` and ${numLines} lines` : '') +\n '. '\n );\n };\n\n private _getMinMaxOfYAxis = (\n dataset: IDataPoint[],\n yAxisType?: YAxisType,\n useSecondaryYScale?: boolean,\n ): { startValue: number; endValue: number } => {\n if (!useSecondaryYScale) {\n return findVSBCNumericMinMaxOfY(dataset);\n }\n\n const values: number[] = [];\n this.props.data.forEach(xPoint => {\n xPoint.lineData?.forEach(point => {\n if (point.useSecondaryYScale) {\n values.push(point.y);\n }\n });\n });\n\n return { startValue: d3Min(values)!, endValue: d3Max(values)! };\n };\n}\n"]}
1
+ {"version":3,"file":"VerticalStackedBarChart.base.js","sourceRoot":"../src/","sources":["components/VerticalStackedBarChart/VerticalStackedBarChart.base.tsx"],"names":[],"mappings":";;;;IAoEA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAsE,CAAC;IAG/G,IAAM,cAAc,GAAG,4BAA4B,CAAC;IAEpD,+EAA+E;IAC/E,+EAA+E;IAC/E,+EAA+E;IAC/E,IAAM,gBAAgB,GAAG,GAAG,CAAC;IAC7B,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sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { Axis as D3Axis } from 'd3-axis';\nimport { select as d3Select } from 'd3-selection';\nimport {\n scaleLinear as d3ScaleLinear,\n ScaleLinear as D3ScaleLinear,\n scaleBand as d3ScaleBand,\n scaleUtc as d3ScaleUtc,\n scaleTime as d3ScaleTime,\n} from 'd3-scale';\nimport {\n classNamesFunction,\n getId,\n getRTL,\n warnDeprecations,\n memoizeFunction,\n initializeComponentRef,\n} from '@fluentui/react/lib/Utilities';\nimport { IPalette, IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { ILegend, ILegendContainer, Legends } from '../Legends/index';\nimport {\n IAccessibilityProps,\n CartesianChart,\n ChartHoverCard,\n IBasestate,\n IChildProps,\n IVerticalStackedBarDataPoint,\n IMargins,\n IVerticalStackedBarChartProps,\n IVerticalStackedBarChartStyleProps,\n IVerticalStackedBarChartStyles,\n IVerticalStackedChartProps,\n IVSChartDataPoint,\n ILineDataInVerticalStackedBarChart,\n IModifiedCartesianChartProps,\n IDataPoint,\n} from '../../index';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n getTypeOfAxis,\n tooltipOfAxislabels,\n formatValueLimitWidth,\n getBarWidth,\n getScalePadding,\n isScalePaddingDefined,\n calculateAppropriateBarWidth,\n findVSBCNumericMinMaxOfY,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfDateForAreaLineVerticalBarChart,\n domainRangeOfVSBCNumeric,\n domainRangeOfXStringAxis,\n createStringYAxis,\n formatDate,\n getNextGradient,\n areArraysEqual,\n calculateLongestLabelWidth,\n YAxisType,\n} from '../../utilities/index';\nimport { IChart, IImageExportOptions } from '../../types/index';\nimport { toImage } from '../../utilities/image-export-utils';\n\nconst getClassNames = classNamesFunction<IVerticalStackedBarChartStyleProps, IVerticalStackedBarChartStyles>();\ntype NumericAxis = D3Axis<number | { valueOf(): number }>;\ntype NumericScale = D3ScaleLinear<number, number>;\nconst COMPONENT_NAME = 'VERTICAL STACKED BAR CHART';\n\n// When displaying gaps between bars, the max height of the gap is given in the\n// props. The actual gap is calculated with this multiplier, with a minimum gap\n// of 1 pixel. (If these values are changed, update the comment for barGapMax.)\nconst barGapMultiplier = 0.2;\nconst barGapMin = 1;\n\nconst MIN_DOMAIN_MARGIN = 8;\n\ninterface IRefArrayData {\n refElement?: SVGGElement | null;\n}\n\ntype LinePoint = ILineDataInVerticalStackedBarChart & { index: number; xItem: IVerticalStackedChartProps };\ntype LineObject = { [key: string]: LinePoint[] };\ntype LineLegends = {\n title: string;\n color: string;\n};\n\ntype CalloutAnchorPointData = {\n xAxisDataPoint: string;\n chartDataPoint: IVSChartDataPoint;\n};\n\nexport interface IVerticalStackedBarChartState extends IBasestate {\n dataPointCalloutProps?: IVSChartDataPoint;\n stackCalloutProps?: IVerticalStackedChartProps;\n activeXAxisDataPoint: number | string | Date;\n callOutAccessibilityData?: IAccessibilityProps;\n calloutLegend: string;\n selectedLegends: string[];\n}\nexport class VerticalStackedBarChartBase\n extends React.Component<IVerticalStackedBarChartProps, IVerticalStackedBarChartState>\n implements IChart\n{\n public static defaultProps: Partial<IVerticalStackedBarChartProps> = {\n maxBarWidth: 24,\n useUTC: true,\n };\n\n private _points: IVerticalStackedChartProps[];\n private _dataset: IVerticalStackedBarDataPoint[];\n private _xAxisLabels: string[];\n private _bars: JSX.Element[];\n private _xAxisType: XAxisTypes;\n private _barWidth: number;\n private _calloutId: string;\n private _colors: string[];\n private margins: IMargins;\n private _isRtl: boolean = getRTL();\n private _createLegendsForLine: (data: IVerticalStackedChartProps[]) => LineLegends[];\n private _lineObject: LineObject;\n private _tooltipId: string;\n private _yMax: number;\n private _yMin: number;\n private _calloutAnchorPoint: CalloutAnchorPointData | null;\n private _domainMargin: number;\n private _classNames: IProcessedStyleSet<IVerticalStackedBarChartStyles>;\n private _emptyChartId: string;\n private _xAxisInnerPadding: number;\n private _xAxisOuterPadding: number;\n private _cartesianChartRef: React.RefObject<IChart>;\n private _legendsRef: React.RefObject<ILegendContainer>;\n private readonly Y_ORIGIN: number = 0;\n\n public constructor(props: IVerticalStackedBarChartProps) {\n super(props);\n\n initializeComponentRef(this);\n\n this.state = {\n isCalloutVisible: false,\n selectedLegends: props.legendProps?.selectedLegends || [],\n activeLegend: undefined,\n refSelected: null,\n dataForHoverCard: 0,\n color: '',\n hoverXValue: '',\n YValueHover: [],\n xCalloutValue: '',\n yCalloutValue: '',\n activeXAxisDataPoint: '',\n calloutLegend: '',\n };\n warnDeprecations(COMPONENT_NAME, props, {\n colors: 'IVSChartDataPoint.color',\n chartLabel: 'use your own title for chart',\n });\n this._handleMouseOut = this._handleMouseOut.bind(this);\n this._calloutId = getId('callout');\n this._tooltipId = getId('VSBCTooltipId_');\n if (!this._isChartEmpty()) {\n this._adjustProps();\n this._dataset = this._createDataSetLayer();\n }\n this._createLegendsForLine = memoizeFunction((data: IVerticalStackedChartProps[]) => this._getLineLegends(data));\n this._emptyChartId = getId('_VSBC_empty');\n this._domainMargin = MIN_DOMAIN_MARGIN;\n this._cartesianChartRef = React.createRef();\n this._legendsRef = React.createRef();\n }\n\n public componentDidUpdate(prevProps: IVerticalStackedBarChartProps): void {\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, this.props.legendProps?.selectedLegends)) {\n this.setState({\n selectedLegends: this.props.legendProps?.selectedLegends || [],\n });\n }\n\n if (\n prevProps.height !== this.props.height ||\n prevProps.width !== this.props.width ||\n prevProps.data !== this.props.data\n ) {\n this._adjustProps();\n this._dataset = this._createDataSetLayer();\n }\n }\n\n public render(): React.ReactNode {\n if (!this._isChartEmpty()) {\n this._adjustProps();\n const _isHavingLines = this.props.data.some(\n (item: IVerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = this._toFocusWholeStack(_isHavingLines);\n const { isCalloutForStack = false } = this.props;\n this._dataset = this._createDataSetLayer();\n const legendBars: JSX.Element = this._getLegendData(\n this._points,\n this.props.theme!.palette,\n this._createLegendsForLine(this.props.data),\n );\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n href: this.props.href!,\n });\n const calloutProps: IModifiedCartesianChartProps['calloutProps'] = {\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n id: `toolTip${this._calloutId}`,\n target: this.state.refSelected,\n isBeakVisible: false,\n gapSpace: 15,\n color: this.state.color,\n legend: this.state.calloutLegend,\n XValue: this.state.xCalloutValue!,\n YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard,\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n onDismiss: this._closeCallout,\n preventDismissOnLostFocus: true,\n ...this.props.calloutProps,\n ...getAccessibleDataObject(this.state.callOutAccessibilityData),\n };\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n\n return (\n <CartesianChart\n {...this.props}\n chartTitle={this._getChartTitle()}\n points={this._dataset}\n chartType={ChartTypes.VerticalStackedBarChart}\n xAxisType={this._xAxisType}\n calloutProps={calloutProps}\n createYAxis={createNumericYAxis}\n tickParams={tickParams}\n legendBars={legendBars}\n getMinMaxOfYAxis={this._getMinMaxOfYAxis}\n datasetForXAxisDomain={this._xAxisLabels}\n isCalloutForStack={shouldFocusWholeStack}\n getDomainNRangeValues={this._getDomainNRangeValues}\n createStringYAxis={createStringYAxis}\n barwidth={this._barWidth}\n focusZoneDirection={\n isCalloutForStack || _isHavingLines ? FocusZoneDirection.horizontal : FocusZoneDirection.vertical\n }\n getmargins={this._getMargins}\n getGraphData={this._getGraphData}\n getAxisData={this._getAxisData}\n customizedCallout={this._getCustomizedCallout()}\n onChartMouseLeave={this._handleChartMouseLeave}\n getDomainMargins={this._getDomainMargins}\n {...(this._xAxisType === XAxisTypes.StringAxis && {\n xAxisInnerPadding: this._xAxisInnerPadding,\n xAxisOuterPadding: this._xAxisOuterPadding,\n })}\n ref={this._cartesianChartRef}\n showRoundOffXTickValues={!isScalePaddingDefined(this.props.xAxisInnerPadding, this.props.xAxisPadding)}\n /* eslint-disable react/jsx-no-bind */\n children={(props: IChildProps) => {\n return (\n <>\n <g>{this._bars}</g>\n <g>\n {_isHavingLines &&\n this._createLines(\n props.xScale!,\n props.yScalePrimary!,\n props.containerHeight!,\n props.containerWidth!,\n props.yScaleSecondary,\n )}\n </g>\n </>\n );\n }}\n />\n );\n }\n return (\n <div\n id={this._emptyChartId}\n role={'alert'}\n style={{ opacity: '0' }}\n aria-label={'Graph has no data to display'}\n />\n );\n }\n\n public get chartContainer(): HTMLElement | null {\n return this._cartesianChartRef.current?.chartContainer || null;\n }\n\n public toImage = (opts?: IImageExportOptions): Promise<string> => {\n return toImage(this._cartesianChartRef.current?.chartContainer, this._legendsRef.current?.toSVG, this._isRtl, opts);\n };\n\n /**\n * This function tells us what to focus either the whole stack as focusable item.\n * or each individual item in the stack as focusable item. basically it depends\n * on the prop `isCalloutForStack` if it's false user can focus each individual bar\n * within the bar if it's true then user can focus whole bar as item.\n * but if we have lines in the chart then we force the user to focus only the whole\n * bar, even if isCalloutForStack is false\n */\n private _toFocusWholeStack = (_isHavingLines: boolean): boolean => {\n const { isCalloutForStack = false } = this.props;\n let shouldFocusStackOnly: boolean = false;\n if (_isHavingLines) {\n if (this._getHighlightedLegend().length === 1) {\n shouldFocusStackOnly = false;\n } else {\n shouldFocusStackOnly = true;\n }\n } else {\n shouldFocusStackOnly = isCalloutForStack;\n }\n return shouldFocusStackOnly;\n };\n\n private _getDomainNRangeValues = (\n points: IDataPoint[],\n margins: IMargins,\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 = domainRangeOfVSBCNumeric(points, margins, width, isRTL, barWidth!);\n } else if (xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = domainRangeOfDateForAreaLineVerticalBarChart(\n points,\n margins,\n width,\n isRTL,\n tickValues! as Date[],\n chartType,\n barWidth,\n );\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);\n }\n return domainNRangeValue;\n };\n\n private _getFormattedLineData = (data: IVerticalStackedChartProps[]): LineObject => {\n const linesData: LinePoint[] = [];\n const formattedLineData: LineObject = {};\n data.forEach((item: IVerticalStackedChartProps, index: number) => {\n if (item.lineData) {\n // injecting corresponding x data point in each of the line data\n // we inject index also , it will be helpful to draw lines when x axis is\n // of string type\n item.lineData.forEach(line => {\n linesData.push({\n ...line,\n index,\n xItem: item,\n });\n });\n }\n });\n linesData.forEach(item => {\n if (formattedLineData[item.legend]) {\n formattedLineData[item.legend].push(item);\n } else {\n formattedLineData[item.legend] = [item];\n }\n });\n return formattedLineData;\n };\n\n private _getLineLegends = (data: IVerticalStackedChartProps[]): LineLegends[] => {\n const lineObject: LineObject = this._lineObject;\n const lineLegends: LineLegends[] = [];\n Object.keys(lineObject).forEach((item: string) => {\n lineLegends.push({\n title: item,\n color: lineObject[item][0].color,\n });\n });\n return lineLegends;\n };\n\n private _createLines = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale: any,\n yScalePrimary: NumericScale,\n containerHeight: number,\n containerWidth: number,\n yScaleSecondary?: NumericScale,\n ): JSX.Element => {\n const lineObject: LineObject = this._getFormattedLineData(this.props.data);\n const lines: React.ReactNode[] = [];\n const borderForLines: React.ReactNode[] = [];\n const dots: React.ReactNode[] = [];\n const { theme } = this.props;\n const lineBorderWidth = this.props.lineOptions?.lineBorderWidth\n ? Number.parseFloat(this.props.lineOptions!.lineBorderWidth!.toString())\n : 0;\n\n const xScaleBandwidthTranslate = this._xAxisType !== XAxisTypes.StringAxis ? 0 : xScale.bandwidth() / 2;\n Object.keys(lineObject).forEach((item: string, index: number) => {\n const shouldHighlight = this._isLegendHighlighted(item) || this._noLegendHighlighted(); // item is legend name\n for (let i = 1; i < lineObject[item].length; i++) {\n const x1 = xScale(lineObject[item][i - 1].xItem.xAxisPoint);\n const useSecondaryYScale =\n lineObject[item][i - 1].useSecondaryYScale && lineObject[item][i].useSecondaryYScale && yScaleSecondary;\n const y1 = useSecondaryYScale\n ? yScaleSecondary!(lineObject[item][i - 1].y)\n : yScalePrimary(lineObject[item][i - 1].y);\n const x2 = xScale(lineObject[item][i].xItem.xAxisPoint);\n const y2 = useSecondaryYScale ? yScaleSecondary!(lineObject[item][i].y) : yScalePrimary(lineObject[item][i].y);\n\n if (lineBorderWidth > 0) {\n borderForLines.push(\n <line\n key={`${index}-${i}-BorderLine`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={3 + lineBorderWidth * 2}\n fill=\"transparent\"\n strokeLinecap=\"round\"\n stroke={theme!.semanticColors.bodyBackground}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />,\n );\n }\n lines.push(\n <line\n key={`${index}-${i}-line`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={lineObject[item][0].lineOptions?.strokeWidth ?? 3}\n strokeLinecap={lineObject[item][0].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={lineObject[item][0].lineOptions?.strokeDasharray}\n stroke={lineObject[item][i].color}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n onMouseOver={this._lineHover.bind(this, lineObject[item][i - 1])}\n onMouseLeave={this._handleMouseOut}\n />,\n );\n }\n });\n Object.keys(lineObject).forEach((item: string, index: number) => {\n lineObject[item].forEach((circlePoint: LinePoint, subIndex: number) => {\n // Create an object to store line point ref so that the object can be passed by reference to the focus handler\n const circleRef: { refElement: SVGCircleElement | null } = { refElement: null };\n const noBarsActive =\n circlePoint.xItem.chartData.filter(\n dataPoint => this._noLegendHighlighted() || this._isLegendHighlighted(dataPoint.legend),\n ).length === 0;\n dots.push(\n <circle\n key={`${index}-${subIndex}-dot`}\n cx={xScale(circlePoint.xItem.xAxisPoint)}\n cy={\n circlePoint.useSecondaryYScale && yScaleSecondary\n ? yScaleSecondary(circlePoint.y)\n : yScalePrimary(circlePoint.y)\n }\n onMouseOver={this._lineHover.bind(this, circlePoint)}\n onMouseLeave={this._handleMouseOut}\n r={this._getCircleOpacityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).radius}\n stroke={circlePoint.color}\n fill={this.props.theme!.semanticColors.bodyBackground}\n strokeWidth={3}\n // Elements with visibility: hidden cannot receive focus, so use opacity: 0 instead to hide them.\n // For more information, see https://fuzzbomb.github.io/accessibility-demos/visually-hidden-focus-test.html\n opacity={this._getCircleOpacityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).opacity}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n ref={e => (circleRef.refElement = e)}\n {...(noBarsActive && (this._noLegendHighlighted() || this._isLegendHighlighted(item))\n ? {\n 'data-is-focusable': !this.props.hideTooltip,\n onFocus: this._lineFocus.bind(this, circlePoint, circleRef),\n onBlur: this._handleMouseOut,\n role: 'img',\n 'aria-label': this._getAriaLabel(circlePoint.xItem, circlePoint, true),\n }\n : {})}\n />,\n );\n });\n });\n return (\n <>\n {borderForLines}\n {lines}\n {dots}\n </>\n );\n };\n\n private _getCircleOpacityAndRadius = (\n xAxisPoint: string | number | Date,\n legend: string,\n ): { opacity: number; radius: number } => {\n const { activeXAxisDataPoint } = this.state;\n if (!this._noLegendHighlighted()) {\n if (xAxisPoint === activeXAxisDataPoint && this._isLegendHighlighted(legend)) {\n return { opacity: 1, radius: 8 };\n } else if (this._isLegendHighlighted(legend)) {\n return { opacity: 1, radius: 0.3 };\n } else {\n return { opacity: 0, radius: 0 };\n }\n } else {\n return {\n opacity: activeXAxisDataPoint === xAxisPoint ? 1 : 0,\n radius: 8,\n };\n }\n };\n\n private _adjustProps(): void {\n this._points = this.props.data || [];\n this._barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth);\n const { theme } = this.props;\n const { palette } = theme!;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._colors = this.props.colors || [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n this._xAxisType = getTypeOfAxis(this.props.data[0].xAxisPoint, true) as XAxisTypes;\n this._lineObject = this._getFormattedLineData(this.props.data);\n this._xAxisInnerPadding = getScalePadding(\n this.props.xAxisInnerPadding,\n this.props.xAxisPadding,\n this._xAxisType === XAxisTypes.StringAxis ? 2 / 3 : 1 / 2,\n );\n this._xAxisOuterPadding = getScalePadding(this.props.xAxisOuterPadding, this.props.xAxisPadding, 0);\n }\n\n private _createDataSetLayer(): IVerticalStackedBarDataPoint[] {\n const tempArr: string[] = [];\n const dataset: IVerticalStackedBarDataPoint[] = this._points.map(singlePointData => {\n let total: number = 0;\n singlePointData.chartData!.forEach((point: IVSChartDataPoint) => {\n total = total + point.data;\n });\n tempArr.push(singlePointData.xAxisPoint as string);\n return {\n x: singlePointData.xAxisPoint,\n y: total,\n };\n });\n this._xAxisLabels = tempArr;\n return dataset;\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _renderCallout(props?: IVSChartDataPoint): JSX.Element | null {\n return props ? (\n <ChartHoverCard\n XValue={props.xAxisCalloutData}\n Legend={props.legend}\n YValue={props.yAxisCalloutData}\n color={props.color}\n culture={this.props.culture}\n />\n ) : null;\n }\n\n private _getCustomizedCallout = () => {\n const _isHavingLines = this.props.data.some(\n (item: IVerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n return this.props.onRenderCalloutPerStack\n ? this.props.onRenderCalloutPerStack(this.state.stackCalloutProps)\n : this.props.onRenderCalloutPerDataPoint && !_isHavingLines\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps, this._renderCallout)\n : null;\n };\n\n private _onLegendHover(legendTitle: string): void {\n this.setState({\n activeLegend: legendTitle,\n });\n }\n\n private _onLegendLeave(): void {\n this.setState({\n activeLegend: undefined,\n });\n }\n\n private _getLegendData(\n data: IVerticalStackedChartProps[],\n palette: IPalette,\n lineLegends: LineLegends[],\n ): JSX.Element {\n if (this.props.hideLegend) {\n return <></>;\n }\n const defaultPalette: string[] = [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n const actions: ILegend[] = [];\n const { allowHoverOnLegend = true, theme } = this.props;\n\n data.forEach((singleChartData: IVerticalStackedChartProps) => {\n singleChartData.chartData.forEach((point: IVSChartDataPoint) => {\n let color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n if (this.props.enableGradient) {\n const pointIndex = Math.max(\n singleChartData.chartData?.findIndex(item => item.legend === point.legend) || 0,\n 0,\n );\n color = point.gradient?.[0] || getNextGradient(pointIndex, 0, theme?.isInverted)[0];\n }\n\n const checkSimilarLegends = actions.filter((leg: ILegend) => leg.title === point.legend && leg.color === color);\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n\n const legend: ILegend = {\n title: point.legend,\n color,\n hoverAction: allowHoverOnLegend\n ? () => {\n this._handleChartMouseLeave();\n this._onLegendHover(point.legend);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => this._onLegendLeave() : undefined,\n };\n\n actions.push(legend);\n });\n });\n const legendsOfLine: ILegend[] = [];\n if (lineLegends && lineLegends.length > 0) {\n lineLegends.forEach((point: LineLegends) => {\n const legend: ILegend = {\n title: point.title,\n color: point.color,\n isLineLegendInBarChart: true,\n hoverAction: allowHoverOnLegend\n ? () => {\n this._handleChartMouseLeave();\n this._onLegendHover(point.title);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => this._onLegendLeave() : undefined,\n };\n legendsOfLine.push(legend);\n });\n }\n const totalLegends: ILegend[] = legendsOfLine.concat(actions);\n return (\n <Legends\n legends={totalLegends}\n overflowProps={this.props.legendsOverflowProps}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n onChange={this._onLegendSelectionChange.bind(this)}\n ref={this._legendsRef}\n />\n );\n }\n\n private _onLegendSelectionChange(\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: ILegend,\n ): void {\n if (this.props.legendProps?.canSelectMultipleLegends) {\n this.setState({ selectedLegends });\n } else {\n this.setState({ selectedLegends: selectedLegends.slice(-1) });\n }\n if (this.props.legendProps?.onChange) {\n this.props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n }\n\n private _getHighlightedLegend() {\n return this.state.selectedLegends.length > 0\n ? this.state.selectedLegends\n : this.state.activeLegend\n ? [this.state.activeLegend]\n : [];\n }\n\n private _onRectHover(\n xAxisPoint: string,\n point: IVSChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n this._onRectFocusHover(xAxisPoint, point, color, mouseEvent);\n }\n\n private _onRectFocusHover(\n xAxisPoint: string,\n point: IVSChartDataPoint,\n color: string,\n refSelected: React.MouseEvent<SVGElement> | SVGGElement,\n ): void {\n if (this._calloutAnchorPoint?.chartDataPoint !== point || this._calloutAnchorPoint?.xAxisDataPoint !== xAxisPoint) {\n this._calloutAnchorPoint = {\n chartDataPoint: point,\n xAxisDataPoint: xAxisPoint,\n };\n this.setState({\n refSelected,\n /**\n * Show the callout if highlighted bar is focused/hovered\n * and Hide it if unhighlighted bar is focused/hovered\n */\n isCalloutVisible: this._noLegendHighlighted() || this._isLegendHighlighted(point.legend),\n calloutLegend: point.legend,\n dataForHoverCard: point.data,\n color,\n xCalloutValue: point.xAxisCalloutData ? point.xAxisCalloutData : xAxisPoint,\n yCalloutValue: point.yAxisCalloutData,\n dataPointCalloutProps: point,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n }\n\n private _lineHover = (lineData: LinePoint, mouseEvent: React.MouseEvent<SVGElement>) => {\n mouseEvent.persist();\n this._lineHoverFocus(lineData, mouseEvent);\n };\n\n private _lineFocus = (lineData: LinePoint, ref: { refElement: SVGCircleElement | null }) => {\n if (ref.refElement) {\n this._lineHoverFocus(lineData, ref.refElement);\n }\n };\n\n private _lineHoverFocus = (lineData: LinePoint, refSelected: React.MouseEvent<SVGElement> | SVGCircleElement) => {\n if (this._getHighlightedLegend().length === 1) {\n if (this._noLegendHighlighted() || this._isLegendHighlighted(lineData.legend)) {\n this.setState({\n refSelected,\n isCalloutVisible: true,\n xCalloutValue: `${lineData.xItem.xAxisPoint}`,\n yCalloutValue: `${lineData.yAxisCalloutData || lineData.data || lineData.y}`,\n activeXAxisDataPoint: lineData.xItem.xAxisPoint,\n color: lineData.color,\n });\n }\n } else {\n this._onStackHoverFocus(lineData.xItem, refSelected);\n }\n };\n\n private _onStackHover(stack: IVerticalStackedChartProps, mouseEvent: React.MouseEvent<SVGElement>): void {\n mouseEvent.persist();\n this._onStackHoverFocus(stack, mouseEvent);\n }\n\n private _onStackHoverFocus(\n stack: IVerticalStackedChartProps,\n refSelected: React.MouseEvent<SVGElement> | SVGGElement,\n ): void {\n if (!this._noLegendHighlighted()) {\n stack = {\n ...stack,\n chartData: stack.chartData.filter(dataPoint => this._isLegendHighlighted(dataPoint.legend)),\n lineData: stack.lineData?.filter(dataPoint => this._isLegendHighlighted(dataPoint.legend)),\n };\n }\n const lineData = stack.lineData;\n const isLinesPresent: boolean = lineData !== undefined && lineData.length > 0;\n if (isLinesPresent) {\n lineData!.forEach((item: ILineDataInVerticalStackedBarChart & { shouldDrawBorderBottom?: boolean }) => {\n item.data = item.data || item.y;\n item.shouldDrawBorderBottom = true;\n });\n }\n\n this.setState({\n refSelected,\n isCalloutVisible: stack.chartData.length > 0 || (stack.lineData?.length ?? 0) > 0,\n YValueHover: isLinesPresent\n ? [...lineData!.sort((a, b) => (a.data! < b.data! ? 1 : -1)), ...stack.chartData.slice().reverse()]\n : stack.chartData.slice().reverse(),\n hoverXValue:\n stack.xAxisPoint instanceof Date ? formatDate(stack.xAxisPoint, this.props.useUTC) : stack.xAxisPoint,\n stackCalloutProps: stack,\n activeXAxisDataPoint: stack.xAxisPoint,\n callOutAccessibilityData: stack.stackCallOutAccessibilityData,\n });\n }\n\n private _onRectFocus(point: IVSChartDataPoint, xAxisPoint: string, color: string, ref: IRefArrayData): void {\n if (ref.refElement) {\n this._onRectFocusHover(xAxisPoint, point, color, ref.refElement);\n }\n }\n\n private _onStackFocus(stack: IVerticalStackedChartProps, groupRef: IRefArrayData): void {\n if (groupRef.refElement) {\n this._onStackHoverFocus(stack, groupRef.refElement);\n }\n }\n\n private _handleMouseOut = (): void => {\n /**/\n };\n\n private _handleChartMouseLeave = (): void => {\n this._calloutAnchorPoint = null;\n this.setState({\n isCalloutVisible: false,\n activeXAxisDataPoint: '',\n });\n };\n\n private _onClick(\n data: IVerticalStackedChartProps | IVSChartDataPoint,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n this.props.onBarClick?.(mouseEvent, data);\n this.props.href ? (window.location.href = this.props.href) : '';\n }\n\n private _getBarGapAndScale(\n bars: IVSChartDataPoint[],\n yBarScale: NumericScale,\n defaultTotalHeight?: number,\n ): {\n readonly gapHeight: number;\n readonly heightValueScale: number;\n readonly adjustedTotalHeight: number;\n } {\n const { barGapMax = 0 } = this.props;\n\n // When displaying gaps between the bars, the height of each bar is\n // adjusted so that the total of all bars is not changed by the gaps\n const totalData = bars.reduce((iter, value) => iter + Math.abs(value.data), 0);\n const totalHeight = defaultTotalHeight ?? Math.abs(yBarScale(totalData) - yBarScale(this.Y_ORIGIN));\n let sumOfPercent = 0;\n bars.forEach(point => {\n let value = (Math.abs(point.data) / totalData) * 100;\n if (value < 1 && value !== 0) {\n value = 1;\n }\n sumOfPercent += value;\n });\n const scalingRatio = sumOfPercent !== 0 ? sumOfPercent / 100 : 1;\n const gaps = barGapMax && bars.length - 1;\n const gapHeight = gaps && Math.max(barGapMin, Math.min(barGapMax, (totalHeight * barGapMultiplier) / gaps));\n const heightValueScale = (totalHeight - gapHeight * gaps) / (totalData * scalingRatio);\n return {\n gapHeight,\n heightValueScale,\n adjustedTotalHeight: sumOfPercent,\n } as const;\n }\n\n private _createBar = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xBarScale: any,\n yBarScale: NumericScale,\n containerHeight: number,\n xElement: SVGElement,\n ): JSX.Element[] => {\n const { barCornerRadius = 0, barMinimumHeight = 0 } = this.props;\n const _isHavingLines = this.props.data.some(\n (item: IVerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = this._toFocusWholeStack(_isHavingLines);\n\n if (this._xAxisType === XAxisTypes.StringAxis) {\n // Setting the bar width here is safe because there are no dependencies earlier in the code\n // that rely on the width of bars in vertical bar charts with string x-axis.\n this._barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth, xBarScale.bandwidth());\n }\n\n const bars = this._points.map((singleChartData: IVerticalStackedChartProps, indexNumber: number) => {\n const xPoint = xBarScale(\n this._xAxisType === XAxisTypes.NumericAxis\n ? (singleChartData.xAxisPoint as number)\n : this._xAxisType === XAxisTypes.DateAxis\n ? (singleChartData.xAxisPoint as Date)\n : (singleChartData.xAxisPoint as string),\n );\n const xScaleBandwidthTranslate =\n this._xAxisType !== XAxisTypes.StringAxis ? -this._barWidth / 2 : (xBarScale.bandwidth() - this._barWidth) / 2;\n\n let barTotalValue = 0;\n\n // Removing datapoints with zero data\n const barsToDisplay = singleChartData.chartData.filter(point => point.data !== 0);\n\n if (!barsToDisplay.length) {\n return undefined;\n }\n\n const { gapHeight, heightValueScale, adjustedTotalHeight } = this._getBarGapAndScale(barsToDisplay, yBarScale);\n\n if (heightValueScale < 0) {\n return undefined;\n }\n const yBaseline = containerHeight - this.margins.bottom! - yBarScale(this.Y_ORIGIN);\n let yPositiveStart = yBaseline;\n let yNegativeStart = yBaseline;\n let yPoint = 0;\n let heightOfLastBar = 0;\n\n const singleBar = barsToDisplay.map((point: IVSChartDataPoint, index: number) => {\n let startColor = point.color ? point.color : this._colors[index];\n let endColor = startColor;\n\n if (this.props.enableGradient) {\n startColor = point.gradient?.[0] || getNextGradient(index, 0, this.props.theme?.isInverted)[0];\n endColor = point.gradient?.[1] || getNextGradient(index, 0, this.props.theme?.isInverted)[1];\n singleChartData.chartData[index].color = startColor;\n }\n\n const ref: IRefArrayData = {};\n\n const shouldHighlight = this._isLegendHighlighted(point.legend) || this._noLegendHighlighted() ? true : false;\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n shouldHighlight,\n href: this.props.href,\n });\n const rectFocusProps = !shouldFocusWholeStack &&\n shouldHighlight && {\n 'data-is-focusable': !this.props.hideTooltip,\n 'aria-label': this._getAriaLabel(singleChartData, point),\n onMouseOver: this._onRectHover.bind(this, singleChartData.xAxisPoint, point, startColor),\n onMouseMove: this._onRectHover.bind(this, singleChartData.xAxisPoint, point, startColor),\n onMouseLeave: this._handleMouseOut,\n onFocus: this._onRectFocus.bind(this, point, singleChartData.xAxisPoint, startColor, ref),\n onBlur: this._handleMouseOut,\n onClick: this._onClick.bind(this, point),\n role: 'img',\n };\n\n let barHeight = Math.abs(heightValueScale * point.data);\n const minHeight = Math.max((heightValueScale * adjustedTotalHeight) / 100.0, barMinimumHeight);\n if (barHeight < minHeight) {\n barHeight = minHeight;\n }\n const gapOffset = index ? gapHeight : 0;\n if (point.data >= this.Y_ORIGIN) {\n yPositiveStart -= barHeight + gapOffset;\n yPoint = yPositiveStart;\n } else {\n yPoint = yNegativeStart + gapOffset;\n yNegativeStart = yPoint + barHeight;\n }\n\n barTotalValue += point.data;\n heightOfLastBar = index === barsToDisplay.length - 1 ? barHeight : 0;\n\n const gradientId = getId('VSBC_Gradient') + `_${indexNumber}_${index}`;\n\n // If set, apply the corner radius to the top of the final bar\n if (barCornerRadius && barHeight > barCornerRadius && index === barsToDisplay.length - 1) {\n return (\n <React.Fragment key={index + indexNumber + `${shouldFocusWholeStack}`}>\n {this.props.enableGradient && (\n <defs>\n <linearGradient id={gradientId} x1=\"0%\" y1=\"100%\" x2=\"0%\" y2=\"0%\">\n <stop offset=\"0\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>\n </defs>\n )}\n <path\n className={this._classNames.opacityChangeOnHover}\n d={`\n M ${xPoint} ${yPoint + barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${-barCornerRadius}\n h ${this._barWidth - 2 * barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${barCornerRadius}\n v ${barHeight - barCornerRadius}\n h ${-this._barWidth}\n z\n `}\n fill={this.props.enableGradient ? `url(#${gradientId})` : startColor}\n rx={this.props.roundCorners ? 3 : 0}\n ref={e => (ref.refElement = e)}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n {...rectFocusProps}\n />\n </React.Fragment>\n );\n }\n if (barHeight < 0) {\n return <React.Fragment key={index + indexNumber}> </React.Fragment>;\n }\n return (\n <React.Fragment key={index + indexNumber}>\n {this.props.enableGradient && (\n <defs>\n <linearGradient id={gradientId} x1=\"0%\" y1=\"100%\" x2=\"0%\" y2=\"0%\">\n <stop offset=\"0\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>\n </defs>\n )}\n <rect\n className={this._classNames.opacityChangeOnHover}\n x={xPoint}\n y={yPoint}\n width={this._barWidth}\n height={barHeight}\n fill={this.props.enableGradient ? `url(#${gradientId})` : startColor}\n rx={this.props.roundCorners ? 3 : 0}\n ref={e => (ref.refElement = e)}\n {...rectFocusProps}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />\n </React.Fragment>\n );\n });\n const groupRef: IRefArrayData = {};\n const someBarsActive =\n singleChartData.chartData.filter(\n dataPoint => this._noLegendHighlighted() || this._isLegendHighlighted(dataPoint.legend),\n ).length > 0;\n // FIXME: Making the entire stack focusable when stack callout is enabled adds unnecessary complexity\n // and can reduce usability in certain scenarios. Instead, each individual element within the stack\n // should be focusable on its own, with its own aria-label. This behavior is also seen in Highcharts.\n const stackFocusProps = shouldFocusWholeStack &&\n someBarsActive && {\n 'data-is-focusable': !this.props.hideTooltip,\n 'aria-label': this._getAriaLabel(singleChartData),\n onMouseOver: this._onStackHover.bind(this, singleChartData),\n onMouseMove: this._onStackHover.bind(this, singleChartData),\n onMouseLeave: this._handleMouseOut,\n onFocus: this._onStackFocus.bind(this, singleChartData, groupRef),\n onBlur: this._handleMouseOut,\n onClick: this._onClick.bind(this, singleChartData),\n role: 'img',\n };\n let showLabel = false;\n let barLabel = 0;\n if (!this.props.hideLabels) {\n if (this._noLegendHighlighted()) {\n showLabel = true;\n barLabel = barTotalValue;\n } else {\n barsToDisplay.forEach(point => {\n if (this._isLegendHighlighted(point.legend)) {\n showLabel = true;\n barLabel += point.data;\n }\n });\n }\n }\n return (\n <g key={indexNumber + `${shouldFocusWholeStack}`}>\n <g id={`${indexNumber}-singleBar`} ref={e => (groupRef.refElement = e)} {...stackFocusProps}>\n {singleBar}\n </g>\n {!this.props.hideLabels && this._barWidth >= 16 && showLabel && (\n <text\n x={xPoint + this._barWidth / 2}\n //if total bar value >=0, show label above top bar, otherwise below bottom bar\n y={barLabel >= this.Y_ORIGIN ? yPoint - 6 : yPoint + heightOfLastBar + 12}\n textAnchor=\"middle\"\n className={this._classNames.barLabel}\n aria-label={`Total: ${barLabel}`}\n role=\"img\"\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n >\n {formatValueLimitWidth(barLabel)}\n </text>\n )}\n </g>\n );\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!this.props.showXAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return bars.filter((bar): bar is JSX.Element => !!bar);\n };\n\n private _getScales = (containerHeight: number, containerWidth: number) => {\n const yDomain = [Math.min(this.Y_ORIGIN, this._yMin), Math.max(this.Y_ORIGIN, this._yMax)];\n const yBarScale = d3ScaleLinear()\n .domain(yDomain)\n .range([0, containerHeight - this.margins.bottom! - this.margins.top!]);\n if (this._xAxisType === XAxisTypes.NumericAxis) {\n const xMax = d3Max(this._dataset, (point: IVerticalStackedBarDataPoint) => point.x as number)!;\n const xMin = d3Min(this._dataset, (point: IVerticalStackedBarDataPoint) => point.x as number)!;\n\n const xBarScale = d3ScaleLinear()\n .domain(this._isRtl ? [xMax, xMin] : [xMin, xMax])\n .range([this.margins.left! + this._domainMargin, containerWidth - this.margins.right! - this._domainMargin]);\n if (!isScalePaddingDefined(this.props.xAxisInnerPadding, this.props.xAxisPadding)) {\n xBarScale.nice();\n }\n\n return { xBarScale, yBarScale };\n }\n if (this._xAxisType === XAxisTypes.DateAxis) {\n const sDate = d3Min(this._dataset, (point: IVerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const lDate = d3Max(this._dataset, (point: IVerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const xBarScale = this.props.useUTC ? d3ScaleUtc() : d3ScaleTime();\n xBarScale\n .domain(this._isRtl ? [lDate, sDate] : [sDate, lDate])\n .range([this.margins.left! + this._domainMargin, containerWidth - this.margins.right! - this._domainMargin]);\n\n return { xBarScale, yBarScale };\n }\n const xBarScale = d3ScaleBand()\n .domain(this._xAxisLabels)\n .range(\n this._isRtl\n ? [containerWidth - this.margins.right! - this._domainMargin, this.margins.left! + this._domainMargin]\n : [this.margins.left! + this._domainMargin, containerWidth - this.margins.right! - this._domainMargin],\n )\n .paddingInner(this._xAxisInnerPadding)\n .paddingOuter(this._xAxisOuterPadding);\n\n return { xBarScale, yBarScale };\n };\n\n private _getGraphData = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale: any,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) => {\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth);\n return (this._bars = this._createBar(xBarScale, yBarScale, containerHeight, xElement!));\n };\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _getAxisData = (yAxisData: IAxisData) => {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n this._yMax = Math.max(domainValue[domainValue.length - 1], this.props.yMaxValue || this.Y_ORIGIN);\n this._yMin = Math.min(domainValue[0], this.props.yMinValue || this.Y_ORIGIN);\n }\n };\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _isLegendHighlighted = (legendTitle: string): boolean => {\n return this._getHighlightedLegend().includes(legendTitle);\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this._getHighlightedLegend().length === 0;\n };\n\n private _getAriaLabel = (\n singleChartData: IVerticalStackedChartProps,\n point?: IVSChartDataPoint | ILineDataInVerticalStackedBarChart,\n isLinePoint?: boolean,\n ): string => {\n if (!point) {\n /** if shouldFocusWholeStack is true */\n const xValue =\n singleChartData.xAxisCalloutData ||\n (singleChartData.xAxisPoint instanceof Date\n ? formatDate(singleChartData.xAxisPoint)\n : singleChartData.xAxisPoint);\n const pointValues = singleChartData.chartData\n .map(pt => {\n const legend = pt.legend;\n const yValue = pt.yAxisCalloutData || pt.data;\n return this._noLegendHighlighted() || this._isLegendHighlighted(legend) ? `${legend}, ${yValue}.` : '';\n })\n .filter(str => str !== '')\n .join(' ');\n const lineValues = singleChartData.lineData\n ?.map(ln => {\n const legend = ln.legend;\n const yValue = ln.yAxisCalloutData || ln.data || ln.y;\n return this._noLegendHighlighted() || this._isLegendHighlighted(legend) ? `${legend}, ${yValue}.` : '';\n })\n .filter(str => str !== '')\n .join(' ');\n return (\n singleChartData.stackCallOutAccessibilityData?.ariaLabel ||\n `${xValue}. ${pointValues}` + (lineValues ? ` ${lineValues}` : '')\n );\n }\n /** if shouldFocusWholeStack is false */\n const xValue =\n singleChartData.xAxisCalloutData ||\n (!isLinePoint && (point as IVSChartDataPoint).xAxisCalloutData) ||\n (singleChartData.xAxisPoint instanceof Date\n ? formatDate(singleChartData.xAxisPoint)\n : singleChartData.xAxisPoint);\n const legend = point.legend;\n const yValue =\n point.yAxisCalloutData ||\n (isLinePoint ? point.data || (point as ILineDataInVerticalStackedBarChart).y : point.data);\n return (\n (!isLinePoint && (point as IVSChartDataPoint).callOutAccessibilityData?.ariaLabel) ||\n `${xValue}. ${legend}, ${yValue}.`\n );\n };\n\n private _getDomainMargins = (containerWidth: number): IMargins => {\n this._domainMargin = MIN_DOMAIN_MARGIN;\n\n /** Total width available to render the bars */\n const totalWidth =\n containerWidth - (this.margins.left! + MIN_DOMAIN_MARGIN) - (this.margins.right! + MIN_DOMAIN_MARGIN);\n /** Rate at which the space between the bars changes wrt the bar width */\n const barGapRate = this._xAxisInnerPadding / (1 - this._xAxisInnerPadding);\n\n if (this._xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(this.props.xAxisOuterPadding, this.props.xAxisPadding)) {\n // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available\n // to adjust the space before the first bar and after the last bar.\n this._domainMargin = 0;\n } else if (this.props.barWidth !== 'auto') {\n // Update the bar width so that when CartesianChart rerenders,\n // the following calculations don't use the previous bar width.\n this._barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth);\n /** Total width required to render the bars. Directly proportional to bar width */\n const reqWidth = (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * barGapRate) * this._barWidth;\n\n if (totalWidth >= reqWidth) {\n // Center align the chart by setting equal left and right margins for domain\n this._domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;\n }\n } else if (this.props.mode === 'plotly' && this._xAxisLabels.length > 1) {\n // Calculate the remaining width after rendering bars at their maximum allowable width\n const bandwidth = totalWidth / (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * barGapRate);\n const barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth, bandwidth);\n let reqWidth = (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * barGapRate) * barWidth;\n const margin1 = (totalWidth - reqWidth) / 2;\n\n let margin2 = Number.POSITIVE_INFINITY;\n if (!this.props.hideTickOverlap) {\n // Calculate the remaining width after accounting for the space required to render x-axis labels\n const step = calculateLongestLabelWidth(this._xAxisLabels) + 20;\n reqWidth = (this._xAxisLabels.length - this._xAxisInnerPadding) * step;\n margin2 = (totalWidth - reqWidth) / 2;\n }\n\n this._domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));\n }\n } else {\n const data = (this.props.data?.map(point => point.xAxisPoint) as number[] | Date[] | undefined) || [];\n this._barWidth = getBarWidth(\n this.props.barWidth,\n this.props.maxBarWidth,\n calculateAppropriateBarWidth(data, totalWidth, this._xAxisInnerPadding),\n );\n this._domainMargin = MIN_DOMAIN_MARGIN + this._barWidth / 2;\n }\n\n return {\n ...this.margins,\n left: this.margins.left! + this._domainMargin,\n right: this.margins.right! + this._domainMargin,\n };\n };\n\n private _isChartEmpty(): boolean {\n return !(\n this.props.data &&\n this.props.data.length > 0 &&\n this.props.data.some(item => item.chartData.length > 0 || (item.lineData && item.lineData.length > 0))\n );\n }\n\n private _getChartTitle = (): string => {\n const { chartTitle, data } = this.props;\n const numLines = Object.keys(this._lineObject).length;\n return (\n (chartTitle ? `${chartTitle}. ` : '') +\n `Vertical bar chart with ${data?.length || 0} stacked bars` +\n (numLines > 0 ? ` and ${numLines} lines` : '') +\n '. '\n );\n };\n\n private _getMinMaxOfYAxis = (\n dataset: IDataPoint[],\n yAxisType?: YAxisType,\n useSecondaryYScale?: boolean,\n ): { startValue: number; endValue: number } => {\n if (!useSecondaryYScale) {\n return findVSBCNumericMinMaxOfY(dataset);\n }\n\n const values: number[] = [];\n this.props.data.forEach(xPoint => {\n xPoint.lineData?.forEach(point => {\n if (point.useSecondaryYScale) {\n values.push(point.y);\n }\n });\n });\n\n return { startValue: d3Min(values)!, endValue: d3Max(values)! };\n };\n}\n"]}
@@ -1,4 +1,4 @@
1
- define(["require", "exports", "tslib", "react", "@fluentui/react/lib/Tooltip", "../Utilities", "@fluentui/react"], function (require, exports, tslib_1, React, Tooltip_1, Utilities_1, react_1) {
1
+ define(["require", "exports", "tslib", "react", "@fluentui/react/lib/Tooltip", "../Utilities"], function (require, exports, tslib_1, React, Tooltip_1, Utilities_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.SVGTooltipText = void 0;
@@ -151,7 +151,7 @@ define(["require", "exports", "tslib", "react", "@fluentui/react/lib/Tooltip", "
151
151
  }
152
152
  SVGTooltipText.prototype.render = function () {
153
153
  var _a = this.props, content = _a.content, tooltipProps = _a.tooltipProps, textProps = _a.textProps, _b = _a.shouldReceiveFocus, shouldReceiveFocus = _b === void 0 ? true : _b, _c = _a.showBackground, showBackground = _c === void 0 ? false : _c;
154
- var _d = this.state, isTooltipVisible = _d.isTooltipVisible, textX = _d.textX, textY = _d.textY, textWidth = _d.textWidth, textHeight = _d.textHeight;
154
+ var _d = this.state, isTooltipVisible = _d.isTooltipVisible, textWidth = _d.textWidth, textHeight = _d.textHeight;
155
155
  var tooltipRenderProps = tslib_1.__assign({ content: content, targetElement: this._getTargetElement(), calloutProps: {
156
156
  onDismiss: this._hideTooltip,
157
157
  onMouseEnter: this._onTooltipMouseEnter,
@@ -159,10 +159,10 @@ define(["require", "exports", "tslib", "react", "@fluentui/react/lib/Tooltip", "
159
159
  }, onMouseEnter: this._onTooltipMouseEnter, onMouseLeave: this._onTooltipMouseLeave }, tooltipProps);
160
160
  var showTooltip = (!!this.props.isTooltipVisibleProp && this.state.isOverflowing && !!content) || (isTooltipVisible && !!content);
161
161
  var backgroundColor = this.props.theme ? this.props.theme.semanticColors.bodyBackground : undefined;
162
- var isRTL = (0, react_1.getRTL)();
163
- var rectX = isRTL ? (textX !== null && textX !== void 0 ? textX : 0) + (textWidth !== null && textWidth !== void 0 ? textWidth : 0) - PADDING : (textX !== null && textX !== void 0 ? textX : 0) - PADDING;
162
+ var rectX = (typeof (textProps === null || textProps === void 0 ? void 0 : textProps.x) === 'number' ? textProps.x : 0) - (textWidth !== null && textWidth !== void 0 ? textWidth : 0) / 2 - PADDING;
163
+ var rectY = (typeof (textProps === null || textProps === void 0 ? void 0 : textProps.y) === 'number' ? textProps.y : 0) - (textHeight !== null && textHeight !== void 0 ? textHeight : 0) / 2 - PADDING;
164
164
  return (React.createElement(React.Fragment, null,
165
- showBackground && (React.createElement("rect", { x: rectX, y: (textY !== null && textY !== void 0 ? textY : 0) - PADDING, width: (textWidth !== null && textWidth !== void 0 ? textWidth : 0) + 2 * PADDING, height: (textHeight !== null && textHeight !== void 0 ? textHeight : 0) + 2 * PADDING, fill: backgroundColor, transform: textProps === null || textProps === void 0 ? void 0 : textProps.transform })),
165
+ showBackground && (React.createElement("rect", { x: rectX, y: rectY, width: (textWidth !== null && textWidth !== void 0 ? textWidth : 0) + 2 * PADDING, height: (textHeight !== null && textHeight !== void 0 ? textHeight : 0) + 2 * PADDING, fill: backgroundColor, transform: textProps === null || textProps === void 0 ? void 0 : textProps.transform })),
166
166
  React.createElement("text", tslib_1.__assign({}, textProps, { id: this._tooltipHostId, ref: this._tooltipHost, onFocusCapture: this._onTooltipFocus, onBlurCapture: this._onTooltipBlur, onMouseEnter: this._onTooltipMouseEnter, onMouseLeave: this._onTooltipMouseLeave, onKeyDown: this._onTooltipKeyDown, "data-is-focusable": shouldReceiveFocus && this.state.isOverflowing }), content),
167
167
  showTooltip && React.createElement(Tooltip_1.Tooltip, tslib_1.__assign({}, tooltipRenderProps))));
168
168
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SVGTooltipText.js","sourceRoot":"../src/","sources":["utilities/SVGTooltipText.tsx"],"names":[],"mappings":";;;;IAuFA,IAAM,OAAO,GAAG,CAAC,CAAC;IAElB;;;OAGG;IACH;QACU,0CAA2D;QAkBnE,wBAAY,KAA2B;YACrC,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAVf,6CAA6C;YACrC,kBAAY,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAC;YAKjD,oBAAc,GAAG,IAAA,iBAAK,EAAC,cAAc,CAAC,CAAC;YAqFxC,UAAI,GAAG;gBACZ,KAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;YAC5B,CAAC,CAAC;YAEK,aAAO,GAAG;gBACf,KAAI,CAAC,YAAY,EAAE,CAAC;YACtB,CAAC,CAAC;YAEM,kBAAY,GAAG;gBACrB,IAAI,KAAI,CAAC,YAAY,CAAC,OAAO,IAAI,OAAO,KAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,KAAK,UAAU,EAAE,CAAC;oBACzF,IAAM,IAAI,GAAG,KAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;oBACjD,KAAI,CAAC,QAAQ,CAAC;wBACZ,KAAK,EAAE,IAAI,CAAC,CAAC;wBACb,KAAK,EAAE,IAAI,CAAC,CAAC;wBACb,SAAS,EAAE,IAAI,CAAC,KAAK;wBACrB,UAAU,EAAE,IAAI,CAAC,MAAM;qBACxB,CAAC,CAAC;gBACL,CAAC;YACH,CAAC,CAAC;YAEM,uBAAiB,GAAG;gBAC1B,IAAI,CAAC,KAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;oBAC/B,OAAO,SAAS,CAAC;gBACn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AAE,IAAI,CAAC,oBAAoB,EACvC,YAAY,EAAE,IAAI,CAAC,oBAAoB,EACvC,SAAS,EAAE,IAAI,CAAC,iBAAiB,uBACd,kBAAkB,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,KAEhE,OAAO,CACH;gBACN,WAAW,IAAI,oBAAC,iBAAO,uBAAK,kBAAkB,EAAI,CAClD,CACJ,CAAC;QACJ,CAAC;QAEM,0CAAiB,GAAxB;YACE,IAAI,CAAC,YAAY,EAAE,CAAC;YACpB,IAAI,CAAC,YAAY,EAAE,CAAC;QACtB,CAAC;QAEM,2CAAkB,GAAzB,UAA0B,SAAyC;YACjE,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,KAAK,SAAS,CAAC,SAAS,EAAE,CAAC;gBAC/F,IAAI,CAAC,YAAY,EAAE,CAAC;gBACpB,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,CAAC;QACH,CAAC;QAEM,6CAAoB,GAA3B;YACE,IAAI,cAAc,CAAC,sBAAsB,IAAI,cAAc,CAAC,sBAAsB,KAAK,IAAI,EAAE,CAAC;gBAC5F,cAAc,CAAC,sBAAsB,GAAG,SAAS,CAAC;YACpD,CAAC;YAED,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACxB,CAAC;QA/Fa,2BAAY,GAAG;YAC3B,KAAK,EAAE,sBAAY,CAAC,MAAM;SAC3B,AAFyB,CAExB;QAyPJ,qBAAC;KAAA,AA/PD,CACU,KAAK,CAAC,SAAS,GA8PxB;IA/PY,wCAAc","sourcesContent":["import * as React from 'react';\nimport { ITooltipHost, ITooltipProps, Tooltip, TooltipDelay } from '@fluentui/react/lib/Tooltip';\nimport { Async, KeyCodes, getId, portalContainsElement } from '../Utilities';\nimport { getRTL, ITheme } from '@fluentui/react';\n\ninterface ISVGTooltipTextProps {\n /**\n * Number of milliseconds to delay closing the tooltip, so that the user has time to hover over\n * the tooltip and interact with it. Hovering over the tooltip will count as hovering over the\n * host, so that the tooltip will stay open if the user is actively interacting with it.\n */\n closeDelay?: number;\n\n /**\n * Content to display in the Tooltip.\n */\n content?: string;\n\n /**\n * Length of delay before showing the tooltip on hover.\n * @defaultvalue TooltipDelay.medium\n */\n delay?: TooltipDelay;\n\n /**\n * Additional properties to pass through for Tooltip.\n */\n tooltipProps?: ITooltipProps;\n\n /**\n * Additional properties to pass through for SVG <text>.\n */\n textProps?: React.SVGAttributes<SVGTextElement>;\n\n /**\n * Max width of text\n */\n maxWidth?: number;\n\n /**\n * Max height of text\n */\n maxHeight?: number;\n\n /**\n * Pass false to make prevent the tooptip from receiving focus through keyboard\n * Eg: In Pie Chart, the focus should only land on the arcs and not on the text to\n * avoid repitition of the same datapoint\n * @defaultvalue true\n */\n shouldReceiveFocus?: boolean;\n\n /**\n * Pass true to show tooltip directly\n * Eg: In Pie Chart, the tooltip is shown when the arc is focussed, so the prop is set to true,\n * to directly show the tooltip from this component\n * @defaultvalue false\n */\n isTooltipVisibleProp?: boolean;\n\n /**\n * Function to wrap text within specified width and height\n * and return a boolean value indicating whether the text overflowed\n */\n wrapContent?: (content: string, id: string, maxWidth: number, maxHeight?: number) => boolean;\n\n /**\n * Theme provided by High Order Component\n */\n theme?: ITheme;\n\n /**\n * @default false\n * Prop to selectively display the tooltip background\n */\n showBackground?: boolean;\n}\n\ninterface ISVGTooltipTextState {\n isTooltipVisible: boolean;\n isOverflowing: boolean;\n textX?: number;\n textY?: number;\n textWidth?: number;\n textHeight?: number;\n}\n\nconst PADDING = 4;\n\n/**\n * Component to render an SVG text element with an optional tooltip.\n * The tooltip appears on hovering and focusing the element when its content overflows.\n */\nexport class SVGTooltipText\n extends React.Component<ISVGTooltipTextProps, ISVGTooltipTextState>\n implements ITooltipHost\n{\n public static defaultProps = {\n delay: TooltipDelay.medium,\n };\n\n private static _currentVisibleTooltip: ITooltipHost | undefined;\n\n /** The element that gets the hover events */\n private _tooltipHost = React.createRef<SVGTextElement>();\n\n private _async: Async;\n private _dismissTimerId: number;\n private _openTimerId: number;\n private _tooltipHostId = getId('tooltip-host');\n private _ignoreNextFocusEvent: boolean;\n\n constructor(props: ISVGTooltipTextProps) {\n super(props);\n\n this.state = {\n isTooltipVisible: false,\n isOverflowing: false,\n };\n\n this._async = new Async(this);\n }\n\n public render(): React.ReactNode {\n const { content, tooltipProps, textProps, shouldReceiveFocus = true, showBackground = false } = this.props;\n const { isTooltipVisible, textX, textY, textWidth, textHeight } = this.state;\n const tooltipRenderProps: ITooltipProps = {\n content,\n targetElement: this._getTargetElement(),\n calloutProps: {\n onDismiss: this._hideTooltip,\n onMouseEnter: this._onTooltipMouseEnter,\n onMouseLeave: this._onTooltipMouseLeave,\n },\n onMouseEnter: this._onTooltipMouseEnter,\n onMouseLeave: this._onTooltipMouseLeave,\n ...tooltipProps,\n };\n\n const showTooltip =\n (!!this.props.isTooltipVisibleProp && this.state.isOverflowing && !!content) || (isTooltipVisible && !!content);\n const backgroundColor = this.props.theme ? this.props.theme.semanticColors.bodyBackground : undefined;\n const isRTL = getRTL();\n const rectX = isRTL ? (textX ?? 0) + (textWidth ?? 0) - PADDING : (textX ?? 0) - PADDING;\n return (\n <>\n {showBackground && (\n <rect\n x={rectX}\n y={(textY ?? 0) - PADDING}\n width={(textWidth ?? 0) + 2 * PADDING}\n height={(textHeight ?? 0) + 2 * PADDING}\n fill={backgroundColor}\n transform={textProps?.transform}\n />\n )}\n <text\n {...textProps}\n id={this._tooltipHostId}\n ref={this._tooltipHost}\n onFocusCapture={this._onTooltipFocus}\n onBlurCapture={this._onTooltipBlur}\n onMouseEnter={this._onTooltipMouseEnter}\n onMouseLeave={this._onTooltipMouseLeave}\n onKeyDown={this._onTooltipKeyDown}\n data-is-focusable={shouldReceiveFocus && this.state.isOverflowing}\n >\n {content}\n </text>\n {showTooltip && <Tooltip {...tooltipRenderProps} />}\n </>\n );\n }\n\n public componentDidMount(): void {\n this._wrapContent();\n this._measureText();\n }\n\n public componentDidUpdate(prevProps: Readonly<ISVGTooltipTextProps>): void {\n if (this.props.maxWidth !== prevProps.maxWidth || this.props.maxHeight !== prevProps.maxHeight) {\n this._wrapContent();\n this._measureText();\n }\n }\n\n public componentWillUnmount(): void {\n if (SVGTooltipText._currentVisibleTooltip && SVGTooltipText._currentVisibleTooltip === this) {\n SVGTooltipText._currentVisibleTooltip = undefined;\n }\n\n this._async.dispose();\n }\n\n public show = (): void => {\n this._toggleTooltip(true);\n };\n\n public dismiss = (): void => {\n this._hideTooltip();\n };\n\n private _measureText = (): void => {\n if (this._tooltipHost.current && typeof this._tooltipHost.current.getBBox === 'function') {\n const bbox = this._tooltipHost.current.getBBox();\n this.setState({\n textX: bbox.x,\n textY: bbox.y,\n textWidth: bbox.width,\n textHeight: bbox.height,\n });\n }\n };\n\n private _getTargetElement = (): HTMLElement | undefined => {\n if (!this._tooltipHost.current) {\n return undefined;\n }\n\n return this._tooltipHost.current as unknown as HTMLElement;\n };\n\n private _onTooltipFocus = (ev: React.FocusEvent<SVGElement>) => {\n if (this._ignoreNextFocusEvent) {\n this._ignoreNextFocusEvent = false;\n return;\n }\n\n this._onTooltipMouseEnter(ev);\n };\n\n private _onTooltipBlur = (ev: React.FocusEvent<SVGElement>) => {\n // The focused element gets a blur event when the document loses focus\n // (e.g. switching tabs in the browser), but we don't want to show the\n // tooltip again when the document gets focus back. Handle this case by\n // checking if the blurred element is still the document's activeElement,\n // and ignoring when it next gets focus back.\n // See https://github.com/microsoft/fluentui/issues/13541\n this._ignoreNextFocusEvent = document?.activeElement === ev.target;\n\n this._dismissTimerId = this._async.setTimeout(() => {\n this._hideTooltip();\n }, 0);\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _onTooltipMouseEnter = (ev: any): void => {\n const { delay } = this.props;\n\n if (SVGTooltipText._currentVisibleTooltip && SVGTooltipText._currentVisibleTooltip !== this) {\n SVGTooltipText._currentVisibleTooltip.dismiss();\n }\n SVGTooltipText._currentVisibleTooltip = this;\n\n if (!this.state.isOverflowing) {\n return;\n }\n\n if (ev.target && portalContainsElement(ev.target as HTMLElement, this._getTargetElement())) {\n // Do not show tooltip when target is inside a portal relative to TooltipHost.\n return;\n }\n\n this._clearDismissTimer();\n this._clearOpenTimer();\n\n if (delay !== TooltipDelay.zero) {\n const delayTime = this._getDelayTime(delay!); // non-null assertion because we set it in `defaultProps`\n\n this._openTimerId = this._async.setTimeout(() => {\n this._toggleTooltip(true);\n }, delayTime);\n } else {\n this._toggleTooltip(true);\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _onTooltipMouseLeave = (ev: any): void => {\n const { closeDelay } = this.props;\n\n this._clearDismissTimer();\n this._clearOpenTimer();\n\n if (closeDelay) {\n this._dismissTimerId = this._async.setTimeout(() => {\n this._toggleTooltip(false);\n }, closeDelay);\n } else {\n this._toggleTooltip(false);\n }\n\n if (SVGTooltipText._currentVisibleTooltip === this) {\n SVGTooltipText._currentVisibleTooltip = undefined;\n }\n };\n\n private _onTooltipKeyDown = (ev: React.KeyboardEvent<SVGElement>): void => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n if ((ev.which === KeyCodes.escape || ev.ctrlKey) && this.state.isTooltipVisible) {\n this._hideTooltip();\n ev.stopPropagation();\n }\n };\n\n private _clearDismissTimer = (): void => {\n this._async.clearTimeout(this._dismissTimerId);\n };\n\n private _clearOpenTimer = (): void => {\n this._async.clearTimeout(this._openTimerId);\n };\n\n private _hideTooltip = (): void => {\n this._clearOpenTimer();\n this._clearDismissTimer();\n this._toggleTooltip(false);\n };\n\n private _toggleTooltip = (isTooltipVisible: boolean): void => {\n if (this.state.isTooltipVisible !== isTooltipVisible) {\n this.setState({ isTooltipVisible });\n }\n };\n\n private _getDelayTime = (delay: TooltipDelay): number => {\n switch (delay) {\n case TooltipDelay.medium:\n return 300;\n case TooltipDelay.long:\n return 500;\n default:\n return 0;\n }\n };\n\n private _wrapContent = () => {\n const { content, wrapContent, maxWidth = Number.POSITIVE_INFINITY, maxHeight } = this.props;\n\n let isOverflowing = false;\n if (content && wrapContent && wrapContent(content, this._tooltipHostId, maxWidth, maxHeight)) {\n isOverflowing = true;\n }\n\n if (this.state.isOverflowing !== isOverflowing) {\n this.setState({ isOverflowing });\n }\n };\n}\n"]}
1
+ {"version":3,"file":"SVGTooltipText.js","sourceRoot":"../src/","sources":["utilities/SVGTooltipText.tsx"],"names":[],"mappings":";;;;IAuFA,IAAM,OAAO,GAAG,CAAC,CAAC;IAElB;;;OAGG;IACH;QACU,0CAA2D;QAkBnE,wBAAY,KAA2B;YACrC,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YAVf,6CAA6C;YACrC,kBAAY,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAC;YAKjD,oBAAc,GAAG,IAAA,iBAAK,EAAC,cAAc,CAAC,CAAC;YAqFxC,UAAI,GAAG;gBACZ,KAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;YAC5B,CAAC,CAAC;YAEK,aAAO,GAAG;gBACf,KAAI,CAAC,YAAY,EAAE,CAAC;YACtB,CAAC,CAAC;YAEM,kBAAY,GAAG;gBACrB,IAAI,KAAI,CAAC,YAAY,CAAC,OAAO,IAAI,OAAO,KAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,KAAK,UAAU,EAAE,CAAC;oBACzF,IAAM,IAAI,GAAG,KAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;oBACjD,KAAI,CAAC,QAAQ,CAAC;wBACZ,KAAK,EAAE,IAAI,CAAC,CAAC;wBACb,KAAK,EAAE,IAAI,CAAC,CAAC;wBACb,SAAS,EAAE,IAAI,CAAC,KAAK;wBACrB,UAAU,EAAE,IAAI,CAAC,MAAM;qBACxB,CAAC,CAAC;gBACL,CAAC;YACH,CAAC,CAAC;YAEM,uBAAiB,GAAG;gBAC1B,IAAI,CAAC,KAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;oBAC/B,O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\nimport { Async, KeyCodes, getId, portalContainsElement } from '../Utilities';\nimport { ITheme } from '@fluentui/react';\n\ninterface ISVGTooltipTextProps {\n /**\n * Number of milliseconds to delay closing the tooltip, so that the user has time to hover over\n * the tooltip and interact with it. Hovering over the tooltip will count as hovering over the\n * host, so that the tooltip will stay open if the user is actively interacting with it.\n */\n closeDelay?: number;\n\n /**\n * Content to display in the Tooltip.\n */\n content?: string;\n\n /**\n * Length of delay before showing the tooltip on hover.\n * @defaultvalue TooltipDelay.medium\n */\n delay?: TooltipDelay;\n\n /**\n * Additional properties to pass through for Tooltip.\n */\n tooltipProps?: ITooltipProps;\n\n /**\n * Additional properties to pass through for SVG <text>.\n */\n textProps?: React.SVGAttributes<SVGTextElement>;\n\n /**\n * Max width of text\n */\n maxWidth?: number;\n\n /**\n * Max height of text\n */\n maxHeight?: number;\n\n /**\n * Pass false to make prevent the tooptip from receiving focus through keyboard\n * Eg: In Pie Chart, the focus should only land on the arcs and not on the text to\n * avoid repitition of the same datapoint\n * @defaultvalue true\n */\n shouldReceiveFocus?: boolean;\n\n /**\n * Pass true to show tooltip directly\n * Eg: In Pie Chart, the tooltip is shown when the arc is focussed, so the prop is set to true,\n * to directly show the tooltip from this component\n * @defaultvalue false\n */\n isTooltipVisibleProp?: boolean;\n\n /**\n * Function to wrap text within specified width and height\n * and return a boolean value indicating whether the text overflowed\n */\n wrapContent?: (content: string, id: string, maxWidth: number, maxHeight?: number) => boolean;\n\n /**\n * Theme provided by High Order Component\n */\n theme?: ITheme;\n\n /**\n * @default false\n * Prop to selectively display the tooltip background\n */\n showBackground?: boolean;\n}\n\ninterface ISVGTooltipTextState {\n isTooltipVisible: boolean;\n isOverflowing: boolean;\n textX?: number;\n textY?: number;\n textWidth?: number;\n textHeight?: number;\n}\n\nconst PADDING = 4;\n\n/**\n * Component to render an SVG text element with an optional tooltip.\n * The tooltip appears on hovering and focusing the element when its content overflows.\n */\nexport class SVGTooltipText\n extends React.Component<ISVGTooltipTextProps, ISVGTooltipTextState>\n implements ITooltipHost\n{\n public static defaultProps = {\n delay: TooltipDelay.medium,\n };\n\n private static _currentVisibleTooltip: ITooltipHost | undefined;\n\n /** The element that gets the hover events */\n private _tooltipHost = React.createRef<SVGTextElement>();\n\n private _async: Async;\n private _dismissTimerId: number;\n private _openTimerId: number;\n private _tooltipHostId = getId('tooltip-host');\n private _ignoreNextFocusEvent: boolean;\n\n constructor(props: ISVGTooltipTextProps) {\n super(props);\n\n this.state = {\n isTooltipVisible: false,\n isOverflowing: false,\n };\n\n this._async = new Async(this);\n }\n\n public render(): React.ReactNode {\n const { content, tooltipProps, textProps, shouldReceiveFocus = true, showBackground = false } = this.props;\n const { isTooltipVisible, textWidth, textHeight } = this.state;\n const tooltipRenderProps: ITooltipProps = {\n content,\n targetElement: this._getTargetElement(),\n calloutProps: {\n onDismiss: this._hideTooltip,\n onMouseEnter: this._onTooltipMouseEnter,\n onMouseLeave: this._onTooltipMouseLeave,\n },\n onMouseEnter: this._onTooltipMouseEnter,\n onMouseLeave: this._onTooltipMouseLeave,\n ...tooltipProps,\n };\n\n const showTooltip =\n (!!this.props.isTooltipVisibleProp && this.state.isOverflowing && !!content) || (isTooltipVisible && !!content);\n const backgroundColor = this.props.theme ? this.props.theme.semanticColors.bodyBackground : undefined;\n const rectX = (typeof textProps?.x === 'number' ? textProps.x : 0) - (textWidth ?? 0) / 2 - PADDING;\n const rectY = (typeof textProps?.y === 'number' ? textProps.y : 0) - (textHeight ?? 0) / 2 - PADDING;\n return (\n <>\n {showBackground && (\n <rect\n x={rectX}\n y={rectY}\n width={(textWidth ?? 0) + 2 * PADDING}\n height={(textHeight ?? 0) + 2 * PADDING}\n fill={backgroundColor}\n transform={textProps?.transform}\n />\n )}\n <text\n {...textProps}\n id={this._tooltipHostId}\n ref={this._tooltipHost}\n onFocusCapture={this._onTooltipFocus}\n onBlurCapture={this._onTooltipBlur}\n onMouseEnter={this._onTooltipMouseEnter}\n onMouseLeave={this._onTooltipMouseLeave}\n onKeyDown={this._onTooltipKeyDown}\n data-is-focusable={shouldReceiveFocus && this.state.isOverflowing}\n >\n {content}\n </text>\n {showTooltip && <Tooltip {...tooltipRenderProps} />}\n </>\n );\n }\n\n public componentDidMount(): void {\n this._wrapContent();\n this._measureText();\n }\n\n public componentDidUpdate(prevProps: Readonly<ISVGTooltipTextProps>): void {\n if (this.props.maxWidth !== prevProps.maxWidth || this.props.maxHeight !== prevProps.maxHeight) {\n this._wrapContent();\n this._measureText();\n }\n }\n\n public componentWillUnmount(): void {\n if (SVGTooltipText._currentVisibleTooltip && SVGTooltipText._currentVisibleTooltip === this) {\n SVGTooltipText._currentVisibleTooltip = undefined;\n }\n\n this._async.dispose();\n }\n\n public show = (): void => {\n this._toggleTooltip(true);\n };\n\n public dismiss = (): void => {\n this._hideTooltip();\n };\n\n private _measureText = (): void => {\n if (this._tooltipHost.current && typeof this._tooltipHost.current.getBBox === 'function') {\n const bbox = this._tooltipHost.current.getBBox();\n this.setState({\n textX: bbox.x,\n textY: bbox.y,\n textWidth: bbox.width,\n textHeight: bbox.height,\n });\n }\n };\n\n private _getTargetElement = (): HTMLElement | undefined => {\n if (!this._tooltipHost.current) {\n return undefined;\n }\n\n return this._tooltipHost.current as unknown as HTMLElement;\n };\n\n private _onTooltipFocus = (ev: React.FocusEvent<SVGElement>) => {\n if (this._ignoreNextFocusEvent) {\n this._ignoreNextFocusEvent = false;\n return;\n }\n\n this._onTooltipMouseEnter(ev);\n };\n\n private _onTooltipBlur = (ev: React.FocusEvent<SVGElement>) => {\n // The focused element gets a blur event when the document loses focus\n // (e.g. switching tabs in the browser), but we don't want to show the\n // tooltip again when the document gets focus back. Handle this case by\n // checking if the blurred element is still the document's activeElement,\n // and ignoring when it next gets focus back.\n // See https://github.com/microsoft/fluentui/issues/13541\n this._ignoreNextFocusEvent = document?.activeElement === ev.target;\n\n this._dismissTimerId = this._async.setTimeout(() => {\n this._hideTooltip();\n }, 0);\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _onTooltipMouseEnter = (ev: any): void => {\n const { delay } = this.props;\n\n if (SVGTooltipText._currentVisibleTooltip && SVGTooltipText._currentVisibleTooltip !== this) {\n SVGTooltipText._currentVisibleTooltip.dismiss();\n }\n SVGTooltipText._currentVisibleTooltip = this;\n\n if (!this.state.isOverflowing) {\n return;\n }\n\n if (ev.target && portalContainsElement(ev.target as HTMLElement, this._getTargetElement())) {\n // Do not show tooltip when target is inside a portal relative to TooltipHost.\n return;\n }\n\n this._clearDismissTimer();\n this._clearOpenTimer();\n\n if (delay !== TooltipDelay.zero) {\n const delayTime = this._getDelayTime(delay!); // non-null assertion because we set it in `defaultProps`\n\n this._openTimerId = this._async.setTimeout(() => {\n this._toggleTooltip(true);\n }, delayTime);\n } else {\n this._toggleTooltip(true);\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _onTooltipMouseLeave = (ev: any): void => {\n const { closeDelay } = this.props;\n\n this._clearDismissTimer();\n this._clearOpenTimer();\n\n if (closeDelay) {\n this._dismissTimerId = this._async.setTimeout(() => {\n this._toggleTooltip(false);\n }, closeDelay);\n } else {\n this._toggleTooltip(false);\n }\n\n if (SVGTooltipText._currentVisibleTooltip === this) {\n SVGTooltipText._currentVisibleTooltip = undefined;\n }\n };\n\n private _onTooltipKeyDown = (ev: React.KeyboardEvent<SVGElement>): void => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n if ((ev.which === KeyCodes.escape || ev.ctrlKey) && this.state.isTooltipVisible) {\n this._hideTooltip();\n ev.stopPropagation();\n }\n };\n\n private _clearDismissTimer = (): void => {\n this._async.clearTimeout(this._dismissTimerId);\n };\n\n private _clearOpenTimer = (): void => {\n this._async.clearTimeout(this._openTimerId);\n };\n\n private _hideTooltip = (): void => {\n this._clearOpenTimer();\n this._clearDismissTimer();\n this._toggleTooltip(false);\n };\n\n private _toggleTooltip = (isTooltipVisible: boolean): void => {\n if (this.state.isTooltipVisible !== isTooltipVisible) {\n this.setState({ isTooltipVisible });\n }\n };\n\n private _getDelayTime = (delay: TooltipDelay): number => {\n switch (delay) {\n case TooltipDelay.medium:\n return 300;\n case TooltipDelay.long:\n return 500;\n default:\n return 0;\n }\n };\n\n private _wrapContent = () => {\n const { content, wrapContent, maxWidth = Number.POSITIVE_INFINITY, maxHeight } = this.props;\n\n let isOverflowing = false;\n if (content && wrapContent && wrapContent(content, this._tooltipHostId, maxWidth, maxHeight)) {\n isOverflowing = true;\n }\n\n if (this.state.isOverflowing !== isOverflowing) {\n this.setState({ isOverflowing });\n }\n };\n}\n"]}
@@ -240,7 +240,7 @@ export declare const calculateLongestLabelWidth: (labels: (string | number)[], q
240
240
  * when prop 'showXAxisLablesTooltip' enables to the respected chart.
241
241
  * On hover of the truncated word(at x axis labels tick), a tooltip will be appeared.
242
242
  */
243
- export declare function tooltipOfXAxislabels(xAxistooltipProps: any): null | undefined;
243
+ export declare function tooltipOfAxislabels(axistooltipProps: any): null | undefined;
244
244
  /**
245
245
  * Find the axis type of line chart and area chart from given data
246
246
  * @param points
@@ -441,4 +441,5 @@ export declare function resolveCSSVariables(chartContainer: HTMLElement, styleRu
441
441
  export declare function copyStyle(properties: string[] | Record<string, string>, fromEl: Element, toEl: Element): void;
442
442
  export declare const createMeasurementSpan: (text: string | number, className: string, parentElement?: HTMLElement | null) => HTMLElement;
443
443
  export declare function getCurveFactory(curve: ILineChartLineOptions['curve'], defaultFactory?: CurveFactory): CurveFactory;
444
+ export declare const truncateString: (str: string, maxLength: number, ellipsis?: string) => string;
444
445
  export {};