@fluentui/react-charting 5.23.83 → 5.23.85

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 (95) hide show
  1. package/CHANGELOG.json +55 -1
  2. package/CHANGELOG.md +24 -2
  3. package/dist/react-charting.d.ts +7 -0
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +2 -0
  7. package/lib/components/CommonComponents/CartesianChart.base.js +1 -1
  8. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  9. package/lib/components/CommonComponents/CartesianChart.types.d.ts +2 -0
  10. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  11. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +10 -5
  12. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  13. package/lib/components/DonutChart/Arc/Arc.js +2 -2
  14. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  15. package/lib/components/GaugeChart/GaugeChart.base.js +3 -3
  16. package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
  17. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +1 -0
  18. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +19 -9
  19. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  20. package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js +2 -2
  21. package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  22. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +5 -0
  23. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +78 -16
  24. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  25. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +2 -2
  26. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  27. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +2 -2
  28. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  29. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +2 -2
  30. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  31. package/lib/types/IDataPoint.d.ts +5 -0
  32. package/lib/types/IDataPoint.js.map +1 -1
  33. package/lib/utilities/utilities.d.ts +8 -1
  34. package/lib/utilities/utilities.js +151 -51
  35. package/lib/utilities/utilities.js.map +1 -1
  36. package/lib-amd/components/CommonComponents/CartesianChart.base.js +1 -1
  37. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  38. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +2 -0
  39. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  40. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +10 -5
  41. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  42. package/lib-amd/components/DonutChart/Arc/Arc.js +1 -1
  43. package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
  44. package/lib-amd/components/GaugeChart/GaugeChart.base.js +2 -2
  45. package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
  46. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +1 -0
  47. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +18 -8
  48. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  49. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js +1 -1
  50. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  51. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +5 -0
  52. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +77 -16
  53. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  54. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +1 -1
  55. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  56. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +1 -1
  57. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  58. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +1 -1
  59. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  60. package/lib-amd/types/IDataPoint.d.ts +5 -0
  61. package/lib-amd/types/IDataPoint.js.map +1 -1
  62. package/lib-amd/utilities/utilities.d.ts +8 -1
  63. package/lib-amd/utilities/utilities.js +154 -53
  64. package/lib-amd/utilities/utilities.js.map +1 -1
  65. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +1 -1
  66. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  67. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +2 -0
  68. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  69. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +10 -5
  70. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  71. package/lib-commonjs/components/DonutChart/Arc/Arc.js +1 -1
  72. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  73. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +2 -2
  74. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
  75. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +1 -0
  76. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +18 -8
  77. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  78. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js +1 -1
  79. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  80. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +5 -0
  81. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +77 -15
  82. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  83. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +1 -1
  84. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  85. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +1 -1
  86. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  87. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +1 -1
  88. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  89. package/lib-commonjs/types/IDataPoint.d.ts +5 -0
  90. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  91. package/lib-commonjs/utilities/utilities.d.ts +8 -1
  92. package/lib-commonjs/utilities/utilities.js +155 -54
  93. package/lib-commonjs/utilities/utilities.js.map +1 -1
  94. package/package.json +2 -2
  95. package/src/components/CommonComponents/CartesianChart.types.ts +3 -0
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalBarChart.base.js","sourceRoot":"../src/","sources":["components/HorizontalBarChart/HorizontalBarChart.base.tsx"],"names":[],"mappings":";;;;AAAA,6BAA+B;AAC/B,2DAAwF;AAExF,iCASiB;AACjB,uDAAuE;AACvE,2DAAoE;AACpE,+CAK+B;AAC/B,qDAAsE;AACtE,6EAA4E;AAE5E,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA4D,CAAC;AAgBrG;IAA4C,kDAAmE;IAW7G,gCAAY,KAA+B;QACzC,YAAA,MAAK,YAAC,KAAK,CAAC,SA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,CAAC,CAAC,CAAC,uBAChB,KAAK,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EACrD,KAAK,EAAE,KAAK,GAAG,GAAG,EAClB,MAAM,EAAE,KAAI,CAAC,UAAU,EACvB,IAAI,EAAE,KAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,eAAQ,UAAU,MAAG,CAAC,CAAC,CAAC,UAAU,EACpE,WAAW,EAAE,KAAK,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EACtF,OAAO,EAAE,KAAK,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EAClF,IAAI,EAAC,KAAK,gBACE,KAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EACrC,MAAM,EAAE,KAAI,CAAC,SAAS,EACtB,YAAY,EAAE,KAAI,CAAC,SAAS,EAC5B,SAAS,EAAE,KAAI,CAAC,WAAW,CAAC,UAAU,GACtC,CACa,CAClB,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAoBO,8CAAa,GAArB;QACE,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC1D,CAAC;IACH,6BAAC;AAAD,CAAC,AAnbD,CAA4C,KAAK,CAAC,SAAS,GAmb1D;AAnbY,wDAAsB","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, find, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling';\nimport {\n IAccessibilityProps,\n IChartProps,\n IHorizontalBarChartProps,\n IHorizontalBarChartStyleProps,\n IHorizontalBarChartStyles,\n IChartDataPoint,\n IRefArrayData,\n HorizontalBarChartVariant,\n} from './index';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { convertToLocaleString } from '../../utilities/locale-util';\nimport {\n ChartHoverCard,\n formatValueWithSIPrefix,\n getAccessibleDataObject,\n getNextGradient,\n} from '../../utilities/index';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport { FocusableTooltipText } from '../../utilities/FocusableTooltipText';\n\nconst getClassNames = classNamesFunction<IHorizontalBarChartStyleProps, IHorizontalBarChartStyles>();\n\nexport interface IHorizontalBarChartState {\n isCalloutVisible: boolean;\n refSelected: SVGGElement | null | undefined;\n color: string;\n hoverValue: string | number | Date | null;\n lineColor: string;\n legend: string | null;\n xCalloutValue?: string;\n yCalloutValue?: string;\n barCalloutProps?: IChartDataPoint;\n callOutAccessibilityData?: IAccessibilityProps;\n barSpacingInPercent: number;\n}\n\nexport class HorizontalBarChartBase extends React.Component<IHorizontalBarChartProps, IHorizontalBarChartState> {\n private _barHeight: number;\n private _classNames: IProcessedStyleSet<IHorizontalBarChartStyles>;\n private _uniqLineText: string;\n private _calloutId: string;\n private _refArray: IRefArrayData[];\n private _calloutAnchorPoint: IChartDataPoint | null;\n private _isRTL: boolean = getRTL();\n private barChartSvgRef: React.RefObject<SVGSVGElement>;\n private _emptyChartId: string;\n\n constructor(props: IHorizontalBarChartProps) {\n super(props);\n this.state = {\n isCalloutVisible: false,\n hoverValue: '',\n lineColor: '',\n legend: '',\n refSelected: null,\n color: '',\n xCalloutValue: '',\n yCalloutValue: '',\n barSpacingInPercent: 0,\n };\n this._refArray = [];\n this._uniqLineText = '_HorizontalLine_' + Math.random().toString(36).substring(7);\n this._hoverOff = this._hoverOff.bind(this);\n this._calloutId = getId('callout');\n this._emptyChartId = getId('_HBC_empty');\n this.barChartSvgRef = React.createRef<SVGSVGElement>();\n }\n\n public componentDidMount(): void {\n const svgWidth = this.barChartSvgRef.current?.getBoundingClientRect().width || 0;\n const MARGIN_WIDTH_IN_PX = 3;\n if (svgWidth) {\n const currentBarSpacing = (MARGIN_WIDTH_IN_PX / svgWidth) * 100;\n this.setState({ barSpacingInPercent: currentBarSpacing });\n }\n }\n\n public render(): JSX.Element {\n const { data, theme } = this.props;\n this._adjustProps();\n const { palette } = theme!;\n let datapoint: number | undefined = 0;\n\n return !this._isChartEmpty() ? (\n <div className={this._classNames.root} onMouseLeave={this._handleChartMouseLeave}>\n {data!.map((points: IChartProps, index: number) => {\n if (points.chartData && points.chartData![0] && points.chartData![0].horizontalBarChartdata!.x) {\n datapoint = points.chartData![0].horizontalBarChartdata!.x;\n } else {\n datapoint = 0;\n }\n points.chartData![1] = {\n legend: '',\n horizontalBarChartdata: {\n x: points.chartData![0].horizontalBarChartdata!.y - datapoint!,\n y: points.chartData![0].horizontalBarChartdata!.y,\n },\n color: palette.neutralLight,\n };\n\n // Hide right side text of chart title for absolute-scale variant\n const chartDataText =\n this.props.variant === HorizontalBarChartVariant.AbsoluteScale ? null : this._getChartDataText(points!);\n const bars = this._createBars(points!, palette, index);\n const keyVal = this._uniqLineText + '_' + index;\n const classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n width: this.props.width,\n showTriangle: !!points!.chartData![0].data,\n variant: this.props.variant,\n });\n\n return (\n <div key={index}>\n <div className={classNames.items}>\n <FocusZone direction={FocusZoneDirection.horizontal}>\n <div className={this._classNames.chartTitle}>\n {points!.chartTitle && (\n <FocusableTooltipText\n className={this._classNames.chartTitleLeft}\n content={points!.chartTitle}\n accessibilityData={points!.chartTitleAccessibilityData}\n />\n )}\n {chartDataText}\n </div>\n </FocusZone>\n {points!.chartData![0].data && this._createBenchmark(points!)}\n <FocusZone direction={FocusZoneDirection.horizontal} className={this._classNames.chartWrapper}>\n <svg ref={this.barChartSvgRef} className={this._classNames.chart} aria-label={points!.chartTitle}>\n <g\n id={keyVal}\n key={keyVal}\n ref={(e: SVGGElement) => {\n this._refCallback(e, points!.chartData![0].legend);\n }}\n // NOTE: points.chartData![0] contains current data value\n onClick={() => {\n const p = points!.chartData![0];\n if (p && p.onClick) {\n p.onClick();\n }\n }}\n >\n {bars}\n </g>\n </svg>\n </FocusZone>\n </div>\n </div>\n );\n })}\n <Callout\n target={this.state.refSelected}\n coverTarget={true}\n isBeakVisible={false}\n gapSpace={30}\n hidden={!(!this.props.hideTooltip && this.state.isCalloutVisible)}\n directionalHint={DirectionalHint.topAutoEdge}\n id={this._calloutId}\n onDismiss={this._closeCallout}\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n preventDismissOnLostFocus={true}\n {...this.props.calloutProps!}\n {...getAccessibleDataObject(this.state.callOutAccessibilityData)}\n >\n <>\n {this.props.onRenderCalloutPerHorizontalBar ? (\n this.props.onRenderCalloutPerHorizontalBar(this.state.barCalloutProps)\n ) : (\n <ChartHoverCard\n Legend={this.state.xCalloutValue ? this.state.xCalloutValue : this.state.legend!}\n YValue={this.state.yCalloutValue ? this.state.yCalloutValue : this.state.hoverValue!}\n color={this.state.lineColor}\n culture={this.props.culture}\n />\n )}\n </>\n </Callout>\n </div>\n ) : (\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 private _refCallback(element: SVGGElement, legendTitle: string | undefined): void {\n this._refArray.push({ index: legendTitle, refElement: element });\n }\n\n private _hoverOn(hoverValue: string | number | Date | null, point: IChartDataPoint): void {\n if ((!this.state.isCalloutVisible || this.state.legend !== point.legend!) && this._calloutAnchorPoint !== point) {\n const currentHoveredElement = find(\n this._refArray,\n (currentElement: IRefArrayData) => currentElement.index === point.legend,\n );\n this._calloutAnchorPoint = point;\n let color = point.color!;\n\n if (this.props.enableGradient) {\n const pointIndex = Math.max(\n this.props.data\n ?.map(v => v.chartData)\n ?.findIndex(item => item?.[0].data === point.data && item?.[0].legend === point.legend) || 0,\n 0,\n );\n color = point.gradient?.[0] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[0];\n }\n\n this.setState({\n isCalloutVisible: true,\n hoverValue,\n lineColor: color,\n legend: point.legend!,\n refSelected: currentHoveredElement!.refElement,\n xCalloutValue: point.xAxisCalloutData!,\n yCalloutValue: point.yAxisCalloutData!,\n barCalloutProps: point,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n }\n\n private _hoverOff(): void {\n /**/\n }\n\n private _handleChartMouseLeave = () => {\n this._calloutAnchorPoint = null;\n if (this.state.isCalloutVisible) {\n this.setState({\n isCalloutVisible: false,\n hoverValue: '',\n refSelected: null,\n lineColor: '',\n legend: '',\n });\n }\n };\n\n private _adjustProps = (): void => {\n this._barHeight = this.props.barHeight || 12;\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n width: this.props.width,\n className: this.props.className,\n barHeight: this._barHeight,\n color: this.state.lineColor,\n variant: this.props.variant,\n hideLabels: this.props.hideLabels,\n });\n };\n\n private _getChartDataText = (data: IChartProps) => {\n return this.props.barChartCustomData ? (\n <div role=\"text\">{this.props.barChartCustomData(data)}</div>\n ) : (\n this._getDefaultTextData(data)\n );\n };\n\n private _getDefaultTextData(data: IChartProps): JSX.Element {\n const { culture } = this.props;\n const chartDataMode = this.props.chartDataMode || 'default';\n const chartData: IChartDataPoint = data!.chartData![0];\n const x = chartData.horizontalBarChartdata!.x;\n const y = chartData.horizontalBarChartdata!.y;\n\n const accessibilityData = getAccessibleDataObject(data.chartDataAccessibilityData!, 'text', false);\n switch (chartDataMode) {\n case 'default':\n return (\n <div className={this._classNames.chartTitleRight} {...accessibilityData}>\n {convertToLocaleString(x, culture)}\n </div>\n );\n case 'fraction':\n return (\n <div {...accessibilityData}>\n <span className={this._classNames.chartTitleRight}>{convertToLocaleString(x, culture)}</span>\n <span className={this._classNames.chartDataTextDenominator}>\n {' / ' + convertToLocaleString(y, culture)}\n </span>\n </div>\n );\n case 'percentage':\n const dataRatioPercentage = `${convertToLocaleString(Math.round((x / y) * 100), culture)}%`;\n return (\n <div className={this._classNames.chartTitleRight} {...accessibilityData}>\n {dataRatioPercentage}\n </div>\n );\n }\n }\n\n private _createBenchmark(data: IChartProps): JSX.Element {\n const totalData = data.chartData![0].horizontalBarChartdata!.y;\n const benchmarkData = data.chartData![0].data;\n const benchmarkRatio = Math.round(((benchmarkData ? benchmarkData : 0) / totalData) * 100);\n\n const benchmarkStyles = {\n left: 'calc(' + benchmarkRatio + '% - 4px)',\n };\n\n return (\n <div className={this._classNames.benchmarkContainer}>\n <div className={this._classNames.triangle} style={benchmarkStyles} />\n </div>\n );\n }\n\n /**\n * This functions returns an array of <rect> elements, which form the bars\n * For each bar an x value, and a width needs to be specified\n * The computations are done based on percentages\n * Extra margin is also provided, in the x value to provide some spacing in between the bars\n */\n\n private _createBars(data: IChartProps, palette: IPalette, dataPointIndex: number): JSX.Element[] {\n const noOfBars =\n data.chartData?.reduce((count: number, point: IChartDataPoint) => (count += (point.data || 0) > 0 ? 1 : 0), 0) ||\n 1;\n const totalMarginPercent = this.state.barSpacingInPercent * (noOfBars - 1);\n const defaultPalette: string[] = [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n // calculating starting point of each bar and it's range\n const startingPoint: number[] = [];\n const total = data.chartData!.reduce(\n (acc: number, point: IChartDataPoint) =>\n acc + (point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0),\n 0,\n );\n let prevPosition = 0;\n let value = 0;\n\n let sumOfPercent = 0;\n data.chartData!.map((point: IChartDataPoint, index: number) => {\n const pointData = point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0;\n value = (pointData / total) * 100;\n if (value < 0) {\n value = 0;\n } else if (value < 1 && value !== 0) {\n value = 1;\n }\n sumOfPercent += value;\n\n return sumOfPercent;\n });\n\n /**\n * The %age of the space occupied by the margin needs to subtracted\n * while computing the scaling ratio, since the margins are not being\n * scaled down, only the data is being scaled down from a higher percentage to lower percentage\n * Eg: 95% of the space is taken by the bars, 5% by the margins\n * Now if the sumOfPercent is 120% -> This needs to be scaled down to 95%, not 100%\n * since that's only space available to the bars\n */\n const scalingRatio = sumOfPercent !== 0 ? (sumOfPercent - totalMarginPercent) / 100 : 1;\n\n const bars = data.chartData!.map((point: IChartDataPoint, index: number) => {\n let startColor: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n let endColor = startColor;\n\n if (this.props.enableGradient && index !== 1) {\n startColor = point.gradient?.[0] || getNextGradient(dataPointIndex, 0, this.props.theme?.isInverted)[0];\n endColor = point.gradient?.[1] || getNextGradient(dataPointIndex, 0, this.props.theme?.isInverted)[1];\n }\n\n const pointData = point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0;\n if (index > 0) {\n prevPosition += value;\n }\n value = (pointData / total) * 100;\n if (value < 0) {\n value = 0;\n } else if (value < 1 && value !== 0) {\n value = 1 / scalingRatio;\n } else {\n value = value / scalingRatio;\n }\n startingPoint.push(prevPosition);\n\n const xValue = point.horizontalBarChartdata!.x;\n const placeholderIndex = 1;\n\n // Render bar label instead of placeholder bar for absolute-scale variant\n if (index === placeholderIndex && this.props.variant === HorizontalBarChartVariant.AbsoluteScale) {\n if (this.props.hideLabels) {\n return <text key={index} />;\n }\n\n const barValue = data.chartData![0].horizontalBarChartdata!.x;\n\n return (\n <text\n key={index}\n x={`${this._isRTL ? 100 - startingPoint[index] : startingPoint[index]}%`}\n y={this._barHeight / 2}\n dominantBaseline=\"central\"\n transform={`translate(${this._isRTL ? -4 : 4})`}\n className={this._classNames.barLabel}\n aria-hidden={true}\n >\n {formatValueWithSIPrefix(barValue)}\n </text>\n );\n }\n\n const gradientId = getId('HBC_Gradient') + `_${dataPointIndex}_${index}`;\n\n return (\n <React.Fragment key={index}>\n {this.props.enableGradient && (\n <defs>\n <linearGradient id={gradientId}>\n <stop offset=\"0\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>\n </defs>\n )}\n <rect\n key={index}\n x={`${\n this._isRTL\n ? 100 - startingPoint[index] - value - index * this.state.barSpacingInPercent\n : startingPoint[index] + index * this.state.barSpacingInPercent\n }%`}\n y={0}\n rx={this.props.roundCorners ? 3 : 0}\n data-is-focusable={point.legend !== '' ? true : false}\n width={value + '%'}\n height={this._barHeight}\n fill={this.props.enableGradient ? `url(#${gradientId})` : startColor}\n onMouseOver={point.legend !== '' ? this._hoverOn.bind(this, xValue, point) : undefined}\n onFocus={point.legend !== '' ? this._hoverOn.bind(this, xValue, point) : undefined}\n role=\"img\"\n aria-label={this._getAriaLabel(point)}\n onBlur={this._hoverOff}\n onMouseLeave={this._hoverOff}\n className={this._classNames.barWrapper}\n />\n </React.Fragment>\n );\n });\n return bars;\n }\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _getAriaLabel = (point: IChartDataPoint): string => {\n const legend = point.xAxisCalloutData || point.legend;\n const benchMark = point.data;\n const yValue =\n point.yAxisCalloutData ||\n (point.horizontalBarChartdata ? `${point.horizontalBarChartdata.x}/${point.horizontalBarChartdata.y}` : 0);\n return (\n point.callOutAccessibilityData?.ariaLabel ||\n (legend ? `${legend}, ` : '') + `${yValue}.` + (benchMark ? 'with benchmark at ' + `${benchMark}, ` : '')\n );\n };\n\n private _isChartEmpty(): boolean {\n return !(this.props.data && this.props.data.length > 0);\n }\n}\n"]}
1
+ {"version":3,"file":"HorizontalBarChart.base.js","sourceRoot":"../src/","sources":["components/HorizontalBarChart/HorizontalBarChart.base.tsx"],"names":[],"mappings":";;;;AAAA,6BAA+B;AAC/B,2DAAwF;AAExF,iCASiB;AACjB,uDAAuE;AACvE,2DAAoE;AACpE,+CAAwH;AACxH,qDAAsE;AACtE,6EAA4E;AAE5E,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA4D,CAAC;AAgBrG;IAA4C,kDAAmE;IAW7G,gCAAY,KAA+B;QACzC,YAAA,MAAK,YAAC,KAAK,CAAC,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AC,CAAC,CAAC,CAAC,uBAChB,KAAK,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EACrD,KAAK,EAAE,KAAK,GAAG,GAAG,EAClB,MAAM,EAAE,KAAI,CAAC,UAAU,EACvB,IAAI,EAAE,KAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,eAAQ,UAAU,MAAG,CAAC,CAAC,CAAC,UAAU,EACpE,WAAW,EAAE,KAAK,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EACtF,OAAO,EAAE,KAAK,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,KAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EAClF,IAAI,EAAC,KAAK,gBACE,KAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EACrC,MAAM,EAAE,KAAI,CAAC,SAAS,EACtB,YAAY,EAAE,KAAI,CAAC,SAAS,EAC5B,SAAS,EAAE,KAAI,CAAC,WAAW,CAAC,UAAU,GACtC,CACa,CAClB,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAoBO,8CAAa,GAArB;QACE,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC1D,CAAC;IACH,6BAAC;AAAD,CAAC,AAnbD,CAA4C,KAAK,CAAC,SAAS,GAmb1D;AAnbY,wDAAsB","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction, find, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling';\nimport {\n IAccessibilityProps,\n IChartProps,\n IHorizontalBarChartProps,\n IHorizontalBarChartStyleProps,\n IHorizontalBarChartStyles,\n IChartDataPoint,\n IRefArrayData,\n HorizontalBarChartVariant,\n} from './index';\nimport { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';\nimport { convertToLocaleString } from '../../utilities/locale-util';\nimport { ChartHoverCard, formatValueLimitWidth, getAccessibleDataObject, getNextGradient } from '../../utilities/index';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport { FocusableTooltipText } from '../../utilities/FocusableTooltipText';\n\nconst getClassNames = classNamesFunction<IHorizontalBarChartStyleProps, IHorizontalBarChartStyles>();\n\nexport interface IHorizontalBarChartState {\n isCalloutVisible: boolean;\n refSelected: SVGGElement | null | undefined;\n color: string;\n hoverValue: string | number | Date | null;\n lineColor: string;\n legend: string | null;\n xCalloutValue?: string;\n yCalloutValue?: string;\n barCalloutProps?: IChartDataPoint;\n callOutAccessibilityData?: IAccessibilityProps;\n barSpacingInPercent: number;\n}\n\nexport class HorizontalBarChartBase extends React.Component<IHorizontalBarChartProps, IHorizontalBarChartState> {\n private _barHeight: number;\n private _classNames: IProcessedStyleSet<IHorizontalBarChartStyles>;\n private _uniqLineText: string;\n private _calloutId: string;\n private _refArray: IRefArrayData[];\n private _calloutAnchorPoint: IChartDataPoint | null;\n private _isRTL: boolean = getRTL();\n private barChartSvgRef: React.RefObject<SVGSVGElement>;\n private _emptyChartId: string;\n\n constructor(props: IHorizontalBarChartProps) {\n super(props);\n this.state = {\n isCalloutVisible: false,\n hoverValue: '',\n lineColor: '',\n legend: '',\n refSelected: null,\n color: '',\n xCalloutValue: '',\n yCalloutValue: '',\n barSpacingInPercent: 0,\n };\n this._refArray = [];\n this._uniqLineText = '_HorizontalLine_' + Math.random().toString(36).substring(7);\n this._hoverOff = this._hoverOff.bind(this);\n this._calloutId = getId('callout');\n this._emptyChartId = getId('_HBC_empty');\n this.barChartSvgRef = React.createRef<SVGSVGElement>();\n }\n\n public componentDidMount(): void {\n const svgWidth = this.barChartSvgRef.current?.getBoundingClientRect().width || 0;\n const MARGIN_WIDTH_IN_PX = 3;\n if (svgWidth) {\n const currentBarSpacing = (MARGIN_WIDTH_IN_PX / svgWidth) * 100;\n this.setState({ barSpacingInPercent: currentBarSpacing });\n }\n }\n\n public render(): JSX.Element {\n const { data, theme } = this.props;\n this._adjustProps();\n const { palette } = theme!;\n let datapoint: number | undefined = 0;\n\n return !this._isChartEmpty() ? (\n <div className={this._classNames.root} onMouseLeave={this._handleChartMouseLeave}>\n {data!.map((points: IChartProps, index: number) => {\n if (points.chartData && points.chartData![0] && points.chartData![0].horizontalBarChartdata!.x) {\n datapoint = points.chartData![0].horizontalBarChartdata!.x;\n } else {\n datapoint = 0;\n }\n points.chartData![1] = {\n legend: '',\n horizontalBarChartdata: {\n x: points.chartData![0].horizontalBarChartdata!.y - datapoint!,\n y: points.chartData![0].horizontalBarChartdata!.y,\n },\n color: palette.neutralLight,\n };\n\n // Hide right side text of chart title for absolute-scale variant\n const chartDataText =\n this.props.variant === HorizontalBarChartVariant.AbsoluteScale ? null : this._getChartDataText(points!);\n const bars = this._createBars(points!, palette, index);\n const keyVal = this._uniqLineText + '_' + index;\n const classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n width: this.props.width,\n showTriangle: !!points!.chartData![0].data,\n variant: this.props.variant,\n });\n\n return (\n <div key={index}>\n <div className={classNames.items}>\n <FocusZone direction={FocusZoneDirection.horizontal}>\n <div className={this._classNames.chartTitle}>\n {points!.chartTitle && (\n <FocusableTooltipText\n className={this._classNames.chartTitleLeft}\n content={points!.chartTitle}\n accessibilityData={points!.chartTitleAccessibilityData}\n />\n )}\n {chartDataText}\n </div>\n </FocusZone>\n {points!.chartData![0].data && this._createBenchmark(points!)}\n <FocusZone direction={FocusZoneDirection.horizontal} className={this._classNames.chartWrapper}>\n <svg ref={this.barChartSvgRef} className={this._classNames.chart} aria-label={points!.chartTitle}>\n <g\n id={keyVal}\n key={keyVal}\n ref={(e: SVGGElement) => {\n this._refCallback(e, points!.chartData![0].legend);\n }}\n // NOTE: points.chartData![0] contains current data value\n onClick={() => {\n const p = points!.chartData![0];\n if (p && p.onClick) {\n p.onClick();\n }\n }}\n >\n {bars}\n </g>\n </svg>\n </FocusZone>\n </div>\n </div>\n );\n })}\n <Callout\n target={this.state.refSelected}\n coverTarget={true}\n isBeakVisible={false}\n gapSpace={30}\n hidden={!(!this.props.hideTooltip && this.state.isCalloutVisible)}\n directionalHint={DirectionalHint.topAutoEdge}\n id={this._calloutId}\n onDismiss={this._closeCallout}\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n preventDismissOnLostFocus={true}\n {...this.props.calloutProps!}\n {...getAccessibleDataObject(this.state.callOutAccessibilityData)}\n >\n <>\n {this.props.onRenderCalloutPerHorizontalBar ? (\n this.props.onRenderCalloutPerHorizontalBar(this.state.barCalloutProps)\n ) : (\n <ChartHoverCard\n Legend={this.state.xCalloutValue ? this.state.xCalloutValue : this.state.legend!}\n YValue={this.state.yCalloutValue ? this.state.yCalloutValue : this.state.hoverValue!}\n color={this.state.lineColor}\n culture={this.props.culture}\n />\n )}\n </>\n </Callout>\n </div>\n ) : (\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 private _refCallback(element: SVGGElement, legendTitle: string | undefined): void {\n this._refArray.push({ index: legendTitle, refElement: element });\n }\n\n private _hoverOn(hoverValue: string | number | Date | null, point: IChartDataPoint): void {\n if ((!this.state.isCalloutVisible || this.state.legend !== point.legend!) && this._calloutAnchorPoint !== point) {\n const currentHoveredElement = find(\n this._refArray,\n (currentElement: IRefArrayData) => currentElement.index === point.legend,\n );\n this._calloutAnchorPoint = point;\n let color = point.color!;\n\n if (this.props.enableGradient) {\n const pointIndex = Math.max(\n this.props.data\n ?.map(v => v.chartData)\n ?.findIndex(item => item?.[0].data === point.data && item?.[0].legend === point.legend) || 0,\n 0,\n );\n color = point.gradient?.[0] || getNextGradient(pointIndex, 0, this.props.theme?.isInverted)[0];\n }\n\n this.setState({\n isCalloutVisible: true,\n hoverValue,\n lineColor: color,\n legend: point.legend!,\n refSelected: currentHoveredElement!.refElement,\n xCalloutValue: point.xAxisCalloutData!,\n yCalloutValue: point.yAxisCalloutData!,\n barCalloutProps: point,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n }\n\n private _hoverOff(): void {\n /**/\n }\n\n private _handleChartMouseLeave = () => {\n this._calloutAnchorPoint = null;\n if (this.state.isCalloutVisible) {\n this.setState({\n isCalloutVisible: false,\n hoverValue: '',\n refSelected: null,\n lineColor: '',\n legend: '',\n });\n }\n };\n\n private _adjustProps = (): void => {\n this._barHeight = this.props.barHeight || 12;\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n width: this.props.width,\n className: this.props.className,\n barHeight: this._barHeight,\n color: this.state.lineColor,\n variant: this.props.variant,\n hideLabels: this.props.hideLabels,\n });\n };\n\n private _getChartDataText = (data: IChartProps) => {\n return this.props.barChartCustomData ? (\n <div role=\"text\">{this.props.barChartCustomData(data)}</div>\n ) : (\n this._getDefaultTextData(data)\n );\n };\n\n private _getDefaultTextData(data: IChartProps): JSX.Element {\n const { culture } = this.props;\n const chartDataMode = this.props.chartDataMode || 'default';\n const chartData: IChartDataPoint = data!.chartData![0];\n const x = chartData.horizontalBarChartdata!.x;\n const y = chartData.horizontalBarChartdata!.y;\n\n const accessibilityData = getAccessibleDataObject(data.chartDataAccessibilityData!, 'text', false);\n switch (chartDataMode) {\n case 'default':\n return (\n <div className={this._classNames.chartTitleRight} {...accessibilityData}>\n {convertToLocaleString(x, culture)}\n </div>\n );\n case 'fraction':\n return (\n <div {...accessibilityData}>\n <span className={this._classNames.chartTitleRight}>{convertToLocaleString(x, culture)}</span>\n <span className={this._classNames.chartDataTextDenominator}>\n {' / ' + convertToLocaleString(y, culture)}\n </span>\n </div>\n );\n case 'percentage':\n const dataRatioPercentage = `${convertToLocaleString(Math.round((x / y) * 100), culture)}%`;\n return (\n <div className={this._classNames.chartTitleRight} {...accessibilityData}>\n {dataRatioPercentage}\n </div>\n );\n }\n }\n\n private _createBenchmark(data: IChartProps): JSX.Element {\n const totalData = data.chartData![0].horizontalBarChartdata!.y;\n const benchmarkData = data.chartData![0].data;\n const benchmarkRatio = Math.round(((benchmarkData ? benchmarkData : 0) / totalData) * 100);\n\n const benchmarkStyles = {\n left: 'calc(' + benchmarkRatio + '% - 4px)',\n };\n\n return (\n <div className={this._classNames.benchmarkContainer}>\n <div className={this._classNames.triangle} style={benchmarkStyles} />\n </div>\n );\n }\n\n /**\n * This functions returns an array of <rect> elements, which form the bars\n * For each bar an x value, and a width needs to be specified\n * The computations are done based on percentages\n * Extra margin is also provided, in the x value to provide some spacing in between the bars\n */\n\n private _createBars(data: IChartProps, palette: IPalette, dataPointIndex: number): JSX.Element[] {\n const noOfBars =\n data.chartData?.reduce((count: number, point: IChartDataPoint) => (count += (point.data || 0) > 0 ? 1 : 0), 0) ||\n 1;\n const totalMarginPercent = this.state.barSpacingInPercent * (noOfBars - 1);\n const defaultPalette: string[] = [palette.blueLight, palette.blue, palette.blueMid, palette.red, palette.black];\n // calculating starting point of each bar and it's range\n const startingPoint: number[] = [];\n const total = data.chartData!.reduce(\n (acc: number, point: IChartDataPoint) =>\n acc + (point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0),\n 0,\n );\n let prevPosition = 0;\n let value = 0;\n\n let sumOfPercent = 0;\n data.chartData!.map((point: IChartDataPoint, index: number) => {\n const pointData = point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0;\n value = (pointData / total) * 100;\n if (value < 0) {\n value = 0;\n } else if (value < 1 && value !== 0) {\n value = 1;\n }\n sumOfPercent += value;\n\n return sumOfPercent;\n });\n\n /**\n * The %age of the space occupied by the margin needs to subtracted\n * while computing the scaling ratio, since the margins are not being\n * scaled down, only the data is being scaled down from a higher percentage to lower percentage\n * Eg: 95% of the space is taken by the bars, 5% by the margins\n * Now if the sumOfPercent is 120% -> This needs to be scaled down to 95%, not 100%\n * since that's only space available to the bars\n */\n const scalingRatio = sumOfPercent !== 0 ? (sumOfPercent - totalMarginPercent) / 100 : 1;\n\n const bars = data.chartData!.map((point: IChartDataPoint, index: number) => {\n let startColor: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n let endColor = startColor;\n\n if (this.props.enableGradient && index !== 1) {\n startColor = point.gradient?.[0] || getNextGradient(dataPointIndex, 0, this.props.theme?.isInverted)[0];\n endColor = point.gradient?.[1] || getNextGradient(dataPointIndex, 0, this.props.theme?.isInverted)[1];\n }\n\n const pointData = point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0;\n if (index > 0) {\n prevPosition += value;\n }\n value = (pointData / total) * 100;\n if (value < 0) {\n value = 0;\n } else if (value < 1 && value !== 0) {\n value = 1 / scalingRatio;\n } else {\n value = value / scalingRatio;\n }\n startingPoint.push(prevPosition);\n\n const xValue = point.horizontalBarChartdata!.x;\n const placeholderIndex = 1;\n\n // Render bar label instead of placeholder bar for absolute-scale variant\n if (index === placeholderIndex && this.props.variant === HorizontalBarChartVariant.AbsoluteScale) {\n if (this.props.hideLabels) {\n return <text key={index} />;\n }\n\n const barValue = data.chartData![0].horizontalBarChartdata!.x;\n\n return (\n <text\n key={index}\n x={`${this._isRTL ? 100 - startingPoint[index] : startingPoint[index]}%`}\n y={this._barHeight / 2}\n dominantBaseline=\"central\"\n transform={`translate(${this._isRTL ? -4 : 4})`}\n className={this._classNames.barLabel}\n aria-hidden={true}\n >\n {formatValueLimitWidth(barValue)}\n </text>\n );\n }\n\n const gradientId = getId('HBC_Gradient') + `_${dataPointIndex}_${index}`;\n\n return (\n <React.Fragment key={index}>\n {this.props.enableGradient && (\n <defs>\n <linearGradient id={gradientId}>\n <stop offset=\"0\" stopColor={startColor} />\n <stop offset=\"100%\" stopColor={endColor} />\n </linearGradient>\n </defs>\n )}\n <rect\n key={index}\n x={`${\n this._isRTL\n ? 100 - startingPoint[index] - value - index * this.state.barSpacingInPercent\n : startingPoint[index] + index * this.state.barSpacingInPercent\n }%`}\n y={0}\n rx={this.props.roundCorners ? 3 : 0}\n data-is-focusable={point.legend !== '' ? true : false}\n width={value + '%'}\n height={this._barHeight}\n fill={this.props.enableGradient ? `url(#${gradientId})` : startColor}\n onMouseOver={point.legend !== '' ? this._hoverOn.bind(this, xValue, point) : undefined}\n onFocus={point.legend !== '' ? this._hoverOn.bind(this, xValue, point) : undefined}\n role=\"img\"\n aria-label={this._getAriaLabel(point)}\n onBlur={this._hoverOff}\n onMouseLeave={this._hoverOff}\n className={this._classNames.barWrapper}\n />\n </React.Fragment>\n );\n });\n return bars;\n }\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _getAriaLabel = (point: IChartDataPoint): string => {\n const legend = point.xAxisCalloutData || point.legend;\n const benchMark = point.data;\n const yValue =\n point.yAxisCalloutData ||\n (point.horizontalBarChartdata ? `${point.horizontalBarChartdata.x}/${point.horizontalBarChartdata.y}` : 0);\n return (\n point.callOutAccessibilityData?.ariaLabel ||\n (legend ? `${legend}, ` : '') + `${yValue}.` + (benchMark ? 'with benchmark at ' + `${benchMark}, ` : '')\n );\n };\n\n private _isChartEmpty(): boolean {\n return !(this.props.data && this.props.data.length > 0);\n }\n}\n"]}
@@ -36,6 +36,8 @@ export declare class HorizontalBarChartWithAxisBase extends React.Component<IHor
36
36
  private _longestBarPositiveTotalValue;
37
37
  private _longestBarNegativeTotalValue;
38
38
  private readonly X_ORIGIN;
39
+ private _domainMargin;
40
+ private _yAxisPadding;
39
41
  constructor(props: IHorizontalBarChartWithAxisProps);
40
42
  componentDidUpdate(prevProps: IHorizontalBarChartWithAxisProps): void;
41
43
  render(): JSX.Element;
@@ -57,6 +59,9 @@ export declare class HorizontalBarChartWithAxisBase extends React.Component<IHor
57
59
  private _onBarFocus;
58
60
  private _getScales;
59
61
  private _createNumericBars;
62
+ private _getUniqueYValues;
63
+ private _calculateAppropriateBarHeight;
64
+ private _getDomainMarginsForHorizontalBarChart;
60
65
  private _tooltipOfYAxislabels;
61
66
  private _createStringBars;
62
67
  private _closeCallout;
@@ -13,11 +13,12 @@ var CartesianChart_1 = require("../CommonComponents/CartesianChart");
13
13
  var react_focus_1 = require("@fluentui/react-focus");
14
14
  var index_1 = require("../../utilities/index");
15
15
  var image_export_utils_1 = require("../../utilities/image-export-utils");
16
+ var vbc_utils_1 = require("../../utilities/vbc-utils");
16
17
  var getClassNames = (0, Utilities_1.classNamesFunction)();
17
18
  var HorizontalBarChartWithAxisBase = /** @class */ (function (_super) {
18
19
  tslib_1.__extends(HorizontalBarChartWithAxisBase, _super);
19
20
  function HorizontalBarChartWithAxisBase(props) {
20
- var _a, _b, _c, _d, _e;
21
+ var _a, _b, _c, _d, _e, _f;
21
22
  var _this = _super.call(this, props) || this;
22
23
  _this._isRtl = (0, Utilities_1.getRTL)();
23
24
  _this.X_ORIGIN = 0;
@@ -82,13 +83,18 @@ var HorizontalBarChartWithAxisBase = /** @class */ (function (_super) {
82
83
  var _a = _this._yAxisType === index_1.YAxisType.NumericAxis
83
84
  ? _this._getScales(containerHeight, containerWidth, true)
84
85
  : _this._getScales(containerHeight, containerWidth, false), xBarScale = _a.xBarScale, yBarScale = _a.yBarScale;
85
- var allBars = stackedChartData
86
- .map(function (singleBarData) {
87
- return _this._yAxisType === index_1.YAxisType.NumericAxis
88
- ? _this._createNumericBars(containerHeight, containerWidth, xElement, yElement, singleBarData, xBarScale, yBarScale)
89
- : _this._createStringBars(containerHeight, containerWidth, xElement, yElement, singleBarData, xBarScale, yBarScale);
90
- })
91
- .flat();
86
+ var xRange = xBarScale.range();
87
+ var allBars = [];
88
+ // when the chart mounts, the xRange[1] is sometimes seen to be < 0 (like -40) while xRange[0] > 0.
89
+ if (xRange[0] < xRange[1]) {
90
+ allBars = stackedChartData
91
+ .map(function (singleBarData) {
92
+ return _this._yAxisType === index_1.YAxisType.NumericAxis
93
+ ? _this._createNumericBars(containerHeight, containerWidth, xElement, yElement, singleBarData, xBarScale, yBarScale)
94
+ : _this._createStringBars(containerHeight, containerWidth, xElement, yElement, singleBarData, xBarScale, yBarScale);
95
+ })
96
+ .flat();
97
+ }
92
98
  return (_this._bars = allBars);
93
99
  };
94
100
  _this._refCallback = function (element, legendTitle) {
@@ -177,16 +183,16 @@ var HorizontalBarChartWithAxisBase = /** @class */ (function (_super) {
177
183
  var yMax = (0, d3_array_1.max)(_this._points, function (point) { return point.y; });
178
184
  var yMin = (0, d3_array_1.min)(_this._points, function (point) { return point.y; });
179
185
  var yDomainMax = Math.max(yMax, _this.props.yMaxValue || 0);
186
+ // Default to 0 if yMinValue is not provided.
180
187
  var yMinProp = _this.props.yMinValue || 0;
181
- var yDomainMin = yMin < yMinProp ? Math.min(0, yMin) : yMinProp;
182
- var yDomainPadding = Math.abs((yMax - yMin) * 0.1);
188
+ var yDomainMin = Math.min(yMin, yMinProp);
183
189
  var xBarScale = (0, d3_scale_1.scaleLinear)()
184
190
  .domain(xDomain)
185
191
  .nice()
186
192
  .range([_this.margins.left, containerWidth - _this.margins.right]);
187
193
  var yBarScale = (0, d3_scale_1.scaleLinear)()
188
- .domain([yDomainMin - yDomainPadding, yDomainMax + yDomainPadding])
189
- .range([containerHeight - _this.margins.bottom, _this.margins.top]);
194
+ .domain([yDomainMin, yDomainMax])
195
+ .range([containerHeight - (_this.margins.bottom + _this._domainMargin), _this.margins.top + _this._domainMargin]);
190
196
  return { xBarScale: xBarScale, yBarScale: yBarScale };
191
197
  }
192
198
  else {
@@ -195,8 +201,8 @@ var HorizontalBarChartWithAxisBase = /** @class */ (function (_super) {
195
201
  // http://using-d3js.com/04_07_ordinal_scales.html
196
202
  var yBarScale = (0, d3_scale_1.scaleBand)()
197
203
  .domain(_this._yAxisLabels)
198
- .range([containerHeight - _this.margins.bottom - _this._barHeight / 2, _this.margins.top + _this._barHeight / 2])
199
- .padding(_this.props.yAxisPadding || 0);
204
+ .range([containerHeight - (_this.margins.bottom + _this._domainMargin), _this.margins.top + _this._domainMargin])
205
+ .padding(_this._yAxisPadding);
200
206
  var xBarScale = (0, d3_scale_1.scaleLinear)()
201
207
  .domain(xDomain)
202
208
  .nice()
@@ -204,6 +210,51 @@ var HorizontalBarChartWithAxisBase = /** @class */ (function (_super) {
204
210
  return { xBarScale: xBarScale, yBarScale: yBarScale };
205
211
  }
206
212
  };
213
+ _this._calculateAppropriateBarHeight = function (data, totalWidth, innerPadding) {
214
+ var result = (0, vbc_utils_1.getClosestPairDiffAndRange)(data);
215
+ if (!result || result[1] === 0) {
216
+ return 16;
217
+ }
218
+ var closestPairDiff = result[0];
219
+ var range = result[1];
220
+ var yMax = (0, d3_array_1.max)(_this._points, function (point) { return point.y; });
221
+ // Since we are always rendering from 0 to yMax, we need to ensure that the range is at least yMax
222
+ // to calculate the bar height correctly.
223
+ range = Math.max(range, yMax);
224
+ // Refer to https://microsoft.github.io/fluentui-charting-contrib/docs/rfcs/fix-overlapping-bars-on-continuous-axes
225
+ // for the derivation of the following formula.
226
+ var barWidth = Math.floor((totalWidth * closestPairDiff * (1 - innerPadding)) / (range + closestPairDiff * (1 - innerPadding)));
227
+ return barWidth;
228
+ };
229
+ _this._getDomainMarginsForHorizontalBarChart = function (containerHeight) {
230
+ _this._domainMargin = index_1.MIN_DOMAIN_MARGIN;
231
+ var uniqueY = _this._getUniqueYValues();
232
+ /** Rate at which the space between the bars changes wrt the bar height */
233
+ _this._yAxisPadding = _this._yAxisPadding === 1 ? 0.99 : _this._yAxisPadding;
234
+ var barGapRate = _this._yAxisPadding / (1 - _this._yAxisPadding);
235
+ var numBars = uniqueY.length + (uniqueY.length - 1) * barGapRate;
236
+ // Total height available to render the bars
237
+ var totalHeight = containerHeight - (_this.margins.top + index_1.MIN_DOMAIN_MARGIN) - (_this.margins.bottom + index_1.MIN_DOMAIN_MARGIN);
238
+ if (_this._yAxisType !== index_1.YAxisType.StringAxis) {
239
+ // Calculate bar height dynamically
240
+ _this._barHeight =
241
+ _this.props.barHeight ||
242
+ _this._calculateAppropriateBarHeight(uniqueY, totalHeight, _this._yAxisPadding);
243
+ _this._barHeight = Math.max(_this._barHeight, 1);
244
+ _this._domainMargin += _this._barHeight / 2;
245
+ }
246
+ else {
247
+ // Calculate the appropriate bar height
248
+ _this._barHeight = _this.props.barHeight || totalHeight / numBars;
249
+ /** Total height required to render the bars. Directly proportional to bar height */
250
+ var reqHeight = numBars * _this._barHeight;
251
+ if (totalHeight >= reqHeight) {
252
+ // Center align the chart by setting equal left and right margins for domain
253
+ _this._domainMargin = index_1.MIN_DOMAIN_MARGIN + (totalHeight - reqHeight) / 2;
254
+ }
255
+ }
256
+ return tslib_1.__assign(tslib_1.__assign({}, _this.margins), { top: _this.margins.top + _this._domainMargin, bottom: _this.margins.bottom + _this._domainMargin });
257
+ };
207
258
  _this._closeCallout = function () {
208
259
  _this.setState({
209
260
  isCalloutVisible: false,
@@ -306,6 +357,8 @@ var HorizontalBarChartWithAxisBase = /** @class */ (function (_super) {
306
357
  : index_1.YAxisType.StringAxis;
307
358
  _this._cartesianChartRef = React.createRef();
308
359
  _this._legendsRef = React.createRef();
360
+ _this._domainMargin = index_1.MIN_DOMAIN_MARGIN;
361
+ _this._yAxisPadding = (_f = _this.props.yAxisPadding) !== null && _f !== void 0 ? _f : 0.5;
309
362
  return _this;
310
363
  }
311
364
  HorizontalBarChartWithAxisBase.prototype.componentDidUpdate = function (prevProps) {
@@ -332,7 +385,7 @@ var HorizontalBarChartWithAxisBase = /** @class */ (function (_super) {
332
385
  tickValues: this.props.tickValues,
333
386
  tickFormat: this.props.tickFormat,
334
387
  };
335
- return (React.createElement(CartesianChart_1.CartesianChart, tslib_1.__assign({}, this.props, { chartTitle: this._getChartTitle(), points: this._points, chartType: index_1.ChartTypes.HorizontalBarChartWithAxis, xAxisType: this._xAxisType, yAxisType: this._yAxisType, stringDatasetForYAxisDomain: this._yAxisLabels, calloutProps: calloutProps, tickParams: tickParams, legendBars: legendBars, createYAxis: index_1.createYAxisForHorizontalBarChartWithAxis, getDomainNRangeValues: this._getDomainNRangeValues, createStringYAxis: index_1.createStringYAxisForHorizontalBarChartWithAxis, getMinMaxOfYAxis: index_1.findHBCWANumericMinMaxOfY, barwidth: this._barHeight, focusZoneDirection: react_focus_1.FocusZoneDirection.vertical, customizedCallout: this._getCustomizedCallout(), getmargins: this._getMargins, getGraphData: this._getGraphData, getAxisData: this._getAxisData, onChartMouseLeave: this._handleChartMouseLeave, ref: this._cartesianChartRef,
388
+ return (React.createElement(CartesianChart_1.CartesianChart, tslib_1.__assign({}, this.props, { yAxisPadding: this._yAxisPadding, chartTitle: this._getChartTitle(), points: this._points, chartType: index_1.ChartTypes.HorizontalBarChartWithAxis, xAxisType: this._xAxisType, yAxisType: this._yAxisType, stringDatasetForYAxisDomain: this._yAxisLabels, calloutProps: calloutProps, tickParams: tickParams, legendBars: legendBars, createYAxis: index_1.createYAxisForHorizontalBarChartWithAxis, getDomainNRangeValues: this._getDomainNRangeValues, createStringYAxis: index_1.createStringYAxisForHorizontalBarChartWithAxis, getMinMaxOfYAxis: index_1.findHBCWANumericMinMaxOfY, barwidth: this._barHeight, focusZoneDirection: react_focus_1.FocusZoneDirection.vertical, customizedCallout: this._getCustomizedCallout(), getmargins: this._getMargins, getYDomainMargins: this._getDomainMarginsForHorizontalBarChart, getGraphData: this._getGraphData, getAxisData: this._getAxisData, onChartMouseLeave: this._handleChartMouseLeave, ref: this._cartesianChartRef,
336
389
  /* eslint-disable react/jsx-no-bind */
337
390
  children: function (props) {
338
391
  return (React.createElement(React.Fragment, null,
@@ -496,6 +549,15 @@ var HorizontalBarChartWithAxisBase = /** @class */ (function (_super) {
496
549
  });
497
550
  return bars;
498
551
  };
552
+ HorizontalBarChartWithAxisBase.prototype._getUniqueYValues = function () {
553
+ var _a;
554
+ var mapY = {};
555
+ (_a = this.props.data) === null || _a === void 0 ? void 0 : _a.forEach(function (point) {
556
+ mapY[point.y] = point.y;
557
+ });
558
+ var uniqueY = Object.values(mapY);
559
+ return uniqueY;
560
+ };
499
561
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
500
562
  HorizontalBarChartWithAxisBase.prototype._tooltipOfYAxislabels = function (ytooltipProps) {
501
563
  var _this = this;