@fluentui/react-charting 5.20.2 → 5.21.1

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 (157) hide show
  1. package/CHANGELOG.json +69 -1
  2. package/CHANGELOG.md +29 -2
  3. package/dist/react-charting.d.ts +13 -6
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +1 -0
  7. package/lib/components/AreaChart/AreaChart.base.js +1 -2
  8. package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
  9. package/lib/components/DonutChart/Arc/Arc.js +1 -1
  10. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  11. package/lib/components/DonutChart/Pie/Pie.js +1 -1
  12. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  13. package/lib/components/GaugeChart/GaugeChart.base.js +1 -1
  14. package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
  15. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +1 -0
  16. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +11 -7
  17. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  18. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +3 -2
  19. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  20. package/lib/components/HeatMapChart/HeatMapChart.base.js +1 -1
  21. package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  22. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +1 -1
  23. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  24. package/lib/components/LineChart/LineChart.base.js +4 -4
  25. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  26. package/lib/components/SankeyChart/SankeyChart.base.d.ts +2 -0
  27. package/lib/components/SankeyChart/SankeyChart.base.js +21 -17
  28. package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
  29. package/lib/components/SankeyChart/SankeyChart.types.d.ts +4 -0
  30. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  31. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +1 -1
  32. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  33. package/lib/components/StackedBarChart/StackedBarChart.base.js +1 -1
  34. package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  35. package/lib/components/VerticalBarChart/VerticalBarChart.base.d.ts +1 -0
  36. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +25 -24
  37. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  38. package/lib/components/VerticalBarChart/VerticalBarChart.types.d.ts +3 -2
  39. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  40. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +1 -0
  41. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +28 -50
  42. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  43. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +3 -2
  44. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  45. package/lib/utilities/index.d.ts +1 -0
  46. package/lib/utilities/index.js +1 -0
  47. package/lib/utilities/index.js.map +1 -1
  48. package/lib/utilities/utilities.d.ts +1 -1
  49. package/lib/utilities/utilities.js +10 -11
  50. package/lib/utilities/utilities.js.map +1 -1
  51. package/lib/utilities/vbc-utils.d.ts +2 -0
  52. package/lib/utilities/vbc-utils.js +31 -0
  53. package/lib/utilities/vbc-utils.js.map +1 -0
  54. package/lib/version.js +1 -1
  55. package/lib/version.js.map +1 -1
  56. package/lib-amd/components/AreaChart/AreaChart.base.js +1 -2
  57. package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
  58. package/lib-amd/components/DonutChart/Arc/Arc.js +1 -1
  59. package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
  60. package/lib-amd/components/DonutChart/Pie/Pie.js +1 -1
  61. package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -1
  62. package/lib-amd/components/GaugeChart/GaugeChart.base.js +1 -1
  63. package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
  64. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +1 -0
  65. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +11 -7
  66. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  67. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +3 -2
  68. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  69. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +1 -1
  70. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  71. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +1 -1
  72. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  73. package/lib-amd/components/LineChart/LineChart.base.js +4 -4
  74. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  75. package/lib-amd/components/SankeyChart/SankeyChart.base.d.ts +2 -0
  76. package/lib-amd/components/SankeyChart/SankeyChart.base.js +21 -17
  77. package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
  78. package/lib-amd/components/SankeyChart/SankeyChart.types.d.ts +4 -0
  79. package/lib-amd/components/SankeyChart/SankeyChart.types.js.map +1 -1
  80. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +1 -1
  81. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  82. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +1 -1
  83. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  84. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.d.ts +1 -0
  85. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +24 -23
  86. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  87. package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.d.ts +3 -2
  88. package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  89. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +1 -0
  90. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +27 -49
  91. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  92. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +3 -2
  93. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  94. package/lib-amd/utilities/index.d.ts +1 -0
  95. package/lib-amd/utilities/index.js +2 -1
  96. package/lib-amd/utilities/index.js.map +1 -1
  97. package/lib-amd/utilities/utilities.d.ts +1 -1
  98. package/lib-amd/utilities/utilities.js +10 -11
  99. package/lib-amd/utilities/utilities.js.map +1 -1
  100. package/lib-amd/utilities/vbc-utils.d.ts +2 -0
  101. package/lib-amd/utilities/vbc-utils.js +38 -0
  102. package/lib-amd/utilities/vbc-utils.js.map +1 -0
  103. package/lib-amd/version.js +1 -1
  104. package/lib-amd/version.js.map +1 -1
  105. package/lib-commonjs/components/AreaChart/AreaChart.base.js +1 -2
  106. package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
  107. package/lib-commonjs/components/DonutChart/Arc/Arc.js +1 -1
  108. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  109. package/lib-commonjs/components/DonutChart/Pie/Pie.js +1 -1
  110. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  111. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +1 -1
  112. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
  113. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +1 -0
  114. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +11 -7
  115. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  116. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +3 -2
  117. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  118. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +1 -1
  119. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  120. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +1 -1
  121. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  122. package/lib-commonjs/components/LineChart/LineChart.base.js +4 -4
  123. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  124. package/lib-commonjs/components/SankeyChart/SankeyChart.base.d.ts +2 -0
  125. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js +21 -17
  126. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
  127. package/lib-commonjs/components/SankeyChart/SankeyChart.types.d.ts +4 -0
  128. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  129. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +1 -1
  130. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  131. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js +1 -1
  132. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  133. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.d.ts +1 -0
  134. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +24 -23
  135. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  136. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.d.ts +3 -2
  137. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  138. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +1 -0
  139. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +27 -49
  140. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  141. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +3 -2
  142. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  143. package/lib-commonjs/utilities/index.d.ts +1 -0
  144. package/lib-commonjs/utilities/index.js +1 -0
  145. package/lib-commonjs/utilities/index.js.map +1 -1
  146. package/lib-commonjs/utilities/utilities.d.ts +1 -1
  147. package/lib-commonjs/utilities/utilities.js +10 -11
  148. package/lib-commonjs/utilities/utilities.js.map +1 -1
  149. package/lib-commonjs/utilities/vbc-utils.d.ts +2 -0
  150. package/lib-commonjs/utilities/vbc-utils.js +36 -0
  151. package/lib-commonjs/utilities/vbc-utils.js.map +1 -0
  152. package/lib-commonjs/version.js +1 -1
  153. package/lib-commonjs/version.js.map +1 -1
  154. package/package.json +5 -5
  155. package/src/components/SankeyChart/SankeyChart.types.ts +5 -0
  156. package/src/components/VerticalBarChart/VerticalBarChart.types.ts +3 -2
  157. package/src/components/VerticalStackedBarChart/VerticalStackedBarChart.types.ts +3 -2
@@ -1 +1 @@
1
- {"version":3,"file":"VerticalStackedBarChart.base.js","sourceRoot":"../src/","sources":["components/VerticalStackedBarChart/VerticalStackedBarChart.base.tsx"],"names":[],"mappings":";;;;IA4CA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAsE,CAAC;IAG/G,IAAM,cAAc,GAAG,4BAA4B,CAAC;IAEpD,+EAA+E;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,CAAC,SAAS,EAAE,CAAC,WAAW,GAAG,gBAAgB,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YAC5G,IAAM,gBAAgB,GAAG,CAAC,WAAW,GAAG,SAAS,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;YAEtE,OAAO;gBACL,SAAS,WAAA;gBACT,gBAAgB,kBAAA;aACR,CAAC;QACb,CAAC;QA6VO,mDAAa,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,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAA3B,CAA2B,CAAC,CAAC,MAAM,KAAK,CAAC,CACzE,CAAC;QACJ,CAAC;QACH,kCAAC;IAAD,CAAC,AAtgCD,CAAiD,KAAK,CAAC,SAAS,GAsgC/D;IAtgCY,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} from 'd3-scale';\nimport { classNamesFunction, getId, getRTL, warnDeprecations, memoizeFunction } from '@fluentui/react/lib/Utilities';\nimport { IPalette, IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { ILegend, 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} from '../../index';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n getTypeOfAxis,\n tooltipOfXAxislabels,\n formatValueWithSIPrefix,\n getBarWidth,\n getScalePadding,\n isScalePaddingDefined,\n} from '../../utilities/index';\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};\nenum CircleVisbility {\n show = 'visibility',\n hide = 'hidden',\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}\nexport class VerticalStackedBarChartBase extends React.Component<\n IVerticalStackedBarChartProps,\n IVerticalStackedBarChartState\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 _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\n public constructor(props: IVerticalStackedBarChartProps) {\n super(props);\n this.state = {\n isCalloutVisible: false,\n selectedLegend: '',\n activeLegend: '',\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 }\n\n public componentDidUpdate(prevProps: IVerticalStackedBarChartProps): void {\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 points={this._dataset}\n chartType={ChartTypes.VerticalStackedBarChart}\n xAxisType={this._xAxisType}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n datasetForXAxisDomain={this._xAxisLabels}\n isCalloutForStack={shouldFocusWholeStack}\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 /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n return (\n <>\n <g>{this._bars}</g>\n <g>\n {_isHavingLines &&\n this._createLines(\n props.xScale!,\n props.yScale!,\n props.containerHeight!,\n props.containerWidth!,\n props.yScaleSecondary,\n )}\n </g>\n </>\n );\n }}\n />\n );\n }\n return (\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 /**\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.state.selectedLegend !== '') {\n shouldFocusStackOnly = false;\n } else {\n shouldFocusStackOnly = true;\n }\n } else {\n shouldFocusStackOnly = isCalloutForStack;\n }\n return shouldFocusStackOnly;\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 xScale: NumericScale,\n yScale: NumericScale,\n containerHeight: number,\n containerWidth: number,\n secondaryYScale?: NumericScale,\n ): JSX.Element => {\n const isNumeric = this._xAxisType === XAxisTypes.NumericAxis;\n const isDate = this._xAxisType === XAxisTypes.DateAxis;\n const { xBarScale } = this._getScales(containerHeight, containerWidth);\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 =\n isNumeric || isDate\n ? 0\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (xBarScale as any).bandwidth() / 2;\n Object.keys(lineObject).forEach((item: string, index: number) => {\n const shouldHighlight = this._legendHighlighted(item) || this._noLegendHighlighted(); // item is legend name\n for (let i = 1; i < lineObject[item].length; i++) {\n const x1 = isNumeric\n ? xScale(lineObject[item][i - 1].xItem.xAxisPoint as number)\n : isDate\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (xBarScale as any)(lineObject[item][i - 1].xItem.xAxisPoint as Date)\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (xBarScale as any)(lineObject[item][i - 1].xItem.xAxisPoint as string);\n const useSecondaryYScale =\n lineObject[item][i - 1].useSecondaryYScale && lineObject[item][i].useSecondaryYScale && secondaryYScale;\n const y1 = useSecondaryYScale ? secondaryYScale!(lineObject[item][i - 1].y) : yScale(lineObject[item][i - 1].y);\n const x2 = isNumeric\n ? xScale(lineObject[item][i].xItem.xAxisPoint as number)\n : isDate\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (xBarScale as any)(lineObject[item][i].xItem.xAxisPoint as Date)\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (xBarScale as any)(lineObject[item][i].xItem.xAxisPoint as string);\n const y2 = useSecondaryYScale ? secondaryYScale!(lineObject[item][i].y) : yScale(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={3}\n strokeLinecap=\"round\"\n stroke={lineObject[item][i].color}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n {...(this.state.selectedLegend === item && {\n onMouseOver: this._lineHover.bind(this, lineObject[item][i - 1]),\n onMouseLeave: this._lineHoverOut,\n })}\n />,\n );\n }\n });\n Object.keys(lineObject).forEach((item: string, index: number) => {\n lineObject[item].forEach((circlePoint: LinePoint, subIndex: number) => {\n dots.push(\n <circle\n key={`${index}-${subIndex}-dot`}\n cx={\n isNumeric\n ? xScale(circlePoint.xItem.xAxisPoint as number)\n : isDate\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (xBarScale as any)(circlePoint.xItem.xAxisPoint as Date)\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (xBarScale as any)(circlePoint.xItem.xAxisPoint as string)\n }\n cy={\n circlePoint.useSecondaryYScale && secondaryYScale ? secondaryYScale(circlePoint.y) : yScale(circlePoint.y)\n }\n onMouseOver={\n this.state.selectedLegend === item\n ? this._lineHover.bind(this, circlePoint)\n : this._onStackHover.bind(this, circlePoint.xItem)\n }\n {...(this.state.selectedLegend === item && {\n onMouseLeave: this._lineHoverOut,\n })}\n r={this._getCircleVisibilityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).radius}\n stroke={circlePoint.color}\n fill={this.props.theme!.semanticColors.bodyBackground}\n strokeWidth={3}\n visibility={this._getCircleVisibilityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).visibility}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />,\n );\n });\n });\n return (\n <>\n {borderForLines}\n {lines}\n {dots}\n </>\n );\n };\n\n private _getCircleVisibilityAndRadius = (\n xAxisPoint: string | number | Date,\n legend: string,\n ): { visibility: CircleVisbility; radius: number } => {\n const { selectedLegend, activeXAxisDataPoint } = this.state;\n if (selectedLegend !== '') {\n if (xAxisPoint === activeXAxisDataPoint && selectedLegend === legend) {\n return { visibility: CircleVisbility.show, radius: 8 };\n } else if (selectedLegend === legend) {\n return { visibility: CircleVisbility.show, radius: 0.3 };\n } else {\n return { visibility: CircleVisbility.hide, radius: 0 };\n }\n } else {\n return {\n visibility: activeXAxisDataPoint === xAxisPoint ? CircleVisbility.show : CircleVisbility.hide,\n radius: 8,\n };\n }\n };\n\n 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 deprecation/deprecation\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(this.props.xAxisInnerPadding, this.props.xAxisPadding, 2 / 3);\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 _onLegendClick(legendTitle: string): void {\n if (this.state.selectedLegend === legendTitle) {\n this.setState({\n selectedLegend: '',\n });\n } else {\n this.setState({\n selectedLegend: legendTitle,\n });\n }\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: '',\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 } = this.props;\n\n data.forEach((singleChartData: IVerticalStackedChartProps) => {\n singleChartData.chartData.forEach((point: IVSChartDataPoint) => {\n const color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\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: color,\n action: () => {\n this._onLegendClick(point.legend);\n },\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 action: () => {\n this._onLegendClick(point.title);\n },\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 />\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.state.selectedLegend === '' || this.state.selectedLegend === 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.setState({\n refSelected: mouseEvent,\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\n private _lineHoverOut = () => {\n this.setState({\n refSelected: null,\n isCalloutVisible: false,\n xCalloutValue: '',\n yCalloutValue: '',\n activeXAxisDataPoint: '',\n color: '',\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 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 this.setState({\n refSelected,\n isCalloutVisible: true,\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: stack.xAxisPoint instanceof Date ? stack.xAxisPoint.toLocaleDateString() : 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 } {\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 + value.data, 0);\n const totalHeight = defaultTotalHeight ?? yBarScale(totalData);\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;\n\n return {\n gapHeight,\n heightValueScale,\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 && this.props.barWidth === 'auto') {\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 let yPoint = containerHeight - this.margins.bottom!;\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 //Time Range is +/-barwidth/2 , so we have to adjust\n //that while making bars because the tick must come in center of bar\n const xScaleBandwidthTranslate =\n this._xAxisType === XAxisTypes.NumericAxis\n ? 0\n : this._xAxisType === XAxisTypes.DateAxis\n ? -this._barWidth / 2\n : (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 } = this._getBarGapAndScale(barsToDisplay, yBarScale);\n\n if (heightValueScale < 0) {\n return undefined;\n }\n\n const singleBar = barsToDisplay.map((point: IVSChartDataPoint, index: number) => {\n const color = point.color ? point.color : this._colors[index];\n const ref: IRefArrayData = {};\n\n const shouldHighlight = this._legendHighlighted(point.legend) || this._noLegendHighlighted() ? true : false;\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n shouldHighlight: shouldHighlight,\n href: this.props.href,\n });\n const rectFocusProps = !shouldFocusWholeStack && {\n 'data-is-focusable': !this.props.hideTooltip,\n 'aria-label': this._getAriaLabel(singleChartData, point),\n onMouseOver: this._onRectHover.bind(this, singleChartData.xAxisPoint, point, color),\n onMouseMove: this._onRectHover.bind(this, singleChartData.xAxisPoint, point, color),\n onMouseLeave: this._handleMouseOut,\n onFocus: this._onRectFocus.bind(this, point, singleChartData.xAxisPoint, color, ref),\n onBlur: this._handleMouseOut,\n onClick: this._onClick.bind(this, point),\n role: 'img',\n };\n\n let barHeight = heightValueScale * point.data;\n if (barHeight < Math.max(Math.ceil((heightValueScale * this._yMax) / 100.0), barMinimumHeight)) {\n barHeight = Math.max(Math.ceil((heightValueScale * this._yMax) / 100.0), barMinimumHeight);\n }\n yPoint = yPoint - barHeight - (index ? gapHeight : 0);\n barTotalValue += point.data;\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 <path\n key={index + indexNumber + `${shouldFocusWholeStack}`}\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={color}\n ref={e => (ref.refElement = e)}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n {...rectFocusProps}\n />\n );\n }\n if (barHeight < 0) {\n return <React.Fragment key={index + indexNumber}> </React.Fragment>;\n }\n return (\n <rect\n key={index + indexNumber}\n className={this._classNames.opacityChangeOnHover}\n x={xPoint}\n y={yPoint}\n width={this._barWidth}\n height={barHeight}\n fill={color}\n ref={e => (ref.refElement = e)}\n {...rectFocusProps}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />\n );\n });\n const groupRef: IRefArrayData = {};\n const stackFocusProps = shouldFocusWholeStack && {\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._legendHighlighted(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 y={yPoint - 6}\n textAnchor=\"middle\"\n className={this._classNames.barLabel}\n aria-label={`Total: ${barLabel}`}\n role=\"img\"\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n >\n {formatValueWithSIPrefix(barLabel)}\n </text>\n )}\n </g>\n );\n });\n // 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 yMax = this._yMax;\n const yBarScale = d3ScaleLinear()\n .domain([0, yMax])\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 .nice()\n .range([\n this.margins.left! + this._domainMargin,\n containerWidth - this.margins.right! - this._barWidth - this._domainMargin,\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 = d3ScaleUtc()\n .domain(this._isRtl ? [lDate, sDate] : [sDate, lDate])\n .range([\n this.margins.left! + this._domainMargin + this._barWidth / 2,\n containerWidth - this.margins.right! - this._barWidth / 2 - this._domainMargin,\n ]);\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 || 0);\n }\n };\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legendTitle: string) => {\n return (\n this.state.selectedLegend === legendTitle ||\n (this.state.selectedLegend === '' && this.state.activeLegend === legendTitle)\n );\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this.state.selectedLegend === '' && this.state.activeLegend === '';\n };\n\n private _getAriaLabel = (singleChartData: IVerticalStackedChartProps, point?: IVSChartDataPoint): string => {\n if (!point) {\n /** if shouldFocusWholeStack is true */\n const xValue = singleChartData.xAxisCalloutData || singleChartData.xAxisPoint;\n const pointValues = singleChartData.chartData\n .map(pt => {\n const legend = pt.legend;\n const yValue = pt.yAxisCalloutData || pt.data;\n return `${legend}, ${yValue}.`;\n })\n .join(' ');\n const lineValues = singleChartData.lineData\n ?.map(ln => {\n const legend = ln.legend;\n const yValue = ln.yAxisCalloutData || ln.data || ln.y;\n return `${legend}, ${yValue}.`;\n })\n .join(' ');\n return (\n singleChartData.stackCallOutAccessibilityData?.ariaLabel ||\n `${xValue}. ${pointValues}` + (lineValues ? ` ${lineValues}` : '')\n );\n }\n /** if shouldFocusWholeStack is false */\n const xValue = singleChartData.xAxisCalloutData || point.xAxisCalloutData || singleChartData.xAxisPoint;\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.data;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n };\n\n private _getDomainMargins = (containerWidth: number): IMargins => {\n this._domainMargin = MIN_DOMAIN_MARGIN;\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 /** 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 /** 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 += (totalWidth - reqWidth) / 2;\n }\n }\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.filter(item => item.chartData.length === 0).length === 0\n );\n }\n}\n"]}
1
+ {"version":3,"file":"VerticalStackedBarChart.base.js","sourceRoot":"../src/","sources":["components/VerticalStackedBarChart/VerticalStackedBarChart.base.tsx"],"names":[],"mappings":";;;;IA6CA,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;IAY5B,IAAK,eAGJ;IAHD,WAAK,eAAe;QAClB,sCAAmB,CAAA;QACnB,kCAAe,CAAA;IACjB,CAAC,EAHI,eAAe,KAAf,eAAe,QAGnB;IAcD;QAAiD,uDAGhD;QA0BC,qCAAmB,KAAoC;YAAvD,YACE,kBAAM,KAAK,CAAC,SA4Bb;YAzCO,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;YAwJnC;;;;;;;eAOG;YACK,wBAAkB,GAAG,UAAC,cAAuB;gBAC3C,IAAA,KAA8B,KAAI,CAAC,KAAK,kBAAf,EAAzB,iBA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S,EAAE,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,WAAW,GAAG,gBAAgB,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YAC5G,IAAM,gBAAgB,GAAG,CAAC,WAAW,GAAG,SAAS,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;YAEtE,OAAO;gBACL,SAAS,WAAA;gBACT,gBAAgB,kBAAA;aACR,CAAC;QACb,CAAC;QA6VO,mDAAa,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,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAA3B,CAA2B,CAAC,CAAC,MAAM,KAAK,CAAC,CACzE,CAAC;QACJ,CAAC;QA3+Ba,wCAAY,GAA2C;YACnE,WAAW,EAAE,EAAE;SAChB,CAAC;QA0+BJ,kCAAC;KAAA,AAh/BD,CAAiD,KAAK,CAAC,SAAS,GAg/B/D;IAh/BY,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} from 'd3-scale';\nimport { classNamesFunction, getId, getRTL, warnDeprecations, memoizeFunction } from '@fluentui/react/lib/Utilities';\nimport { IPalette, IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { ILegend, 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} from '../../index';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n getTypeOfAxis,\n tooltipOfXAxislabels,\n formatValueWithSIPrefix,\n getBarWidth,\n getScalePadding,\n isScalePaddingDefined,\n calculateAppropriateBarWidth,\n} from '../../utilities/index';\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};\nenum CircleVisbility {\n show = 'visibility',\n hide = 'hidden',\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}\nexport class VerticalStackedBarChartBase extends React.Component<\n IVerticalStackedBarChartProps,\n IVerticalStackedBarChartState\n> {\n public static defaultProps: Partial<IVerticalStackedBarChartProps> = {\n maxBarWidth: 24,\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 _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\n public constructor(props: IVerticalStackedBarChartProps) {\n super(props);\n this.state = {\n isCalloutVisible: false,\n selectedLegend: '',\n activeLegend: '',\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 }\n\n public componentDidUpdate(prevProps: IVerticalStackedBarChartProps): void {\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 points={this._dataset}\n chartType={ChartTypes.VerticalStackedBarChart}\n xAxisType={this._xAxisType}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n datasetForXAxisDomain={this._xAxisLabels}\n isCalloutForStack={shouldFocusWholeStack}\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 /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n return (\n <>\n <g>{this._bars}</g>\n <g>\n {_isHavingLines &&\n this._createLines(\n props.xScale!,\n props.yScale!,\n props.containerHeight!,\n props.containerWidth!,\n props.yScaleSecondary,\n )}\n </g>\n </>\n );\n }}\n />\n );\n }\n return (\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 /**\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.state.selectedLegend !== '') {\n shouldFocusStackOnly = false;\n } else {\n shouldFocusStackOnly = true;\n }\n } else {\n shouldFocusStackOnly = isCalloutForStack;\n }\n return shouldFocusStackOnly;\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 yScale: NumericScale,\n containerHeight: number,\n containerWidth: number,\n secondaryYScale?: 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._legendHighlighted(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 && secondaryYScale;\n const y1 = useSecondaryYScale ? secondaryYScale!(lineObject[item][i - 1].y) : yScale(lineObject[item][i - 1].y);\n const x2 = xScale(lineObject[item][i].xItem.xAxisPoint);\n const y2 = useSecondaryYScale ? secondaryYScale!(lineObject[item][i].y) : yScale(lineObject[item][i].y);\n\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={3}\n strokeLinecap=\"round\"\n stroke={lineObject[item][i].color}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n {...(this.state.selectedLegend === item && {\n onMouseOver: this._lineHover.bind(this, lineObject[item][i - 1]),\n onMouseLeave: this._lineHoverOut,\n })}\n />,\n );\n }\n });\n Object.keys(lineObject).forEach((item: string, index: number) => {\n lineObject[item].forEach((circlePoint: LinePoint, subIndex: number) => {\n dots.push(\n <circle\n key={`${index}-${subIndex}-dot`}\n cx={xScale(circlePoint.xItem.xAxisPoint)}\n cy={\n circlePoint.useSecondaryYScale && secondaryYScale ? secondaryYScale(circlePoint.y) : yScale(circlePoint.y)\n }\n onMouseOver={\n this.state.selectedLegend === item\n ? this._lineHover.bind(this, circlePoint)\n : this._onStackHover.bind(this, circlePoint.xItem)\n }\n {...(this.state.selectedLegend === item && {\n onMouseLeave: this._lineHoverOut,\n })}\n r={this._getCircleVisibilityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).radius}\n stroke={circlePoint.color}\n fill={this.props.theme!.semanticColors.bodyBackground}\n strokeWidth={3}\n visibility={this._getCircleVisibilityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).visibility}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />,\n );\n });\n });\n return (\n <>\n {borderForLines}\n {lines}\n {dots}\n </>\n );\n };\n\n private _getCircleVisibilityAndRadius = (\n xAxisPoint: string | number | Date,\n legend: string,\n ): { visibility: CircleVisbility; radius: number } => {\n const { selectedLegend, activeXAxisDataPoint } = this.state;\n if (selectedLegend !== '') {\n if (xAxisPoint === activeXAxisDataPoint && selectedLegend === legend) {\n return { visibility: CircleVisbility.show, radius: 8 };\n } else if (selectedLegend === legend) {\n return { visibility: CircleVisbility.show, radius: 0.3 };\n } else {\n return { visibility: CircleVisbility.hide, radius: 0 };\n }\n } else {\n return {\n visibility: activeXAxisDataPoint === xAxisPoint ? CircleVisbility.show : CircleVisbility.hide,\n radius: 8,\n };\n }\n };\n\n 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 deprecation/deprecation\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(this.props.xAxisInnerPadding, this.props.xAxisPadding, 2 / 3);\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 _onLegendClick(legendTitle: string): void {\n if (this.state.selectedLegend === legendTitle) {\n this.setState({\n selectedLegend: '',\n });\n } else {\n this.setState({\n selectedLegend: legendTitle,\n });\n }\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: '',\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 } = this.props;\n\n data.forEach((singleChartData: IVerticalStackedChartProps) => {\n singleChartData.chartData.forEach((point: IVSChartDataPoint) => {\n const color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\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: color,\n action: () => {\n this._onLegendClick(point.legend);\n },\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 action: () => {\n this._onLegendClick(point.title);\n },\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 />\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.state.selectedLegend === '' || this.state.selectedLegend === 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.setState({\n refSelected: mouseEvent,\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\n private _lineHoverOut = () => {\n this.setState({\n refSelected: null,\n isCalloutVisible: false,\n xCalloutValue: '',\n yCalloutValue: '',\n activeXAxisDataPoint: '',\n color: '',\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 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 this.setState({\n refSelected,\n isCalloutVisible: true,\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: stack.xAxisPoint instanceof Date ? stack.xAxisPoint.toLocaleDateString() : 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 } {\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 + value.data, 0);\n const totalHeight = defaultTotalHeight ?? yBarScale(totalData);\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;\n\n return {\n gapHeight,\n heightValueScale,\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 let yPoint = containerHeight - this.margins.bottom!;\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 } = this._getBarGapAndScale(barsToDisplay, yBarScale);\n\n if (heightValueScale < 0) {\n return undefined;\n }\n\n const singleBar = barsToDisplay.map((point: IVSChartDataPoint, index: number) => {\n const color = point.color ? point.color : this._colors[index];\n const ref: IRefArrayData = {};\n\n const shouldHighlight = this._legendHighlighted(point.legend) || this._noLegendHighlighted() ? true : false;\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n shouldHighlight: shouldHighlight,\n href: this.props.href,\n });\n const rectFocusProps = !shouldFocusWholeStack && {\n 'data-is-focusable': !this.props.hideTooltip && shouldHighlight,\n 'aria-label': this._getAriaLabel(singleChartData, point),\n onMouseOver: this._onRectHover.bind(this, singleChartData.xAxisPoint, point, color),\n onMouseMove: this._onRectHover.bind(this, singleChartData.xAxisPoint, point, color),\n onMouseLeave: this._handleMouseOut,\n onFocus: this._onRectFocus.bind(this, point, singleChartData.xAxisPoint, color, ref),\n onBlur: this._handleMouseOut,\n onClick: this._onClick.bind(this, point),\n role: 'img',\n };\n\n let barHeight = heightValueScale * point.data;\n if (barHeight < Math.max(Math.ceil((heightValueScale * this._yMax) / 100.0), barMinimumHeight)) {\n barHeight = Math.max(Math.ceil((heightValueScale * this._yMax) / 100.0), barMinimumHeight);\n }\n yPoint = yPoint - barHeight - (index ? gapHeight : 0);\n barTotalValue += point.data;\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 <path\n key={index + indexNumber + `${shouldFocusWholeStack}`}\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={color}\n ref={e => (ref.refElement = e)}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n {...rectFocusProps}\n />\n );\n }\n if (barHeight < 0) {\n return <React.Fragment key={index + indexNumber}> </React.Fragment>;\n }\n return (\n <rect\n key={index + indexNumber}\n className={this._classNames.opacityChangeOnHover}\n x={xPoint}\n y={yPoint}\n width={this._barWidth}\n height={barHeight}\n fill={color}\n ref={e => (ref.refElement = e)}\n {...rectFocusProps}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />\n );\n });\n const groupRef: IRefArrayData = {};\n const stackFocusProps = shouldFocusWholeStack && {\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._legendHighlighted(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 y={yPoint - 6}\n textAnchor=\"middle\"\n className={this._classNames.barLabel}\n aria-label={`Total: ${barLabel}`}\n role=\"img\"\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n >\n {formatValueWithSIPrefix(barLabel)}\n </text>\n )}\n </g>\n );\n });\n // 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 yMax = this._yMax;\n const yBarScale = d3ScaleLinear()\n .domain([0, yMax])\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 .nice()\n .range([this.margins.left! + this._domainMargin, containerWidth - this.margins.right! - this._domainMargin]);\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 = d3ScaleUtc()\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 || 0);\n }\n };\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legendTitle: string) => {\n return (\n this.state.selectedLegend === legendTitle ||\n (this.state.selectedLegend === '' && this.state.activeLegend === legendTitle)\n );\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this.state.selectedLegend === '' && this.state.activeLegend === '';\n };\n\n private _getAriaLabel = (singleChartData: IVerticalStackedChartProps, point?: IVSChartDataPoint): string => {\n if (!point) {\n /** if shouldFocusWholeStack is true */\n const xValue = singleChartData.xAxisCalloutData || singleChartData.xAxisPoint;\n const pointValues = singleChartData.chartData\n .map(pt => {\n const legend = pt.legend;\n const yValue = pt.yAxisCalloutData || pt.data;\n return `${legend}, ${yValue}.`;\n })\n .join(' ');\n const lineValues = singleChartData.lineData\n ?.map(ln => {\n const legend = ln.legend;\n const yValue = ln.yAxisCalloutData || ln.data || ln.y;\n return `${legend}, ${yValue}.`;\n })\n .join(' ');\n return (\n singleChartData.stackCallOutAccessibilityData?.ariaLabel ||\n `${xValue}. ${pointValues}` + (lineValues ? ` ${lineValues}` : '')\n );\n }\n /** if shouldFocusWholeStack is false */\n const xValue = singleChartData.xAxisCalloutData || point.xAxisCalloutData || singleChartData.xAxisPoint;\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.data;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n };\n\n 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\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 /** Rate at which the space between the bars changes wrt the bar width */\n const barGapRate = this._xAxisInnerPadding / (1 - this._xAxisInnerPadding);\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 }\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),\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.filter(item => item.chartData.length === 0).length === 0\n );\n }\n}\n"]}
@@ -13,8 +13,8 @@ export interface IVerticalStackedBarChartProps extends ICartesianChartProps {
13
13
  */
14
14
  data: IVerticalStackedChartProps[];
15
15
  /**
16
- * Width of each bar in the chart. When set to `undefined` or `'default'`, the bar width defaults to 16px.
17
- * When set to `auto` (which is only applicable to string x-axis), the bar width is calculated from padding values.
16
+ * Width of each bar in the chart. When set to `undefined` or `'default'`, the bar width defaults to 16px,
17
+ * which may decrease to prevent overlap. When set to `'auto'`, the bar width is calculated from padding values.
18
18
  */
19
19
  barWidth?: number | 'default' | 'auto';
20
20
  /**
@@ -99,6 +99,7 @@ export interface IVerticalStackedBarChartProps extends ICartesianChartProps {
99
99
  hideLabels?: boolean;
100
100
  /**
101
101
  * Maximum width of a bar, in pixels.
102
+ * @default 24
102
103
  */
103
104
  maxBarWidth?: number;
104
105
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"VerticalStackedBarChart.types.js","sourceRoot":"../src/","sources":["components/VerticalStackedBarChart/VerticalStackedBarChart.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { IStyle } from '@fluentui/react/lib/Styling';\nimport { ICalloutProps } from '@fluentui/react/lib/Callout';\nimport { IRenderFunction, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\nimport {\n ICartesianChartProps,\n ICartesianChartStyleProps,\n ICartesianChartStyles,\n ILineChartLineOptions,\n IVerticalStackedChartProps,\n IVSChartDataPoint,\n} from '../../index';\n\n/**\n * Vertical Stacked Bar Chart properties\n * {@docCategory VerticalStackedBarChart}\n */\nexport interface IVerticalStackedBarChartProps extends ICartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data: IVerticalStackedChartProps[];\n\n /**\n * Width of each bar in the chart. When set to `undefined` or `'default'`, the bar width defaults to 16px.\n * When set to `auto` (which is only applicable to string x-axis), the bar width is calculated from padding values.\n */\n barWidth?: number | 'default' | 'auto';\n\n /**\n * Gap (max) between bars in a stack. When non-zero, the bars in a stack will\n * be separated by gaps. The actual size of each gap is calculated as 20% of\n * the height of that stack, with a minimum size of 1px and a maximum given by\n * this prop.\n * @default 0\n */\n barGapMax?: number;\n\n /**\n * Corner radius of the bars\n * @default 0\n */\n barCornerRadius?: number;\n\n /**\n * The minimum height of a bar; bars below this height will be displayed at\n * this height. Note that this setting will result in the height of these data\n * points not being to scale.\n * @default 0\n */\n barMinimumHeight?: number;\n\n /**\n * Colors from which to select the color of each bar.\n * @deprecated Not using this prop. DIrectly taking color from given data.\n */\n colors?: string[];\n\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * To display multi stack callout or single callout\n * @default flase\n */\n isCalloutForStack?: boolean;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IStyleFunctionOrObject<IVerticalStackedBarChartStyleProps, IVerticalStackedBarChartStyles>;\n\n /**\n * Define a custom callout renderer for a stack; default is to render per data point\n */\n onRenderCalloutPerStack?: IRenderFunction<IVerticalStackedChartProps>;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: IRenderFunction<IVSChartDataPoint>;\n\n /**\n * props for the callout in the chart\n */\n calloutProps?: Partial<ICalloutProps>;\n\n /**\n * yMinValue is not supported for bar charts, so only allow \"undefined\"\n */\n yMinValue?: undefined;\n\n /**\n * Allow hover actions on the legend\n * @default true\n */\n allowHoverOnLegend?: boolean;\n\n /**\n * Click handler for bars; type of data is dependant on isCalloutForStack\n */\n onBarClick?: (event: React.MouseEvent<SVGElement>, data: IVerticalStackedChartProps | IVSChartDataPoint) => void;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * it's padding between bar's or lines in the graph\n */\n xAxisPadding?: number;\n\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\n\n /**\n * Prop to hide the bar labels\n * @default false\n */\n hideLabels?: boolean;\n\n /**\n * Maximum width of a bar, in pixels.\n */\n maxBarWidth?: number;\n\n /**\n * Padding between bars as a fraction of the [step](https://d3js.org/d3-scale/band#band_step).\n * Takes a number in the range [0, 1]. Only applicable to string x-axis.\n * @default 2/3\n */\n xAxisInnerPadding?: number;\n\n /**\n * Padding before the first bar and after the last bar as a fraction of\n * the [step](https://d3js.org/d3-scale/band#band_step). Takes a number in the range [0, 1].\n * Only applicable to string x-axis.\n */\n xAxisOuterPadding?: number;\n}\n\n/**\n * Vertical Stacked Bar Chart style properties\n * {@docCategory VerticalStackedBarChart}\n */\nexport interface IVerticalStackedBarChartStyleProps extends ICartesianChartStyleProps {}\n\n/**\n * Vertical Stacked Bar Chart styles\n * {@docCategory VerticalStackedBarChart}\n */\nexport interface IVerticalStackedBarChartStyles extends ICartesianChartStyles {\n /**\n * Style to change the opacity of bars in dataviz when we hover on a single bar or legends\n */\n opacityChangeOnHover?: IStyle;\n\n /**\n * Style for the bar labels\n */\n barLabel: IStyle;\n\n /**\n * Style for the chart.\n * @deprecated use root instead.\n */\n chart?: IStyle;\n\n /**\n * Style for the line representing the domain of the x-axis.\n * @deprecated - use xAxis instead.\n */\n xAxisDomain?: IStyle;\n\n /**\n * Style for the lines representing the ticks along the x-axis.\n * @deprecated - use xAxis instead.\n */\n xAxisTicks?: IStyle;\n\n /**\n * Style for the text labeling each tick along the x-axis.\n * @deprecated - use xAxis instead.\n */\n xAxisText?: IStyle;\n\n /**\n * Style for the line representing the domain of the y-axis.\n * @deprecated - use xAxis instead.\n */\n yAxisDomain?: IStyle;\n\n /**\n * Style for the lines representing the ticks along the y-axis.\n * @deprecated - use xAxis instead.\n */\n yAxisTicks?: IStyle;\n\n /**\n * Style for the text labeling each tick along the y-axis.\n * @deprecated - use xAxis instead.\n */\n yAxisText?: IStyle;\n}\n"]}
1
+ {"version":3,"file":"VerticalStackedBarChart.types.js","sourceRoot":"../src/","sources":["components/VerticalStackedBarChart/VerticalStackedBarChart.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { IStyle } from '@fluentui/react/lib/Styling';\nimport { ICalloutProps } from '@fluentui/react/lib/Callout';\nimport { IRenderFunction, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\nimport {\n ICartesianChartProps,\n ICartesianChartStyleProps,\n ICartesianChartStyles,\n ILineChartLineOptions,\n IVerticalStackedChartProps,\n IVSChartDataPoint,\n} from '../../index';\n\n/**\n * Vertical Stacked Bar Chart properties\n * {@docCategory VerticalStackedBarChart}\n */\nexport interface IVerticalStackedBarChartProps extends ICartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data: IVerticalStackedChartProps[];\n\n /**\n * Width of each bar in the chart. When set to `undefined` or `'default'`, the bar width defaults to 16px,\n * which may decrease to prevent overlap. When set to `'auto'`, the bar width is calculated from padding values.\n */\n barWidth?: number | 'default' | 'auto';\n\n /**\n * Gap (max) between bars in a stack. When non-zero, the bars in a stack will\n * be separated by gaps. The actual size of each gap is calculated as 20% of\n * the height of that stack, with a minimum size of 1px and a maximum given by\n * this prop.\n * @default 0\n */\n barGapMax?: number;\n\n /**\n * Corner radius of the bars\n * @default 0\n */\n barCornerRadius?: number;\n\n /**\n * The minimum height of a bar; bars below this height will be displayed at\n * this height. Note that this setting will result in the height of these data\n * points not being to scale.\n * @default 0\n */\n barMinimumHeight?: number;\n\n /**\n * Colors from which to select the color of each bar.\n * @deprecated Not using this prop. DIrectly taking color from given data.\n */\n colors?: string[];\n\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * To display multi stack callout or single callout\n * @default flase\n */\n isCalloutForStack?: boolean;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IStyleFunctionOrObject<IVerticalStackedBarChartStyleProps, IVerticalStackedBarChartStyles>;\n\n /**\n * Define a custom callout renderer for a stack; default is to render per data point\n */\n onRenderCalloutPerStack?: IRenderFunction<IVerticalStackedChartProps>;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: IRenderFunction<IVSChartDataPoint>;\n\n /**\n * props for the callout in the chart\n */\n calloutProps?: Partial<ICalloutProps>;\n\n /**\n * yMinValue is not supported for bar charts, so only allow \"undefined\"\n */\n yMinValue?: undefined;\n\n /**\n * Allow hover actions on the legend\n * @default true\n */\n allowHoverOnLegend?: boolean;\n\n /**\n * Click handler for bars; type of data is dependant on isCalloutForStack\n */\n onBarClick?: (event: React.MouseEvent<SVGElement>, data: IVerticalStackedChartProps | IVSChartDataPoint) => void;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * it's padding between bar's or lines in the graph\n */\n xAxisPadding?: number;\n\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\n\n /**\n * Prop to hide the bar labels\n * @default false\n */\n hideLabels?: boolean;\n\n /**\n * Maximum width of a bar, in pixels.\n * @default 24\n */\n maxBarWidth?: number;\n\n /**\n * Padding between bars as a fraction of the [step](https://d3js.org/d3-scale/band#band_step).\n * Takes a number in the range [0, 1]. Only applicable to string x-axis.\n * @default 2/3\n */\n xAxisInnerPadding?: number;\n\n /**\n * Padding before the first bar and after the last bar as a fraction of\n * the [step](https://d3js.org/d3-scale/band#band_step). Takes a number in the range [0, 1].\n * Only applicable to string x-axis.\n */\n xAxisOuterPadding?: number;\n}\n\n/**\n * Vertical Stacked Bar Chart style properties\n * {@docCategory VerticalStackedBarChart}\n */\nexport interface IVerticalStackedBarChartStyleProps extends ICartesianChartStyleProps {}\n\n/**\n * Vertical Stacked Bar Chart styles\n * {@docCategory VerticalStackedBarChart}\n */\nexport interface IVerticalStackedBarChartStyles extends ICartesianChartStyles {\n /**\n * Style to change the opacity of bars in dataviz when we hover on a single bar or legends\n */\n opacityChangeOnHover?: IStyle;\n\n /**\n * Style for the bar labels\n */\n barLabel: IStyle;\n\n /**\n * Style for the chart.\n * @deprecated use root instead.\n */\n chart?: IStyle;\n\n /**\n * Style for the line representing the domain of the x-axis.\n * @deprecated - use xAxis instead.\n */\n xAxisDomain?: IStyle;\n\n /**\n * Style for the lines representing the ticks along the x-axis.\n * @deprecated - use xAxis instead.\n */\n xAxisTicks?: IStyle;\n\n /**\n * Style for the text labeling each tick along the x-axis.\n * @deprecated - use xAxis instead.\n */\n xAxisText?: IStyle;\n\n /**\n * Style for the line representing the domain of the y-axis.\n * @deprecated - use xAxis instead.\n */\n yAxisDomain?: IStyle;\n\n /**\n * Style for the lines representing the ticks along the y-axis.\n * @deprecated - use xAxis instead.\n */\n yAxisTicks?: IStyle;\n\n /**\n * Style for the text labeling each tick along the y-axis.\n * @deprecated - use xAxis instead.\n */\n yAxisText?: IStyle;\n}\n"]}
@@ -1,3 +1,4 @@
1
1
  export * from './ChartHoverCard/index';
2
2
  export * from './utilities';
3
3
  export * from './colors';
4
+ export * from './vbc-utils';
@@ -1,8 +1,9 @@
1
- define(["require", "exports", "tslib", "./ChartHoverCard/index", "./utilities", "./colors"], function (require, exports, tslib_1, index_1, utilities_1, colors_1) {
1
+ define(["require", "exports", "tslib", "./ChartHoverCard/index", "./utilities", "./colors", "./vbc-utils"], function (require, exports, tslib_1, index_1, utilities_1, colors_1, vbc_utils_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  tslib_1.__exportStar(index_1, exports);
5
5
  tslib_1.__exportStar(utilities_1, exports);
6
6
  tslib_1.__exportStar(colors_1, exports);
7
+ tslib_1.__exportStar(vbc_utils_1, exports);
7
8
  });
8
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["utilities/index.ts"],"names":[],"mappings":";;;IAAA,uCAAuC;IACvC,2CAA4B;IAC5B,wCAAyB","sourcesContent":["export * from './ChartHoverCard/index';\nexport * from './utilities';\nexport * from './colors';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["utilities/index.ts"],"names":[],"mappings":";;;IAAA,uCAAuC;IACvC,2CAA4B;IAC5B,wCAAyB;IACzB,2CAA4B","sourcesContent":["export * from './ChartHoverCard/index';\nexport * from './utilities';\nexport * from './colors';\nexport * from './vbc-utils';\n"]}
@@ -440,7 +440,7 @@ export declare const convertToLocaleString: (data: LocaleStringDataProps, cultur
440
440
  export declare function rotateXAxisLabels(rotateLabelProps: IRotateLabelProps): number | undefined;
441
441
  export declare function wrapTextInsideDonut(selectorClass: string, maxWidth: number): void;
442
442
  export declare function formatValueWithSIPrefix(value: number): string;
443
- export declare const getBarWidth: (barWidthProp: number | 'default' | 'auto' | undefined, maxBarWidthProp: number | undefined, defaultValue?: number) => number;
443
+ export declare const getBarWidth: (barWidthProp: number | 'default' | 'auto' | undefined, maxBarWidthProp: number | undefined, adjustedValue?: number) => number;
444
444
  export declare const getScalePadding: (prop: number | undefined, shorthandProp?: number, defaultValue?: number) => number;
445
445
  export declare const isScalePaddingDefined: (prop: number | undefined, shorthandProp?: number) => boolean;
446
446
  export {};
@@ -699,9 +699,8 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
699
699
  function domainRangeOfVSBCNumeric(points, margins, width, isRTL, barWidth) {
700
700
  var xMin = (0, d3_array_1.min)(points, function (point) { return point.x; });
701
701
  var xMax = (0, d3_array_1.max)(points, function (point) { return point.x; });
702
- // barWidth / 2 - for to get tick middle of the bar
703
- var rMax = margins.left + barWidth / 2;
704
- var rMin = width - margins.right - barWidth / 2;
702
+ var rMax = margins.left;
703
+ var rMin = width - margins.right;
705
704
  return isRTL
706
705
  ? { dStartValue: xMax, dEndValue: xMin, rStartValue: rMax, rEndValue: rMin }
707
706
  : { dStartValue: xMin, dEndValue: xMax, rStartValue: rMax, rEndValue: rMin };
@@ -748,8 +747,8 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
748
747
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
749
748
  lDate = (0, d3_array_1.max)(points, function (point) { return point.x; });
750
749
  }
751
- var rStartValue = margins.left + (barWidth ? barWidth / 2 : 0);
752
- var rEndValue = width - margins.right - (barWidth ? barWidth / 2 : 0);
750
+ var rStartValue = margins.left;
751
+ var rEndValue = width - margins.right;
753
752
  return isRTL
754
753
  ? { dStartValue: lDate, dEndValue: sDate, rStartValue: rStartValue, rEndValue: rEndValue }
755
754
  : { dStartValue: sDate, dEndValue: lDate, rStartValue: rStartValue, rEndValue: rEndValue };
@@ -768,8 +767,8 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
768
767
  function domainRageOfVerticalNumeric(points, margins, containerWidth, isRTL, barWidth) {
769
768
  var xMax = (0, d3_array_1.max)(points, function (point) { return point.x; });
770
769
  var xMin = (0, d3_array_1.min)(points, function (point) { return point.x; });
771
- var rMin = margins.left + barWidth / 2;
772
- var rMax = containerWidth - margins.right - barWidth / 2;
770
+ var rMin = margins.left;
771
+ var rMax = containerWidth - margins.right;
773
772
  return isRTL
774
773
  ? { dStartValue: xMax, dEndValue: xMin, rStartValue: rMin, rEndValue: rMax }
775
774
  : { dStartValue: xMin, dEndValue: xMax, rStartValue: rMin, rEndValue: rMax };
@@ -1162,17 +1161,17 @@ define(["require", "exports", "tslib", "d3-axis", "d3-array", "d3-scale", "d3-se
1162
1161
  exports.formatValueWithSIPrefix = formatValueWithSIPrefix;
1163
1162
  var DEFAULT_BAR_WIDTH = 16;
1164
1163
  var MIN_BAR_WIDTH = 1;
1165
- var getBarWidth = function (barWidthProp, maxBarWidthProp, defaultValue) {
1166
- if (defaultValue === void 0) { defaultValue = DEFAULT_BAR_WIDTH; }
1164
+ var getBarWidth = function (barWidthProp, maxBarWidthProp, adjustedValue) {
1165
+ if (adjustedValue === void 0) { adjustedValue = DEFAULT_BAR_WIDTH; }
1167
1166
  var barWidth;
1168
1167
  if (typeof barWidthProp === 'number') {
1169
1168
  barWidth = barWidthProp;
1170
1169
  }
1171
1170
  else if (barWidthProp === 'default' || typeof barWidthProp === 'undefined') {
1172
- barWidth = DEFAULT_BAR_WIDTH;
1171
+ barWidth = Math.min(adjustedValue, DEFAULT_BAR_WIDTH);
1173
1172
  }
1174
1173
  else {
1175
- barWidth = defaultValue;
1174
+ barWidth = adjustedValue;
1176
1175
  }
1177
1176
  if (typeof maxBarWidthProp === 'number') {
1178
1177
  barWidth = Math.min(barWidth, maxBarWidthProp);