@fluentui/react-charting 5.21.32 → 5.22.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 (188) hide show
  1. package/CHANGELOG.json +37 -1
  2. package/CHANGELOG.md +21 -2
  3. package/dist/react-charting.d.ts +152 -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 +60 -0
  7. package/lib/components/DonutChart/Arc/Arc.js +22 -5
  8. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  9. package/lib/components/DonutChart/Arc/Arc.types.d.ts +15 -0
  10. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
  11. package/lib/components/DonutChart/DonutChart.base.js +13 -4
  12. package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
  13. package/lib/components/DonutChart/DonutChart.types.d.ts +10 -0
  14. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  15. package/lib/components/DonutChart/Pie/Pie.js +8 -2
  16. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  17. package/lib/components/DonutChart/Pie/Pie.types.d.ts +10 -0
  18. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -1
  19. package/lib/components/GaugeChart/GaugeChart.base.js +30 -6
  20. package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
  21. package/lib/components/GaugeChart/GaugeChart.types.d.ts +14 -0
  22. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  23. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +29 -6
  24. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  25. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +10 -0
  26. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  27. package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js +26 -9
  28. package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  29. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.d.ts +10 -0
  30. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  31. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +75 -30
  32. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  33. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +10 -0
  34. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  35. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +29 -10
  36. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  37. package/lib/components/StackedBarChart/MultiStackedBarChart.types.d.ts +10 -0
  38. package/lib/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -1
  39. package/lib/components/StackedBarChart/StackedBarChart.base.js +18 -7
  40. package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  41. package/lib/components/StackedBarChart/StackedBarChart.types.d.ts +10 -0
  42. package/lib/components/StackedBarChart/StackedBarChart.types.js.map +1 -1
  43. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +79 -14
  44. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  45. package/lib/components/VerticalBarChart/VerticalBarChart.types.d.ts +10 -0
  46. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  47. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +32 -10
  48. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  49. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +10 -0
  50. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  51. package/lib/index.d.ts +39 -20
  52. package/lib/index.js +20 -20
  53. package/lib/index.js.map +1 -1
  54. package/lib/types/IDataPoint.d.ts +25 -0
  55. package/lib/types/IDataPoint.js.map +1 -1
  56. package/lib/utilities/gradients.d.ts +30 -0
  57. package/lib/utilities/gradients.js +173 -0
  58. package/lib/utilities/gradients.js.map +1 -0
  59. package/lib/utilities/index.d.ts +1 -0
  60. package/lib/utilities/index.js +1 -0
  61. package/lib/utilities/index.js.map +1 -1
  62. package/lib/version.js +1 -1
  63. package/lib/version.js.map +1 -1
  64. package/lib-amd/components/DonutChart/Arc/Arc.js +21 -4
  65. package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
  66. package/lib-amd/components/DonutChart/Arc/Arc.types.d.ts +15 -0
  67. package/lib-amd/components/DonutChart/Arc/Arc.types.js.map +1 -1
  68. package/lib-amd/components/DonutChart/DonutChart.base.js +12 -3
  69. package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
  70. package/lib-amd/components/DonutChart/DonutChart.types.d.ts +10 -0
  71. package/lib-amd/components/DonutChart/DonutChart.types.js.map +1 -1
  72. package/lib-amd/components/DonutChart/Pie/Pie.js +7 -1
  73. package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -1
  74. package/lib-amd/components/DonutChart/Pie/Pie.types.d.ts +10 -0
  75. package/lib-amd/components/DonutChart/Pie/Pie.types.js.map +1 -1
  76. package/lib-amd/components/GaugeChart/GaugeChart.base.js +28 -4
  77. package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
  78. package/lib-amd/components/GaugeChart/GaugeChart.types.d.ts +14 -0
  79. package/lib-amd/components/GaugeChart/GaugeChart.types.js.map +1 -1
  80. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +28 -5
  81. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  82. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +10 -0
  83. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  84. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js +25 -8
  85. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  86. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.d.ts +10 -0
  87. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  88. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +74 -29
  89. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  90. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +10 -0
  91. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  92. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +28 -9
  93. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  94. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.d.ts +10 -0
  95. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -1
  96. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +17 -6
  97. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  98. package/lib-amd/components/StackedBarChart/StackedBarChart.types.d.ts +10 -0
  99. package/lib-amd/components/StackedBarChart/StackedBarChart.types.js.map +1 -1
  100. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +78 -13
  101. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  102. package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.d.ts +10 -0
  103. package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  104. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +31 -9
  105. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  106. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +10 -0
  107. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  108. package/lib-amd/index.d.ts +39 -20
  109. package/lib-amd/index.js +36 -21
  110. package/lib-amd/index.js.map +1 -1
  111. package/lib-amd/types/IDataPoint.d.ts +25 -0
  112. package/lib-amd/types/IDataPoint.js.map +1 -1
  113. package/lib-amd/utilities/gradients.d.ts +30 -0
  114. package/lib-amd/utilities/gradients.js +180 -0
  115. package/lib-amd/utilities/gradients.js.map +1 -0
  116. package/lib-amd/utilities/index.d.ts +1 -0
  117. package/lib-amd/utilities/index.js +2 -1
  118. package/lib-amd/utilities/index.js.map +1 -1
  119. package/lib-amd/version.js +1 -1
  120. package/lib-amd/version.js.map +1 -1
  121. package/lib-commonjs/components/DonutChart/Arc/Arc.js +21 -4
  122. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  123. package/lib-commonjs/components/DonutChart/Arc/Arc.types.d.ts +15 -0
  124. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -1
  125. package/lib-commonjs/components/DonutChart/DonutChart.base.js +12 -3
  126. package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
  127. package/lib-commonjs/components/DonutChart/DonutChart.types.d.ts +10 -0
  128. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  129. package/lib-commonjs/components/DonutChart/Pie/Pie.js +7 -1
  130. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  131. package/lib-commonjs/components/DonutChart/Pie/Pie.types.d.ts +10 -0
  132. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -1
  133. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +28 -4
  134. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
  135. package/lib-commonjs/components/GaugeChart/GaugeChart.types.d.ts +14 -0
  136. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  137. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +28 -5
  138. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  139. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +10 -0
  140. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  141. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js +25 -8
  142. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  143. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.d.ts +10 -0
  144. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  145. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +74 -29
  146. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  147. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +10 -0
  148. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  149. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +28 -9
  150. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  151. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.types.d.ts +10 -0
  152. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -1
  153. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js +17 -6
  154. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  155. package/lib-commonjs/components/StackedBarChart/StackedBarChart.types.d.ts +10 -0
  156. package/lib-commonjs/components/StackedBarChart/StackedBarChart.types.js.map +1 -1
  157. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +78 -13
  158. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  159. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.d.ts +10 -0
  160. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  161. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +31 -9
  162. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  163. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +10 -0
  164. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  165. package/lib-commonjs/index.d.ts +39 -20
  166. package/lib-commonjs/index.js +55 -21
  167. package/lib-commonjs/index.js.map +1 -1
  168. package/lib-commonjs/types/IDataPoint.d.ts +25 -0
  169. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  170. package/lib-commonjs/utilities/gradients.d.ts +30 -0
  171. package/lib-commonjs/utilities/gradients.js +178 -0
  172. package/lib-commonjs/utilities/gradients.js.map +1 -0
  173. package/lib-commonjs/utilities/index.d.ts +1 -0
  174. package/lib-commonjs/utilities/index.js +1 -0
  175. package/lib-commonjs/utilities/index.js.map +1 -1
  176. package/lib-commonjs/version.js +1 -1
  177. package/lib-commonjs/version.js.map +1 -1
  178. package/package.json +3 -3
  179. package/src/components/DonutChart/Arc/Arc.types.ts +18 -0
  180. package/src/components/DonutChart/DonutChart.types.ts +12 -0
  181. package/src/components/DonutChart/Pie/Pie.types.ts +12 -0
  182. package/src/components/GaugeChart/GaugeChart.types.ts +17 -0
  183. package/src/components/HorizontalBarChart/HorizontalBarChart.types.ts +12 -0
  184. package/src/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.ts +12 -0
  185. package/src/components/StackedBarChart/MultiStackedBarChart.types.ts +12 -0
  186. package/src/components/StackedBarChart/StackedBarChart.types.ts +12 -0
  187. package/src/components/VerticalBarChart/VerticalBarChart.types.ts +12 -0
  188. package/src/components/VerticalStackedBarChart/VerticalStackedBarChart.types.ts +12 -0
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalBarChart.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AAI,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,CACH,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,OAAO,IAAI,CAAC;QACd,CAAC;QAoBO,8CAAa,GAArB;YACE,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC1D,CAAC;QACH,6BAAC;IAAD,CAAC,AAlZD,CAA4C,KAAK,CAAC,SAAS,GAkZ1D;IAlZY,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, formatValueWithSIPrefix, getAccessibleDataObject } 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 // eslint-disable-next-line react/no-unused-state\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 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);\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 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 this.setState({\n isCalloutVisible: true,\n hoverValue: hoverValue,\n lineColor: point.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): 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 const color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n const pointData = point.horizontalBarChartdata!.x ? point.horizontalBarChartdata!.x : 0;\n if (index > 0) {\n prevPosition += value;\n }\n value = (pointData / total) * 100;\n if (value < 0) {\n value = 0;\n } else if (value < 1 && value !== 0) {\n value = 1 / scalingRatio;\n } else {\n value = value / scalingRatio;\n }\n startingPoint.push(prevPosition);\n\n const xValue = point.horizontalBarChartdata!.x;\n const placeholderIndex = 1;\n\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 return (\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 data-is-focusable={point.legend !== '' ? true : false}\n width={value + '%'}\n height={this._barHeight}\n fill={color}\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 );\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":";;;;IAwBA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAA4D,CAAC;IAgBrG;QAA4C,kDAAmE;QAW7G,gCAAY,KAA+B;YAA3C,YACE,kBAAM,KAAK,CAAC,SAkBb;YAvBO,YAAM,GAAY,IAAA,kBAAM,GAAE,CAAC;YA2L3B,4BAAsB,GAAG;gBAC/B,KAAI,CAAC,mBAA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,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;YACJ,CAAC,CAAC,CAAC;YACH,OAAO,IAAI,CAAC;QACd,CAAC;QAoBO,8CAAa,GAArB;YACE,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC1D,CAAC;QACH,6BAAC;IAAD,CAAC,AAlbD,CAA4C,KAAK,CAAC,SAAS,GAkb1D;IAlbY,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 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"]}
@@ -77,6 +77,16 @@ export interface IHorizontalBarChartProps {
77
77
  * @default false
78
78
  */
79
79
  hideLabels?: boolean;
80
+ /**
81
+ * @default false
82
+ * The prop used to enable gradient fill color for the chart.
83
+ */
84
+ enableGradient?: boolean;
85
+ /**
86
+ * @default false
87
+ * The prop used to enable rounded corners for the chart.
88
+ */
89
+ roundCorners?: boolean;
80
90
  }
81
91
  /**
82
92
  * Horizontal Bar Chart style properties
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalBarChart.types.js","sourceRoot":"../src/","sources":["components/HorizontalBarChart/HorizontalBarChart.types.ts"],"names":[],"mappings":";;;;IA0NA;;OAEG;IACH,IAAY,yBAGX;IAHD,WAAY,yBAAyB;QACnC,0DAA6B,CAAA;QAC7B,6DAAgC,CAAA;IAClC,CAAC,EAHW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAGpC","sourcesContent":["import { IChartProps, IChartDataPoint } from './index';\nimport { IStyle, ITheme } from '@fluentui/react/lib/Styling';\nimport { ICalloutProps } from '@fluentui/react/lib/Callout';\nimport { IRenderFunction, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\n\n/**\n * Horizontal Bar Chart properties\n * {@docCategory HorizontalBarChart}\n */\nexport interface IHorizontalBarChartProps {\n /**\n * An array of chart data points for the Horizontal bar chart\n */\n data?: IChartProps[];\n\n /**\n * Width of bar chart\n */\n width?: number;\n\n /**\n * Height of bar chart\n * @default 15\n */\n barHeight?: number;\n\n /**\n * Additional CSS class(es) to apply to the StackedBarChart.\n */\n className?: string;\n\n /**\n * Theme (provided through customization.)\n */\n theme?: ITheme;\n\n /**\n * This property tells whether to show ratio on top of stacked bar chart or not.\n */\n hideRatio?: boolean[];\n\n /**\n * Do not show tooltips in chart\n *\n * @default false\n */\n hideTooltip?: boolean;\n\n /**\n * This property tells how to show data text on top right of bar chart.\n * If barChartCustomData props added, then this props will be overrided.\n * @default 'default'\n */\n chartDataMode?: ChartDataMode;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IStyleFunctionOrObject<IHorizontalBarChartStyleProps, IHorizontalBarChartStyles>;\n\n /**\n * Define a custom callout renderer for a horizontal bar\n */\n onRenderCalloutPerHorizontalBar?: IRenderFunction<IChartDataPoint>;\n\n /**\n * props for the callout in the chart\n */\n calloutProps?: Partial<ICalloutProps>;\n\n /**\n * Custom text to the chart (right side of the chart)\n * IChartProps will be available as props to the method prop.\n * If this method not given, default values (IHorizontalDataPoint \\{x,y\\})\n * will be used to display the data/text based on given chartModeData prop.\n */\n barChartCustomData?: IRenderFunction<IChartProps>;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * Prop to define the variant of HorizontalBarChart to render\n * @default HorizontalBarChartVariant.PartToWhole\n */\n variant?: HorizontalBarChartVariant;\n\n /**\n * Prop to hide the bar labels\n * @default false\n */\n hideLabels?: boolean;\n}\n\n/**\n * Horizontal Bar Chart style properties\n * {@docCategory HorizontalBarChart}\n */\nexport interface IHorizontalBarChartStyleProps {\n /**\n * Theme (provided through customization.)\n */\n theme: ITheme;\n\n /**\n * Additional CSS class(es) to apply to the StackedBarChart.\n */\n className?: string;\n\n /**\n * Width of the chart.\n */\n width: number | undefined;\n\n /**\n * line color for callout\n */\n color?: string;\n\n /**\n * Height of bar chart\n * @default 15\n */\n barHeight?: number;\n\n /**\n * prop to check if benchmark data is provided\n */\n showTriangle?: boolean;\n\n /**\n * Prop to define the variant of HorizontalBarChart to render\n */\n variant?: HorizontalBarChartVariant;\n\n /**\n * Prop to hide the bar labels\n */\n hideLabels?: boolean;\n}\n\n/**\n * Horizontal Bar Chart styles\n * {@docCategory HorizontalBarChart}\n */\nexport interface IHorizontalBarChartStyles {\n /**\n * Styling for the root container\n */\n root: IStyle;\n\n /**\n * Styling for each item in the container\n */\n items: IStyle;\n\n /**\n * Style for the chart.\n */\n chart: IStyle;\n\n /**\n * Style for the chart Title.\n */\n chartTitle: IStyle;\n\n /**\n * Style for the bars.\n */\n barWrapper: IStyle;\n\n /**\n * Style for left side text of the chart title\n */\n chartTitleLeft: IStyle;\n\n /**\n * Style for right side text of the chart title\n */\n chartTitleRight: IStyle;\n\n /**\n * Style for the chart data text denominator.\n */\n chartDataTextDenominator: IStyle;\n\n /**\n * Style for the benchmark container\n */\n benchmarkContainer: IStyle;\n\n /**\n * Style for the benchmark triangle\n */\n triangle: IStyle;\n\n /**\n * Style for the bar labels\n */\n barLabel: IStyle;\n\n /**\n * Style for the div containing the chart\n */\n chartWrapper: IStyle;\n}\n\n/**\n * Chart data mode for chart data text\n * default: show the datapoint.x value\n * fraction: show the fraction of datapoint.x/datapoint.y\n * percentage: show the percentage of (datapoint.x/datapoint.y)%\n * {@docCategory HorizontalBarChart}\n */\nexport type ChartDataMode = 'default' | 'fraction' | 'percentage';\n\n/**\n * {@docCategory HorizontalBarChart}\n */\nexport enum HorizontalBarChartVariant {\n PartToWhole = 'part-to-whole',\n AbsoluteScale = 'absolute-scale',\n}\n"]}
1
+ {"version":3,"file":"HorizontalBarChart.types.js","sourceRoot":"../src/","sources":["components/HorizontalBarChart/HorizontalBarChart.types.ts"],"names":[],"mappings":";;;;IAsOA;;OAEG;IACH,IAAY,yBAGX;IAHD,WAAY,yBAAyB;QACnC,0DAA6B,CAAA;QAC7B,6DAAgC,CAAA;IAClC,CAAC,EAHW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAGpC","sourcesContent":["import { IChartProps, IChartDataPoint } from './index';\nimport { IStyle, ITheme } from '@fluentui/react/lib/Styling';\nimport { ICalloutProps } from '@fluentui/react/lib/Callout';\nimport { IRenderFunction, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\n\n/**\n * Horizontal Bar Chart properties\n * {@docCategory HorizontalBarChart}\n */\nexport interface IHorizontalBarChartProps {\n /**\n * An array of chart data points for the Horizontal bar chart\n */\n data?: IChartProps[];\n\n /**\n * Width of bar chart\n */\n width?: number;\n\n /**\n * Height of bar chart\n * @default 15\n */\n barHeight?: number;\n\n /**\n * Additional CSS class(es) to apply to the StackedBarChart.\n */\n className?: string;\n\n /**\n * Theme (provided through customization.)\n */\n theme?: ITheme;\n\n /**\n * This property tells whether to show ratio on top of stacked bar chart or not.\n */\n hideRatio?: boolean[];\n\n /**\n * Do not show tooltips in chart\n *\n * @default false\n */\n hideTooltip?: boolean;\n\n /**\n * This property tells how to show data text on top right of bar chart.\n * If barChartCustomData props added, then this props will be overrided.\n * @default 'default'\n */\n chartDataMode?: ChartDataMode;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IStyleFunctionOrObject<IHorizontalBarChartStyleProps, IHorizontalBarChartStyles>;\n\n /**\n * Define a custom callout renderer for a horizontal bar\n */\n onRenderCalloutPerHorizontalBar?: IRenderFunction<IChartDataPoint>;\n\n /**\n * props for the callout in the chart\n */\n calloutProps?: Partial<ICalloutProps>;\n\n /**\n * Custom text to the chart (right side of the chart)\n * IChartProps will be available as props to the method prop.\n * If this method not given, default values (IHorizontalDataPoint \\{x,y\\})\n * will be used to display the data/text based on given chartModeData prop.\n */\n barChartCustomData?: IRenderFunction<IChartProps>;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * Prop to define the variant of HorizontalBarChart to render\n * @default HorizontalBarChartVariant.PartToWhole\n */\n variant?: HorizontalBarChartVariant;\n\n /**\n * Prop to hide the bar labels\n * @default false\n */\n hideLabels?: boolean;\n\n /**\n * @default false\n * The prop used to enable gradient fill color for the chart.\n */\n enableGradient?: boolean;\n\n /**\n * @default false\n * The prop used to enable rounded corners for the chart.\n */\n roundCorners?: boolean;\n}\n\n/**\n * Horizontal Bar Chart style properties\n * {@docCategory HorizontalBarChart}\n */\nexport interface IHorizontalBarChartStyleProps {\n /**\n * Theme (provided through customization.)\n */\n theme: ITheme;\n\n /**\n * Additional CSS class(es) to apply to the StackedBarChart.\n */\n className?: string;\n\n /**\n * Width of the chart.\n */\n width: number | undefined;\n\n /**\n * line color for callout\n */\n color?: string;\n\n /**\n * Height of bar chart\n * @default 15\n */\n barHeight?: number;\n\n /**\n * prop to check if benchmark data is provided\n */\n showTriangle?: boolean;\n\n /**\n * Prop to define the variant of HorizontalBarChart to render\n */\n variant?: HorizontalBarChartVariant;\n\n /**\n * Prop to hide the bar labels\n */\n hideLabels?: boolean;\n}\n\n/**\n * Horizontal Bar Chart styles\n * {@docCategory HorizontalBarChart}\n */\nexport interface IHorizontalBarChartStyles {\n /**\n * Styling for the root container\n */\n root: IStyle;\n\n /**\n * Styling for each item in the container\n */\n items: IStyle;\n\n /**\n * Style for the chart.\n */\n chart: IStyle;\n\n /**\n * Style for the chart Title.\n */\n chartTitle: IStyle;\n\n /**\n * Style for the bars.\n */\n barWrapper: IStyle;\n\n /**\n * Style for left side text of the chart title\n */\n chartTitleLeft: IStyle;\n\n /**\n * Style for right side text of the chart title\n */\n chartTitleRight: IStyle;\n\n /**\n * Style for the chart data text denominator.\n */\n chartDataTextDenominator: IStyle;\n\n /**\n * Style for the benchmark container\n */\n benchmarkContainer: IStyle;\n\n /**\n * Style for the benchmark triangle\n */\n triangle: IStyle;\n\n /**\n * Style for the bar labels\n */\n barLabel: IStyle;\n\n /**\n * Style for the div containing the chart\n */\n chartWrapper: IStyle;\n}\n\n/**\n * Chart data mode for chart data text\n * default: show the datapoint.x value\n * fraction: show the fraction of datapoint.x/datapoint.y\n * percentage: show the percentage of (datapoint.x/datapoint.y)%\n * {@docCategory HorizontalBarChart}\n */\nexport type ChartDataMode = 'default' | 'fraction' | 'percentage';\n\n/**\n * {@docCategory HorizontalBarChart}\n */\nexport enum HorizontalBarChartVariant {\n PartToWhole = 'part-to-whole',\n AbsoluteScale = 'absolute-scale',\n}\n"]}
@@ -22,8 +22,8 @@ define(["require", "exports", "tslib", "react", "d3-array", "d3-selection", "d3-
22
22
  _this.margins = margins;
23
23
  };
24
24
  _this._renderContentForOnlyBars = function (point) {
25
- var _a, _b;
26
- var _c = _this.props.useSingleColor, useSingleColor = _c === void 0 ? false : _c;
25
+ var _a, _b, _c;
26
+ var _d = _this.props, _e = _d.useSingleColor, useSingleColor = _e === void 0 ? false : _e, _f = _d.enableGradient, enableGradient = _f === void 0 ? false : _f;
27
27
  var selectedPointIndex = 0;
28
28
  _this.props.data.forEach(function (yDataPoint, index) {
29
29
  if (yDataPoint.y === point.y) {
@@ -35,13 +35,16 @@ define(["require", "exports", "tslib", "react", "d3-array", "d3-selection", "d3-
35
35
  //if useSingle color , then check if user has given a palette or not
36
36
  // and pick the first color from that or else from our paltette.
37
37
  color = _this.props.colors ? _this._createColors()(1) : (0, index_1.getNextColor)(1, 0, (_a = _this.props.theme) === null || _a === void 0 ? void 0 : _a.isInverted);
38
+ if (enableGradient) {
39
+ color = (0, index_1.getNextGradient)(0, 0, (_b = _this.props.theme) === null || _b === void 0 ? void 0 : _b.isInverted)[0];
40
+ }
38
41
  }
39
42
  else {
40
43
  color = point.color
41
44
  ? point.color
42
45
  : _this.props.colors
43
46
  ? _this._createColors()(point.x)
44
- : (0, index_1.getNextColor)(selectedPointIndex, 0, (_b = _this.props.theme) === null || _b === void 0 ? void 0 : _b.isInverted);
47
+ : (0, index_1.getNextColor)(selectedPointIndex, 0, (_c = _this.props.theme) === null || _c === void 0 ? void 0 : _c.isInverted);
45
48
  }
46
49
  return (React.createElement(React.Fragment, null,
47
50
  React.createElement(index_1.ChartHoverCard, { XValue: point.xAxisCalloutData || point.x.toString(), Legend: point.legend, YValue: point.yAxisCalloutData || point.y, color: color, culture: _this.props.culture })));
@@ -64,9 +67,9 @@ define(["require", "exports", "tslib", "react", "d3-array", "d3-selection", "d3-
64
67
  _this._refArray.push({ index: legendTitle, refElement: element });
65
68
  };
66
69
  _this._getCalloutContentForBar = function (point) {
67
- var _a, _b;
70
+ var _a, _b, _c;
68
71
  var YValueHover = [];
69
- var _c = _this.props.useSingleColor, useSingleColor = _c === void 0 ? false : _c;
72
+ var _d = _this.props, _e = _d.useSingleColor, useSingleColor = _e === void 0 ? false : _e, _f = _d.enableGradient, enableGradient = _f === void 0 ? false : _f;
70
73
  var data = _this.props.data;
71
74
  var selectedPoint = data.filter(function (yDataPoint) { return yDataPoint.y === point.y; });
72
75
  var selectedPointIndex = 0;
@@ -80,13 +83,16 @@ define(["require", "exports", "tslib", "react", "d3-array", "d3-selection", "d3-
80
83
  //if useSingle color , then check if user has given a palette or not
81
84
  // and pick the first color from that or else from our paltette.
82
85
  color = _this.props.colors ? _this._createColors()(1) : (0, index_1.getNextColor)(1, 0, (_a = _this.props.theme) === null || _a === void 0 ? void 0 : _a.isInverted);
86
+ if (enableGradient) {
87
+ color = (0, index_1.getNextGradient)(0, 0, (_b = _this.props.theme) === null || _b === void 0 ? void 0 : _b.isInverted)[0];
88
+ }
83
89
  }
84
90
  else {
85
91
  color = selectedPoint[0].color
86
92
  ? selectedPoint[0].color
87
93
  : _this.props.colors
88
94
  ? _this._createColors()(selectedPoint[0].x)
89
- : (0, index_1.getNextColor)(selectedPointIndex, 0, (_b = _this.props.theme) === null || _b === void 0 ? void 0 : _b.isInverted);
95
+ : (0, index_1.getNextColor)(selectedPointIndex, 0, (_c = _this.props.theme) === null || _c === void 0 ? void 0 : _c.isInverted);
90
96
  }
91
97
  // callout data for the bar
92
98
  YValueHover.push({
@@ -173,12 +179,18 @@ define(["require", "exports", "tslib", "react", "d3-array", "d3-selection", "d3-
173
179
  var useSingleColor = _this.props.useSingleColor;
174
180
  var actions = [];
175
181
  data.forEach(function (point, _index) {
176
- var _a;
182
+ var _a, _b, _c, _d;
177
183
  var color = useSingleColor
178
184
  ? _this.props.colors
179
185
  ? _this._createColors()(1)
180
186
  : (0, index_1.getNextColor)(1, 0, (_a = _this.props.theme) === null || _a === void 0 ? void 0 : _a.isInverted)
181
187
  : point.color;
188
+ if (_this.props.enableGradient) {
189
+ color = ((_b = point.gradient) === null || _b === void 0 ? void 0 : _b[0]) || (0, index_1.getNextGradient)(_index, 0, (_c = _this.props.theme) === null || _c === void 0 ? void 0 : _c.isInverted)[0];
190
+ if (useSingleColor) {
191
+ color = (0, index_1.getNextGradient)(0, 0, (_d = _this.props.theme) === null || _d === void 0 ? void 0 : _d.isInverted)[0];
192
+ }
193
+ }
182
194
  // mapping data to the format Legends component needs
183
195
  var legend = {
184
196
  title: point.legend,
@@ -261,7 +273,6 @@ define(["require", "exports", "tslib", "react", "d3-array", "d3-selection", "d3-
261
273
  };
262
274
  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,
263
275
  /* eslint-disable react/jsx-no-bind */
264
- // eslint-disable-next-line react/no-children-prop
265
276
  children: function (props) {
266
277
  return (React.createElement(React.Fragment, null,
267
278
  React.createElement("g", null, _this._bars)));
@@ -302,7 +313,7 @@ define(["require", "exports", "tslib", "react", "d3-array", "d3-selection", "d3-
302
313
  isCalloutVisible: true,
303
314
  dataForHoverCard: point.x,
304
315
  selectedLegendTitle: point.legend,
305
- color: this.props.useSingleColor ? color : point.color,
316
+ color: this.props.useSingleColor || this.props.enableGradient ? color : point.color,
306
317
  // To display callout value, if no callout value given, taking given point.x value as a string.
307
318
  xCalloutValue: point.yAxisCalloutData || point.y.toString(),
308
319
  yCalloutValue: point.xAxisCalloutData || point.x.toString(),
@@ -314,7 +325,6 @@ define(["require", "exports", "tslib", "react", "d3-array", "d3-selection", "d3-
314
325
  });
315
326
  }
316
327
  };
317
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
318
328
  HorizontalBarChartWithAxisBase.prototype._createNumericBars = function (containerHeight, containerWidth, xElement, yElement) {
319
329
  var _this = this;
320
330
  var _a = this.props.useSingleColor, useSingleColor = _a === void 0 ? false : _a;
@@ -326,7 +336,7 @@ define(["require", "exports", "tslib", "react", "d3-array", "d3-selection", "d3-
326
336
  return bValue - aValue;
327
337
  });
328
338
  var bars = sortedBars.map(function (point, index) {
329
- var _a, _b;
339
+ var _a, _b, _c, _d, _e, _f, _g, _h;
330
340
  var shouldHighlight = true;
331
341
  if (_this.state.isLegendHovered || _this.state.isLegendSelected) {
332
342
  shouldHighlight = _this.state.selectedLegendTitle === point.legend;
@@ -340,22 +350,40 @@ define(["require", "exports", "tslib", "react", "d3-array", "d3-selection", "d3-
340
350
  if (barHeight < 1) {
341
351
  return React.createElement(React.Fragment, { key: point.x }, " ");
342
352
  }
343
- var color;
353
+ var startColor;
344
354
  if (useSingleColor) {
345
355
  //if useSingle color , then check if user has given a palette or not
346
356
  // and pick the first color from that or else from our paltette.
347
- color = _this.props.colors ? _this._createColors()(1) : (0, index_1.getNextColor)(1, 0, (_a = _this.props.theme) === null || _a === void 0 ? void 0 : _a.isInverted);
357
+ startColor = _this.props.colors ? _this._createColors()(1) : (0, index_1.getNextColor)(1, 0, (_a = _this.props.theme) === null || _a === void 0 ? void 0 : _a.isInverted);
348
358
  }
349
359
  else {
350
- color = _this.props.colors
360
+ startColor = _this.props.colors
351
361
  ? _this._createColors()(point.x)
352
362
  : (0, index_1.getNextColor)(index, 0, (_b = _this.props.theme) === null || _b === void 0 ? void 0 : _b.isInverted);
353
363
  }
354
- return (React.createElement("rect", { key: point.y, x: _this._isRtl ? xBarScale(point.x) : _this.margins.left, className: _this._classNames.opacityChangeOnHover, y: yBarScale(point.y) - _this._barHeight / 2, "data-is-focusable": shouldHighlight, width: _this._isRtl
355
- ? containerWidth - _this.margins.right - Math.max(xBarScale(point.x), 0)
356
- : Math.max(xBarScale(point.x), 0) - _this.margins.left, height: _this._barHeight, ref: function (e) {
357
- _this._refCallback(e, point.legend);
358
- }, onClick: point.onClick, onMouseOver: _this._onBarHover.bind(_this, point, color), "aria-label": _this._getAriaLabel(point), role: "img", "aria-labelledby": "toolTip".concat(_this._calloutId), onMouseLeave: _this._onBarLeave, onFocus: _this._onBarFocus.bind(_this, point, index, color), onBlur: _this._onBarLeave, fill: point.color && !useSingleColor ? point.color : color }));
364
+ startColor = point.color && !useSingleColor ? point.color : startColor;
365
+ var endColor = startColor;
366
+ if (_this.props.enableGradient) {
367
+ var pointIndex = Math.max(_this._points.findIndex(function (item) { return item === point; }), 0);
368
+ startColor = ((_c = point.gradient) === null || _c === void 0 ? void 0 : _c[0]) || (0, index_1.getNextGradient)(pointIndex, 0, (_d = _this.props.theme) === null || _d === void 0 ? void 0 : _d.isInverted)[0];
369
+ endColor = ((_e = point.gradient) === null || _e === void 0 ? void 0 : _e[1]) || (0, index_1.getNextGradient)(pointIndex, 0, (_f = _this.props.theme) === null || _f === void 0 ? void 0 : _f.isInverted)[1];
370
+ if (useSingleColor) {
371
+ startColor = (0, index_1.getNextGradient)(0, 0, (_g = _this.props.theme) === null || _g === void 0 ? void 0 : _g.isInverted)[0];
372
+ endColor = (0, index_1.getNextGradient)(0, 0, (_h = _this.props.theme) === null || _h === void 0 ? void 0 : _h.isInverted)[1];
373
+ }
374
+ _this._points[pointIndex].color = startColor;
375
+ }
376
+ var gradientId = (0, Utilities_1.getId)('HBCWA_Gradient') + "_".concat(index, "_").concat(point.x);
377
+ return (React.createElement(React.Fragment, { key: "".concat(index, "_").concat(point.x) },
378
+ _this.props.enableGradient && (React.createElement("defs", null,
379
+ React.createElement("linearGradient", { id: gradientId },
380
+ React.createElement("stop", { offset: "0", stopColor: startColor }),
381
+ React.createElement("stop", { offset: "100%", stopColor: endColor })))),
382
+ React.createElement("rect", { key: point.y, x: _this._isRtl ? xBarScale(point.x) : _this.margins.left, className: _this._classNames.opacityChangeOnHover, y: yBarScale(point.y) - _this._barHeight / 2, "data-is-focusable": shouldHighlight, width: _this._isRtl
383
+ ? containerWidth - _this.margins.right - Math.max(xBarScale(point.x), 0)
384
+ : Math.max(xBarScale(point.x), 0) - _this.margins.left, height: _this._barHeight, ref: function (e) {
385
+ _this._refCallback(e, point.legend);
386
+ }, rx: _this.props.roundCorners ? 3 : 0, onClick: point.onClick, onMouseOver: _this._onBarHover.bind(_this, point, startColor), "aria-label": _this._getAriaLabel(point), role: "img", "aria-labelledby": "toolTip".concat(_this._calloutId), onMouseLeave: _this._onBarLeave, onFocus: _this._onBarFocus.bind(_this, point, index, startColor), onBlur: _this._onBarLeave, fill: _this.props.enableGradient ? "url(#".concat(gradientId, ")") : startColor })));
359
387
  });
360
388
  return bars;
361
389
  };
@@ -397,33 +425,50 @@ define(["require", "exports", "tslib", "react", "d3-array", "d3-selection", "d3-
397
425
  _loop_1(i);
398
426
  }
399
427
  };
400
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
401
428
  HorizontalBarChartWithAxisBase.prototype._createStringBars = function (containerHeight, containerWidth, xElement, yElement) {
402
429
  var _this = this;
403
430
  var _a = this._getScales(containerHeight, containerWidth, false), xBarScale = _a.xBarScale, yBarScale = _a.yBarScale;
404
431
  var _b = this.props.useSingleColor, useSingleColor = _b === void 0 ? false : _b;
405
432
  var bars = this._points.map(function (point, index) {
406
- var _a, _b;
433
+ var _a, _b, _c, _d, _e, _f, _g, _h;
407
434
  var barHeight = Math.max(yBarScale(point.y), 0);
408
435
  if (barHeight < 1) {
409
436
  return React.createElement(React.Fragment, { key: point.x }, " ");
410
437
  }
411
- var color;
438
+ var startColor;
412
439
  if (useSingleColor) {
413
440
  //if useSingle color , then check if user has given a palette or not
414
441
  // and pick the first color from that or else from our paltette.
415
- color = _this.props.colors ? _this._createColors()(1) : (0, index_1.getNextColor)(1, 0, (_a = _this.props.theme) === null || _a === void 0 ? void 0 : _a.isInverted);
442
+ startColor = _this.props.colors ? _this._createColors()(1) : (0, index_1.getNextColor)(1, 0, (_a = _this.props.theme) === null || _a === void 0 ? void 0 : _a.isInverted);
416
443
  }
417
444
  else {
418
- color = _this.props.colors
445
+ startColor = _this.props.colors
419
446
  ? _this._createColors()(point.x)
420
447
  : (0, index_1.getNextColor)(index, 0, (_b = _this.props.theme) === null || _b === void 0 ? void 0 : _b.isInverted);
421
448
  }
422
- return (React.createElement("rect", { transform: "translate(0,".concat(0.5 * (yBarScale.bandwidth() - _this._barHeight), ")"), key: point.x, x: _this._isRtl ? xBarScale(point.x) : _this.margins.left, y: yBarScale(point.y), width: _this._isRtl
423
- ? containerWidth - _this.margins.right - Math.max(xBarScale(point.x), 0)
424
- : Math.max(xBarScale(point.x), 0) - _this.margins.left, height: _this._barHeight, "aria-labelledby": "toolTip".concat(_this._calloutId), "aria-label": _this._getAriaLabel(point), role: "img", ref: function (e) {
425
- _this._refCallback(e, point.legend);
426
- }, onClick: point.onClick, onMouseOver: _this._onBarHover.bind(_this, point, color), onMouseLeave: _this._onBarLeave, onBlur: _this._onBarLeave, "data-is-focusable": true, onFocus: _this._onBarFocus.bind(_this, point, index, color), fill: point.color && !useSingleColor ? point.color : color }));
449
+ startColor = point.color && !useSingleColor ? point.color : startColor;
450
+ var endColor = startColor;
451
+ if (_this.props.enableGradient) {
452
+ var pointIndex = _this._points.findIndex(function (item) { return item === point; });
453
+ startColor = ((_c = point.gradient) === null || _c === void 0 ? void 0 : _c[0]) || (0, index_1.getNextGradient)(pointIndex, 0, (_d = _this.props.theme) === null || _d === void 0 ? void 0 : _d.isInverted)[0];
454
+ endColor = ((_e = point.gradient) === null || _e === void 0 ? void 0 : _e[1]) || (0, index_1.getNextGradient)(pointIndex, 0, (_f = _this.props.theme) === null || _f === void 0 ? void 0 : _f.isInverted)[1];
455
+ if (useSingleColor) {
456
+ startColor = (0, index_1.getNextGradient)(0, 0, (_g = _this.props.theme) === null || _g === void 0 ? void 0 : _g.isInverted)[0];
457
+ endColor = (0, index_1.getNextGradient)(0, 0, (_h = _this.props.theme) === null || _h === void 0 ? void 0 : _h.isInverted)[1];
458
+ }
459
+ _this._points[pointIndex].color = startColor;
460
+ }
461
+ var gradientId = (0, Utilities_1.getId)('HBCWA_Gradient') + "_".concat(index, "_").concat(point.x);
462
+ return (React.createElement(React.Fragment, { key: "".concat(index, "_").concat(point.x) },
463
+ _this.props.enableGradient && (React.createElement("defs", null,
464
+ React.createElement("linearGradient", { id: gradientId },
465
+ React.createElement("stop", { offset: "0", stopColor: startColor }),
466
+ React.createElement("stop", { offset: "100%", stopColor: endColor })))),
467
+ React.createElement("rect", { transform: "translate(0,".concat(0.5 * (yBarScale.bandwidth() - _this._barHeight), ")"), key: point.x, x: _this._isRtl ? xBarScale(point.x) : _this.margins.left, y: yBarScale(point.y), rx: _this.props.roundCorners ? 3 : 0, width: _this._isRtl
468
+ ? containerWidth - _this.margins.right - Math.max(xBarScale(point.x), 0)
469
+ : Math.max(xBarScale(point.x), 0) - _this.margins.left, height: _this._barHeight, "aria-labelledby": "toolTip".concat(_this._calloutId), "aria-label": _this._getAriaLabel(point), role: "img", ref: function (e) {
470
+ _this._refCallback(e, point.legend);
471
+ }, onClick: point.onClick, onMouseOver: _this._onBarHover.bind(_this, point, startColor), onMouseLeave: _this._onBarLeave, onBlur: _this._onBarLeave, "data-is-focusable": true, onFocus: _this._onBarFocus.bind(_this, point, index, startColor), fill: _this.props.enableGradient ? "url(#".concat(gradientId, ")") : startColor })));
427
472
  });
428
473
  // Removing un wanted tooltip div from DOM, when prop not provided, for proper cleanup
429
474
  // of unwanted DOM elements, to prevent flacky behaviour in tooltips , that might occur