@fluentui/react-charting 5.20.2 → 5.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/CHANGELOG.json +69 -1
  2. package/CHANGELOG.md +29 -2
  3. package/dist/react-charting.d.ts +13 -6
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +1 -0
  7. package/lib/components/AreaChart/AreaChart.base.js +1 -2
  8. package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
  9. package/lib/components/DonutChart/Arc/Arc.js +1 -1
  10. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  11. package/lib/components/DonutChart/Pie/Pie.js +1 -1
  12. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  13. package/lib/components/GaugeChart/GaugeChart.base.js +1 -1
  14. package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
  15. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +1 -0
  16. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +11 -7
  17. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  18. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +3 -2
  19. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  20. package/lib/components/HeatMapChart/HeatMapChart.base.js +1 -1
  21. package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  22. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +1 -1
  23. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  24. package/lib/components/LineChart/LineChart.base.js +4 -4
  25. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  26. package/lib/components/SankeyChart/SankeyChart.base.d.ts +2 -0
  27. package/lib/components/SankeyChart/SankeyChart.base.js +21 -17
  28. package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
  29. package/lib/components/SankeyChart/SankeyChart.types.d.ts +4 -0
  30. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  31. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +1 -1
  32. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  33. package/lib/components/StackedBarChart/StackedBarChart.base.js +1 -1
  34. package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  35. package/lib/components/VerticalBarChart/VerticalBarChart.base.d.ts +1 -0
  36. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +25 -24
  37. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  38. package/lib/components/VerticalBarChart/VerticalBarChart.types.d.ts +3 -2
  39. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  40. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +1 -0
  41. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +28 -50
  42. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  43. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +3 -2
  44. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  45. package/lib/utilities/index.d.ts +1 -0
  46. package/lib/utilities/index.js +1 -0
  47. package/lib/utilities/index.js.map +1 -1
  48. package/lib/utilities/utilities.d.ts +1 -1
  49. package/lib/utilities/utilities.js +10 -11
  50. package/lib/utilities/utilities.js.map +1 -1
  51. package/lib/utilities/vbc-utils.d.ts +2 -0
  52. package/lib/utilities/vbc-utils.js +31 -0
  53. package/lib/utilities/vbc-utils.js.map +1 -0
  54. package/lib/version.js +1 -1
  55. package/lib/version.js.map +1 -1
  56. package/lib-amd/components/AreaChart/AreaChart.base.js +1 -2
  57. package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
  58. package/lib-amd/components/DonutChart/Arc/Arc.js +1 -1
  59. package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
  60. package/lib-amd/components/DonutChart/Pie/Pie.js +1 -1
  61. package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -1
  62. package/lib-amd/components/GaugeChart/GaugeChart.base.js +1 -1
  63. package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
  64. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +1 -0
  65. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +11 -7
  66. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  67. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +3 -2
  68. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  69. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +1 -1
  70. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  71. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +1 -1
  72. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  73. package/lib-amd/components/LineChart/LineChart.base.js +4 -4
  74. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  75. package/lib-amd/components/SankeyChart/SankeyChart.base.d.ts +2 -0
  76. package/lib-amd/components/SankeyChart/SankeyChart.base.js +21 -17
  77. package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
  78. package/lib-amd/components/SankeyChart/SankeyChart.types.d.ts +4 -0
  79. package/lib-amd/components/SankeyChart/SankeyChart.types.js.map +1 -1
  80. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +1 -1
  81. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  82. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +1 -1
  83. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  84. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.d.ts +1 -0
  85. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +24 -23
  86. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  87. package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.d.ts +3 -2
  88. package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  89. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +1 -0
  90. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +27 -49
  91. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  92. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +3 -2
  93. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  94. package/lib-amd/utilities/index.d.ts +1 -0
  95. package/lib-amd/utilities/index.js +2 -1
  96. package/lib-amd/utilities/index.js.map +1 -1
  97. package/lib-amd/utilities/utilities.d.ts +1 -1
  98. package/lib-amd/utilities/utilities.js +10 -11
  99. package/lib-amd/utilities/utilities.js.map +1 -1
  100. package/lib-amd/utilities/vbc-utils.d.ts +2 -0
  101. package/lib-amd/utilities/vbc-utils.js +38 -0
  102. package/lib-amd/utilities/vbc-utils.js.map +1 -0
  103. package/lib-amd/version.js +1 -1
  104. package/lib-amd/version.js.map +1 -1
  105. package/lib-commonjs/components/AreaChart/AreaChart.base.js +1 -2
  106. package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
  107. package/lib-commonjs/components/DonutChart/Arc/Arc.js +1 -1
  108. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  109. package/lib-commonjs/components/DonutChart/Pie/Pie.js +1 -1
  110. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  111. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +1 -1
  112. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
  113. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +1 -0
  114. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +11 -7
  115. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  116. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +3 -2
  117. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  118. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +1 -1
  119. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  120. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +1 -1
  121. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  122. package/lib-commonjs/components/LineChart/LineChart.base.js +4 -4
  123. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  124. package/lib-commonjs/components/SankeyChart/SankeyChart.base.d.ts +2 -0
  125. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js +21 -17
  126. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
  127. package/lib-commonjs/components/SankeyChart/SankeyChart.types.d.ts +4 -0
  128. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  129. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +1 -1
  130. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  131. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js +1 -1
  132. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  133. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.d.ts +1 -0
  134. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +24 -23
  135. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  136. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.d.ts +3 -2
  137. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  138. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +1 -0
  139. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +27 -49
  140. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  141. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +3 -2
  142. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  143. package/lib-commonjs/utilities/index.d.ts +1 -0
  144. package/lib-commonjs/utilities/index.js +1 -0
  145. package/lib-commonjs/utilities/index.js.map +1 -1
  146. package/lib-commonjs/utilities/utilities.d.ts +1 -1
  147. package/lib-commonjs/utilities/utilities.js +10 -11
  148. package/lib-commonjs/utilities/utilities.js.map +1 -1
  149. package/lib-commonjs/utilities/vbc-utils.d.ts +2 -0
  150. package/lib-commonjs/utilities/vbc-utils.js +36 -0
  151. package/lib-commonjs/utilities/vbc-utils.js.map +1 -0
  152. package/lib-commonjs/version.js +1 -1
  153. package/lib-commonjs/version.js.map +1 -1
  154. package/package.json +5 -5
  155. package/src/components/SankeyChart/SankeyChart.types.ts +5 -0
  156. package/src/components/VerticalBarChart/VerticalBarChart.types.ts +3 -2
  157. package/src/components/VerticalStackedBarChart/VerticalStackedBarChart.types.ts +3 -2
@@ -1 +1 @@
1
- {"version":3,"file":"VerticalBarChart.base.js","sourceRoot":"../src/","sources":["components/VerticalBarChart/VerticalBarChart.base.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,IAAI,KAAK,EAAE,GAAG,IAAI,KAAK,EAAE,MAAM,UAAU,C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C,MAAM,CAAC,IAAI,IAAI,CAAC,oBAAoB,EAAE,CAAC,EACjE;YACA,OAAO,IAAI,CAAC;SACb;QAED,OAAO,CACL,8BACE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC,SAAS,GAAG,CAAC,EAC9B,CAAC,EAAE,MAAM,GAAG,CAAC,EACb,UAAU,EAAC,QAAQ,EACnB,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,QAAQ,iBACvB,IAAI,IAEhB,uBAAuB,CAAC,QAAQ,CAAC,CAC7B,CACR,CAAC;IACJ,CAAC;IAiCO,4CAAa,GAArB;QACE,OAAO,CACL,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC;YACzB,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,UAAC,KAAiC,IAAK,OAAA,KAAK,CAAC,CAAC,EAAP,CAAO,CAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CACnG,CAAC;IACJ,CAAC;IACH,2BAAC;AAAD,CAAC,AA74BD,CAA0C,KAAK,CAAC,SAAS,GA64BxD","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { line as d3Line } from 'd3-shape';\nimport { select as d3Select } from 'd3-selection';\nimport {\n scaleLinear as d3ScaleLinear,\n ScaleLinear as D3ScaleLinear,\n scaleBand as d3ScaleBand,\n scaleUtc as d3ScaleUtc,\n} from 'd3-scale';\nimport { classNamesFunction, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport {\n IAccessibilityProps,\n CartesianChart,\n ChartHoverCard,\n IBasestate,\n IMargins,\n ILegend,\n IRefArrayData,\n IVerticalBarChartProps,\n IVerticalBarChartStyleProps,\n IVerticalBarChartStyles,\n IVerticalBarChartDataPoint,\n Legends,\n IChildProps,\n IYValueHover,\n} from '../../index';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n NumericAxis,\n getTypeOfAxis,\n tooltipOfXAxislabels,\n formatValueWithSIPrefix,\n getBarWidth,\n getScalePadding,\n isScalePaddingDefined,\n} from '../../utilities/index';\n\nenum CircleVisbility {\n show = 'visibility',\n hide = 'hidden',\n}\nconst getClassNames = classNamesFunction<IVerticalBarChartStyleProps, IVerticalBarChartStyles>();\n\nconst MIN_DOMAIN_MARGIN = 8;\n\nexport interface IVerticalBarChartState extends IBasestate {\n dataPointCalloutProps?: IVerticalBarChartDataPoint; // define this in hover and focus\n /**\n * data point of x, where rectangle is hovered or focused\n */\n activeXdataPoint: number | string | Date | null;\n YValueHover: IYValueHover[];\n hoverXValue?: string | number | null;\n callOutAccessibilityData?: IAccessibilityProps;\n calloutLegend: string;\n}\n\ntype ColorScale = (_p?: number) => string;\n\nexport class VerticalBarChartBase extends React.Component<IVerticalBarChartProps, IVerticalBarChartState> {\n private _points: IVerticalBarChartDataPoint[];\n private _barWidth: number;\n private _colors: string[];\n private _classNames: IProcessedStyleSet<IVerticalBarChartStyles>;\n private _refArray: IRefArrayData[];\n private _calloutId: string;\n private margins: IMargins;\n private _isRtl: boolean = getRTL();\n private _bars: JSX.Element[];\n private _xAxisLabels: string[];\n private _yMax: number;\n private _isHavingLine: boolean;\n private _tooltipId: string;\n private _xAxisType: XAxisTypes;\n private _calloutAnchorPoint: IVerticalBarChartDataPoint | null;\n private _domainMargin: number;\n private _emptyChartId: string;\n private _xAxisInnerPadding: number;\n private _xAxisOuterPadding: number;\n\n public constructor(props: IVerticalBarChartProps) {\n super(props);\n this.state = {\n color: '',\n dataForHoverCard: 0,\n isCalloutVisible: false,\n refSelected: null,\n selectedLegend: '',\n activeLegend: '',\n xCalloutValue: '',\n yCalloutValue: '',\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n calloutLegend: '',\n };\n this._isHavingLine = this._checkForLine();\n this._calloutId = getId('callout');\n this._tooltipId = getId('VCTooltipID_');\n this._refArray = [];\n this._xAxisType =\n this.props.data! && this.props.data!.length > 0\n ? (getTypeOfAxis(this.props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\n this._emptyChartId = getId('_VBC_empty');\n }\n\n public render(): JSX.Element {\n this._adjustProps();\n this._xAxisLabels = this._points.map((point: IVerticalBarChartDataPoint) => point.x as string);\n this._yMax = Math.max(\n d3Max(this._points, (point: IVerticalBarChartDataPoint) => point.y)!,\n this.props.yMaxValue || 0,\n );\n const legendBars: JSX.Element = this._getLegendData(this._points, this.props.theme!.palette);\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n });\n const calloutProps = {\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n id: `toolTip${this._calloutId}`,\n target: this.state.refSelected,\n isBeakVisible: false,\n ...(this._isHavingLine && {\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n }),\n gapSpace: 15,\n color: this.state.color,\n legend: this.state.calloutLegend,\n XValue: this.state.xCalloutValue,\n YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard,\n onDismiss: this._closeCallout,\n preventDismissOnLostFocus: true,\n ...this.props.calloutProps,\n ...getAccessibleDataObject(this.state.callOutAccessibilityData),\n };\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n return !this._isChartEmpty() ? (\n <CartesianChart\n {...this.props}\n points={this._points}\n chartType={ChartTypes.VerticalBarChart}\n xAxisType={this._xAxisType}\n calloutProps={calloutProps}\n tickParams={tickParams}\n {...(this._isHavingLine && { isCalloutForStack: true })}\n legendBars={legendBars}\n datasetForXAxisDomain={this._xAxisLabels}\n barwidth={this._barWidth}\n focusZoneDirection={FocusZoneDirection.horizontal}\n customizedCallout={this._getCustomizedCallout()}\n getmargins={this._getMargins}\n getGraphData={this._getGraphData}\n getAxisData={this._getAxisData}\n onChartMouseLeave={this._handleChartMouseLeave}\n getDomainMargins={this._getDomainMargins}\n {...(this._xAxisType === XAxisTypes.StringAxis && {\n xAxisInnerPadding: this._xAxisInnerPadding,\n xAxisOuterPadding: this._xAxisOuterPadding,\n })}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n return (\n <>\n <g>{this._bars}</g>\n {this._isHavingLine && (\n <g>\n {this._createLine(\n props.xScale!,\n props.yScale!,\n props.containerHeight,\n props.containerWidth,\n props.yScaleSecondary,\n )}\n </g>\n )}\n </>\n );\n }}\n />\n ) : (\n <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 _createLine = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScale: any,\n containerHeight: number = 0,\n containerWidth: number = 0,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScaleSecondary?: any,\n ): React.ReactNode => {\n const isStringAxis = this._xAxisType === XAxisTypes.StringAxis;\n const { xBarScale } = this._getScales(containerHeight, containerWidth);\n const colorScale = this._createColors();\n const { theme } = this.props;\n const { data, lineLegendColor = theme!.palette.yellow, lineLegendText } = this.props;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const lineData: Array<any> = [];\n const line: JSX.Element[] = [];\n data &&\n data.forEach((item: IVerticalBarChartDataPoint, index: number) => {\n if (item.lineData && item.lineData.y) {\n lineData.push({\n x: item.x,\n y: item.lineData!.y,\n useSecondaryYScale: item.lineData!.useSecondaryYScale ?? false,\n point: item,\n index,\n });\n }\n });\n const linePath = d3Line()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => (isStringAxis ? xBarScale(d.x) + 0.5 * xBarScale.bandwidth() : xScale(d.x)))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => (d.useSecondaryYScale && yScaleSecondary ? yScaleSecondary(d.y) : yScale(d.y)));\n const shouldHighlight = this._legendHighlighted(lineLegendText!) || this._noLegendHighlighted() ? true : false;\n const lineBorderWidth = this.props.lineOptions?.lineBorderWidth\n ? Number.parseFloat(this.props.lineOptions!.lineBorderWidth!.toString())\n : 0;\n\n if (lineBorderWidth > 0) {\n line.push(\n <path\n key={getId('_VBC_line_')}\n id={getId('_VBC_line_')}\n opacity={shouldHighlight ? 1 : 0.1}\n d={linePath(lineData)!}\n fill=\"transparent\"\n strokeLinecap=\"square\"\n strokeWidth={3 + lineBorderWidth * 2}\n stroke={theme!.semanticColors.bodyBackground}\n />,\n );\n }\n line.push(\n <path\n key={getId('_VBC_line_')}\n id={getId('_VBC_line_')}\n opacity={shouldHighlight ? 1 : 0.1}\n d={linePath(lineData)!}\n fill=\"transparent\"\n strokeLinecap=\"square\"\n strokeWidth={3}\n stroke={lineLegendColor}\n />,\n );\n\n const dots: React.ReactNode[] = lineData.map(\n (\n item: {\n x: number | string;\n y: number;\n useSecondaryYScale: boolean;\n point: IVerticalBarChartDataPoint;\n index: number;\n },\n index: number,\n ) => {\n return (\n <circle\n key={index}\n id={getId('_VBC_point_')}\n cx={isStringAxis ? xBarScale(item.x) + 0.5 * xBarScale.bandwidth() : xScale(item.x)}\n cy={item.useSecondaryYScale && yScaleSecondary ? yScaleSecondary(item.y) : yScale(item.y)}\n onMouseOver={this._onBarHover.bind(this, item.point, colorScale(item.y))}\n onMouseOut={this._onBarLeave}\n r={8}\n stroke={lineLegendColor}\n fill={this.props.theme!.semanticColors.bodyBackground}\n strokeWidth={3}\n visibility={this.state.activeXdataPoint === item.x ? CircleVisbility.show : CircleVisbility.hide}\n onClick={item.point.lineData?.onClick}\n />\n );\n },\n );\n\n return (\n <>\n {line}\n {dots}\n </>\n );\n };\n\n private _checkForLine = (): boolean => {\n const { data } = this.props;\n return data!.some((item: IVerticalBarChartDataPoint) => item?.lineData?.y !== undefined);\n };\n\n private _adjustProps(): void {\n this._points = this.props.data || [];\n this._barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth);\n const { palette } = this.props.theme!;\n this._colors = this.props.colors || [palette.blueLight, palette.blue, palette.blueMid, palette.blueDark];\n this._isHavingLine = this._checkForLine();\n this._xAxisInnerPadding = getScalePadding(this.props.xAxisInnerPadding, this.props.xAxisPadding, 2 / 3);\n this._xAxisOuterPadding = getScalePadding(this.props.xAxisOuterPadding, this.props.xAxisPadding, 0);\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _renderContentForBothLineAndBars = (point: IVerticalBarChartDataPoint): JSX.Element => {\n const { YValueHover, hoverXValue } = this._getCalloutContentForLineAndBar(point);\n const content: JSX.Element[] = YValueHover.map((item: IYValueHover, index: number) => {\n return (\n <ChartHoverCard\n key={index}\n Legend={item.legend}\n {...(index === 0 && { XValue: `${hoverXValue || item.data}` })}\n color={item.color}\n YValue={item.data || item.y}\n culture={this.props.culture}\n />\n );\n });\n return <>{content}</>;\n };\n private _renderContentForOnlyBars = (props: IVerticalBarChartDataPoint): JSX.Element => {\n const { useSingleColor = false } = this.props;\n return (\n <>\n <ChartHoverCard\n XValue={props.xAxisCalloutData || (props.x as string)}\n Legend={props.legend}\n YValue={props.yAxisCalloutData || props.y}\n color={!useSingleColor && props.color ? props.color : this._createColors()(props.y)}\n culture={this.props.culture}\n />\n </>\n );\n };\n\n private _renderCallout = (props?: IVerticalBarChartDataPoint): JSX.Element | null => {\n return props\n ? this._isHavingLine\n ? this._renderContentForBothLineAndBars(props)\n : this._renderContentForOnlyBars(props)\n : null;\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps, this._renderCallout)\n : null;\n };\n\n private _getGraphData = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale: any,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n ) => {\n return (this._bars =\n this._xAxisType === XAxisTypes.NumericAxis\n ? this._createNumericBars(containerHeight, containerWidth, xElement!)\n : this._xAxisType === XAxisTypes.DateAxis\n ? this._createDateBars(containerHeight, containerWidth, xElement!)\n : this._createStringBars(containerHeight, containerWidth, xElement!));\n };\n\n private _createColors(): D3ScaleLinear<string, string> | ColorScale {\n const increment = this._colors.length <= 1 ? 1 : 1 / (this._colors.length - 1);\n const { useSingleColor = false } = this.props;\n if (useSingleColor) {\n return (_p?: number) => {\n const { theme, colors } = this.props;\n return colors && colors.length > 0 ? colors[0] : theme!.palette.blueLight;\n };\n }\n const domainValues = [];\n for (let i = 0; i < this._colors.length; i++) {\n domainValues.push(increment * i * this._yMax);\n }\n const colorScale = d3ScaleLinear<string>().domain(domainValues).range(this._colors);\n return colorScale;\n }\n\n private _refCallback = (element: SVGRectElement, legendTitle: string): void => {\n this._refArray.push({ index: legendTitle, refElement: element });\n };\n\n private _getCalloutContentForLineAndBar = (\n point: IVerticalBarChartDataPoint,\n ): { YValueHover: IYValueHover[]; hoverXValue: string | number | null } => {\n const YValueHover: IYValueHover[] = [];\n const { theme, useSingleColor = false } = this.props;\n const { data, lineLegendText, lineLegendColor = theme!.palette.yellow } = this.props;\n const selectedPoint = data!.filter((xDataPoint: IVerticalBarChartDataPoint) => xDataPoint.x === point.x);\n // there might be no y value of the line for the hovered bar. so we need to check this condition\n if (this._isHavingLine && selectedPoint[0].lineData?.y !== undefined) {\n // callout data for the line\n YValueHover.push({\n legend: lineLegendText,\n color: lineLegendColor,\n y: selectedPoint[0].lineData?.y,\n data: selectedPoint[0].lineData?.yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].lineData?.yAxisCalloutData,\n });\n }\n // callout data for the bar\n YValueHover.push({\n legend: selectedPoint[0].legend,\n y: selectedPoint[0].y,\n color: !useSingleColor\n ? selectedPoint[0].color\n ? selectedPoint[0].color\n : this._createColors()(selectedPoint[0].y)\n : this._createColors()(1),\n data: selectedPoint[0].yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].yAxisCalloutData,\n });\n const hoverXValue = point.x instanceof Date ? point.x.toLocaleString() : point.x.toString();\n return {\n YValueHover,\n hoverXValue: point.xAxisCalloutData || hoverXValue,\n };\n };\n\n private _onBarHover(\n point: IVerticalBarChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n\n const { YValueHover, hoverXValue } = this._getCalloutContentForLineAndBar(point);\n if (this._calloutAnchorPoint !== point) {\n this._calloutAnchorPoint = point;\n this.setState({\n refSelected: mouseEvent,\n /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */\n isCalloutVisible: this.state.selectedLegend === '' || this.state.selectedLegend === point.legend,\n dataForHoverCard: point.y,\n calloutLegend: point.legend!,\n color: point.color || color,\n // To display callout value, if no callout value given, taking given point.x value as a string.\n xCalloutValue:\n point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()),\n yCalloutValue: point.yAxisCalloutData!,\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n }\n\n private _onBarLeave = (): void => {\n /**/\n };\n\n private _handleChartMouseLeave = (): void => {\n this._calloutAnchorPoint = null;\n this.setState({\n isCalloutVisible: false,\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n });\n };\n\n private _onBarFocus = (point: IVerticalBarChartDataPoint, refArrayIndexNumber: number, color: string): void => {\n const { YValueHover, hoverXValue } = this._getCalloutContentForLineAndBar(point);\n this._refArray.forEach((obj: IRefArrayData, index: number) => {\n if (obj.index === point.legend! && refArrayIndexNumber === index) {\n this.setState({\n refSelected: obj.refElement,\n /** Show the callout if highlighted bar is focused and Hide it if unhighlighted bar is focused */\n isCalloutVisible: this.state.selectedLegend === '' || this.state.selectedLegend === point.legend,\n calloutLegend: point.legend!,\n dataForHoverCard: point.y,\n color: point.color || color,\n xCalloutValue:\n point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()),\n yCalloutValue: point.yAxisCalloutData!,\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n });\n };\n\n private _getScales = (\n containerHeight: number,\n containerWidth: number,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): { xBarScale: any; yBarScale: any } => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let xBarScale: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const yBarScale: any = d3ScaleLinear()\n .domain([0, this._yMax])\n .range([0, containerHeight - this.margins.bottom! - this.margins.top!]);\n\n if (this._xAxisType === XAxisTypes.NumericAxis) {\n const xMax = d3Max(this._points, (point: IVerticalBarChartDataPoint) => point.x as number)!;\n const xMin = d3Min(this._points, (point: IVerticalBarChartDataPoint) => point.x as number)!;\n xBarScale = d3ScaleLinear()\n .domain(this._isRtl ? [xMax, xMin] : [xMin, xMax])\n .nice()\n .range([\n this.margins.left! + this._domainMargin,\n containerWidth - this.margins.right! - this._barWidth - this._domainMargin,\n ]);\n } else if (this._xAxisType === XAxisTypes.DateAxis) {\n const sDate = d3Min(this._points, (point: IVerticalBarChartDataPoint) => point.x as Date)!;\n const lDate = d3Max(this._points, (point: IVerticalBarChartDataPoint) => point.x as Date)!;\n xBarScale = d3ScaleUtc()\n .domain([sDate, lDate])\n .range(\n this._isRtl\n ? [\n containerWidth - this.margins.right! - this._barWidth / 2 - this._domainMargin,\n this.margins.left! + this._domainMargin + this._barWidth / 2,\n ]\n : [\n this.margins.left! + this._domainMargin + this._barWidth / 2,\n containerWidth - this.margins.right! - this._barWidth / 2 - this._domainMargin,\n ],\n );\n } else {\n xBarScale = d3ScaleBand()\n .domain(this._xAxisLabels)\n .range(\n this._isRtl\n ? [containerWidth - this.margins.right! - this._domainMargin, this.margins.left! + this._domainMargin]\n : [this.margins.left! + this._domainMargin, containerWidth - this.margins.right! - this._domainMargin],\n )\n .paddingInner(this._xAxisInnerPadding)\n .paddingOuter(this._xAxisOuterPadding);\n }\n\n return { xBarScale, yBarScale };\n };\n\n private _createNumericBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSX.Element[] {\n const { useSingleColor = false } = this.props;\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth);\n const colorScale = this._createColors();\n const bars = this._points.map((point: IVerticalBarChartDataPoint, index: number) => {\n const shouldHighlight = this._legendHighlighted(point.legend!) || this._noLegendHighlighted() ? true : false;\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n shouldHighlight,\n });\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n let adjustedBarHeight = 0;\n if (barHeight <= 0) {\n return <React.Fragment key={point.x as string}> </React.Fragment>;\n } else if (barHeight <= Math.ceil(yBarScale(this._yMax) / 100.0)) {\n adjustedBarHeight = Math.ceil(yBarScale(this._yMax) / 100.0);\n } else {\n adjustedBarHeight = barHeight;\n }\n const xPoint = xBarScale(point.x as number);\n const yPoint = containerHeight - this.margins.bottom! - adjustedBarHeight;\n return (\n <g key={point.x as string}>\n <rect\n id={getId('_VBC_bar_')}\n x={xPoint}\n className={this._classNames.opacityChangeOnHover}\n y={yPoint}\n width={this._barWidth}\n data-is-focusable={!this.props.hideTooltip}\n height={adjustedBarHeight}\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, colorScale(point.y))}\n aria-label={this._getAriaLabel(point)}\n role=\"img\"\n onMouseLeave={this._onBarLeave}\n onFocus={this._onBarFocus.bind(this, point, index, colorScale(point.y))}\n onBlur={this._onBarLeave}\n fill={point.color && !useSingleColor ? point.color : colorScale(point.y)}\n />\n {this._renderBarLabel(xPoint, yPoint, point.y, point.legend!)}\n </g>\n );\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!this.props.showXAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return bars;\n }\n\n private _createStringBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSX.Element[] {\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth);\n const colorScale = this._createColors();\n const bars = this._points.map((point: IVerticalBarChartDataPoint, index: number) => {\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n let adjustedBarHeight = 0;\n if (barHeight <= 0) {\n return <React.Fragment key={point.x instanceof Date ? point.x.getTime() : point.x}> </React.Fragment>;\n } else if (barHeight <= Math.ceil(yBarScale(this._yMax) / 100.0)) {\n adjustedBarHeight = Math.ceil(yBarScale(this._yMax) / 100.0);\n } else {\n adjustedBarHeight = barHeight;\n }\n const xPoint = xBarScale(point.x);\n const yPoint = containerHeight - this.margins.bottom! - adjustedBarHeight;\n if (this.props.barWidth === 'auto') {\n // Setting the bar width here is safe because there are no dependencies earlier in the code\n // that rely on the width of bars in vertical bar charts with string x-axis.\n this._barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth, xBarScale.bandwidth());\n }\n return (\n <g\n key={point.x instanceof Date ? point.x.getTime() : point.x}\n transform={`translate(${0.5 * (xBarScale.bandwidth() - this._barWidth)}, 0)`}\n >\n <rect\n id={getId('_VBC_bar_')}\n x={xPoint}\n y={yPoint}\n width={this._barWidth}\n height={adjustedBarHeight}\n aria-label={this._getAriaLabel(point)}\n role=\"img\"\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, colorScale(point.y))}\n onMouseLeave={this._onBarLeave}\n onBlur={this._onBarLeave}\n data-is-focusable={!this.props.hideTooltip}\n onFocus={this._onBarFocus.bind(this, point, index, colorScale(point.y))}\n fill={point.color ? point.color : colorScale(point.y)}\n />\n {this._renderBarLabel(xPoint, yPoint, point.y, point.legend!)}\n </g>\n );\n });\n\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!this.props.showXAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n showTooltip: this.props.showXAxisLablesTooltip,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return bars;\n }\n\n private _createDateBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSX.Element[] {\n const { useSingleColor = false } = this.props;\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth);\n const colorScale = this._createColors();\n const bars = this._points.map((point: IVerticalBarChartDataPoint, index: number) => {\n const shouldHighlight = this._legendHighlighted(point.legend!) || this._noLegendHighlighted() ? true : false;\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n shouldHighlight: shouldHighlight,\n });\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n let adjustedBarHeight = 0;\n if (barHeight <= 0) {\n return <React.Fragment key={point.x instanceof Date ? point.x.getTime() : point.x}> </React.Fragment>;\n } else if (barHeight <= Math.ceil(yBarScale(this._yMax) / 100.0)) {\n adjustedBarHeight = Math.ceil(yBarScale(this._yMax) / 100.0);\n } else {\n adjustedBarHeight = barHeight;\n }\n const xPoint = xBarScale(point.x as number) - this._barWidth / 2;\n const yPoint = containerHeight - this.margins.bottom! - adjustedBarHeight;\n return (\n <g key={point.x instanceof Date ? point.x.getTime() : point.x}>\n <rect\n id={getId('_VBC_bar_')}\n x={xPoint}\n className={this._classNames.opacityChangeOnHover}\n y={yPoint}\n width={this._barWidth}\n data-is-focusable={!this.props.hideTooltip}\n height={adjustedBarHeight}\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, colorScale(point.y))}\n aria-label={this._getAriaLabel(point)}\n role=\"img\"\n onMouseLeave={this._onBarLeave}\n onFocus={this._onBarFocus.bind(this, point, index, colorScale(point.y))}\n onBlur={this._onBarLeave}\n fill={point.color && !useSingleColor ? point.color : colorScale(point.y)}\n />\n {this._renderBarLabel(xPoint, yPoint, point.y, point.legend!)}\n </g>\n );\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!this.props.showXAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return bars;\n }\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _onLegendClick(legendTitle: string): void {\n if (this.state.selectedLegend === legendTitle) {\n this.setState({\n selectedLegend: '',\n });\n } else {\n this.setState({\n selectedLegend: legendTitle,\n });\n }\n }\n\n private _onLegendHover(legendTitle: string): void {\n this.setState({\n activeLegend: legendTitle,\n });\n }\n\n private _onLegendLeave(): void {\n this.setState({\n activeLegend: '',\n });\n }\n\n private _getLegendData = (data: IVerticalBarChartDataPoint[], palette: IPalette): JSX.Element => {\n const { theme, useSingleColor } = this.props;\n const { lineLegendText, lineLegendColor = theme!.palette.yellow } = this.props;\n const actions: ILegend[] = [];\n data.forEach((point: IVerticalBarChartDataPoint, _index: number) => {\n const color: string = !useSingleColor ? point.color! : this._createColors()(1);\n // mapping data to the format Legends component needs\n const legend: ILegend = {\n title: point.legend!,\n color,\n action: () => {\n this._onLegendClick(point.legend!);\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(point.legend!);\n },\n onMouseOutAction: () => {\n this._onLegendLeave();\n },\n };\n actions.push(legend);\n });\n if (this._isHavingLine && lineLegendText && lineLegendColor) {\n const lineLegend: ILegend = {\n title: lineLegendText,\n color: lineLegendColor,\n action: () => {\n this._onLegendClick(lineLegendText);\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(lineLegendText);\n },\n onMouseOutAction: () => {\n this._onLegendLeave();\n },\n isLineLegendInBarChart: true,\n };\n actions.unshift(lineLegend);\n }\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n />\n );\n return legends;\n };\n\n private _getAxisData = (yAxisData: IAxisData) => {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n this._yMax = Math.max(domainValue[domainValue.length - 1], this.props.yMaxValue || 0);\n }\n };\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legendTitle: string) => {\n return (\n this.state.selectedLegend === legendTitle ||\n (this.state.selectedLegend === '' && this.state.activeLegend === legendTitle)\n );\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this.state.selectedLegend === '' && this.state.activeLegend === '';\n };\n\n private _getAriaLabel = (point: IVerticalBarChartDataPoint): string => {\n const xValue = point.xAxisCalloutData\n ? point.xAxisCalloutData\n : point.x instanceof Date\n ? point.x.toLocaleString()\n : point.x;\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.y;\n const lineLegend = this.props.lineLegendText || 'Line';\n const lineYValue = point.lineData?.yAxisCalloutData || point.lineData?.y;\n return (\n point.callOutAccessibilityData?.ariaLabel ||\n `${xValue}. ` +\n (legend ? `${legend}, ` : '') +\n `${yValue}.` +\n (typeof lineYValue !== 'undefined' ? ` ${lineLegend}, ${lineYValue}.` : '')\n );\n };\n\n private _renderBarLabel(xPoint: number, yPoint: number, barValue: number, legend: string) {\n if (\n this.props.hideLabels ||\n this._barWidth < 16 ||\n !(this._legendHighlighted(legend) || this._noLegendHighlighted())\n ) {\n return null;\n }\n\n return (\n <text\n x={xPoint + this._barWidth / 2}\n y={yPoint - 6}\n textAnchor=\"middle\"\n className={this._classNames.barLabel}\n aria-hidden={true}\n >\n {formatValueWithSIPrefix(barValue)}\n </text>\n );\n }\n\n private _getDomainMargins = (containerWidth: number): IMargins => {\n this._domainMargin = MIN_DOMAIN_MARGIN;\n\n if (this._xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(this.props.xAxisOuterPadding, this.props.xAxisPadding)) {\n // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available\n // to adjust the space before the first bar and after the last bar.\n this._domainMargin = 0;\n } else if (this.props.barWidth !== 'auto') {\n /** Total width available to render the bars */\n const totalWidth =\n containerWidth - (this.margins.left! + MIN_DOMAIN_MARGIN) - (this.margins.right! + MIN_DOMAIN_MARGIN);\n /** Rate at which the space between the bars changes wrt the bar width */\n const barGapRate = this._xAxisInnerPadding / (1 - this._xAxisInnerPadding);\n /** Total width required to render the bars. Directly proportional to bar width */\n const reqWidth = (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * barGapRate) * this._barWidth;\n\n if (totalWidth >= reqWidth) {\n // Center align the chart by setting equal left and right margins for domain\n this._domainMargin += (totalWidth - reqWidth) / 2;\n }\n }\n }\n\n return {\n ...this.margins,\n left: this.margins.left! + this._domainMargin,\n right: this.margins.right! + this._domainMargin,\n };\n };\n\n private _isChartEmpty(): boolean {\n return (\n this._points.length === 0 ||\n (d3Max(this._points, (point: IVerticalBarChartDataPoint) => point.y)! <= 0 && !this._isHavingLine)\n );\n }\n}\n"]}
1
+ {"version":3,"file":"VerticalBarChart.base.js","sourceRoot":"../src/","sources":["components/VerticalBarChart/VerticalBarChart.base.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,IAAI,KAAK,EAAE,GAAG,IAAI,KAAK,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EACL,WAAW,IAAI,aAAa,EAE5B,SAAS,IAAI,WAAW,EACxB,QAAQ,IAAI,UAAU,GACvB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAElF,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAEL,cAAc,EACd,cAAc,EASd,OAAO,GAGR,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,u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CAAC,EACjE;YACA,OAAO,IAAI,CAAC;SACb;QAED,OAAO,CACL,8BACE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC,SAAS,GAAG,CAAC,EAC9B,CAAC,EAAE,MAAM,GAAG,CAAC,EACb,UAAU,EAAC,QAAQ,EACnB,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,QAAQ,iBACvB,IAAI,IAEhB,uBAAuB,CAAC,QAAQ,CAAC,CAC7B,CACR,CAAC;IACJ,CAAC;IA6CO,4CAAa,GAArB;QACE,OAAO,CACL,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC;YACzB,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,UAAC,KAAiC,IAAK,OAAA,KAAK,CAAC,CAAC,EAAP,CAAO,CAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CACnG,CAAC;IACJ,CAAC;IAh5Ba,iCAAY,GAAoC;QAC5D,WAAW,EAAE,EAAE;KAChB,CAAC;IA+4BJ,2BAAC;CAAA,AAl5BD,CAA0C,KAAK,CAAC,SAAS,GAk5BxD;SAl5BY,oBAAoB","sourcesContent":["import * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { line as d3Line } from 'd3-shape';\nimport { select as d3Select } from 'd3-selection';\nimport {\n scaleLinear as d3ScaleLinear,\n ScaleLinear as D3ScaleLinear,\n scaleBand as d3ScaleBand,\n scaleUtc as d3ScaleUtc,\n} from 'd3-scale';\nimport { classNamesFunction, getId, getRTL } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet, IPalette } from '@fluentui/react/lib/Styling';\nimport { DirectionalHint } from '@fluentui/react/lib/Callout';\nimport {\n IAccessibilityProps,\n CartesianChart,\n ChartHoverCard,\n IBasestate,\n IMargins,\n ILegend,\n IRefArrayData,\n IVerticalBarChartProps,\n IVerticalBarChartStyleProps,\n IVerticalBarChartStyles,\n IVerticalBarChartDataPoint,\n Legends,\n IChildProps,\n IYValueHover,\n} from '../../index';\nimport { FocusZoneDirection } from '@fluentui/react-focus';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n NumericAxis,\n getTypeOfAxis,\n tooltipOfXAxislabels,\n formatValueWithSIPrefix,\n getBarWidth,\n getScalePadding,\n isScalePaddingDefined,\n calculateAppropriateBarWidth,\n} from '../../utilities/index';\n\nenum CircleVisbility {\n show = 'visibility',\n hide = 'hidden',\n}\nconst getClassNames = classNamesFunction<IVerticalBarChartStyleProps, IVerticalBarChartStyles>();\n\nconst MIN_DOMAIN_MARGIN = 8;\n\nexport interface IVerticalBarChartState extends IBasestate {\n dataPointCalloutProps?: IVerticalBarChartDataPoint; // define this in hover and focus\n /**\n * data point of x, where rectangle is hovered or focused\n */\n activeXdataPoint: number | string | Date | null;\n YValueHover: IYValueHover[];\n hoverXValue?: string | number | null;\n callOutAccessibilityData?: IAccessibilityProps;\n calloutLegend: string;\n}\n\ntype ColorScale = (_p?: number) => string;\n\nexport class VerticalBarChartBase extends React.Component<IVerticalBarChartProps, IVerticalBarChartState> {\n public static defaultProps: Partial<IVerticalBarChartProps> = {\n maxBarWidth: 24,\n };\n\n private _points: IVerticalBarChartDataPoint[];\n private _barWidth: number;\n private _colors: string[];\n private _classNames: IProcessedStyleSet<IVerticalBarChartStyles>;\n private _refArray: IRefArrayData[];\n private _calloutId: string;\n private margins: IMargins;\n private _isRtl: boolean = getRTL();\n private _bars: JSX.Element[];\n private _xAxisLabels: string[];\n private _yMax: number;\n private _isHavingLine: boolean;\n private _tooltipId: string;\n private _xAxisType: XAxisTypes;\n private _calloutAnchorPoint: IVerticalBarChartDataPoint | null;\n private _domainMargin: number;\n private _emptyChartId: string;\n private _xAxisInnerPadding: number;\n private _xAxisOuterPadding: number;\n\n public constructor(props: IVerticalBarChartProps) {\n super(props);\n this.state = {\n color: '',\n dataForHoverCard: 0,\n isCalloutVisible: false,\n refSelected: null,\n selectedLegend: '',\n activeLegend: '',\n xCalloutValue: '',\n yCalloutValue: '',\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n calloutLegend: '',\n };\n this._isHavingLine = this._checkForLine();\n this._calloutId = getId('callout');\n this._tooltipId = getId('VCTooltipID_');\n this._refArray = [];\n this._xAxisType =\n this.props.data! && this.props.data!.length > 0\n ? (getTypeOfAxis(this.props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\n this._emptyChartId = getId('_VBC_empty');\n }\n\n public render(): JSX.Element {\n this._adjustProps();\n this._xAxisLabels = this._points.map((point: IVerticalBarChartDataPoint) => point.x as string);\n this._yMax = Math.max(\n d3Max(this._points, (point: IVerticalBarChartDataPoint) => point.y)!,\n this.props.yMaxValue || 0,\n );\n const legendBars: JSX.Element = this._getLegendData(this._points, this.props.theme!.palette);\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n });\n const calloutProps = {\n isCalloutVisible: this.state.isCalloutVisible,\n directionalHint: DirectionalHint.topAutoEdge,\n id: `toolTip${this._calloutId}`,\n target: this.state.refSelected,\n isBeakVisible: false,\n ...(this._isHavingLine && {\n YValueHover: this.state.YValueHover,\n hoverXValue: this.state.hoverXValue,\n }),\n gapSpace: 15,\n color: this.state.color,\n legend: this.state.calloutLegend,\n XValue: this.state.xCalloutValue,\n YValue: this.state.yCalloutValue ? this.state.yCalloutValue : this.state.dataForHoverCard,\n onDismiss: this._closeCallout,\n preventDismissOnLostFocus: true,\n ...this.props.calloutProps,\n ...getAccessibleDataObject(this.state.callOutAccessibilityData),\n };\n const tickParams = {\n tickValues: this.props.tickValues,\n tickFormat: this.props.tickFormat,\n };\n return !this._isChartEmpty() ? (\n <CartesianChart\n {...this.props}\n points={this._points}\n chartType={ChartTypes.VerticalBarChart}\n xAxisType={this._xAxisType}\n calloutProps={calloutProps}\n tickParams={tickParams}\n {...(this._isHavingLine && { isCalloutForStack: true })}\n legendBars={legendBars}\n datasetForXAxisDomain={this._xAxisLabels}\n barwidth={this._barWidth}\n focusZoneDirection={FocusZoneDirection.horizontal}\n customizedCallout={this._getCustomizedCallout()}\n getmargins={this._getMargins}\n getGraphData={this._getGraphData}\n getAxisData={this._getAxisData}\n onChartMouseLeave={this._handleChartMouseLeave}\n getDomainMargins={this._getDomainMargins}\n {...(this._xAxisType === XAxisTypes.StringAxis && {\n xAxisInnerPadding: this._xAxisInnerPadding,\n xAxisOuterPadding: this._xAxisOuterPadding,\n })}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: IChildProps) => {\n return (\n <>\n <g>{this._bars}</g>\n {this._isHavingLine && (\n <g>\n {this._createLine(\n props.xScale!,\n props.yScale!,\n props.containerHeight,\n props.containerWidth,\n props.yScaleSecondary,\n )}\n </g>\n )}\n </>\n );\n }}\n />\n ) : (\n <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 _createLine = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScale: any,\n containerHeight: number = 0,\n containerWidth: number = 0,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScaleSecondary?: any,\n ): React.ReactNode => {\n const isStringAxis = this._xAxisType === XAxisTypes.StringAxis;\n const { xBarScale } = this._getScales(containerHeight, containerWidth);\n const colorScale = this._createColors();\n const { theme } = this.props;\n const { data, lineLegendColor = theme!.palette.yellow, lineLegendText } = this.props;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const lineData: Array<any> = [];\n const line: JSX.Element[] = [];\n data &&\n data.forEach((item: IVerticalBarChartDataPoint, index: number) => {\n if (item.lineData && item.lineData.y) {\n lineData.push({\n x: item.x,\n y: item.lineData!.y,\n useSecondaryYScale: item.lineData!.useSecondaryYScale ?? false,\n point: item,\n index,\n });\n }\n });\n const linePath = d3Line()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .x((d: any) => (isStringAxis ? xBarScale(d.x) + 0.5 * xBarScale.bandwidth() : xScale(d.x)))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => (d.useSecondaryYScale && yScaleSecondary ? yScaleSecondary(d.y) : yScale(d.y)));\n const shouldHighlight = this._legendHighlighted(lineLegendText!) || this._noLegendHighlighted() ? true : false;\n const lineBorderWidth = this.props.lineOptions?.lineBorderWidth\n ? Number.parseFloat(this.props.lineOptions!.lineBorderWidth!.toString())\n : 0;\n\n if (lineBorderWidth > 0) {\n line.push(\n <path\n key={getId('_VBC_line_')}\n id={getId('_VBC_line_')}\n opacity={shouldHighlight ? 1 : 0.1}\n d={linePath(lineData)!}\n fill=\"transparent\"\n strokeLinecap=\"square\"\n strokeWidth={3 + lineBorderWidth * 2}\n stroke={theme!.semanticColors.bodyBackground}\n />,\n );\n }\n line.push(\n <path\n key={getId('_VBC_line_')}\n id={getId('_VBC_line_')}\n opacity={shouldHighlight ? 1 : 0.1}\n d={linePath(lineData)!}\n fill=\"transparent\"\n strokeLinecap=\"square\"\n strokeWidth={3}\n stroke={lineLegendColor}\n />,\n );\n\n const dots: React.ReactNode[] = lineData.map(\n (\n item: {\n x: number | string;\n y: number;\n useSecondaryYScale: boolean;\n point: IVerticalBarChartDataPoint;\n index: number;\n },\n index: number,\n ) => {\n return (\n <circle\n key={index}\n id={getId('_VBC_point_')}\n cx={isStringAxis ? xBarScale(item.x) + 0.5 * xBarScale.bandwidth() : xScale(item.x)}\n cy={item.useSecondaryYScale && yScaleSecondary ? yScaleSecondary(item.y) : yScale(item.y)}\n onMouseOver={this._onBarHover.bind(this, item.point, colorScale(item.y))}\n onMouseOut={this._onBarLeave}\n r={8}\n stroke={lineLegendColor}\n fill={this.props.theme!.semanticColors.bodyBackground}\n strokeWidth={3}\n visibility={this.state.activeXdataPoint === item.x ? CircleVisbility.show : CircleVisbility.hide}\n onClick={item.point.lineData?.onClick}\n />\n );\n },\n );\n\n return (\n <>\n {line}\n {dots}\n </>\n );\n };\n\n private _checkForLine = (): boolean => {\n const { data } = this.props;\n return data!.some((item: IVerticalBarChartDataPoint) => item?.lineData?.y !== undefined);\n };\n\n private _adjustProps(): void {\n this._points = this.props.data || [];\n this._barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth);\n const { palette } = this.props.theme!;\n this._colors = this.props.colors || [palette.blueLight, palette.blue, palette.blueMid, palette.blueDark];\n this._isHavingLine = this._checkForLine();\n this._xAxisInnerPadding = getScalePadding(this.props.xAxisInnerPadding, this.props.xAxisPadding, 2 / 3);\n this._xAxisOuterPadding = getScalePadding(this.props.xAxisOuterPadding, this.props.xAxisPadding, 0);\n }\n\n private _getMargins = (margins: IMargins) => {\n this.margins = margins;\n };\n\n private _renderContentForBothLineAndBars = (point: IVerticalBarChartDataPoint): JSX.Element => {\n const { YValueHover, hoverXValue } = this._getCalloutContentForLineAndBar(point);\n const content: JSX.Element[] = YValueHover.map((item: IYValueHover, index: number) => {\n return (\n <ChartHoverCard\n key={index}\n Legend={item.legend}\n {...(index === 0 && { XValue: `${hoverXValue || item.data}` })}\n color={item.color}\n YValue={item.data || item.y}\n culture={this.props.culture}\n />\n );\n });\n return <>{content}</>;\n };\n private _renderContentForOnlyBars = (props: IVerticalBarChartDataPoint): JSX.Element => {\n const { useSingleColor = false } = this.props;\n return (\n <>\n <ChartHoverCard\n XValue={props.xAxisCalloutData || (props.x as string)}\n Legend={props.legend}\n YValue={props.yAxisCalloutData || props.y}\n color={!useSingleColor && props.color ? props.color : this._createColors()(props.y)}\n culture={this.props.culture}\n />\n </>\n );\n };\n\n private _renderCallout = (props?: IVerticalBarChartDataPoint): JSX.Element | null => {\n return props\n ? this._isHavingLine\n ? this._renderContentForBothLineAndBars(props)\n : this._renderContentForOnlyBars(props)\n : null;\n };\n\n private _getCustomizedCallout = () => {\n return this.props.onRenderCalloutPerDataPoint\n ? this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps, this._renderCallout)\n : null;\n };\n\n private _getGraphData = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale: any,\n yScale: NumericAxis,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n ) => {\n return (this._bars =\n this._xAxisType === XAxisTypes.NumericAxis\n ? this._createNumericBars(containerHeight, containerWidth, xElement!)\n : this._xAxisType === XAxisTypes.DateAxis\n ? this._createDateBars(containerHeight, containerWidth, xElement!)\n : this._createStringBars(containerHeight, containerWidth, xElement!));\n };\n\n private _createColors(): D3ScaleLinear<string, string> | ColorScale {\n const increment = this._colors.length <= 1 ? 1 : 1 / (this._colors.length - 1);\n const { useSingleColor = false } = this.props;\n if (useSingleColor) {\n return (_p?: number) => {\n const { theme, colors } = this.props;\n return colors && colors.length > 0 ? colors[0] : theme!.palette.blueLight;\n };\n }\n const domainValues = [];\n for (let i = 0; i < this._colors.length; i++) {\n domainValues.push(increment * i * this._yMax);\n }\n const colorScale = d3ScaleLinear<string>().domain(domainValues).range(this._colors);\n return colorScale;\n }\n\n private _refCallback = (element: SVGRectElement, legendTitle: string): void => {\n this._refArray.push({ index: legendTitle, refElement: element });\n };\n\n private _getCalloutContentForLineAndBar = (\n point: IVerticalBarChartDataPoint,\n ): { YValueHover: IYValueHover[]; hoverXValue: string | number | null } => {\n const YValueHover: IYValueHover[] = [];\n const { theme, useSingleColor = false } = this.props;\n const { data, lineLegendText, lineLegendColor = theme!.palette.yellow } = this.props;\n const selectedPoint = data!.filter((xDataPoint: IVerticalBarChartDataPoint) => xDataPoint.x === point.x);\n // there might be no y value of the line for the hovered bar. so we need to check this condition\n if (this._isHavingLine && selectedPoint[0].lineData?.y !== undefined) {\n // callout data for the line\n YValueHover.push({\n legend: lineLegendText,\n color: lineLegendColor,\n y: selectedPoint[0].lineData?.y,\n data: selectedPoint[0].lineData?.yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].lineData?.yAxisCalloutData,\n });\n }\n // callout data for the bar\n YValueHover.push({\n legend: selectedPoint[0].legend,\n y: selectedPoint[0].y,\n color: !useSingleColor\n ? selectedPoint[0].color\n ? selectedPoint[0].color\n : this._createColors()(selectedPoint[0].y)\n : this._createColors()(1),\n data: selectedPoint[0].yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].yAxisCalloutData,\n });\n const hoverXValue = point.x instanceof Date ? point.x.toLocaleString() : point.x.toString();\n return {\n YValueHover,\n hoverXValue: point.xAxisCalloutData || hoverXValue,\n };\n };\n\n private _onBarHover(\n point: IVerticalBarChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n\n const { YValueHover, hoverXValue } = this._getCalloutContentForLineAndBar(point);\n if (this._calloutAnchorPoint !== point) {\n this._calloutAnchorPoint = point;\n this.setState({\n refSelected: mouseEvent,\n /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */\n isCalloutVisible: this.state.selectedLegend === '' || this.state.selectedLegend === point.legend,\n dataForHoverCard: point.y,\n calloutLegend: point.legend!,\n color: point.color || color,\n // To display callout value, if no callout value given, taking given point.x value as a string.\n xCalloutValue:\n point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()),\n yCalloutValue: point.yAxisCalloutData!,\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n }\n\n private _onBarLeave = (): void => {\n /**/\n };\n\n private _handleChartMouseLeave = (): void => {\n this._calloutAnchorPoint = null;\n this.setState({\n isCalloutVisible: false,\n activeXdataPoint: null,\n YValueHover: [],\n hoverXValue: '',\n });\n };\n\n private _onBarFocus = (point: IVerticalBarChartDataPoint, refArrayIndexNumber: number, color: string): void => {\n const { YValueHover, hoverXValue } = this._getCalloutContentForLineAndBar(point);\n this._refArray.forEach((obj: IRefArrayData, index: number) => {\n if (obj.index === point.legend! && refArrayIndexNumber === index) {\n this.setState({\n refSelected: obj.refElement,\n /** Show the callout if highlighted bar is focused and Hide it if unhighlighted bar is focused */\n isCalloutVisible: this.state.selectedLegend === '' || this.state.selectedLegend === point.legend,\n calloutLegend: point.legend!,\n dataForHoverCard: point.y,\n color: point.color || color,\n xCalloutValue:\n point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()),\n yCalloutValue: point.yAxisCalloutData!,\n dataPointCalloutProps: point,\n activeXdataPoint: point.x,\n YValueHover,\n hoverXValue,\n callOutAccessibilityData: point.callOutAccessibilityData,\n });\n }\n });\n };\n\n private _getScales = (\n containerHeight: number,\n containerWidth: number,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): { xBarScale: any; yBarScale: any } => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let xBarScale: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const yBarScale: any = d3ScaleLinear()\n .domain([0, this._yMax])\n .range([0, containerHeight - this.margins.bottom! - this.margins.top!]);\n\n if (this._xAxisType === XAxisTypes.NumericAxis) {\n const xMax = d3Max(this._points, (point: IVerticalBarChartDataPoint) => point.x as number)!;\n const xMin = d3Min(this._points, (point: IVerticalBarChartDataPoint) => point.x as number)!;\n xBarScale = d3ScaleLinear()\n .domain(this._isRtl ? [xMax, xMin] : [xMin, xMax])\n .nice()\n .range([this.margins.left! + this._domainMargin, containerWidth - this.margins.right! - this._domainMargin]);\n } else if (this._xAxisType === XAxisTypes.DateAxis) {\n const sDate = d3Min(this._points, (point: IVerticalBarChartDataPoint) => point.x as Date)!;\n const lDate = d3Max(this._points, (point: IVerticalBarChartDataPoint) => point.x as Date)!;\n xBarScale = d3ScaleUtc()\n .domain([sDate, lDate])\n .range(\n this._isRtl\n ? [containerWidth - this.margins.right! - this._domainMargin, this.margins.left! + this._domainMargin]\n : [this.margins.left! + this._domainMargin, containerWidth - this.margins.right! - this._domainMargin],\n );\n } else {\n xBarScale = d3ScaleBand()\n .domain(this._xAxisLabels)\n .range(\n this._isRtl\n ? [containerWidth - this.margins.right! - this._domainMargin, this.margins.left! + this._domainMargin]\n : [this.margins.left! + this._domainMargin, containerWidth - this.margins.right! - this._domainMargin],\n )\n .paddingInner(this._xAxisInnerPadding)\n .paddingOuter(this._xAxisOuterPadding);\n }\n\n return { xBarScale, yBarScale };\n };\n\n private _createNumericBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSX.Element[] {\n const { useSingleColor = false } = this.props;\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth);\n const colorScale = this._createColors();\n const bars = this._points.map((point: IVerticalBarChartDataPoint, index: number) => {\n const shouldHighlight = this._legendHighlighted(point.legend!) || this._noLegendHighlighted() ? true : false;\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n shouldHighlight,\n });\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n let adjustedBarHeight = 0;\n if (barHeight <= 0) {\n return <React.Fragment key={point.x as string}> </React.Fragment>;\n } else if (barHeight <= Math.ceil(yBarScale(this._yMax) / 100.0)) {\n adjustedBarHeight = Math.ceil(yBarScale(this._yMax) / 100.0);\n } else {\n adjustedBarHeight = barHeight;\n }\n const xPoint = xBarScale(point.x as number) - this._barWidth / 2;\n const yPoint = containerHeight - this.margins.bottom! - adjustedBarHeight;\n return (\n <g key={point.x as string}>\n <rect\n id={getId('_VBC_bar_')}\n x={xPoint}\n className={this._classNames.opacityChangeOnHover}\n y={yPoint}\n width={this._barWidth}\n data-is-focusable={!this.props.hideTooltip && shouldHighlight}\n height={adjustedBarHeight}\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, colorScale(point.y))}\n aria-label={this._getAriaLabel(point)}\n role=\"img\"\n onMouseLeave={this._onBarLeave}\n onFocus={this._onBarFocus.bind(this, point, index, colorScale(point.y))}\n onBlur={this._onBarLeave}\n fill={point.color && !useSingleColor ? point.color : colorScale(point.y)}\n />\n {this._renderBarLabel(xPoint, yPoint, point.y, point.legend!)}\n </g>\n );\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!this.props.showXAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return bars;\n }\n\n private _createStringBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSX.Element[] {\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth);\n const colorScale = this._createColors();\n const bars = this._points.map((point: IVerticalBarChartDataPoint, index: number) => {\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n let adjustedBarHeight = 0;\n if (barHeight <= 0) {\n return <React.Fragment key={point.x instanceof Date ? point.x.getTime() : point.x}> </React.Fragment>;\n } else if (barHeight <= Math.ceil(yBarScale(this._yMax) / 100.0)) {\n adjustedBarHeight = Math.ceil(yBarScale(this._yMax) / 100.0);\n } else {\n adjustedBarHeight = barHeight;\n }\n const xPoint = xBarScale(point.x);\n const yPoint = containerHeight - this.margins.bottom! - adjustedBarHeight;\n // Setting the bar width here is safe because there are no dependencies earlier in the code\n // that rely on the width of bars in vertical bar charts with string x-axis.\n this._barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth, xBarScale.bandwidth());\n return (\n <g\n key={point.x instanceof Date ? point.x.getTime() : point.x}\n transform={`translate(${0.5 * (xBarScale.bandwidth() - this._barWidth)}, 0)`}\n >\n <rect\n id={getId('_VBC_bar_')}\n x={xPoint}\n y={yPoint}\n width={this._barWidth}\n height={adjustedBarHeight}\n aria-label={this._getAriaLabel(point)}\n role=\"img\"\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, colorScale(point.y))}\n onMouseLeave={this._onBarLeave}\n onBlur={this._onBarLeave}\n data-is-focusable={!this.props.hideTooltip}\n onFocus={this._onBarFocus.bind(this, point, index, colorScale(point.y))}\n fill={point.color ? point.color : colorScale(point.y)}\n />\n {this._renderBarLabel(xPoint, yPoint, point.y, point.legend!)}\n </g>\n );\n });\n\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!this.props.showXAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n showTooltip: this.props.showXAxisLablesTooltip,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return bars;\n }\n\n private _createDateBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSX.Element[] {\n const { useSingleColor = false } = this.props;\n const { xBarScale, yBarScale } = this._getScales(containerHeight, containerWidth);\n const colorScale = this._createColors();\n const bars = this._points.map((point: IVerticalBarChartDataPoint, index: number) => {\n const shouldHighlight = this._legendHighlighted(point.legend!) || this._noLegendHighlighted() ? true : false;\n this._classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n legendColor: this.state.color,\n shouldHighlight: shouldHighlight,\n });\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n let adjustedBarHeight = 0;\n if (barHeight <= 0) {\n return <React.Fragment key={point.x instanceof Date ? point.x.getTime() : point.x}> </React.Fragment>;\n } else if (barHeight <= Math.ceil(yBarScale(this._yMax) / 100.0)) {\n adjustedBarHeight = Math.ceil(yBarScale(this._yMax) / 100.0);\n } else {\n adjustedBarHeight = barHeight;\n }\n const xPoint = xBarScale(point.x as number) - this._barWidth / 2;\n const yPoint = containerHeight - this.margins.bottom! - adjustedBarHeight;\n return (\n <g key={point.x instanceof Date ? point.x.getTime() : point.x}>\n <rect\n id={getId('_VBC_bar_')}\n x={xPoint}\n className={this._classNames.opacityChangeOnHover}\n y={yPoint}\n width={this._barWidth}\n data-is-focusable={!this.props.hideTooltip && shouldHighlight}\n height={adjustedBarHeight}\n ref={(e: SVGRectElement) => {\n this._refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={this._onBarHover.bind(this, point, colorScale(point.y))}\n aria-label={this._getAriaLabel(point)}\n role=\"img\"\n onMouseLeave={this._onBarLeave}\n onFocus={this._onBarFocus.bind(this, point, index, colorScale(point.y))}\n onBlur={this._onBarLeave}\n fill={point.color && !useSingleColor ? point.color : colorScale(point.y)}\n />\n {this._renderBarLabel(xPoint, yPoint, point.y, point.legend!)}\n </g>\n );\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!this.props.showXAxisLablesTooltip) {\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!this.props.wrapXAxisLables && this.props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: this._classNames.tooltip!,\n id: this._tooltipId,\n xAxis: xAxisElement,\n };\n xAxisElement && tooltipOfXAxislabels(tooltipProps);\n }\n return bars;\n }\n\n private _closeCallout = () => {\n this.setState({\n isCalloutVisible: false,\n });\n };\n\n private _onLegendClick(legendTitle: string): void {\n if (this.state.selectedLegend === legendTitle) {\n this.setState({\n selectedLegend: '',\n });\n } else {\n this.setState({\n selectedLegend: legendTitle,\n });\n }\n }\n\n private _onLegendHover(legendTitle: string): void {\n this.setState({\n activeLegend: legendTitle,\n });\n }\n\n private _onLegendLeave(): void {\n this.setState({\n activeLegend: '',\n });\n }\n\n private _getLegendData = (data: IVerticalBarChartDataPoint[], palette: IPalette): JSX.Element => {\n const { theme, useSingleColor } = this.props;\n const { lineLegendText, lineLegendColor = theme!.palette.yellow } = this.props;\n const actions: ILegend[] = [];\n data.forEach((point: IVerticalBarChartDataPoint, _index: number) => {\n const color: string = !useSingleColor ? point.color! : this._createColors()(1);\n // mapping data to the format Legends component needs\n const legend: ILegend = {\n title: point.legend!,\n color,\n action: () => {\n this._onLegendClick(point.legend!);\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(point.legend!);\n },\n onMouseOutAction: () => {\n this._onLegendLeave();\n },\n };\n actions.push(legend);\n });\n if (this._isHavingLine && lineLegendText && lineLegendColor) {\n const lineLegend: ILegend = {\n title: lineLegendText,\n color: lineLegendColor,\n action: () => {\n this._onLegendClick(lineLegendText);\n },\n hoverAction: () => {\n this._handleChartMouseLeave();\n this._onLegendHover(lineLegendText);\n },\n onMouseOutAction: () => {\n this._onLegendLeave();\n },\n isLineLegendInBarChart: true,\n };\n actions.unshift(lineLegend);\n }\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={this.props.enabledLegendsWrapLines}\n overflowProps={this.props.legendsOverflowProps}\n focusZonePropsInHoverCard={this.props.focusZonePropsForLegendsInHoverCard}\n overflowText={this.props.legendsOverflowText}\n {...this.props.legendProps}\n />\n );\n return legends;\n };\n\n private _getAxisData = (yAxisData: IAxisData) => {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n this._yMax = Math.max(domainValue[domainValue.length - 1], this.props.yMaxValue || 0);\n }\n };\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n private _legendHighlighted = (legendTitle: string) => {\n return (\n this.state.selectedLegend === legendTitle ||\n (this.state.selectedLegend === '' && this.state.activeLegend === legendTitle)\n );\n };\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n private _noLegendHighlighted = () => {\n return this.state.selectedLegend === '' && this.state.activeLegend === '';\n };\n\n private _getAriaLabel = (point: IVerticalBarChartDataPoint): string => {\n const xValue = point.xAxisCalloutData\n ? point.xAxisCalloutData\n : point.x instanceof Date\n ? point.x.toLocaleString()\n : point.x;\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.y;\n const lineLegend = this.props.lineLegendText || 'Line';\n const lineYValue = point.lineData?.yAxisCalloutData || point.lineData?.y;\n return (\n point.callOutAccessibilityData?.ariaLabel ||\n `${xValue}. ` +\n (legend ? `${legend}, ` : '') +\n `${yValue}.` +\n (typeof lineYValue !== 'undefined' ? ` ${lineLegend}, ${lineYValue}.` : '')\n );\n };\n\n private _renderBarLabel(xPoint: number, yPoint: number, barValue: number, legend: string) {\n if (\n this.props.hideLabels ||\n this._barWidth < 16 ||\n !(this._legendHighlighted(legend) || this._noLegendHighlighted())\n ) {\n return null;\n }\n\n return (\n <text\n x={xPoint + this._barWidth / 2}\n y={yPoint - 6}\n textAnchor=\"middle\"\n className={this._classNames.barLabel}\n aria-hidden={true}\n >\n {formatValueWithSIPrefix(barValue)}\n </text>\n );\n }\n\n private _getDomainMargins = (containerWidth: number): IMargins => {\n this._domainMargin = MIN_DOMAIN_MARGIN;\n\n /** Total width available to render the bars */\n const totalWidth =\n containerWidth - (this.margins.left! + MIN_DOMAIN_MARGIN) - (this.margins.right! + MIN_DOMAIN_MARGIN);\n\n if (this._xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(this.props.xAxisOuterPadding, this.props.xAxisPadding)) {\n // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available\n // to adjust the space before the first bar and after the last bar.\n this._domainMargin = 0;\n } else if (this.props.barWidth !== 'auto') {\n /** Rate at which the space between the bars changes wrt the bar width */\n const barGapRate = this._xAxisInnerPadding / (1 - this._xAxisInnerPadding);\n // Update the bar width so that when CartesianChart rerenders,\n // the following calculations don't use the previous bar width.\n this._barWidth = getBarWidth(this.props.barWidth, this.props.maxBarWidth);\n /** Total width required to render the bars. Directly proportional to bar width */\n const reqWidth = (this._xAxisLabels.length + (this._xAxisLabels.length - 1) * barGapRate) * this._barWidth;\n\n if (totalWidth >= reqWidth) {\n // Center align the chart by setting equal left and right margins for domain\n this._domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;\n }\n }\n } else {\n const data = (this.props.data?.map(point => point.x) as number[] | Date[] | undefined) || [];\n this._barWidth = getBarWidth(\n this.props.barWidth,\n this.props.maxBarWidth,\n calculateAppropriateBarWidth(data, totalWidth),\n );\n this._domainMargin = MIN_DOMAIN_MARGIN + this._barWidth / 2;\n }\n\n return {\n ...this.margins,\n left: this.margins.left! + this._domainMargin,\n right: this.margins.right! + this._domainMargin,\n };\n };\n\n private _isChartEmpty(): boolean {\n return (\n this._points.length === 0 ||\n (d3Max(this._points, (point: IVerticalBarChartDataPoint) => point.y)! <= 0 && !this._isHavingLine)\n );\n }\n}\n"]}
@@ -16,8 +16,8 @@ export interface IVerticalBarChartProps extends ICartesianChartProps {
16
16
  */
17
17
  onRenderCalloutPerDataPoint?: IRenderFunction<IVerticalBarChartDataPoint>;
18
18
  /**
19
- * Width of each bar in the chart. When set to `undefined` or `'default'`, the bar width defaults to 16px.
20
- * When set to `auto` (which is only applicable to string x-axis), the bar width is calculated from padding values.
19
+ * Width of each bar in the chart. When set to `undefined` or `'default'`, the bar width defaults to 16px,
20
+ * which may decrease to prevent overlap. When set to `'auto'`, the bar width is calculated from padding values.
21
21
  * @default 16
22
22
  */
23
23
  barWidth?: number | 'default' | 'auto';
@@ -68,6 +68,7 @@ export interface IVerticalBarChartProps extends ICartesianChartProps {
68
68
  hideLabels?: boolean;
69
69
  /**
70
70
  * Maximum width of a bar, in pixels.
71
+ * @default 24
71
72
  */
72
73
  maxBarWidth?: number;
73
74
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"VerticalBarChart.types.js","sourceRoot":"../src/","sources":["components/VerticalBarChart/VerticalBarChart.types.ts"],"names":[],"mappings":"","sourcesContent":["import { IStyle } from '@fluentui/react/lib/Styling';\nimport { IRenderFunction, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\nimport {\n ICartesianChartProps,\n ICartesianChartStyleProps,\n ICartesianChartStyles,\n IVerticalBarChartDataPoint,\n} from '../../index';\nimport { ILineChartLineOptions } from '../../types/index';\n\n/**\n * Vertical Bar Chart properties\n * {@docCategory VerticalBarChart}\n */\nexport interface IVerticalBarChartProps extends ICartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data?: IVerticalBarChartDataPoint[];\n\n /**\n * Define a custom callout renderer for a data point.\n */\n onRenderCalloutPerDataPoint?: IRenderFunction<IVerticalBarChartDataPoint>;\n\n /**\n * Width of each bar in the chart. When set to `undefined` or `'default'`, the bar width defaults to 16px.\n * When set to `auto` (which is only applicable to string x-axis), the bar width is calculated from padding values.\n * @default 16\n */\n barWidth?: number | 'default' | 'auto';\n\n /**\n * Colors from which to select the color of each bar.\n */\n colors?: string[];\n\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * Legend text for the line datapoint in the chart\n */\n lineLegendText?: string;\n\n /**\n * color for the legend of the line in the chart\n * @default theme.yellow\n */\n\n lineLegendColor?: string;\n\n /**\n * This prop makes sure that all the bars are of same color.\n * it will take the first color from the array of colors in\n * prop `colors` or if `colors` prop is not given then default color is palette.blueLight\n * @default false\n */\n useSingleColor?: boolean;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IStyleFunctionOrObject<IVerticalBarChartStyleProps, IVerticalBarChartStyles>;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * it's padding between bar's or lines in the graph\n */\n xAxisPadding?: number;\n\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\n\n /**\n * Prop to hide the bar labels\n * @default false\n */\n hideLabels?: boolean;\n\n /**\n * Maximum width of a bar, in pixels.\n */\n maxBarWidth?: number;\n\n /**\n * Padding between bars as a fraction of the [step](https://d3js.org/d3-scale/band#band_step).\n * Takes a number in the range [0, 1]. Only applicable to string x-axis.\n * @default 2/3\n */\n xAxisInnerPadding?: number;\n\n /**\n * Padding before the first bar and after the last bar as a fraction of\n * the [step](https://d3js.org/d3-scale/band#band_step). Takes a number in the range [0, 1].\n * Only applicable to string x-axis.\n */\n xAxisOuterPadding?: number;\n}\n\n/**\n * Vertical Bar Chart style properties\n * {@docCategory VerticalBarChart}\n */\nexport interface IVerticalBarChartStyleProps extends ICartesianChartStyleProps {\n /**\n * color of the datapoint legend\n */\n legendColor?: string;\n}\n\n/**\n * Vertical Bar Chart styles\n * {@docCategory VerticalBarChart}\n */\nexport interface IVerticalBarChartStyles extends ICartesianChartStyles {\n /**\n * Style for the chart label.\n * @deprecated This style cannot be customized anymore\n */\n chartLabel?: IStyle;\n\n /**\n * Style for the line representing the domain of the x-axis.\n * @deprecated This style cannot be customized anymore\n */\n xAxisDomain?: IStyle;\n\n /**\n * Style for the lines representing the ticks along the x-axis.\n * @deprecated This style cannot be customized anymore\n */\n xAxisTicks?: IStyle;\n\n /**\n * Style for the text labeling each tick along the x-axis.\n * @deprecated This style cannot be customized anymore\n */\n xAxisText?: IStyle;\n\n /**\n * Style for the line representing the domain of the y-axis.\n * @deprecated This style cannot be customized anymore\n */\n yAxisDomain?: IStyle;\n\n /**\n * Style for the lines representing the ticks along the y-axis.\n * @deprecated This style cannot be customized anymore\n */\n yAxisTicks?: IStyle;\n\n /**\n * Style for the text labeling each tick along the y-axis.\n * @deprecated This style cannot be customized anymore\n */\n yAxisText?: IStyle;\n\n /**\n * Style to change the opacity of bars in dataviz when we hover on a single bar or legends\n */\n opacityChangeOnHover: IStyle;\n\n /**\n * Style for the bar labels\n */\n barLabel: IStyle;\n}\n"]}
1
+ {"version":3,"file":"VerticalBarChart.types.js","sourceRoot":"../src/","sources":["components/VerticalBarChart/VerticalBarChart.types.ts"],"names":[],"mappings":"","sourcesContent":["import { IStyle } from '@fluentui/react/lib/Styling';\nimport { IRenderFunction, IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\nimport {\n ICartesianChartProps,\n ICartesianChartStyleProps,\n ICartesianChartStyles,\n IVerticalBarChartDataPoint,\n} from '../../index';\nimport { ILineChartLineOptions } from '../../types/index';\n\n/**\n * Vertical Bar Chart properties\n * {@docCategory VerticalBarChart}\n */\nexport interface IVerticalBarChartProps extends ICartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data?: IVerticalBarChartDataPoint[];\n\n /**\n * Define a custom callout renderer for a data point.\n */\n onRenderCalloutPerDataPoint?: IRenderFunction<IVerticalBarChartDataPoint>;\n\n /**\n * Width of each bar in the chart. When set to `undefined` or `'default'`, the bar width defaults to 16px,\n * which may decrease to prevent overlap. When set to `'auto'`, the bar width is calculated from padding values.\n * @default 16\n */\n barWidth?: number | 'default' | 'auto';\n\n /**\n * Colors from which to select the color of each bar.\n */\n colors?: string[];\n\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * Legend text for the line datapoint in the chart\n */\n lineLegendText?: string;\n\n /**\n * color for the legend of the line in the chart\n * @default theme.yellow\n */\n\n lineLegendColor?: string;\n\n /**\n * This prop makes sure that all the bars are of same color.\n * it will take the first color from the array of colors in\n * prop `colors` or if `colors` prop is not given then default color is palette.blueLight\n * @default false\n */\n useSingleColor?: boolean;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IStyleFunctionOrObject<IVerticalBarChartStyleProps, IVerticalBarChartStyles>;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * it's padding between bar's or lines in the graph\n */\n xAxisPadding?: number;\n\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\n\n /**\n * Prop to hide the bar labels\n * @default false\n */\n hideLabels?: boolean;\n\n /**\n * Maximum width of a bar, in pixels.\n * @default 24\n */\n maxBarWidth?: number;\n\n /**\n * Padding between bars as a fraction of the [step](https://d3js.org/d3-scale/band#band_step).\n * Takes a number in the range [0, 1]. Only applicable to string x-axis.\n * @default 2/3\n */\n xAxisInnerPadding?: number;\n\n /**\n * Padding before the first bar and after the last bar as a fraction of\n * the [step](https://d3js.org/d3-scale/band#band_step). Takes a number in the range [0, 1].\n * Only applicable to string x-axis.\n */\n xAxisOuterPadding?: number;\n}\n\n/**\n * Vertical Bar Chart style properties\n * {@docCategory VerticalBarChart}\n */\nexport interface IVerticalBarChartStyleProps extends ICartesianChartStyleProps {\n /**\n * color of the datapoint legend\n */\n legendColor?: string;\n}\n\n/**\n * Vertical Bar Chart styles\n * {@docCategory VerticalBarChart}\n */\nexport interface IVerticalBarChartStyles extends ICartesianChartStyles {\n /**\n * Style for the chart label.\n * @deprecated This style cannot be customized anymore\n */\n chartLabel?: IStyle;\n\n /**\n * Style for the line representing the domain of the x-axis.\n * @deprecated This style cannot be customized anymore\n */\n xAxisDomain?: IStyle;\n\n /**\n * Style for the lines representing the ticks along the x-axis.\n * @deprecated This style cannot be customized anymore\n */\n xAxisTicks?: IStyle;\n\n /**\n * Style for the text labeling each tick along the x-axis.\n * @deprecated This style cannot be customized anymore\n */\n xAxisText?: IStyle;\n\n /**\n * Style for the line representing the domain of the y-axis.\n * @deprecated This style cannot be customized anymore\n */\n yAxisDomain?: IStyle;\n\n /**\n * Style for the lines representing the ticks along the y-axis.\n * @deprecated This style cannot be customized anymore\n */\n yAxisTicks?: IStyle;\n\n /**\n * Style for the text labeling each tick along the y-axis.\n * @deprecated This style cannot be customized anymore\n */\n yAxisText?: IStyle;\n\n /**\n * Style to change the opacity of bars in dataviz when we hover on a single bar or legends\n */\n opacityChangeOnHover: IStyle;\n\n /**\n * Style for the bar labels\n */\n barLabel: IStyle;\n}\n"]}
@@ -8,6 +8,7 @@ export interface IVerticalStackedBarChartState extends IBasestate {
8
8
  calloutLegend: string;
9
9
  }
10
10
  export declare class VerticalStackedBarChartBase extends React.Component<IVerticalStackedBarChartProps, IVerticalStackedBarChartState> {
11
+ static defaultProps: Partial<IVerticalStackedBarChartProps>;
11
12
  private _points;
12
13
  private _dataset;
13
14
  private _xAxisLabels;
@@ -8,7 +8,7 @@ import { DirectionalHint } from '@fluentui/react/lib/Callout';
8
8
  import { Legends } from '../Legends/index';
9
9
  import { CartesianChart, ChartHoverCard, } from '../../index';
10
10
  import { FocusZoneDirection } from '@fluentui/react-focus';
11
- import { ChartTypes, getAccessibleDataObject, XAxisTypes, getTypeOfAxis, tooltipOfXAxislabels, formatValueWithSIPrefix, getBarWidth, getScalePadding, isScalePaddingDefined, } from '../../utilities/index';
11
+ import { ChartTypes, getAccessibleDataObject, XAxisTypes, getTypeOfAxis, tooltipOfXAxislabels, formatValueWithSIPrefix, getBarWidth, getScalePadding, isScalePaddingDefined, calculateAppropriateBarWidth, } from '../../utilities/index';
12
12
  var getClassNames = classNamesFunction();
13
13
  var COMPONENT_NAME = 'VERTICAL STACKED BAR CHART';
14
14
  // When displaying gaps between bars, the max height of the gap is given in the
@@ -85,11 +85,10 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
85
85
  });
86
86
  return lineLegends;
87
87
  };
88
- _this._createLines = function (xScale, yScale, containerHeight, containerWidth, secondaryYScale) {
88
+ _this._createLines = function (
89
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
90
+ xScale, yScale, containerHeight, containerWidth, secondaryYScale) {
89
91
  var _a;
90
- var isNumeric = _this._xAxisType === XAxisTypes.NumericAxis;
91
- var isDate = _this._xAxisType === XAxisTypes.DateAxis;
92
- var xBarScale = _this._getScales(containerHeight, containerWidth).xBarScale;
93
92
  var lineObject = _this._getFormattedLineData(_this.props.data);
94
93
  var lines = [];
95
94
  var borderForLines = [];
@@ -98,29 +97,14 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
98
97
  var lineBorderWidth = ((_a = _this.props.lineOptions) === null || _a === void 0 ? void 0 : _a.lineBorderWidth)
99
98
  ? Number.parseFloat(_this.props.lineOptions.lineBorderWidth.toString())
100
99
  : 0;
101
- var xScaleBandwidthTranslate = isNumeric || isDate
102
- ? 0
103
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
104
- xBarScale.bandwidth() / 2;
100
+ var xScaleBandwidthTranslate = _this._xAxisType !== XAxisTypes.StringAxis ? 0 : xScale.bandwidth() / 2;
105
101
  Object.keys(lineObject).forEach(function (item, index) {
106
102
  var shouldHighlight = _this._legendHighlighted(item) || _this._noLegendHighlighted(); // item is legend name
107
103
  for (var i = 1; i < lineObject[item].length; i++) {
108
- var x1 = isNumeric
109
- ? xScale(lineObject[item][i - 1].xItem.xAxisPoint)
110
- : isDate
111
- ? // eslint-disable-next-line @typescript-eslint/no-explicit-any
112
- xBarScale(lineObject[item][i - 1].xItem.xAxisPoint)
113
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
114
- xBarScale(lineObject[item][i - 1].xItem.xAxisPoint);
104
+ var x1 = xScale(lineObject[item][i - 1].xItem.xAxisPoint);
115
105
  var useSecondaryYScale = lineObject[item][i - 1].useSecondaryYScale && lineObject[item][i].useSecondaryYScale && secondaryYScale;
116
106
  var y1 = useSecondaryYScale ? secondaryYScale(lineObject[item][i - 1].y) : yScale(lineObject[item][i - 1].y);
117
- var x2 = isNumeric
118
- ? xScale(lineObject[item][i].xItem.xAxisPoint)
119
- : isDate
120
- ? // eslint-disable-next-line @typescript-eslint/no-explicit-any
121
- xBarScale(lineObject[item][i].xItem.xAxisPoint)
122
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
123
- xBarScale(lineObject[item][i].xItem.xAxisPoint);
107
+ var x2 = xScale(lineObject[item][i].xItem.xAxisPoint);
124
108
  var y2 = useSecondaryYScale ? secondaryYScale(lineObject[item][i].y) : yScale(lineObject[item][i].y);
125
109
  if (lineBorderWidth > 0) {
126
110
  borderForLines.push(React.createElement("line", { key: "".concat(index, "-").concat(i, "-BorderLine"), x1: x1, y1: y1, x2: x2, y2: y2, opacity: shouldHighlight ? 1 : 0.1, strokeWidth: 3 + lineBorderWidth * 2, fill: "transparent", strokeLinecap: "round", stroke: theme.semanticColors.bodyBackground, transform: "translate(".concat(xScaleBandwidthTranslate, ", 0)") }));
@@ -133,13 +117,7 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
133
117
  });
134
118
  Object.keys(lineObject).forEach(function (item, index) {
135
119
  lineObject[item].forEach(function (circlePoint, subIndex) {
136
- dots.push(React.createElement("circle", __assign({ key: "".concat(index, "-").concat(subIndex, "-dot"), cx: isNumeric
137
- ? xScale(circlePoint.xItem.xAxisPoint)
138
- : isDate
139
- ? // eslint-disable-next-line @typescript-eslint/no-explicit-any
140
- xBarScale(circlePoint.xItem.xAxisPoint)
141
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
142
- xBarScale(circlePoint.xItem.xAxisPoint), cy: circlePoint.useSecondaryYScale && secondaryYScale ? secondaryYScale(circlePoint.y) : yScale(circlePoint.y), onMouseOver: _this.state.selectedLegend === item
120
+ dots.push(React.createElement("circle", __assign({ key: "".concat(index, "-").concat(subIndex, "-dot"), cx: xScale(circlePoint.xItem.xAxisPoint), cy: circlePoint.useSecondaryYScale && secondaryYScale ? secondaryYScale(circlePoint.y) : yScale(circlePoint.y), onMouseOver: _this.state.selectedLegend === item
143
121
  ? _this._lineHover.bind(_this, circlePoint)
144
122
  : _this._onStackHover.bind(_this, circlePoint.xItem) }, (_this.state.selectedLegend === item && {
145
123
  onMouseLeave: _this._lineHoverOut,
@@ -219,7 +197,7 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
219
197
  var _a = _this.props, _b = _a.barCornerRadius, barCornerRadius = _b === void 0 ? 0 : _b, _c = _a.barMinimumHeight, barMinimumHeight = _c === void 0 ? 0 : _c;
220
198
  var _isHavingLines = _this.props.data.some(function (item) { return item.lineData && item.lineData.length > 0; });
221
199
  var shouldFocusWholeStack = _this._toFocusWholeStack(_isHavingLines);
222
- if (_this._xAxisType === XAxisTypes.StringAxis && _this.props.barWidth === 'auto') {
200
+ if (_this._xAxisType === XAxisTypes.StringAxis) {
223
201
  // Setting the bar width here is safe because there are no dependencies earlier in the code
224
202
  // that rely on the width of bars in vertical bar charts with string x-axis.
225
203
  _this._barWidth = getBarWidth(_this.props.barWidth, _this.props.maxBarWidth, xBarScale.bandwidth());
@@ -231,13 +209,7 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
231
209
  : _this._xAxisType === XAxisTypes.DateAxis
232
210
  ? singleChartData.xAxisPoint
233
211
  : singleChartData.xAxisPoint);
234
- //Time Range is +/-barwidth/2 , so we have to adjust
235
- //that while making bars because the tick must come in center of bar
236
- var xScaleBandwidthTranslate = _this._xAxisType === XAxisTypes.NumericAxis
237
- ? 0
238
- : _this._xAxisType === XAxisTypes.DateAxis
239
- ? -_this._barWidth / 2
240
- : (xBarScale.bandwidth() - _this._barWidth) / 2;
212
+ var xScaleBandwidthTranslate = _this._xAxisType !== XAxisTypes.StringAxis ? -_this._barWidth / 2 : (xBarScale.bandwidth() - _this._barWidth) / 2;
241
213
  var barTotalValue = 0;
242
214
  // Removing datapoints with zero data
243
215
  var barsToDisplay = singleChartData.chartData.filter(function (point) { return point.data > 0; });
@@ -258,7 +230,7 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
258
230
  href: _this.props.href,
259
231
  });
260
232
  var rectFocusProps = !shouldFocusWholeStack && {
261
- 'data-is-focusable': !_this.props.hideTooltip,
233
+ 'data-is-focusable': !_this.props.hideTooltip && shouldHighlight,
262
234
  'aria-label': _this._getAriaLabel(singleChartData, point),
263
235
  onMouseOver: _this._onRectHover.bind(_this, singleChartData.xAxisPoint, point, color),
264
236
  onMouseMove: _this._onRectHover.bind(_this, singleChartData.xAxisPoint, point, color),
@@ -351,10 +323,7 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
351
323
  var xBarScale_1 = d3ScaleLinear()
352
324
  .domain(_this._isRtl ? [xMax, xMin] : [xMin, xMax])
353
325
  .nice()
354
- .range([
355
- _this.margins.left + _this._domainMargin,
356
- containerWidth - _this.margins.right - _this._barWidth - _this._domainMargin,
357
- ]);
326
+ .range([_this.margins.left + _this._domainMargin, containerWidth - _this.margins.right - _this._domainMargin]);
358
327
  return { xBarScale: xBarScale_1, yBarScale: yBarScale };
359
328
  }
360
329
  if (_this._xAxisType === XAxisTypes.DateAxis) {
@@ -366,10 +335,7 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
366
335
  });
367
336
  var xBarScale_2 = d3ScaleUtc()
368
337
  .domain(_this._isRtl ? [lDate, sDate] : [sDate, lDate])
369
- .range([
370
- _this.margins.left + _this._domainMargin + _this._barWidth / 2,
371
- containerWidth - _this.margins.right - _this._barWidth / 2 - _this._domainMargin,
372
- ]);
338
+ .range([_this.margins.left + _this._domainMargin, containerWidth - _this.margins.right - _this._domainMargin]);
373
339
  return { xBarScale: xBarScale_2, yBarScale: yBarScale };
374
340
  }
375
341
  var xBarScale = d3ScaleBand()
@@ -441,7 +407,10 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
441
407
  return ((_c = point.callOutAccessibilityData) === null || _c === void 0 ? void 0 : _c.ariaLabel) || "".concat(xValue, ". ").concat(legend, ", ").concat(yValue, ".");
442
408
  };
443
409
  _this._getDomainMargins = function (containerWidth) {
410
+ var _a;
444
411
  _this._domainMargin = MIN_DOMAIN_MARGIN;
412
+ /** Total width available to render the bars */
413
+ var totalWidth = containerWidth - (_this.margins.left + MIN_DOMAIN_MARGIN) - (_this.margins.right + MIN_DOMAIN_MARGIN);
445
414
  if (_this._xAxisType === XAxisTypes.StringAxis) {
446
415
  if (isScalePaddingDefined(_this.props.xAxisOuterPadding, _this.props.xAxisPadding)) {
447
416
  // Setting the domain margin for string x-axis to 0 because the xAxisOuterPadding prop is now available
@@ -449,18 +418,24 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
449
418
  _this._domainMargin = 0;
450
419
  }
451
420
  else if (_this.props.barWidth !== 'auto') {
452
- /** Total width available to render the bars */
453
- var totalWidth = containerWidth - (_this.margins.left + MIN_DOMAIN_MARGIN) - (_this.margins.right + MIN_DOMAIN_MARGIN);
454
421
  /** Rate at which the space between the bars changes wrt the bar width */
455
422
  var barGapRate = _this._xAxisInnerPadding / (1 - _this._xAxisInnerPadding);
423
+ // Update the bar width so that when CartesianChart rerenders,
424
+ // the following calculations don't use the previous bar width.
425
+ _this._barWidth = getBarWidth(_this.props.barWidth, _this.props.maxBarWidth);
456
426
  /** Total width required to render the bars. Directly proportional to bar width */
457
427
  var reqWidth = (_this._xAxisLabels.length + (_this._xAxisLabels.length - 1) * barGapRate) * _this._barWidth;
458
428
  if (totalWidth >= reqWidth) {
459
429
  // Center align the chart by setting equal left and right margins for domain
460
- _this._domainMargin += (totalWidth - reqWidth) / 2;
430
+ _this._domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;
461
431
  }
462
432
  }
463
433
  }
434
+ else {
435
+ var data = ((_a = _this.props.data) === null || _a === void 0 ? void 0 : _a.map(function (point) { return point.xAxisPoint; })) || [];
436
+ _this._barWidth = getBarWidth(_this.props.barWidth, _this.props.maxBarWidth, calculateAppropriateBarWidth(data, totalWidth));
437
+ _this._domainMargin = MIN_DOMAIN_MARGIN + _this._barWidth / 2;
438
+ }
464
439
  return __assign(__assign({}, _this.margins), { left: _this.margins.left + _this._domainMargin, right: _this.margins.right + _this._domainMargin });
465
440
  };
466
441
  _this.state = {
@@ -728,6 +703,9 @@ var VerticalStackedBarChartBase = /** @class */ (function (_super) {
728
703
  this.props.data.length > 0 &&
729
704
  this.props.data.filter(function (item) { return item.chartData.length === 0; }).length === 0);
730
705
  };
706
+ VerticalStackedBarChartBase.defaultProps = {
707
+ maxBarWidth: 24,
708
+ };
731
709
  return VerticalStackedBarChartBase;
732
710
  }(React.Component));
733
711
  export { VerticalStackedBarChartBase };