@fluentui/react-charts 9.2.3 → 9.2.4

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 (194) hide show
  1. package/CHANGELOG.md +49 -10
  2. package/dist/index.d.ts +98 -5
  3. package/lib/components/AreaChart/AreaChart.js +3 -3
  4. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  5. package/lib/components/AreaChart/useAreaChartStyles.styles.js +2 -2
  6. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  7. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -15
  8. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  9. package/lib/components/ChartTable/ChartTable.js +89 -6
  10. package/lib/components/ChartTable/ChartTable.js.map +1 -1
  11. package/lib/components/CommonComponents/CartesianChart.js +38 -34
  12. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  13. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  14. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +17 -14
  15. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  16. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +6 -33
  17. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  18. package/lib/components/DeclarativeChart/DeclarativeChart.js +55 -16
  19. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  20. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +19 -0
  21. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  22. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +1058 -291
  23. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  24. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +8 -3
  25. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  26. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +6 -2
  27. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  28. package/lib/components/DonutChart/DonutChart.js +6 -1
  29. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  30. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  31. package/lib/components/DonutChart/useDonutChartStyles.styles.js +21 -4
  32. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  33. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +8 -4
  34. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  35. package/lib/components/FunnelChart/FunnelChart.js +4 -2
  36. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  37. package/lib/components/FunnelChart/funnelGeometry.js.map +1 -1
  38. package/lib/components/GaugeChart/GaugeChart.js +1 -2
  39. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  40. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +2 -2
  41. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  42. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +4 -17
  43. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  44. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +4 -21
  45. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  46. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +1 -1
  47. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  48. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +7 -3
  49. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  50. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +5 -2
  51. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  52. package/lib/components/LineChart/LineChart.js +271 -271
  53. package/lib/components/LineChart/LineChart.js.map +1 -1
  54. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  55. package/lib/components/LineChart/useLineChartStyles.styles.js +23 -10
  56. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  57. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +4 -21
  58. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  59. package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  60. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  61. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +12 -25
  62. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  63. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +2 -12
  64. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  65. package/lib/components/ScatterChart/ScatterChart.js +114 -75
  66. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  67. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  68. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +11 -7
  69. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  70. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +4 -22
  71. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  72. package/lib/components/VerticalBarChart/VerticalBarChart.js +2 -2
  73. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  74. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +8 -6
  75. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  76. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +5 -19
  77. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  78. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +2 -2
  79. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  80. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +7 -6
  81. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  82. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +4 -19
  83. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  84. package/lib/types/DataPoint.js +3 -1
  85. package/lib/types/DataPoint.js.map +1 -1
  86. package/lib/utilities/Common.styles.js +47 -0
  87. package/lib/utilities/Common.styles.js.map +1 -0
  88. package/lib/utilities/Common.styles.raw.js +47 -0
  89. package/lib/utilities/Common.styles.raw.js.map +1 -0
  90. package/lib/utilities/SVGTooltipText.js.map +1 -1
  91. package/lib/utilities/image-export-utils.js.map +1 -1
  92. package/lib/utilities/index.js +1 -0
  93. package/lib/utilities/index.js.map +1 -1
  94. package/lib/utilities/scatterpolar-utils.js +52 -0
  95. package/lib/utilities/scatterpolar-utils.js.map +1 -0
  96. package/lib/utilities/utilities.js +309 -142
  97. package/lib/utilities/utilities.js.map +1 -1
  98. package/lib/utilities/vbc-utils.js.map +1 -1
  99. package/lib-commonjs/components/AreaChart/AreaChart.js +2 -2
  100. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  101. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  102. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +2 -14
  103. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  104. package/lib-commonjs/components/ChartTable/ChartTable.js +89 -6
  105. package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
  106. package/lib-commonjs/components/CommonComponents/CartesianChart.js +38 -34
  107. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  108. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  109. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +15 -13
  110. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  111. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +4 -32
  112. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  113. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +58 -19
  114. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  115. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +22 -0
  116. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  117. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +1070 -291
  118. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  119. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +12 -3
  120. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  121. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +6 -2
  122. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  123. package/lib-commonjs/components/DonutChart/DonutChart.js +6 -1
  124. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  125. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  126. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +32 -4
  127. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  128. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +8 -4
  129. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  130. package/lib-commonjs/components/FunnelChart/FunnelChart.js +4 -2
  131. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
  132. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -1
  133. package/lib-commonjs/components/GaugeChart/GaugeChart.js +1 -2
  134. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  135. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +2 -2
  136. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  137. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +2 -19
  138. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  139. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +3 -20
  140. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  141. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +1 -1
  142. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  143. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +10 -3
  144. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  145. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +5 -2
  146. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  147. package/lib-commonjs/components/LineChart/LineChart.js +269 -269
  148. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  149. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  150. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +30 -9
  151. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  152. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +2 -20
  153. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  154. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  155. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  156. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +23 -33
  157. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  158. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +1 -12
  159. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  160. package/lib-commonjs/components/ScatterChart/ScatterChart.js +112 -73
  161. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  162. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  163. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +13 -7
  164. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  165. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +2 -20
  166. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  167. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +1 -1
  168. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  169. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +5 -3
  170. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  171. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +3 -17
  172. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  173. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +1 -1
  174. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  175. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +5 -3
  176. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  177. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -18
  178. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  179. package/lib-commonjs/types/DataPoint.js +3 -1
  180. package/lib-commonjs/types/DataPoint.js.map +1 -1
  181. package/lib-commonjs/utilities/Common.styles.js +71 -0
  182. package/lib-commonjs/utilities/Common.styles.js.map +1 -0
  183. package/lib-commonjs/utilities/Common.styles.raw.js +71 -0
  184. package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -0
  185. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  186. package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
  187. package/lib-commonjs/utilities/index.js +1 -0
  188. package/lib-commonjs/utilities/index.js.map +1 -1
  189. package/lib-commonjs/utilities/scatterpolar-utils.js +67 -0
  190. package/lib-commonjs/utilities/scatterpolar-utils.js.map +1 -0
  191. package/lib-commonjs/utilities/utilities.js +322 -133
  192. package/lib-commonjs/utilities/utilities.js.map +1 -1
  193. package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
  194. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/VerticalBarChart/VerticalBarChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useVerticalBarChartStyles } from './useVerticalBarChartStyles.styles';\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 { useId } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport {\n AccessibilityProps,\n CartesianChart,\n Margins,\n Legend,\n RefArrayData,\n VerticalBarChartProps,\n VerticalBarChartDataPoint,\n Legends,\n ChildProps,\n YValueHover,\n ChartPopover,\n Chart,\n DataPoint,\n ImageExportOptions,\n LegendContainer,\n} from '../../index';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n NumericAxis,\n getTypeOfAxis,\n tooltipOfAxislabels,\n formatScientificLimitWidth,\n getBarWidth,\n getScalePadding,\n isScalePaddingDefined,\n calculateAppropriateBarWidth,\n useRtl,\n areArraysEqual,\n calculateLongestLabelWidth,\n findVerticalNumericMinMaxOfY,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfVerticalNumeric,\n domainRangeOfDateForAreaLineVerticalBarChart,\n domainRangeOfXStringAxis,\n createStringYAxis,\n calcTotalWidth,\n calcBandwidth,\n calcRequiredWidth,\n sortAxisCategories,\n} from '../../utilities/index';\nimport { toImage } from '../../utilities/image-export-utils';\n\nenum CircleVisbility {\n show = 'visibility',\n hide = 'hidden',\n}\n\nconst MIN_DOMAIN_MARGIN = 8;\n\n// Create a VerticalBarChart variant which uses these default styles and this styled subcomponent.\n/**\n * VerticalBarchart component\n * {@docCategory VerticalBarChart}\n */\nexport const VerticalBarChart: React.FunctionComponent<VerticalBarChartProps> = React.forwardRef<\n HTMLDivElement,\n VerticalBarChartProps\n>((props = { xAxisCategoryOrder: 'default' }, forwardedRef) => {\n let _points: VerticalBarChartDataPoint[] = [];\n let _barWidth: number = 0;\n let _colors: string[];\n const _refArray: RefArrayData[] = [];\n let margins: Margins;\n const _useRtl: boolean = useRtl();\n let _bars: JSXElement[];\n let _xAxisLabels: string[];\n let _yMax: number;\n let _yMin: number;\n let _isHavingLine: boolean = _checkForLine();\n const _tooltipId: string = useId('VCTooltipID_');\n let _xAxisType: XAxisTypes;\n let _calloutAnchorPoint: VerticalBarChartDataPoint | null;\n let _domainMargin: number;\n const _emptyChartId: string = useId('_VBC_empty');\n const _vbcLineId: string = useId('_VBC_line_');\n const _vbcPointId: string = useId('_VBC_point_');\n const _vbcBarId: string = useId('_VBC_bar_');\n let _xAxisInnerPadding: number = 0;\n let _xAxisOuterPadding: number = 0;\n type ColorScale = (_p?: number) => string;\n const cartesianChartRef = React.useRef<Chart>(null);\n const _legendsRef = React.useRef<LegendContainer>(null);\n\n const [color, setColor] = React.useState<string>('');\n const [dataForHoverCard, setDataForHoverCard] = React.useState<number>(0);\n const [activeLegend, setActiveLegend] = React.useState<string | undefined>(undefined);\n const [xCalloutValue, setXCalloutValue] = React.useState<string | undefined>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string | undefined>('');\n const [activeXdataPoint, setActiveXDatapoint] = React.useState<string | number | Date | null>(null);\n const [hoveredYValues, setYValueHover] = React.useState<YValueHover[]>();\n const [hoverXValue, setHoverXValue] = React.useState<string | number | undefined>('');\n const [calloutLegend, setCalloutLegend] = React.useState<string>('');\n const [callOutAccessibilityData, setCalloutAccessibilityData] = React.useState<AccessibilityProps>();\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<VerticalBarChartDataPoint>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const prevPropsRef = React.useRef<VerticalBarChartProps | null>(null);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n toImage: (opts?: ImageExportOptions): Promise<string> => {\n return toImage(cartesianChartRef.current?.chartContainer, _legendsRef.current?.toSVG, _useRtl, opts);\n },\n }),\n [],\n );\n\n React.useEffect(() => {\n if (prevPropsRef.current) {\n const prevProps = prevPropsRef.current;\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, props.legendProps?.selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n if (prevProps.height !== props.height || prevProps.width !== props.width) {\n _adjustProps();\n }\n }\n prevPropsRef.current = props;\n }, [props, prevPropsRef, _adjustProps]);\n\n function _getDomainNRangeValues(\n points: DataPoint[],\n margins: Margins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfVerticalNumeric(points, margins, width, isRTL, barWidth!);\n } else if (xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = domainRangeOfDateForAreaLineVerticalBarChart(\n points,\n margins,\n width,\n isRTL,\n tickValues! as Date[],\n chartType,\n barWidth,\n );\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);\n }\n return domainNRangeValue;\n }\n\n function _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 yScalePrimary: 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 = _xAxisType === XAxisTypes.StringAxis;\n const colorScale = _createColors();\n const { data, lineLegendColor = tokens.colorPaletteYellowBackground1, lineLegendText } = props;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const lineData: Array<any> = [];\n const line: JSXElement[] = [];\n data &&\n data.forEach((item: VerticalBarChartDataPoint, 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 ? xScale(d.x) + 0.5 * xScale.bandwidth() : xScale(d.x)))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => (d.useSecondaryYScale && yScaleSecondary ? yScaleSecondary(d.y) : yScalePrimary(d.y)));\n const shouldHighlight = _legendHighlighted(lineLegendText!) || _noLegendHighlighted() ? true : false;\n const lineBorderWidth = props.lineOptions?.lineBorderWidth\n ? Number.parseFloat(props.lineOptions!.lineBorderWidth!.toString())\n : 0;\n\n if (lineBorderWidth > 0) {\n line.push(\n <path\n key={_vbcLineId}\n id={_vbcLineId}\n opacity={shouldHighlight ? 1 : 0.1}\n d={linePath(lineData)!}\n fill=\"transparent\"\n strokeLinecap=\"square\"\n strokeWidth={3 + lineBorderWidth * 2}\n className={classes.lineBorder}\n />,\n );\n }\n line.push(\n <path\n key={_vbcLineId}\n id={_vbcLineId}\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: VerticalBarChartDataPoint;\n index: number;\n },\n index: number,\n ) => {\n // Create an object to store line point ref so that the object can be passed by reference to the focus handler\n const circleRef: { refElement: SVGCircleElement | null } = { refElement: null };\n return (\n <circle\n key={index}\n id={`${_vbcPointId}-${index}`}\n cx={isStringAxis ? xScale(item.x) + 0.5 * xScale.bandwidth() : xScale(item.x)}\n cy={item.useSecondaryYScale && yScaleSecondary ? yScaleSecondary(item.y) : yScalePrimary(item.y)}\n onMouseOver={event =>\n _legendHighlighted(lineLegendText!)\n ? _lineHover(item.point, event)\n : _onBarHover(item.point, colorScale(item.y), event)\n }\n onMouseOut={_onBarLeave}\n r={_getCircleVisibilityAndRadius(item.x, lineLegendText!).radius}\n stroke={lineLegendColor}\n fill={tokens.colorNeutralBackground1}\n strokeWidth={3}\n visibility={_getCircleVisibilityAndRadius(item.x, lineLegendText!).visibility}\n onClick={item.point.lineData?.onClick}\n // When no legend is highlighted: Line points are automatically displayed along with the bars\n // at the same x-axis point in the stack callout. So to prevent an increase in focusable elements\n // and avoid conveying duplicate info, make these line points non-focusable.\n data-is-focusable={_legendHighlighted(lineLegendText!)}\n ref={e => (circleRef.refElement = e)}\n onFocus={event => _lineFocus(event, item.point, circleRef)}\n onBlur={_handleChartMouseLeave}\n tabIndex={_legendHighlighted(lineLegendText!) ? 0 : undefined}\n />\n );\n },\n );\n\n return (\n <>\n {line}\n {dots}\n </>\n );\n }\n\n function _getCircleVisibilityAndRadius(\n xAxisPoint: string | number | Date,\n legend: string,\n ): { visibility: CircleVisbility; radius: number } {\n if (!_noLegendHighlighted()) {\n if (xAxisPoint === activeXdataPoint && _legendHighlighted(legend)) {\n return { visibility: CircleVisbility.show, radius: 8 };\n } else if (_legendHighlighted(legend)) {\n // Don't hide the circle to keep it focusable. For more information,\n // see https://fuzzbomb.github.io/accessibility-demos/visually-hidden-focus-test.html\n return { visibility: CircleVisbility.show, radius: 0.3 };\n } else {\n return { visibility: CircleVisbility.hide, radius: 0 };\n }\n } else {\n return {\n visibility: activeXdataPoint === xAxisPoint ? CircleVisbility.show : CircleVisbility.hide,\n radius: 8,\n };\n }\n }\n\n function _checkForLine(): boolean {\n const { data } = props;\n return data!.some((item: VerticalBarChartDataPoint) => item?.lineData?.y !== undefined);\n }\n\n function _adjustProps(): void {\n _xAxisType =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\n _points = props.data || [];\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, undefined, props.mode);\n const defaultColors: string[] = [\n tokens.colorPaletteBlueForeground2,\n tokens.colorPaletteCornflowerForeground2,\n tokens.colorPaletteDarkGreenForeground2,\n tokens.colorPaletteNavyForeground2,\n tokens.colorPaletteDarkOrangeForeground2,\n ];\n _colors = props.colors || defaultColors;\n _isHavingLine = _checkForLine();\n _xAxisInnerPadding =\n props.mode === 'histogram'\n ? 0\n : getScalePadding(\n props.xAxisInnerPadding,\n props.xAxisPadding,\n _xAxisType === XAxisTypes.StringAxis ? 2 / 3 : 1 / 2,\n );\n _xAxisOuterPadding = getScalePadding(props.xAxisOuterPadding, props.xAxisPadding, 0);\n }\n\n function _getMargins(_margins: Margins) {\n margins = _margins;\n }\n\n function _renderContentForBothLineAndBars(point: VerticalBarChartDataPoint): JSXElement {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);\n const content: JSXElement[] = YValueHover.map((item: YValueHover, index: number) => {\n return (\n <>\n <ChartPopover\n culture={props.culture ?? 'en-us'}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n legend={item.legend!}\n {...(index === 0 && { XValue: `${hoverXValue || item.data}` })}\n YValue={item.data || item.y}\n color={item.color}\n isCalloutForStack={false}\n />\n </>\n );\n });\n return <>{content}</>;\n }\n\n function _renderContentForOnlyBars(_props: VerticalBarChartDataPoint): JSXElement {\n return (\n <>\n <ChartPopover\n XValue={_props.xAxisCalloutData || (_props.x as string)}\n xCalloutValue={xCalloutValue}\n yCalloutValue={yCalloutValue}\n culture={props.culture ?? 'en-us'}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n legend={_props.legend!}\n YValue={_props.yAxisCalloutData || _props.y}\n color={!props.useSingleColor && _props.color ? _props.color : _createColors()(_props.y)}\n isCalloutForStack={false}\n />\n </>\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n function _renderCallout(props?: VerticalBarChartDataPoint): JSXElement | null {\n return props ? (_isHavingLine ? _renderContentForBothLineAndBars(props) : _renderContentForOnlyBars(props)) : null;\n }\n\n function _getCustomizedCallout() {\n return props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps, _renderCallout)\n : null;\n }\n\n function _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 (_bars =\n _xAxisType === XAxisTypes.NumericAxis\n ? _createNumericBars(containerHeight, containerWidth, xElement!)\n : _xAxisType === XAxisTypes.DateAxis\n ? _createDateBars(containerHeight, containerWidth, xElement!)\n : _createStringBars(containerHeight, containerWidth, xElement!));\n }\n\n function _createColors(): D3ScaleLinear<string, string> | ColorScale {\n const increment = _colors.length <= 1 ? 1 : 1 / (_colors.length - 1);\n const { useSingleColor = false } = props;\n if (useSingleColor) {\n return (_p?: number) => {\n const { colors } = props;\n return colors && colors.length > 0 ? colors[0] : tokens.colorPaletteBlueBackground2;\n };\n }\n const domainValues = [];\n for (let i = 0; i < _colors.length; i++) {\n domainValues.push(increment * i * _yMax);\n }\n const colorScale = d3ScaleLinear<string>().domain(domainValues).range(_colors);\n return colorScale;\n }\n\n function _refCallback(element: SVGRectElement, legendTitle: string): void {\n _refArray.push({ index: legendTitle, refElement: element });\n }\n\n function _getCalloutContentForLineAndBar(point: VerticalBarChartDataPoint): {\n YValueHover: YValueHover[];\n hoverXValue: string | number | undefined;\n } {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const YValueHover: YValueHover[] = [];\n const { useSingleColor = false } = props;\n const { data, lineLegendText, lineLegendColor = tokens.colorPaletteYellowBackground1 } = props;\n const selectedPoint = data!.filter((xDataPoint: VerticalBarChartDataPoint) => xDataPoint.x === point.x);\n // Check if the line legend is highlighted or no legend is highlighted\n if (\n _isHavingLine &&\n selectedPoint[0].lineData?.y !== undefined &&\n (_legendHighlighted(lineLegendText) || _noLegendHighlighted())\n ) {\n // Add 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 // Check if the bar legend is highlighted or no legend is highlighted\n if (selectedLegends.includes(selectedPoint[0].legend!) || _noLegendHighlighted()) {\n // Add 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 : _createColors()(selectedPoint[0].y)\n : _createColors()(1),\n data: selectedPoint[0].yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].yAxisCalloutData,\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-shadow\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 function _onBarHover(\n point: VerticalBarChartDataPoint,\n // eslint-disable-next-line @typescript-eslint/no-shadow\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);\n if (_calloutAnchorPoint !== point) {\n _calloutAnchorPoint = point;\n /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(point.legend));\n setDataForHoverCard(point.y);\n setCalloutLegend(point.legend!);\n setColor(point.color || color);\n // To display callout value, if no callout value given, taking given point.x value as a string.\n setXCalloutValue(\n point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()),\n );\n setDataPointCalloutProps(point);\n // Hovering over a bar should highlight corresponding line points only when no legend is selected\n setActiveXDatapoint(_noLegendHighlighted() ? point.x : null);\n setYValueHover(YValueHover);\n setHoverXValue(hoverXValue);\n setCalloutAccessibilityData(point.callOutAccessibilityData);\n }\n }\n\n function _onBarLeave(): void {\n /**/\n }\n\n function _handleChartMouseLeave(): void {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n setActiveXDatapoint(null);\n setYValueHover([]);\n setHoverXValue('');\n }\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n function _onBarFocus(\n event: React.FocusEvent<SVGRectElement, Element>,\n point: VerticalBarChartDataPoint,\n refArrayIndexNumber: number,\n color: string,\n ): void {\n let x = 0;\n let y = 0;\n\n const targetRect = (event.target as SVGRectElement).getBoundingClientRect();\n x = targetRect.left + targetRect.width / 2;\n y = targetRect.top + targetRect.height / 2;\n updatePosition(x, y);\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);\n _refArray.forEach((obj: RefArrayData, index: number) => {\n if (obj.index === point.legend! && refArrayIndexNumber === index) {\n /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(point.legend));\n setDataForHoverCard(point.y);\n setCalloutLegend(point.legend!);\n setColor(point.color || color);\n // To display callout value, if no callout value given, taking given point.x value as a string.\n setXCalloutValue(\n point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()),\n );\n setYCalloutValue(point.yAxisCalloutData!);\n setDataPointCalloutProps(point);\n // Hovering over a bar should highlight corresponding line points only when no legend is selected\n setActiveXDatapoint(point.x);\n setYValueHover(YValueHover);\n setHoverXValue(hoverXValue);\n setCalloutAccessibilityData(point.callOutAccessibilityData);\n }\n });\n }\n\n function _lineHover(point: VerticalBarChartDataPoint, mouseEvent: React.MouseEvent<SVGElement>) {\n mouseEvent.persist();\n _lineHoverFocus(point, mouseEvent);\n }\n\n function _lineFocus(\n event: React.FocusEvent<SVGCircleElement, Element>,\n point: VerticalBarChartDataPoint,\n ref: { refElement: SVGCircleElement | null },\n ) {\n if (ref.refElement) {\n _lineHoverFocus(point, ref.refElement);\n }\n }\n\n function _lineHoverFocus(\n point: VerticalBarChartDataPoint,\n _refSelected: React.MouseEvent<SVGElement> | SVGCircleElement,\n ) {\n const { lineLegendText = '', lineLegendColor = tokens.colorPaletteYellowBackground1 } = props;\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(lineLegendText));\n setCalloutLegend(lineLegendText);\n setDataForHoverCard(point.lineData!.y);\n setColor(lineLegendColor);\n setXCalloutValue(\n point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()),\n );\n setYCalloutValue(point.lineData!.yAxisCalloutData);\n setDataPointCalloutProps(point);\n setActiveXDatapoint(point.x);\n }\n\n function _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([_yMin, _yMax])\n .range([0, containerHeight - margins.bottom! - margins.top!]);\n\n if (_xAxisType === XAxisTypes.NumericAxis) {\n const xMax = d3Max(_points, (point: VerticalBarChartDataPoint) => point.x as number)!;\n const xMin = d3Min(_points, (point: VerticalBarChartDataPoint) => point.x as number)!;\n xBarScale = d3ScaleLinear()\n .domain(_useRtl ? [xMax, xMin] : [xMin, xMax])\n .range([margins.left! + _domainMargin, containerWidth - margins.right! - _domainMargin]);\n if (!isScalePaddingDefined(props.xAxisInnerPadding, props.xAxisPadding) && props.mode !== 'histogram') {\n xBarScale.nice();\n }\n } else if (_xAxisType === XAxisTypes.DateAxis) {\n const sDate = d3Min(_points, (point: VerticalBarChartDataPoint) => point.x as Date)!;\n const lDate = d3Max(_points, (point: VerticalBarChartDataPoint) => point.x as Date)!;\n xBarScale = d3ScaleUtc()\n .domain([sDate, lDate])\n .range(\n _useRtl\n ? [containerWidth - margins.right! - _domainMargin, margins.left! + _domainMargin]\n : [margins.left! + _domainMargin, containerWidth - margins.right! - _domainMargin],\n );\n } else {\n xBarScale = d3ScaleBand()\n .domain(_xAxisLabels)\n .range(\n _useRtl\n ? [containerWidth - margins.right! - _domainMargin, margins.left! + _domainMargin]\n : [margins.left! + _domainMargin, containerWidth - margins.right! - _domainMargin],\n )\n .paddingInner(_xAxisInnerPadding)\n .paddingOuter(_xAxisOuterPadding);\n }\n\n return { xBarScale, yBarScale };\n }\n\n const classes = useVerticalBarChartStyles(props);\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _calculateMinBarHeight(yMin: number, yMax: number, yReferencePoint: number, yBarScale: any): number {\n const maxHeightFromBaseline =\n yMax < 0\n ? Math.abs(yMin - yReferencePoint)\n : Math.max(Math.abs(yMax - yReferencePoint), Math.abs(yMin - yReferencePoint));\n return Math.ceil(yBarScale(maxHeightFromBaseline) / 100.0);\n }\n\n function _createNumericBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSXElement[] {\n const { useSingleColor = false } = props;\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);\n const colorScale = _createColors();\n const yReferencePoint = _yMax < 0 ? _yMax : 0;\n const bars = _points.map((point: VerticalBarChartDataPoint, index: number) => {\n const shouldHighlight = _legendHighlighted(point.legend!) || _noLegendHighlighted() ? true : false;\n\n let barHeight: number = yBarScale(point.y) - yBarScale(yReferencePoint);\n const isHeightNegative = barHeight < 0;\n barHeight = Math.abs(barHeight);\n // Calculate threshold for minimum visible bar height\n const minBarHeight = _calculateMinBarHeight(_yMin, _yMax, yReferencePoint, yBarScale);\n let adjustedBarHeight = barHeight;\n\n if (barHeight === 0) {\n return <React.Fragment key={point.x as string}> </React.Fragment>;\n }\n // Adjust bar height if it's smaller than the threshold\n else if (barHeight <= minBarHeight) {\n adjustedBarHeight = minBarHeight;\n }\n const xPoint = xBarScale(point.x as number) - _barWidth / 2;\n const yPoint =\n containerHeight -\n margins.bottom! -\n (isHeightNegative ? -1 * adjustedBarHeight : adjustedBarHeight) -\n yBarScale(yReferencePoint);\n const baselineHeight = containerHeight - margins.bottom! - yBarScale(yReferencePoint);\n return (\n <g key={`${point.x}_${index}` as string}>\n <rect\n id={`${_vbcBarId}-${index}`}\n x={xPoint}\n y={!isHeightNegative ? yPoint : baselineHeight}\n width={_barWidth}\n height={adjustedBarHeight}\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={event => _onBarHover(point, colorScale(point.y), event)}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n onMouseLeave={_onBarLeave}\n onFocus={event => _onBarFocus(event, point, index, colorScale(point.y))}\n onBlur={_onBarLeave}\n fill={point.color && !useSingleColor ? point.color : colorScale(point.y)}\n tabIndex={!props.hideTooltip && shouldHighlight ? 0 : undefined}\n opacity={shouldHighlight ? 1 : 0.1}\n rx={props.roundCorners ? 3 : 0}\n />\n {_renderBarLabel(xPoint, yPoint, point.y, point.legend!, isHeightNegative)}\n </g>\n );\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return bars;\n }\n\n function _createStringBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSXElement[] {\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);\n const colorScale = _createColors();\n const yReferencePoint = _yMax < 0 ? _yMax : 0;\n const bars = _points.map((point: VerticalBarChartDataPoint, index: number) => {\n const shouldHighlight = _legendHighlighted(point.legend!) || _noLegendHighlighted() ? true : false;\n let barHeight: number = yBarScale(point.y) - yBarScale(yReferencePoint);\n const isHeightNegative = barHeight < 0;\n barHeight = Math.abs(barHeight);\n // Calculate threshold for minimum visible bar height\n const minBarHeight = _calculateMinBarHeight(_yMin, _yMax, yReferencePoint, yBarScale);\n let adjustedBarHeight = barHeight;\n\n if (barHeight === 0) {\n return <React.Fragment key={point.x as string}> </React.Fragment>;\n }\n // Adjust bar height if it's smaller than the threshold\n else if (barHeight <= minBarHeight) {\n adjustedBarHeight = minBarHeight;\n }\n const xPoint = xBarScale(point.x);\n const yPoint =\n containerHeight -\n margins.bottom! -\n (isHeightNegative ? -1 * adjustedBarHeight : adjustedBarHeight) -\n yBarScale(yReferencePoint);\n const baselineHeight = containerHeight - margins.bottom! - yBarScale(yReferencePoint);\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 _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, xBarScale.bandwidth(), props.mode);\n return (\n <g\n key={point.x instanceof Date ? `${point.x.getTime()}_${index}` : `${point.x}_${index}`}\n transform={`translate(${0.5 * (xBarScale.bandwidth() - _barWidth)}, 0)`}\n >\n <rect\n id={`${_vbcBarId}-${index}`}\n x={xPoint}\n y={!isHeightNegative ? yPoint : baselineHeight}\n width={_barWidth}\n height={adjustedBarHeight}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={event => _onBarHover(point, colorScale(point.y), event)}\n onMouseLeave={_onBarLeave}\n onBlur={_onBarLeave}\n onFocus={event => _onBarFocus(event, point, index, colorScale(point.y))}\n fill={point.color ? point.color : colorScale(point.y)}\n tabIndex={!props.hideTooltip && shouldHighlight ? 0 : undefined}\n rx={props.roundCorners ? 3 : 0}\n opacity={shouldHighlight ? 1 : 0.1}\n />\n {_renderBarLabel(xPoint, yPoint, point.y, point.legend!, isHeightNegative)}\n </g>\n );\n });\n\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: xAxisElement,\n showTooltip: props.showXAxisLablesTooltip,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return bars;\n }\n\n function _createDateBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSXElement[] {\n const { useSingleColor = false } = props;\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);\n const colorScale = _createColors();\n const yReferencePoint = _yMax < 0 ? _yMax : 0;\n const bars = _points.map((point: VerticalBarChartDataPoint, index: number) => {\n const shouldHighlight = _legendHighlighted(point.legend!) || _noLegendHighlighted() ? true : false;\n let barHeight: number = yBarScale(point.y) - yBarScale(yReferencePoint);\n const isHeightNegative = barHeight < 0;\n barHeight = Math.abs(barHeight);\n // Calculate threshold for minimum visible bar height\n const minBarHeight = _calculateMinBarHeight(_yMin, _yMax, yReferencePoint, yBarScale);\n let adjustedBarHeight = barHeight;\n\n if (barHeight === 0) {\n return <React.Fragment key={point.x as string}> </React.Fragment>;\n }\n // Adjust bar height if it's smaller than the threshold\n else if (barHeight <= minBarHeight) {\n adjustedBarHeight = minBarHeight;\n }\n const xPoint = xBarScale(point.x as number) - _barWidth / 2;\n const yPoint =\n containerHeight -\n margins.bottom! -\n (isHeightNegative ? -1 * adjustedBarHeight : adjustedBarHeight) -\n yBarScale(yReferencePoint);\n const baselineHeight = containerHeight - margins.bottom! - yBarScale(yReferencePoint);\n return (\n <g key={point.x instanceof Date ? `${point.x.getTime()}_${index}` : `${point.x}_${index}`}>\n <rect\n id={`${_vbcBarId}-${index}`}\n x={xPoint}\n className={classes.opacityChangeOnHover}\n y={!isHeightNegative ? yPoint : baselineHeight}\n width={_barWidth}\n height={adjustedBarHeight}\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={event => _onBarHover(point, colorScale(point.y), event)}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n onMouseLeave={_onBarLeave}\n onFocus={event => _onBarFocus(event, point, index, colorScale(point.y))}\n onBlur={_onBarLeave}\n fill={point.color && !useSingleColor ? point.color : colorScale(point.y)}\n tabIndex={!props.hideTooltip && shouldHighlight ? 0 : undefined}\n rx={props.roundCorners ? 3 : 0}\n opacity={shouldHighlight ? 1 : 0.1}\n />\n {_renderBarLabel(xPoint, yPoint, point.y, point.legend!, isHeightNegative)}\n </g>\n );\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return bars;\n }\n\n function _onLegendHover(legendTitle: string): void {\n setActiveLegend(legendTitle);\n }\n\n function _onLegendLeave(): void {\n setActiveLegend(undefined);\n }\n\n function _getLegendData(data: VerticalBarChartDataPoint[]): JSXElement {\n const { useSingleColor } = props;\n const { lineLegendText, lineLegendColor = tokens.colorPaletteYellowForeground1 } = props;\n const actions: Legend[] = [];\n const mapLegendToColor: Record<string, string> = {};\n data.forEach((point: VerticalBarChartDataPoint, _index: number) => {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const color: string = !useSingleColor ? point.color! : _createColors()(1);\n mapLegendToColor[point.legend!] = color;\n });\n Object.entries(mapLegendToColor).forEach(([legendTitle, color]) => {\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: legendTitle,\n color,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(legendTitle);\n },\n onMouseOutAction: () => {\n _onLegendLeave();\n },\n };\n actions.push(legend);\n });\n if (_isHavingLine && lineLegendText && lineLegendColor) {\n const lineLegend: Legend = {\n title: lineLegendText,\n color: lineLegendColor,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(lineLegendText);\n },\n onMouseOutAction: () => {\n _onLegendLeave();\n },\n isLineLegendInBarChart: true,\n };\n actions.unshift(lineLegend);\n }\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n selectedLegends={selectedLegends}\n onChange={_onLegendSelectionChange}\n legendRef={_legendsRef}\n />\n );\n return legends;\n }\n\n function _onLegendSelectionChange(\n legendsSelected: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(legendsSelected);\n } else {\n setSelectedLegends(legendsSelected.slice(-1));\n }\n\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(legendsSelected, event, currentLegend);\n }\n }\n\n function _getAxisData(yAxisData: IAxisData) {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n _yMax = Math.max(domainValue[domainValue.length - 1], props.yMaxValue || 0);\n _yMin = Math.min(domainValue[0], props.yMinValue || 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 function _legendHighlighted(legendTitle: string | undefined): boolean {\n return _getHighlightedLegend().includes(legendTitle!);\n }\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n function _noLegendHighlighted(): boolean {\n return _getHighlightedLegend().length === 0;\n }\n\n function _getHighlightedLegend() {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n }\n\n function _getAriaLabel(point: VerticalBarChartDataPoint): 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 = 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 function _renderBarLabel(xPoint: number, yPoint: number, barValue: number, legend: string, isNegativeBar: boolean) {\n if (props.hideLabels || _barWidth < 16 || !(_legendHighlighted(legend) || _noLegendHighlighted())) {\n return null;\n }\n\n return (\n <text\n x={xPoint + _barWidth / 2}\n y={isNegativeBar ? yPoint + 12 : yPoint - 6}\n textAnchor=\"middle\"\n className={classes.barLabel}\n aria-hidden={true}\n >\n {typeof props.yAxisTickFormat === 'function'\n ? props.yAxisTickFormat(barValue)\n : formatScientificLimitWidth(barValue)}\n </text>\n );\n }\n\n function _getDomainMargins(containerWidth: number): Margins {\n _domainMargin = MIN_DOMAIN_MARGIN;\n\n const mapX: Record<string, number | string | Date> = {};\n props.data?.forEach(point => {\n if (point.x instanceof Date) {\n mapX[point.x.getTime()] = point.x;\n } else {\n mapX[point.x] = point.x;\n }\n });\n const uniqueX = Object.values(mapX);\n\n /** Total width available to render the bars */\n const totalWidth = calcTotalWidth(containerWidth, margins, MIN_DOMAIN_MARGIN);\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(props.xAxisOuterPadding, 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 _domainMargin = 0;\n } else if (props.barWidth !== 'auto' && props.mode !== 'histogram') {\n // Update the bar width so that when CartesianChart rerenders,\n // the following calculations don't use the previous bar width.\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n /** Total width required to render the bars. Directly proportional to bar width */\n const reqWidth = calcRequiredWidth(_barWidth, uniqueX.length, _xAxisInnerPadding);\n\n if (totalWidth >= reqWidth) {\n // Center align the chart by setting equal left and right margins for domain\n _domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;\n }\n } else if (['plotly', 'histogram'].includes(props.mode!) && uniqueX.length > 1) {\n // Calculate the remaining width after rendering bars at their maximum allowable width\n const bandwidth = calcBandwidth(totalWidth, uniqueX.length, _xAxisInnerPadding);\n const barWidth = getBarWidth(props.barWidth, props.maxBarWidth, bandwidth, props.mode);\n let reqWidth = calcRequiredWidth(barWidth, uniqueX.length, _xAxisInnerPadding);\n const margin1 = (totalWidth - reqWidth) / 2;\n\n let margin2 = Number.POSITIVE_INFINITY;\n // This logic may introduce gaps between histogram bars when the barWidth is restricted.\n // So disable it for histogram mode.\n if (props.mode !== 'histogram') {\n // Calculate the remaining width after accounting for the space required to render x-axis labels\n const step = calculateLongestLabelWidth(uniqueX as string[]) + 20;\n reqWidth = (uniqueX.length - _xAxisInnerPadding) * step;\n margin2 = (totalWidth - reqWidth) / 2;\n }\n\n _domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));\n }\n } else {\n if (props.mode === 'histogram') {\n // Try center-aligning the bars to eliminate any gaps caused by a restricted barWidth.\n // This only works if the bin centers are consistent across all legend groups; otherwise,\n // the calculated domainMargin may be too small.\n const barWidth = props.maxBarWidth!;\n const reqWidth = calcRequiredWidth(barWidth, uniqueX.length, _xAxisInnerPadding);\n _domainMargin += Math.max(0, (totalWidth - reqWidth) / 2);\n }\n\n // The histogram may appear distorted when bin centers/sizes vary across different legend groups.\n // Currently, we calculate the appropriate bar width using the closest unique x-values to make\n // the bars of the same legend group adjacent. But these x-values can come from different legend groups\n // and result in misleading visuals. Even if we compute bar widths separately within each group,\n // we still lack support for rendering bars with different widths and must use the minimum width,\n // which can cause the same issue.\n // Solution: Instead of estimating the appropriate bar width, render each bar to span the full range\n // of its corresponding bin explicitly.\n _barWidth = getBarWidth(\n props.barWidth,\n props.maxBarWidth,\n calculateAppropriateBarWidth(\n uniqueX as number[] | Date[],\n calcTotalWidth(containerWidth, margins, _domainMargin),\n _xAxisInnerPadding,\n ),\n props.mode,\n );\n _domainMargin += _barWidth / 2;\n _domainMargin += _barWidth / 2;\n }\n\n return {\n ...margins,\n left: margins.left! + _domainMargin,\n right: margins.right! + _domainMargin,\n };\n }\n\n function _isChartEmpty(): boolean {\n return _points.length === 0 || (_points.every(point => point.y === 0) && !_isHavingLine);\n }\n\n function _getOrderedXAxisLabels() {\n if (_xAxisType !== XAxisTypes.StringAxis) {\n return [];\n }\n\n return sortAxisCategories(_mapCategoryToValues(), props.xAxisCategoryOrder);\n }\n\n function _mapCategoryToValues() {\n const categoryToValues: Record<string, number[]> = {};\n _points.forEach(point => {\n const xValue = point.x as string;\n if (!categoryToValues[xValue]) {\n categoryToValues[xValue] = [];\n }\n categoryToValues[xValue].push(point.y);\n if (point.lineData) {\n categoryToValues[xValue].push(point.lineData.y);\n }\n });\n return categoryToValues;\n }\n\n function updatePosition(newX: number, newY: number) {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n // Calculate the distance moved\n const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));\n // Update the position only if the distance moved is greater than the threshold\n if (distance > threshold) {\n setClickPosition({ x: newX, y: newY });\n setPopoverOpen(true);\n }\n }\n\n _adjustProps();\n _xAxisLabels = _getOrderedXAxisLabels();\n _yMax = Math.max(d3Max(_points, (point: VerticalBarChartDataPoint) => point.y)!, props.yMaxValue || 0);\n _yMin = Math.min(d3Min(_points, (point: VerticalBarChartDataPoint) => point.y)!, props.yMinValue || 0);\n const legendBars: JSXElement = _getLegendData(_points);\n const calloutProps = {\n ...(_isHavingLine && {\n YValueHover: hoveredYValues,\n hoverXValue: hoverXValue,\n }),\n color: color,\n legend: calloutLegend,\n XValue: xCalloutValue,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData),\n clickPosition: clickPosition,\n isPopoverOpen: isPopoverOpen,\n isCalloutForStack: _isHavingLine && (_noLegendHighlighted() || _getHighlightedLegend().length > 1),\n culture: props.culture ?? 'en-us',\n isCartesian: true,\n customCallout: {\n customizedCallout: _getCustomizedCallout() != null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n };\n\n const tickParams = {\n tickValues: props.tickValues,\n tickFormat: props.tickFormat,\n };\n return !_isChartEmpty() ? (\n <CartesianChart\n {...props}\n points={_points}\n chartType={ChartTypes.VerticalBarChart}\n xAxisType={_xAxisType!}\n createYAxis={createNumericYAxis}\n calloutProps={calloutProps}\n tickParams={tickParams}\n {...(_isHavingLine && _noLegendHighlighted() && { isCalloutForStack: true })}\n legendBars={legendBars}\n datasetForXAxisDomain={_xAxisLabels}\n barwidth={_barWidth}\n createStringYAxis={createStringYAxis}\n getmargins={_getMargins}\n getMinMaxOfYAxis={findVerticalNumericMinMaxOfY}\n getGraphData={_getGraphData}\n getDomainNRangeValues={_getDomainNRangeValues}\n getAxisData={_getAxisData}\n onChartMouseLeave={_handleChartMouseLeave}\n getDomainMargins={_getDomainMargins}\n {...(_xAxisType! === XAxisTypes.StringAxis && {\n xAxisInnerPadding: _xAxisInnerPadding,\n xAxisOuterPadding: _xAxisOuterPadding,\n })}\n componentRef={cartesianChartRef}\n showRoundOffXTickValues={\n !isScalePaddingDefined(props.xAxisInnerPadding, props.xAxisPadding) && props.mode !== 'histogram'\n }\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: ChildProps) => {\n return (\n <>\n <g>{_bars}</g>\n {_isHavingLine && (\n <g>\n {_createLine(\n props.xScale!,\n props.yScalePrimary!,\n props.containerHeight,\n props.containerWidth,\n props.yScaleSecondary,\n )}\n </g>\n )}\n </>\n );\n }}\n />\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n});\nVerticalBarChart.displayName = 'VerticalBarChart';\n"],"names":["React","useVerticalBarChartStyles","max","d3Max","min","d3Min","line","d3Line","select","d3Select","scaleLinear","d3ScaleLinear","scaleBand","d3ScaleBand","scaleUtc","d3ScaleUtc","useId","tokens","CartesianChart","Legends","ChartPopover","ChartTypes","getAccessibleDataObject","XAxisTypes","getTypeOfAxis","tooltipOfAxislabels","formatScientificLimitWidth","getBarWidth","getScalePadding","isScalePaddingDefined","calculateAppropriateBarWidth","useRtl","areArraysEqual","calculateLongestLabelWidth","findVerticalNumericMinMaxOfY","createNumericYAxis","domainRangeOfVerticalNumeric","domainRangeOfDateForAreaLineVerticalBarChart","domainRangeOfXStringAxis","createStringYAxis","calcTotalWidth","calcBandwidth","calcRequiredWidth","sortAxisCategories","toImage","CircleVisbility","MIN_DOMAIN_MARGIN","VerticalBarChart","forwardRef","props","xAxisCategoryOrder","forwardedRef","_points","_barWidth","_colors","_refArray","margins","_useRtl","_bars","_xAxisLabels","_yMax","_yMin","_isHavingLine","_checkForLine","_tooltipId","_xAxisType","_calloutAnchorPoint","_domainMargin","_emptyChartId","_vbcLineId","_vbcPointId","_vbcBarId","_xAxisInnerPadding","_xAxisOuterPadding","cartesianChartRef","useRef","_legendsRef","color","setColor","useState","dataForHoverCard","setDataForHoverCard","activeLegend","setActiveLegend","undefined","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","activeXdataPoint","setActiveXDatapoint","hoveredYValues","setYValueHover","hoverXValue","setHoverXValue","calloutLegend","setCalloutLegend","callOutAccessibilityData","setCalloutAccessibilityData","dataPointCalloutProps","setDataPointCalloutProps","clickPosition","setClickPosition","x","y","isPopoverOpen","setPopoverOpen","selectedLegends","setSelectedLegends","legendProps","prevPropsRef","useImperativeHandle","componentRef","chartContainer","current","opts","toSVG","useEffect","prevProps","height","width","_adjustProps","_getDomainNRangeValues","points","chartType","isRTL","xAxisType","barWidth","tickValues","shiftX","domainNRangeValue","NumericAxis","DateAxis","_createLine","xScale","yScalePrimary","containerHeight","containerWidth","yScaleSecondary","isStringAxis","StringAxis","colorScale","_createColors","data","lineLegendColor","colorPaletteYellowBackground1","lineLegendText","lineData","forEach","item","index","push","useSecondaryYScale","point","linePath","d","bandwidth","shouldHighlight","_legendHighlighted","_noLegendHighlighted","lineBorderWidth","lineOptions","Number","parseFloat","toString","path","key","id","opacity","fill","strokeLinecap","strokeWidth","className","classes","lineBorder","stroke","dots","map","circleRef","refElement","circle","cx","cy","onMouseOver","event","_lineHover","_onBarHover","onMouseOut","_onBarLeave","r","_getCircleVisibilityAndRadius","radius","colorNeutralBackground1","visibility","onClick","data-is-focusable","ref","e","onFocus","_lineFocus","onBlur","_handleChartMouseLeave","tabIndex","xAxisPoint","legend","some","length","maxBarWidth","mode","defaultColors","colorPaletteBlueForeground2","colorPaletteCornflowerForeground2","colorPaletteDarkGreenForeground2","colorPaletteNavyForeground2","colorPaletteDarkOrangeForeground2","colors","xAxisInnerPadding","xAxisPadding","xAxisOuterPadding","_getMargins","_margins","_renderContentForBothLineAndBars","YValueHover","_getCalloutContentForLineAndBar","content","culture","XValue","YValue","isCalloutForStack","_renderContentForOnlyBars","_props","xAxisCalloutData","yAxisCalloutData","useSingleColor","_renderCallout","_getCustomizedCallout","onRenderCalloutPerDataPoint","_getGraphData","yScale","xElement","_createNumericBars","_createDateBars","_createStringBars","increment","_p","colorPaletteBlueBackground2","domainValues","i","domain","range","_refCallback","element","legendTitle","selectedPoint","filter","xDataPoint","includes","Date","toLocaleString","mouseEvent","persist","updatePosition","clientX","clientY","toLocaleDateString","_onBarFocus","refArrayIndexNumber","targetRect","target","getBoundingClientRect","left","top","obj","_lineHoverFocus","_refSelected","_getScales","xBarScale","yBarScale","bottom","xMax","xMin","right","nice","sDate","lDate","paddingInner","paddingOuter","_calculateMinBarHeight","yMin","yMax","yReferencePoint","maxHeightFromBaseline","Math","abs","ceil","bars","barHeight","isHeightNegative","minBarHeight","adjustedBarHeight","Fragment","xPoint","yPoint","baselineHeight","g","rect","aria-label","_getAriaLabel","role","onMouseLeave","hideTooltip","rx","roundCorners","_renderBarLabel","showXAxisLablesTooltip","document","getElementById","remove","wrapXAxisLables","xAxisElement","call","tooltipProps","tooltipCls","tooltip","axis","getTime","transform","showTooltip","opacityChangeOnHover","_onLegendHover","_onLegendLeave","_getLegendData","colorPaletteYellowForeground1","actions","mapLegendToColor","_index","Object","entries","title","hoverAction","onMouseOutAction","lineLegend","isLineLegendInBarChart","unshift","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onChange","_onLegendSelectionChange","legendRef","legendsSelected","currentLegend","canSelectMultipleLegends","slice","_getAxisData","yAxisData","yAxisDomainValues","domainValue","yMaxValue","yMinValue","_getHighlightedLegend","xValue","yValue","lineYValue","ariaLabel","barValue","isNegativeBar","hideLabels","text","textAnchor","barLabel","aria-hidden","yAxisTickFormat","_getDomainMargins","mapX","uniqueX","values","totalWidth","reqWidth","margin1","margin2","POSITIVE_INFINITY","step","_isChartEmpty","every","_getOrderedXAxisLabels","_mapCategoryToValues","categoryToValues","newX","newY","threshold","distance","sqrt","pow","legendBars","calloutProps","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","tickFormat","createYAxis","datasetForXAxisDomain","barwidth","getmargins","getMinMaxOfYAxis","getGraphData","getDomainNRangeValues","getAxisData","onChartMouseLeave","getDomainMargins","showRoundOffXTickValues","children","div","style","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qCAAqC;AAC/E,SAASC,OAAOC,KAAK,EAAEC,OAAOC,KAAK,QAAQ,WAAW;AACtD,SAASC,QAAQC,MA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gB1C,WAAWqH,UAAU,IAAI;YAC5C4E,mBAAmBhJ;YACnBkJ,mBAAmBjJ;QACrB,CAAC;QACDuC,cAActC;QACdqV,yBACE,CAAClY,sBAAsBoB,MAAMuK,iBAAiB,EAAEvK,MAAMwK,YAAY,KAAKxK,MAAM+J,IAAI,KAAK;QAExF,oCAAoC,GACpC,kDAAkD;QAClDgN,UAAU,CAAC/W;YACT,qBACE,wDACE,oBAAC+P,WAAGtP,QACHI,+BACC,oBAACkP,WACE3K,YACCpF,MAAMqF,MAAM,EACZrF,MAAMsF,aAAa,EACnBtF,MAAMuF,eAAe,EACrBvF,MAAMwF,cAAc,EACpBxF,MAAMyF,eAAe;QAMjC;uBAGF,oBAACuR;QAAI1P,IAAInG;QAAegP,MAAM;QAAS8G,OAAO;YAAE1P,SAAS;QAAI;QAAG0I,cAAY;;AAEhF,GAAG;AACHnQ,iBAAiBoX,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/VerticalBarChart/VerticalBarChart.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useVerticalBarChartStyles } from './useVerticalBarChartStyles.styles';\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 { useId } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport {\n AccessibilityProps,\n CartesianChart,\n Margins,\n Legend,\n RefArrayData,\n VerticalBarChartProps,\n VerticalBarChartDataPoint,\n Legends,\n ChildProps,\n YValueHover,\n ChartPopover,\n Chart,\n DataPoint,\n ImageExportOptions,\n LegendContainer,\n} from '../../index';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n NumericAxis,\n getTypeOfAxis,\n tooltipOfAxislabels,\n formatScientificLimitWidth,\n getBarWidth,\n getScalePadding,\n isScalePaddingDefined,\n calculateAppropriateBarWidth,\n useRtl,\n areArraysEqual,\n calculateLongestLabelWidth,\n findVerticalNumericMinMaxOfY,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfVerticalNumeric,\n domainRangeOfDateForAreaLineScatterVerticalBarCharts,\n domainRangeOfXStringAxis,\n createStringYAxis,\n calcTotalWidth,\n calcBandwidth,\n calcRequiredWidth,\n sortAxisCategories,\n} from '../../utilities/index';\nimport { toImage } from '../../utilities/image-export-utils';\n\nenum CircleVisbility {\n show = 'visibility',\n hide = 'hidden',\n}\n\nconst MIN_DOMAIN_MARGIN = 8;\n\n// Create a VerticalBarChart variant which uses these default styles and this styled subcomponent.\n/**\n * VerticalBarchart component\n * {@docCategory VerticalBarChart}\n */\nexport const VerticalBarChart: React.FunctionComponent<VerticalBarChartProps> = React.forwardRef<\n HTMLDivElement,\n VerticalBarChartProps\n>((props = { xAxisCategoryOrder: 'default' }, forwardedRef) => {\n let _points: VerticalBarChartDataPoint[] = [];\n let _barWidth: number = 0;\n let _colors: string[];\n const _refArray: RefArrayData[] = [];\n let margins: Margins;\n const _useRtl: boolean = useRtl();\n let _bars: JSXElement[];\n let _xAxisLabels: string[];\n let _yMax: number;\n let _yMin: number;\n let _isHavingLine: boolean = _checkForLine();\n const _tooltipId: string = useId('VCTooltipID_');\n let _xAxisType: XAxisTypes;\n let _calloutAnchorPoint: VerticalBarChartDataPoint | null;\n let _domainMargin: number;\n const _emptyChartId: string = useId('_VBC_empty');\n const _vbcLineId: string = useId('_VBC_line_');\n const _vbcPointId: string = useId('_VBC_point_');\n const _vbcBarId: string = useId('_VBC_bar_');\n let _xAxisInnerPadding: number = 0;\n let _xAxisOuterPadding: number = 0;\n type ColorScale = (_p?: number) => string;\n const cartesianChartRef = React.useRef<Chart>(null);\n const _legendsRef = React.useRef<LegendContainer>(null);\n\n const [color, setColor] = React.useState<string>('');\n const [dataForHoverCard, setDataForHoverCard] = React.useState<number>(0);\n const [activeLegend, setActiveLegend] = React.useState<string | undefined>(undefined);\n const [xCalloutValue, setXCalloutValue] = React.useState<string | undefined>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string | undefined>('');\n const [activeXdataPoint, setActiveXDatapoint] = React.useState<string | number | Date | null>(null);\n const [hoveredYValues, setYValueHover] = React.useState<YValueHover[]>();\n const [hoverXValue, setHoverXValue] = React.useState<string | number | undefined>('');\n const [calloutLegend, setCalloutLegend] = React.useState<string>('');\n const [callOutAccessibilityData, setCalloutAccessibilityData] = React.useState<AccessibilityProps>();\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<VerticalBarChartDataPoint>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const prevPropsRef = React.useRef<VerticalBarChartProps | null>(null);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n toImage: (opts?: ImageExportOptions): Promise<string> => {\n return toImage(cartesianChartRef.current?.chartContainer, _legendsRef.current?.toSVG, _useRtl, opts);\n },\n }),\n [],\n );\n\n React.useEffect(() => {\n if (prevPropsRef.current) {\n const prevProps = prevPropsRef.current;\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, props.legendProps?.selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n if (prevProps.height !== props.height || prevProps.width !== props.width) {\n _adjustProps();\n }\n }\n prevPropsRef.current = props;\n }, [props, prevPropsRef, _adjustProps]);\n\n function _getDomainNRangeValues(\n points: DataPoint[],\n margins: Margins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfVerticalNumeric(points, margins, width, isRTL, barWidth!);\n } else if (xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = domainRangeOfDateForAreaLineScatterVerticalBarCharts(\n points,\n margins,\n width,\n isRTL,\n tickValues! as Date[],\n chartType,\n barWidth,\n );\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);\n }\n return domainNRangeValue;\n }\n\n function _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 yScalePrimary: 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 = _xAxisType === XAxisTypes.StringAxis;\n const colorScale = _createColors();\n const { data, lineLegendColor = tokens.colorPaletteYellowBackground1, lineLegendText } = props;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const lineData: Array<any> = [];\n const line: JSXElement[] = [];\n data &&\n data.forEach((item: VerticalBarChartDataPoint, 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 ? xScale(d.x) + 0.5 * xScale.bandwidth() : xScale(d.x)))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .y((d: any) => (d.useSecondaryYScale && yScaleSecondary ? yScaleSecondary(d.y) : yScalePrimary(d.y)));\n const shouldHighlight = _legendHighlighted(lineLegendText!) || _noLegendHighlighted() ? true : false;\n const lineBorderWidth = props.lineOptions?.lineBorderWidth\n ? Number.parseFloat(props.lineOptions!.lineBorderWidth!.toString())\n : 0;\n\n if (lineBorderWidth > 0) {\n line.push(\n <path\n key={_vbcLineId}\n id={_vbcLineId}\n opacity={shouldHighlight ? 1 : 0.1}\n d={linePath(lineData)!}\n fill=\"transparent\"\n strokeLinecap=\"square\"\n strokeWidth={3 + lineBorderWidth * 2}\n className={classes.lineBorder}\n />,\n );\n }\n line.push(\n <path\n key={_vbcLineId}\n id={_vbcLineId}\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: VerticalBarChartDataPoint;\n index: number;\n },\n index: number,\n ) => {\n // Create an object to store line point ref so that the object can be passed by reference to the focus handler\n const circleRef: { refElement: SVGCircleElement | null } = { refElement: null };\n return (\n <circle\n key={index}\n id={`${_vbcPointId}-${index}`}\n cx={isStringAxis ? xScale(item.x) + 0.5 * xScale.bandwidth() : xScale(item.x)}\n cy={item.useSecondaryYScale && yScaleSecondary ? yScaleSecondary(item.y) : yScalePrimary(item.y)}\n onMouseOver={event =>\n _legendHighlighted(lineLegendText!)\n ? _lineHover(item.point, event)\n : _onBarHover(item.point, colorScale(item.y), event)\n }\n onMouseOut={_onBarLeave}\n r={_getCircleVisibilityAndRadius(item.x, lineLegendText!).radius}\n stroke={lineLegendColor}\n fill={tokens.colorNeutralBackground1}\n strokeWidth={3}\n visibility={_getCircleVisibilityAndRadius(item.x, lineLegendText!).visibility}\n onClick={item.point.lineData?.onClick}\n // When no legend is highlighted: Line points are automatically displayed along with the bars\n // at the same x-axis point in the stack callout. So to prevent an increase in focusable elements\n // and avoid conveying duplicate info, make these line points non-focusable.\n data-is-focusable={_legendHighlighted(lineLegendText!)}\n ref={e => (circleRef.refElement = e)}\n onFocus={event => _lineFocus(event, item.point, circleRef)}\n onBlur={_handleChartMouseLeave}\n tabIndex={_legendHighlighted(lineLegendText!) ? 0 : undefined}\n />\n );\n },\n );\n\n return (\n <>\n {line}\n {dots}\n </>\n );\n }\n\n function _getCircleVisibilityAndRadius(\n xAxisPoint: string | number | Date,\n legend: string,\n ): { visibility: CircleVisbility; radius: number } {\n if (!_noLegendHighlighted()) {\n if (xAxisPoint === activeXdataPoint && _legendHighlighted(legend)) {\n return { visibility: CircleVisbility.show, radius: 8 };\n } else if (_legendHighlighted(legend)) {\n // Don't hide the circle to keep it focusable. For more information,\n // see https://fuzzbomb.github.io/accessibility-demos/visually-hidden-focus-test.html\n return { visibility: CircleVisbility.show, radius: 0.3 };\n } else {\n return { visibility: CircleVisbility.hide, radius: 0 };\n }\n } else {\n return {\n visibility: activeXdataPoint === xAxisPoint ? CircleVisbility.show : CircleVisbility.hide,\n radius: 8,\n };\n }\n }\n\n function _checkForLine(): boolean {\n const { data } = props;\n return data!.some((item: VerticalBarChartDataPoint) => item?.lineData?.y !== undefined);\n }\n\n function _adjustProps(): void {\n _xAxisType =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\n _points = props.data || [];\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, undefined, props.mode);\n const defaultColors: string[] = [\n tokens.colorPaletteBlueForeground2,\n tokens.colorPaletteCornflowerForeground2,\n tokens.colorPaletteDarkGreenForeground2,\n tokens.colorPaletteNavyForeground2,\n tokens.colorPaletteDarkOrangeForeground2,\n ];\n _colors = props.colors || defaultColors;\n _isHavingLine = _checkForLine();\n _xAxisInnerPadding =\n props.mode === 'histogram'\n ? 0\n : getScalePadding(\n props.xAxisInnerPadding,\n props.xAxisPadding,\n _xAxisType === XAxisTypes.StringAxis ? 2 / 3 : 1 / 2,\n );\n _xAxisOuterPadding = getScalePadding(props.xAxisOuterPadding, props.xAxisPadding, 0);\n }\n\n function _getMargins(_margins: Margins) {\n margins = _margins;\n }\n\n function _renderContentForBothLineAndBars(point: VerticalBarChartDataPoint): JSXElement {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);\n const content: JSXElement[] = YValueHover.map((item: YValueHover, index: number) => {\n return (\n <>\n <ChartPopover\n culture={props.culture ?? 'en-us'}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n legend={item.legend!}\n {...(index === 0 && { XValue: `${hoverXValue || item.data}` })}\n YValue={item.data || item.y}\n color={item.color}\n isCalloutForStack={false}\n />\n </>\n );\n });\n return <>{content}</>;\n }\n\n function _renderContentForOnlyBars(_props: VerticalBarChartDataPoint): JSXElement {\n return (\n <>\n <ChartPopover\n XValue={_props.xAxisCalloutData || (_props.x as string)}\n xCalloutValue={xCalloutValue}\n yCalloutValue={yCalloutValue}\n culture={props.culture ?? 'en-us'}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n legend={_props.legend!}\n YValue={_props.yAxisCalloutData || _props.y}\n color={!props.useSingleColor && _props.color ? _props.color : _createColors()(_props.y)}\n isCalloutForStack={false}\n />\n </>\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n function _renderCallout(props?: VerticalBarChartDataPoint): JSXElement | null {\n return props ? (_isHavingLine ? _renderContentForBothLineAndBars(props) : _renderContentForOnlyBars(props)) : null;\n }\n\n function _getCustomizedCallout() {\n return props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps, _renderCallout)\n : null;\n }\n\n function _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 (_bars =\n _xAxisType === XAxisTypes.NumericAxis\n ? _createNumericBars(containerHeight, containerWidth, xElement!)\n : _xAxisType === XAxisTypes.DateAxis\n ? _createDateBars(containerHeight, containerWidth, xElement!)\n : _createStringBars(containerHeight, containerWidth, xElement!));\n }\n\n function _createColors(): D3ScaleLinear<string, string> | ColorScale {\n const increment = _colors.length <= 1 ? 1 : 1 / (_colors.length - 1);\n const { useSingleColor = false } = props;\n if (useSingleColor) {\n return (_p?: number) => {\n const { colors } = props;\n return colors && colors.length > 0 ? colors[0] : tokens.colorPaletteBlueBackground2;\n };\n }\n const domainValues = [];\n for (let i = 0; i < _colors.length; i++) {\n domainValues.push(increment * i * _yMax);\n }\n const colorScale = d3ScaleLinear<string>().domain(domainValues).range(_colors);\n return colorScale;\n }\n\n function _refCallback(element: SVGRectElement, legendTitle: string): void {\n _refArray.push({ index: legendTitle, refElement: element });\n }\n\n function _getCalloutContentForLineAndBar(point: VerticalBarChartDataPoint): {\n YValueHover: YValueHover[];\n hoverXValue: string | number | undefined;\n } {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const YValueHover: YValueHover[] = [];\n const { useSingleColor = false } = props;\n const { data, lineLegendText, lineLegendColor = tokens.colorPaletteYellowBackground1 } = props;\n const selectedPoint = data!.filter((xDataPoint: VerticalBarChartDataPoint) => xDataPoint.x === point.x);\n // Check if the line legend is highlighted or no legend is highlighted\n if (\n _isHavingLine &&\n selectedPoint[0].lineData?.y !== undefined &&\n (_legendHighlighted(lineLegendText) || _noLegendHighlighted())\n ) {\n // Add 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 // Check if the bar legend is highlighted or no legend is highlighted\n if (selectedLegends.includes(selectedPoint[0].legend!) || _noLegendHighlighted()) {\n // Add 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 : _createColors()(selectedPoint[0].y)\n : _createColors()(1),\n data: selectedPoint[0].yAxisCalloutData,\n yAxisCalloutData: selectedPoint[0].yAxisCalloutData,\n });\n }\n // eslint-disable-next-line @typescript-eslint/no-shadow\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 function _onBarHover(\n point: VerticalBarChartDataPoint,\n // eslint-disable-next-line @typescript-eslint/no-shadow\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);\n if (_calloutAnchorPoint !== point) {\n _calloutAnchorPoint = point;\n /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */\n updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(point.legend));\n setDataForHoverCard(point.y);\n setCalloutLegend(point.legend!);\n setColor(point.color || color);\n // To display callout value, if no callout value given, taking given point.x value as a string.\n setXCalloutValue(\n point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()),\n );\n setDataPointCalloutProps(point);\n // Hovering over a bar should highlight corresponding line points only when no legend is selected\n setActiveXDatapoint(_noLegendHighlighted() ? point.x : null);\n setYValueHover(YValueHover);\n setHoverXValue(hoverXValue);\n setCalloutAccessibilityData(point.callOutAccessibilityData);\n }\n }\n\n function _onBarLeave(): void {\n /**/\n }\n\n function _handleChartMouseLeave(): void {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n setActiveXDatapoint(null);\n setYValueHover([]);\n setHoverXValue('');\n }\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n function _onBarFocus(\n event: React.FocusEvent<SVGRectElement, Element>,\n point: VerticalBarChartDataPoint,\n refArrayIndexNumber: number,\n color: string,\n ): void {\n let x = 0;\n let y = 0;\n\n const targetRect = (event.target as SVGRectElement).getBoundingClientRect();\n x = targetRect.left + targetRect.width / 2;\n y = targetRect.top + targetRect.height / 2;\n updatePosition(x, y);\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { YValueHover, hoverXValue } = _getCalloutContentForLineAndBar(point);\n _refArray.forEach((obj: RefArrayData, index: number) => {\n if (obj.index === point.legend! && refArrayIndexNumber === index) {\n /** Show the callout if highlighted bar is hovered and Hide it if unhighlighted bar is hovered */\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(point.legend));\n setDataForHoverCard(point.y);\n setCalloutLegend(point.legend!);\n setColor(point.color || color);\n // To display callout value, if no callout value given, taking given point.x value as a string.\n setXCalloutValue(\n point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()),\n );\n setYCalloutValue(point.yAxisCalloutData!);\n setDataPointCalloutProps(point);\n // Hovering over a bar should highlight corresponding line points only when no legend is selected\n setActiveXDatapoint(point.x);\n setYValueHover(YValueHover);\n setHoverXValue(hoverXValue);\n setCalloutAccessibilityData(point.callOutAccessibilityData);\n }\n });\n }\n\n function _lineHover(point: VerticalBarChartDataPoint, mouseEvent: React.MouseEvent<SVGElement>) {\n mouseEvent.persist();\n _lineHoverFocus(point, mouseEvent);\n }\n\n function _lineFocus(\n event: React.FocusEvent<SVGCircleElement, Element>,\n point: VerticalBarChartDataPoint,\n ref: { refElement: SVGCircleElement | null },\n ) {\n if (ref.refElement) {\n _lineHoverFocus(point, ref.refElement);\n }\n }\n\n function _lineHoverFocus(\n point: VerticalBarChartDataPoint,\n _refSelected: React.MouseEvent<SVGElement> | SVGCircleElement,\n ) {\n const { lineLegendText = '', lineLegendColor = tokens.colorPaletteYellowBackground1 } = props;\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(lineLegendText));\n setCalloutLegend(lineLegendText);\n setDataForHoverCard(point.lineData!.y);\n setColor(lineLegendColor);\n setXCalloutValue(\n point.xAxisCalloutData || (point.x instanceof Date ? point.x.toLocaleDateString() : point.x.toString()),\n );\n setYCalloutValue(point.lineData!.yAxisCalloutData);\n setDataPointCalloutProps(point);\n setActiveXDatapoint(point.x);\n }\n\n function _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([_yMin, _yMax])\n .range([0, containerHeight - margins.bottom! - margins.top!]);\n\n if (_xAxisType === XAxisTypes.NumericAxis) {\n const xMax = d3Max(_points, (point: VerticalBarChartDataPoint) => point.x as number)!;\n const xMin = d3Min(_points, (point: VerticalBarChartDataPoint) => point.x as number)!;\n xBarScale = d3ScaleLinear()\n .domain(_useRtl ? [xMax, xMin] : [xMin, xMax])\n .range([margins.left! + _domainMargin, containerWidth - margins.right! - _domainMargin]);\n if (!isScalePaddingDefined(props.xAxisInnerPadding, props.xAxisPadding) && props.mode !== 'histogram') {\n xBarScale.nice();\n }\n } else if (_xAxisType === XAxisTypes.DateAxis) {\n const sDate = d3Min(_points, (point: VerticalBarChartDataPoint) => point.x as Date)!;\n const lDate = d3Max(_points, (point: VerticalBarChartDataPoint) => point.x as Date)!;\n xBarScale = d3ScaleUtc()\n .domain([sDate, lDate])\n .range(\n _useRtl\n ? [containerWidth - margins.right! - _domainMargin, margins.left! + _domainMargin]\n : [margins.left! + _domainMargin, containerWidth - margins.right! - _domainMargin],\n );\n } else {\n xBarScale = d3ScaleBand()\n .domain(_xAxisLabels)\n .range(\n _useRtl\n ? [containerWidth - margins.right! - _domainMargin, margins.left! + _domainMargin]\n : [margins.left! + _domainMargin, containerWidth - margins.right! - _domainMargin],\n )\n .paddingInner(_xAxisInnerPadding)\n .paddingOuter(_xAxisOuterPadding);\n }\n\n return { xBarScale, yBarScale };\n }\n\n const classes = useVerticalBarChartStyles(props);\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _calculateMinBarHeight(yMin: number, yMax: number, yReferencePoint: number, yBarScale: any): number {\n const maxHeightFromBaseline =\n yMax < 0\n ? Math.abs(yMin - yReferencePoint)\n : Math.max(Math.abs(yMax - yReferencePoint), Math.abs(yMin - yReferencePoint));\n return Math.ceil(yBarScale(maxHeightFromBaseline) / 100.0);\n }\n\n function _createNumericBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSXElement[] {\n const { useSingleColor = false } = props;\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);\n const colorScale = _createColors();\n const yReferencePoint = _yMax < 0 ? _yMax : 0;\n const bars = _points.map((point: VerticalBarChartDataPoint, index: number) => {\n const shouldHighlight = _legendHighlighted(point.legend!) || _noLegendHighlighted() ? true : false;\n\n let barHeight: number = yBarScale(point.y) - yBarScale(yReferencePoint);\n const isHeightNegative = barHeight < 0;\n barHeight = Math.abs(barHeight);\n // Calculate threshold for minimum visible bar height\n const minBarHeight = _calculateMinBarHeight(_yMin, _yMax, yReferencePoint, yBarScale);\n let adjustedBarHeight = barHeight;\n\n if (barHeight === 0) {\n return <React.Fragment key={point.x as string}> </React.Fragment>;\n }\n // Adjust bar height if it's smaller than the threshold\n else if (barHeight <= minBarHeight) {\n adjustedBarHeight = minBarHeight;\n }\n const xPoint = xBarScale(point.x as number) - _barWidth / 2;\n const yPoint =\n containerHeight -\n margins.bottom! -\n (isHeightNegative ? -1 * adjustedBarHeight : adjustedBarHeight) -\n yBarScale(yReferencePoint);\n const baselineHeight = containerHeight - margins.bottom! - yBarScale(yReferencePoint);\n return (\n <g key={`${point.x}_${index}` as string}>\n <rect\n id={`${_vbcBarId}-${index}`}\n x={xPoint}\n y={!isHeightNegative ? yPoint : baselineHeight}\n width={_barWidth}\n height={adjustedBarHeight}\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={event => _onBarHover(point, colorScale(point.y), event)}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n onMouseLeave={_onBarLeave}\n onFocus={event => _onBarFocus(event, point, index, colorScale(point.y))}\n onBlur={_onBarLeave}\n fill={point.color && !useSingleColor ? point.color : colorScale(point.y)}\n tabIndex={!props.hideTooltip && shouldHighlight ? 0 : undefined}\n opacity={shouldHighlight ? 1 : 0.1}\n rx={props.roundCorners ? 3 : 0}\n />\n {_renderBarLabel(xPoint, yPoint, point.y, point.legend!, isHeightNegative)}\n </g>\n );\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return bars;\n }\n\n function _createStringBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSXElement[] {\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);\n const colorScale = _createColors();\n const yReferencePoint = _yMax < 0 ? _yMax : 0;\n const bars = _points.map((point: VerticalBarChartDataPoint, index: number) => {\n const shouldHighlight = _legendHighlighted(point.legend!) || _noLegendHighlighted() ? true : false;\n let barHeight: number = yBarScale(point.y) - yBarScale(yReferencePoint);\n const isHeightNegative = barHeight < 0;\n barHeight = Math.abs(barHeight);\n // Calculate threshold for minimum visible bar height\n const minBarHeight = _calculateMinBarHeight(_yMin, _yMax, yReferencePoint, yBarScale);\n let adjustedBarHeight = barHeight;\n\n if (barHeight === 0) {\n return <React.Fragment key={point.x as string}> </React.Fragment>;\n }\n // Adjust bar height if it's smaller than the threshold\n else if (barHeight <= minBarHeight) {\n adjustedBarHeight = minBarHeight;\n }\n const xPoint = xBarScale(point.x);\n const yPoint =\n containerHeight -\n margins.bottom! -\n (isHeightNegative ? -1 * adjustedBarHeight : adjustedBarHeight) -\n yBarScale(yReferencePoint);\n const baselineHeight = containerHeight - margins.bottom! - yBarScale(yReferencePoint);\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 _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, xBarScale.bandwidth(), props.mode);\n return (\n <g\n key={point.x instanceof Date ? `${point.x.getTime()}_${index}` : `${point.x}_${index}`}\n transform={`translate(${0.5 * (xBarScale.bandwidth() - _barWidth)}, 0)`}\n >\n <rect\n id={`${_vbcBarId}-${index}`}\n x={xPoint}\n y={!isHeightNegative ? yPoint : baselineHeight}\n width={_barWidth}\n height={adjustedBarHeight}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={event => _onBarHover(point, colorScale(point.y), event)}\n onMouseLeave={_onBarLeave}\n onBlur={_onBarLeave}\n onFocus={event => _onBarFocus(event, point, index, colorScale(point.y))}\n fill={point.color ? point.color : colorScale(point.y)}\n tabIndex={!props.hideTooltip && shouldHighlight ? 0 : undefined}\n rx={props.roundCorners ? 3 : 0}\n opacity={shouldHighlight ? 1 : 0.1}\n />\n {_renderBarLabel(xPoint, yPoint, point.y, point.legend!, isHeightNegative)}\n </g>\n );\n });\n\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: xAxisElement,\n showTooltip: props.showXAxisLablesTooltip,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return bars;\n }\n\n function _createDateBars(containerHeight: number, containerWidth: number, xElement: SVGElement): JSXElement[] {\n const { useSingleColor = false } = props;\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);\n const colorScale = _createColors();\n const yReferencePoint = _yMax < 0 ? _yMax : 0;\n const bars = _points.map((point: VerticalBarChartDataPoint, index: number) => {\n const shouldHighlight = _legendHighlighted(point.legend!) || _noLegendHighlighted() ? true : false;\n let barHeight: number = yBarScale(point.y) - yBarScale(yReferencePoint);\n const isHeightNegative = barHeight < 0;\n barHeight = Math.abs(barHeight);\n // Calculate threshold for minimum visible bar height\n const minBarHeight = _calculateMinBarHeight(_yMin, _yMax, yReferencePoint, yBarScale);\n let adjustedBarHeight = barHeight;\n\n if (barHeight === 0) {\n return <React.Fragment key={point.x as string}> </React.Fragment>;\n }\n // Adjust bar height if it's smaller than the threshold\n else if (barHeight <= minBarHeight) {\n adjustedBarHeight = minBarHeight;\n }\n const xPoint = xBarScale(point.x as number) - _barWidth / 2;\n const yPoint =\n containerHeight -\n margins.bottom! -\n (isHeightNegative ? -1 * adjustedBarHeight : adjustedBarHeight) -\n yBarScale(yReferencePoint);\n const baselineHeight = containerHeight - margins.bottom! - yBarScale(yReferencePoint);\n return (\n <g key={point.x instanceof Date ? `${point.x.getTime()}_${index}` : `${point.x}_${index}`}>\n <rect\n id={`${_vbcBarId}-${index}`}\n x={xPoint}\n className={classes.opacityChangeOnHover}\n y={!isHeightNegative ? yPoint : baselineHeight}\n width={_barWidth}\n height={adjustedBarHeight}\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={event => _onBarHover(point, colorScale(point.y), event)}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n onMouseLeave={_onBarLeave}\n onFocus={event => _onBarFocus(event, point, index, colorScale(point.y))}\n onBlur={_onBarLeave}\n fill={point.color && !useSingleColor ? point.color : colorScale(point.y)}\n tabIndex={!props.hideTooltip && shouldHighlight ? 0 : undefined}\n rx={props.roundCorners ? 3 : 0}\n opacity={shouldHighlight ? 1 : 0.1}\n />\n {_renderBarLabel(xPoint, yPoint, point.y, point.legend!, isHeightNegative)}\n </g>\n );\n });\n // Removing un wanted tooltip div from DOM, when prop not provided.\n if (!props.showXAxisLablesTooltip) {\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\n // eslint-disable-next-line no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n const tooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n axis: xAxisElement,\n };\n xAxisElement && tooltipOfAxislabels(tooltipProps);\n }\n return bars;\n }\n\n function _onLegendHover(legendTitle: string): void {\n setActiveLegend(legendTitle);\n }\n\n function _onLegendLeave(): void {\n setActiveLegend(undefined);\n }\n\n function _getLegendData(data: VerticalBarChartDataPoint[]): JSXElement {\n const { useSingleColor } = props;\n const { lineLegendText, lineLegendColor = tokens.colorPaletteYellowForeground1 } = props;\n const actions: Legend[] = [];\n const mapLegendToColor: Record<string, string> = {};\n data.forEach((point: VerticalBarChartDataPoint, _index: number) => {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const color: string = !useSingleColor ? point.color! : _createColors()(1);\n mapLegendToColor[point.legend!] = color;\n });\n Object.entries(mapLegendToColor).forEach(([legendTitle, color]) => {\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: legendTitle,\n color,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(legendTitle);\n },\n onMouseOutAction: () => {\n _onLegendLeave();\n },\n };\n actions.push(legend);\n });\n if (_isHavingLine && lineLegendText && lineLegendColor) {\n const lineLegend: Legend = {\n title: lineLegendText,\n color: lineLegendColor,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(lineLegendText);\n },\n onMouseOutAction: () => {\n _onLegendLeave();\n },\n isLineLegendInBarChart: true,\n };\n actions.unshift(lineLegend);\n }\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n selectedLegends={selectedLegends}\n onChange={_onLegendSelectionChange}\n legendRef={_legendsRef}\n />\n );\n return legends;\n }\n\n function _onLegendSelectionChange(\n legendsSelected: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(legendsSelected);\n } else {\n setSelectedLegends(legendsSelected.slice(-1));\n }\n\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(legendsSelected, event, currentLegend);\n }\n }\n\n function _getAxisData(yAxisData: IAxisData) {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n _yMax = Math.max(domainValue[domainValue.length - 1], props.yMaxValue || 0);\n _yMin = Math.min(domainValue[0], props.yMinValue || 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 function _legendHighlighted(legendTitle: string | undefined): boolean {\n return _getHighlightedLegend().includes(legendTitle!);\n }\n\n /**\n * This function checks if none of the legends is selected or hovered.\n */\n function _noLegendHighlighted(): boolean {\n return _getHighlightedLegend().length === 0;\n }\n\n function _getHighlightedLegend() {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n }\n\n function _getAriaLabel(point: VerticalBarChartDataPoint): 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 = 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 function _renderBarLabel(xPoint: number, yPoint: number, barValue: number, legend: string, isNegativeBar: boolean) {\n if (props.hideLabels || _barWidth < 16 || !(_legendHighlighted(legend) || _noLegendHighlighted())) {\n return null;\n }\n\n return (\n <text\n x={xPoint + _barWidth / 2}\n y={isNegativeBar ? yPoint + 12 : yPoint - 6}\n textAnchor=\"middle\"\n className={classes.barLabel}\n aria-hidden={true}\n >\n {typeof props.yAxisTickFormat === 'function'\n ? props.yAxisTickFormat(barValue)\n : formatScientificLimitWidth(barValue)}\n </text>\n );\n }\n\n function _getDomainMargins(containerWidth: number): Margins {\n _domainMargin = MIN_DOMAIN_MARGIN;\n\n const mapX: Record<string, number | string | Date> = {};\n props.data?.forEach(point => {\n if (point.x instanceof Date) {\n mapX[point.x.getTime()] = point.x;\n } else {\n mapX[point.x] = point.x;\n }\n });\n const uniqueX = Object.values(mapX);\n\n /** Total width available to render the bars */\n const totalWidth = calcTotalWidth(containerWidth, margins, MIN_DOMAIN_MARGIN);\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(props.xAxisOuterPadding, 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 _domainMargin = 0;\n } else if (props.barWidth !== 'auto' && props.mode !== 'histogram') {\n // Update the bar width so that when CartesianChart rerenders,\n // the following calculations don't use the previous bar width.\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n /** Total width required to render the bars. Directly proportional to bar width */\n const reqWidth = calcRequiredWidth(_barWidth, uniqueX.length, _xAxisInnerPadding);\n\n if (totalWidth >= reqWidth) {\n // Center align the chart by setting equal left and right margins for domain\n _domainMargin = MIN_DOMAIN_MARGIN + (totalWidth - reqWidth) / 2;\n }\n } else if (['plotly', 'histogram'].includes(props.mode!) && uniqueX.length > 1) {\n // Calculate the remaining width after rendering bars at their maximum allowable width\n const bandwidth = calcBandwidth(totalWidth, uniqueX.length, _xAxisInnerPadding);\n const barWidth = getBarWidth(props.barWidth, props.maxBarWidth, bandwidth, props.mode);\n let reqWidth = calcRequiredWidth(barWidth, uniqueX.length, _xAxisInnerPadding);\n const margin1 = (totalWidth - reqWidth) / 2;\n\n let margin2 = Number.POSITIVE_INFINITY;\n // This logic may introduce gaps between histogram bars when the barWidth is restricted.\n // So disable it for histogram mode.\n if (props.mode !== 'histogram') {\n // Calculate the remaining width after accounting for the space required to render x-axis labels\n const step = calculateLongestLabelWidth(uniqueX as string[]) + 20;\n reqWidth = (uniqueX.length - _xAxisInnerPadding) * step;\n margin2 = (totalWidth - reqWidth) / 2;\n }\n\n _domainMargin = MIN_DOMAIN_MARGIN + Math.max(0, Math.min(margin1, margin2));\n }\n } else {\n if (props.mode === 'histogram') {\n // Try center-aligning the bars to eliminate any gaps caused by a restricted barWidth.\n // This only works if the bin centers are consistent across all legend groups; otherwise,\n // the calculated domainMargin may be too small.\n const barWidth = props.maxBarWidth!;\n const reqWidth = calcRequiredWidth(barWidth, uniqueX.length, _xAxisInnerPadding);\n _domainMargin += Math.max(0, (totalWidth - reqWidth) / 2);\n }\n\n // The histogram may appear distorted when bin centers/sizes vary across different legend groups.\n // Currently, we calculate the appropriate bar width using the closest unique x-values to make\n // the bars of the same legend group adjacent. But these x-values can come from different legend groups\n // and result in misleading visuals. Even if we compute bar widths separately within each group,\n // we still lack support for rendering bars with different widths and must use the minimum width,\n // which can cause the same issue.\n // Solution: Instead of estimating the appropriate bar width, render each bar to span the full range\n // of its corresponding bin explicitly.\n _barWidth = getBarWidth(\n props.barWidth,\n props.maxBarWidth,\n calculateAppropriateBarWidth(\n uniqueX as number[] | Date[],\n calcTotalWidth(containerWidth, margins, _domainMargin),\n _xAxisInnerPadding,\n ),\n props.mode,\n );\n _domainMargin += _barWidth / 2;\n _domainMargin += _barWidth / 2;\n }\n\n return {\n ...margins,\n left: margins.left! + _domainMargin,\n right: margins.right! + _domainMargin,\n };\n }\n\n function _isChartEmpty(): boolean {\n return _points.length === 0 || (_points.every(point => point.y === 0) && !_isHavingLine);\n }\n\n function _getOrderedXAxisLabels() {\n if (_xAxisType !== XAxisTypes.StringAxis) {\n return [];\n }\n\n return sortAxisCategories(_mapCategoryToValues(), props.xAxisCategoryOrder);\n }\n\n function _mapCategoryToValues() {\n const categoryToValues: Record<string, number[]> = {};\n _points.forEach(point => {\n const xValue = point.x as string;\n if (!categoryToValues[xValue]) {\n categoryToValues[xValue] = [];\n }\n categoryToValues[xValue].push(point.y);\n if (point.lineData) {\n categoryToValues[xValue].push(point.lineData.y);\n }\n });\n return categoryToValues;\n }\n\n function updatePosition(newX: number, newY: number) {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n // Calculate the distance moved\n const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));\n // Update the position only if the distance moved is greater than the threshold\n if (distance > threshold) {\n setClickPosition({ x: newX, y: newY });\n setPopoverOpen(true);\n }\n }\n\n _adjustProps();\n _xAxisLabels = _getOrderedXAxisLabels();\n _yMax = Math.max(d3Max(_points, (point: VerticalBarChartDataPoint) => point.y)!, props.yMaxValue || 0);\n _yMin = Math.min(d3Min(_points, (point: VerticalBarChartDataPoint) => point.y)!, props.yMinValue || 0);\n const legendBars: JSXElement = _getLegendData(_points);\n const calloutProps = {\n ...(_isHavingLine && {\n YValueHover: hoveredYValues,\n hoverXValue: hoverXValue,\n }),\n color: color,\n legend: calloutLegend,\n XValue: xCalloutValue,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData),\n clickPosition: clickPosition,\n isPopoverOpen: isPopoverOpen,\n isCalloutForStack: _isHavingLine && (_noLegendHighlighted() || _getHighlightedLegend().length > 1),\n culture: props.culture ?? 'en-us',\n isCartesian: true,\n customCallout: {\n customizedCallout: _getCustomizedCallout() != null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n };\n\n const tickParams = {\n tickValues: props.tickValues,\n tickFormat: props.tickFormat,\n };\n return !_isChartEmpty() ? (\n <CartesianChart\n {...props}\n points={_points}\n chartType={ChartTypes.VerticalBarChart}\n xAxisType={_xAxisType!}\n createYAxis={createNumericYAxis}\n calloutProps={calloutProps}\n tickParams={tickParams}\n {...(_isHavingLine && _noLegendHighlighted() && { isCalloutForStack: true })}\n legendBars={legendBars}\n datasetForXAxisDomain={_xAxisLabels}\n barwidth={_barWidth}\n createStringYAxis={createStringYAxis}\n getmargins={_getMargins}\n getMinMaxOfYAxis={findVerticalNumericMinMaxOfY}\n getGraphData={_getGraphData}\n getDomainNRangeValues={_getDomainNRangeValues}\n getAxisData={_getAxisData}\n onChartMouseLeave={_handleChartMouseLeave}\n getDomainMargins={_getDomainMargins}\n {...(_xAxisType! === XAxisTypes.StringAxis && {\n xAxisInnerPadding: _xAxisInnerPadding,\n xAxisOuterPadding: _xAxisOuterPadding,\n })}\n componentRef={cartesianChartRef}\n showRoundOffXTickValues={\n !isScalePaddingDefined(props.xAxisInnerPadding, props.xAxisPadding) && props.mode !== 'histogram'\n }\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line react/no-children-prop\n children={(props: ChildProps) => {\n return (\n <>\n <g>{_bars}</g>\n {_isHavingLine && (\n <g>\n {_createLine(\n props.xScale!,\n props.yScalePrimary!,\n props.containerHeight,\n props.containerWidth,\n props.yScaleSecondary,\n )}\n </g>\n )}\n </>\n );\n }}\n />\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n});\nVerticalBarChart.displayName = 'VerticalBarChart';\n"],"names":["React","useVerticalBarChartStyles","max","d3Max","min","d3Min","line","d3Line","select","d3Select","scaleLinear","d3ScaleLinear","scaleBand","d3ScaleBand","scaleUtc","d3ScaleUtc","useId","tokens","CartesianChart","Legends","ChartPopover","ChartTypes","getAccessibleDataObject","XAxisTypes","getTypeOfAxis","tooltipOfAxislabels","formatScientificLimitWidth","getBarWidth","getScalePadding","isScalePaddingDefined","calculateAppropriateBarWidth","useRtl","areArraysEqual","calculateLongestLabelWidth","findVerticalNumericMinMaxOfY","createNumericYAxis","domainRangeOfVerticalNumeric","domainRangeOfDateForAreaLineScatterVerticalBarCharts","domainRangeOfXStringAxis","createStringYAxis","calcTotalWidth","calcBandwidth","calcRequiredWidth","sortAxisCategories","toImage","CircleVisbility","MIN_DOMAIN_MARGIN","VerticalBarChart","forwardRef","props","xAxisCategoryOrder","forwardedRef","_points","_barWidth","_colors","_refArray","margins","_useRtl","_bars","_xAxisLabels","_yMax","_yMin","_isHavingLine","_checkForLine","_tooltipId","_xAxisType","_calloutAnchorPoint","_domainMargin","_emptyChartId","_vbcLineId","_vbcPointId","_vbcBarId","_xAxisInnerPadding","_xAxisOuterPadding","cartesianChartRef","useRef","_legendsRef","color","setColor","useState","dataForHoverCard","setDataForHoverCard","activeLegend","setActiveLegend","undefined","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","activeXdataPoint","setActiveXDatapoint","hoveredYValues","setYValueHover","hoverXValue","setHoverXValue","calloutLegend","setCalloutLegend","callOutAccessibilityData","setCalloutAccessibilityData","dataPointCalloutProps","setDataPointCalloutProps","clickPosition","setClickPosition","x","y","isPopoverOpen","setPopoverOpen","selectedLegends","setSelectedLegends","legendProps","prevPropsRef","useImperativeHandle","componentRef","chartContainer","current","opts","toSVG","useEffect","prevProps","height","width","_adjustProps","_getDomainNRangeValues","points","chartType","isRTL","xAxisType","barWidth","tickValues","shiftX","domainNRangeValue","NumericAxis","DateAxis","_createLine","xScale","yScalePrimary","containerHeight","containerWidth","yScaleSecondary","isStringAxis","StringAxis","colorScale","_createColors","data","lineLegendColor","colorPaletteYellowBackground1","lineLegendText","lineData","forEach","item","index","push","useSecondaryYScale","point","linePath","d","bandwidth","shouldHighlight","_legendHighlighted","_noLegendHighlighted","lineBorderWidth","lineOptions","Number","parseFloat","toString","path","key","id","opacity","fill","strokeLinecap","strokeWidth","className","classes","lineBorder","stroke","dots","map","circleRef","refElement","circle","cx","cy","onMouseOver","event","_lineHover","_onBarHover","onMouseOut","_onBarLeave","r","_getCircleVisibilityAndRadius","radius","colorNeutralBackground1","visibility","onClick","data-is-focusable","ref","e","onFocus","_lineFocus","onBlur","_handleChartMouseLeave","tabIndex","xAxisPoint","legend","some","length","maxBarWidth","mode","defaultColors","colorPaletteBlueForeground2","colorPaletteCornflowerForeground2","colorPaletteDarkGreenForeground2","colorPaletteNavyForeground2","colorPaletteDarkOrangeForeground2","colors","xAxisInnerPadding","xAxisPadding","xAxisOuterPadding","_getMargins","_margins","_renderContentForBothLineAndBars","YValueHover","_getCalloutContentForLineAndBar","content","culture","XValue","YValue","isCalloutForStack","_renderContentForOnlyBars","_props","xAxisCalloutData","yAxisCalloutData","useSingleColor","_renderCallout","_getCustomizedCallout","onRenderCalloutPerDataPoint","_getGraphData","yScale","xElement","_createNumericBars","_createDateBars","_createStringBars","increment","_p","colorPaletteBlueBackground2","domainValues","i","domain","range","_refCallback","element","legendTitle","selectedPoint","filter","xDataPoint","includes","Date","toLocaleString","mouseEvent","persist","updatePosition","clientX","clientY","toLocaleDateString","_onBarFocus","refArrayIndexNumber","targetRect","target","getBoundingClientRect","left","top","obj","_lineHoverFocus","_refSelected","_getScales","xBarScale","yBarScale","bottom","xMax","xMin","right","nice","sDate","lDate","paddingInner","paddingOuter","_calculateMinBarHeight","yMin","yMax","yReferencePoint","maxHeightFromBaseline","Math","abs","ceil","bars","barHeight","isHeightNegative","minBarHeight","adjustedBarHeight","Fragment","xPoint","yPoint","baselineHeight","g","rect","aria-label","_getAriaLabel","role","onMouseLeave","hideTooltip","rx","roundCorners","_renderBarLabel","showXAxisLablesTooltip","document","getElementById","remove","wrapXAxisLables","xAxisElement","call","tooltipProps","tooltipCls","tooltip","axis","getTime","transform","showTooltip","opacityChangeOnHover","_onLegendHover","_onLegendLeave","_getLegendData","colorPaletteYellowForeground1","actions","mapLegendToColor","_index","Object","entries","title","hoverAction","onMouseOutAction","lineLegend","isLineLegendInBarChart","unshift","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onChange","_onLegendSelectionChange","legendRef","legendsSelected","currentLegend","canSelectMultipleLegends","slice","_getAxisData","yAxisData","yAxisDomainValues","domainValue","yMaxValue","yMinValue","_getHighlightedLegend","xValue","yValue","lineYValue","ariaLabel","barValue","isNegativeBar","hideLabels","text","textAnchor","barLabel","aria-hidden","yAxisTickFormat","_getDomainMargins","mapX","uniqueX","values","totalWidth","reqWidth","margin1","margin2","POSITIVE_INFINITY","step","_isChartEmpty","every","_getOrderedXAxisLabels","_mapCategoryToValues","categoryToValues","newX","newY","threshold","distance","sqrt","pow","legendBars","calloutProps","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","tickFormat","createYAxis","datasetForXAxisDomain","barwidth","getmargins","getMinMaxOfYAxis","getGraphData","getDomainNRangeValues","getAxisData","onChartMouseLeave","getDomainMargins","showRoundOffXTickValues","children","div","style","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qCAAqC;AAC/E,SAASC,OAAOC,KAAK,EAAEC,OAAOC,KAAK,QAAQ,WAAW;AACtD,SAASC,QAAQC,MAAM,QAAQ,WAAW;AAC1C,SAASC,UAAUC,QAAQ,QAAQ,eAAe;AAClD,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jJ;QACrB,CAAC;QACDuC,cAActC;QACdqV,yBACE,CAAClY,sBAAsBoB,MAAMuK,iBAAiB,EAAEvK,MAAMwK,YAAY,KAAKxK,MAAM+J,IAAI,KAAK;QAExF,oCAAoC,GACpC,kDAAkD;QAClDgN,UAAU,CAAC/W;YACT,qBACE,wDACE,oBAAC+P,WAAGtP,QACHI,+BACC,oBAACkP,WACE3K,YACCpF,MAAMqF,MAAM,EACZrF,MAAMsF,aAAa,EACnBtF,MAAMuF,eAAe,EACrBvF,MAAMwF,cAAc,EACpBxF,MAAMyF,eAAe;QAMjC;uBAGF,oBAACuR;QAAI1P,IAAInG;QAAegP,MAAM;QAAS8G,OAAO;YAAE1P,SAAS;QAAI;QAAG0I,cAAY;;AAEhF,GAAG;AACHnQ,iBAAiBoX,WAAW,GAAG"}
@@ -1,6 +1,7 @@
1
- import { __styles, mergeClasses, shorthands } from '@griffel/react';
2
- import { tokens, typographyStyles } from '@fluentui/react-theme';
1
+ import { __styles, mergeClasses } from '@griffel/react';
2
+ import { tokens } from '@fluentui/react-theme';
3
3
  import { HighContrastSelector } from '../../utilities/utilities';
4
+ import { getBarLabelStyle, getTooltipStyle } from '../../utilities/index';
4
5
  export const verticalbarchartClassNames = {
5
6
  opacityChangeOnHover: 'fui-vbc__opacityChangeOnHover',
6
7
  tooltip: 'fui-vbc__tooltip',
@@ -36,13 +37,14 @@ const useStyles = /*#__PURE__*/__styles({
36
37
  qhf8xq: "f1euv43f",
37
38
  fsow6f: "f17mccla",
38
39
  Bhzewxz: "fr6rvge",
39
- Bkfmm31: "f5q6cfr",
40
+ De3pzq: "fxugw4r",
40
41
  Beyfa6y: 0,
41
42
  Bbmb7ep: 0,
42
43
  Btl43ni: 0,
43
44
  B7oj6ja: 0,
44
45
  Dimara: "fq9zq91",
45
- Bkecrkj: "f1aehjj5"
46
+ Bkecrkj: "f1aehjj5",
47
+ sj55zd: "f19n0e5"
46
48
  },
47
49
  barLabel: {
48
50
  Bahqtrf: "fk6fouc",
@@ -57,9 +59,9 @@ const useStyles = /*#__PURE__*/__styles({
57
59
  Bpvj6i6: "fdvt8h6"
58
60
  }
59
61
  }, {
60
- d: [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f22iagw{display:flex;}", ".f1vx9l62{flex-direction:column;}", ".f17mpqex{padding-top:var(--spacingHorizontalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".fdvome7{padding-bottom:var(--spacingHorizontalS);}", ".f1euv43f{position:absolute;}", ".f17mccla{text-align:center;}", ".fr6rvge{top:var(--spacingVerticalNone);}", ".f5q6cfr{fill:var(--colorNeutralBackground1);}", [".fq9zq91{border-radius:var(--borderRadiusSmall);}", {
62
+ d: [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f22iagw{display:flex;}", ".f1vx9l62{flex-direction:column;}", ".f17mpqex{padding-top:var(--spacingHorizontalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".fdvome7{padding-bottom:var(--spacingHorizontalS);}", ".f1euv43f{position:absolute;}", ".f17mccla{text-align:center;}", ".fr6rvge{top:var(--spacingVerticalNone);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", [".fq9zq91{border-radius:var(--borderRadiusSmall);}", {
61
63
  p: -1
62
- }], ".f1aehjj5{pointer-events:none;}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fhuob2q{fill:var(--colorNeutralForeground1);}", ".fhv2zbx{forced-color-adjust:auto;}", ".f1yuyku4{stroke:var(--colorNeutralBackground1);}"],
64
+ }], ".f1aehjj5{pointer-events:none;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fhuob2q{fill:var(--colorNeutralForeground1);}", ".fhv2zbx{forced-color-adjust:auto;}", ".f1yuyku4{stroke:var(--colorNeutralBackground1);}"],
63
65
  m: [["@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.fdvt8h6{stroke:Canvas;}}", {
64
66
  m: "screen and (-ms-high-contrast: active), screen and (forced-colors: active)"
65
67
  }]]
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","HighContrastSelector","verticalbarchartClassNames","opacityChangeOnHover","tooltip","barLabel","lineBorder","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","Bkfmm31","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","Bvjb7m6","ojy3ng","Bpvj6i6","d","p","m","useVerticalBarChartStyles","props","baseStyles"],"sources":["useVerticalBarChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/utilities';\nexport const verticalbarchartClassNames = {\n opacityChangeOnHover: 'fui-vbc__opacityChangeOnHover',\n tooltip: 'fui-vbc__tooltip',\n barLabel: 'fui-vbc__barLabel',\n lineBorder: 'fui-vbc_lineBorder',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: ''\n};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {},\n tooltip: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.padding(tokens.spacingHorizontalS),\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n fill: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none'\n },\n barLabel: {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n },\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas'\n }\n }\n});\n/**\n * Apply styling to the Carousel slots based on the state\n */ export const useVerticalBarChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n opacityChangeOnHover: mergeClasses(verticalbarchartClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/ ),\n tooltip: mergeClasses(verticalbarchartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ ),\n barLabel: mergeClasses(verticalbarchartClassNames.barLabel, baseStyles.barLabel /*props.styles?.barLabel*/ ),\n lineBorder: mergeClasses(verticalbarchartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/ )\n };\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,OAAO,MAAMC,0BAA0B,GAAG;EACtCC,oBAAoB,EAAE,+BAA+B;EACrDC,OAAO,EAAE,kBAAkB;EAC3BC,QAAQ,EAAE,mBAAmB;EAC7BC,UAAU,EAAE,oBAAoB;EAChCC,IAAI,EAAE,EAAE;EACRC,KAAK,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A0B,CAACG,QAAQ,EAAE4C,UAAU,CAAC5C,QAAQ,CAAC,0BAA2B,CAAC;IAC5GC,UAAU,EAAET,YAAY,CAACK,0BAA0B,CAACI,UAAU,EAAE2C,UAAU,CAAC3C,UAAU,CAAC,4BAA6B;EACvH,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__styles","mergeClasses","tokens","HighContrastSelector","getBarLabelStyle","getTooltipStyle","verticalbarchartClassNames","opacityChangeOnHover","tooltip","barLabel","lineBorder","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","De3pzq","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","sj55zd","Bkfmm31","Bvjb7m6","ojy3ng","Bpvj6i6","d","p","m","useVerticalBarChartStyles","props","baseStyles"],"sources":["useVerticalBarChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/utilities';\nimport { getBarLabelStyle, getTooltipStyle } from '../../utilities/index';\nexport const verticalbarchartClassNames = {\n opacityChangeOnHover: 'fui-vbc__opacityChangeOnHover',\n tooltip: 'fui-vbc__tooltip',\n barLabel: 'fui-vbc__barLabel',\n lineBorder: 'fui-vbc_lineBorder',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: ''\n};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {},\n tooltip: getTooltipStyle(),\n barLabel: getBarLabelStyle(),\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas'\n }\n }\n});\n/**\n * Apply styling to the Carousel slots based on the state\n */ export const useVerticalBarChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n opacityChangeOnHover: mergeClasses(verticalbarchartClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/ ),\n tooltip: mergeClasses(verticalbarchartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ ),\n barLabel: mergeClasses(verticalbarchartClassNames.barLabel, baseStyles.barLabel /*props.styles?.barLabel*/ ),\n lineBorder: mergeClasses(verticalbarchartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/ )\n };\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,gBAAgB,EAAEC,eAAe,QAAQ,uBAAuB;AACzE,OAAO,MAAMC,0BAA0B,GAAG;EACtCC,oBAAoB,EAAE,+BAA+B;EACrDC,OAAO,EAAE,kBAAkB;EAC3BC,QAAQ,EAAE,mBAAmB;EAC7BC,UAAU,EAAE,oBAAoB;EAChCC,IAAI,EAAE,EAAE;EACRC,KAAK,EAAE,EAAE;EACTC,KAAK,EAAE,EAAE;EACTC,eAAe,EAAE,EAAE;EACnBC,KAAK,EAAE,EAAE;EACTC,kBAAkB,EAAE,EAAE;EACtBC,SAAS,EAAE,EAAE;EACbC,UAAU,EAAE,EAAE;EACdC,WAAW,EAAE,EAAE;EACfC,YAAY,EAAE,EAAE;EAChBC,UAAU,EAAE,EAAE;EACdC,KAAK,EAAE,EAAE;EACTC,cAAc,EAAE;AACpB,CAAC;AACD,MAAMC,SAAS,gBAAGxB,QAAA;EAAAO,oBAAA;EAAAC,OAAA;IAAAiB,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAApC,QAAA;IAAAgB,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAkB,OAAA;IAAAC,OAAA;EAAA;EAAArC,UAAA;IAAAsC,MAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;IAAAC,CAAA;EAAA;EAAAC,CAAA;IAAAA,CAAA;EAAA;AAAA,CAUjB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,yBAAyB,GAAIC,KAAK,IAAG;EAClD,MAAMC,UAAU,GAAG/B,SAAS,CAAC,CAAC;EAC9B,OAAO;IACHjB,oBAAoB,EAAEN,YAAY,CAACK,0BAA0B,CAACC,oBAAoB,EAAEgD,UAAU,CAAChD,oBAAoB,CAAC,sCAAuC,CAAC;IAC5JC,OAAO,EAAEP,YAAY,CAACK,0BAA0B,CAACE,OAAO,EAAE+C,UAAU,CAAC/C,OAAO,CAAC,yBAA0B,CAAC;IACxGC,QAAQ,EAAER,YAAY,CAACK,0BAA0B,CAACG,QAAQ,EAAE8C,UAAU,CAAC9C,QAAQ,CAAC,0BAA2B,CAAC;IAC5GC,UAAU,EAAET,YAAY,CAACK,0BAA0B,CAACI,UAAU,EAAE6C,UAAU,CAAC7C,UAAU,CAAC,4BAA6B;EACvH,CAAC;AACL,CAAC","ignoreList":[]}
@@ -1,6 +1,7 @@
1
- import { makeStyles, mergeClasses, shorthands } from '@griffel/react';
2
- import { tokens, typographyStyles } from '@fluentui/react-theme';
1
+ import { makeStyles, mergeClasses } from '@griffel/react';
2
+ import { tokens } from '@fluentui/react-theme';
3
3
  import { HighContrastSelector } from '../../utilities/utilities';
4
+ import { getBarLabelStyle, getTooltipStyle } from '../../utilities/index';
4
5
  export const verticalbarchartClassNames = {
5
6
  opacityChangeOnHover: 'fui-vbc__opacityChangeOnHover',
6
7
  tooltip: 'fui-vbc__tooltip',
@@ -22,23 +23,8 @@ export const verticalbarchartClassNames = {
22
23
  };
23
24
  const useStyles = makeStyles({
24
25
  opacityChangeOnHover: {},
25
- tooltip: {
26
- ...typographyStyles.body1,
27
- display: 'flex',
28
- flexDirection: 'column',
29
- ...shorthands.padding(tokens.spacingHorizontalS),
30
- position: 'absolute',
31
- textAlign: 'center',
32
- top: tokens.spacingVerticalNone,
33
- fill: tokens.colorNeutralBackground1,
34
- borderRadius: tokens.borderRadiusSmall,
35
- pointerEvents: 'none'
36
- },
37
- barLabel: {
38
- ...typographyStyles.caption1Strong,
39
- fill: tokens.colorNeutralForeground1,
40
- forcedColorAdjust: 'auto'
41
- },
26
+ tooltip: getTooltipStyle(),
27
+ barLabel: getBarLabelStyle(),
42
28
  lineBorder: {
43
29
  stroke: tokens.colorNeutralBackground1,
44
30
  [HighContrastSelector]: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/VerticalBarChart/useVerticalBarChartStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { VerticalBarChartProps, VerticalBarChartStyles } from '../../index';\nimport { SlotClassNames } from '@fluentui/react-utilities/src/index';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/utilities';\n\nexport const verticalbarchartClassNames: SlotClassNames<VerticalBarChartStyles> = {\n opacityChangeOnHover: 'fui-vbc__opacityChangeOnHover',\n tooltip: 'fui-vbc__tooltip',\n barLabel: 'fui-vbc__barLabel',\n lineBorder: 'fui-vbc_lineBorder',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {},\n tooltip: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.padding(tokens.spacingHorizontalS),\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n fill: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none',\n },\n barLabel: {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto',\n },\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas',\n },\n },\n});\n\n/**\n * Apply styling to the Carousel slots based on the state\n */\nexport const useVerticalBarChartStyles = (props: VerticalBarChartProps): VerticalBarChartStyles => {\n const baseStyles = useStyles();\n\n return {\n opacityChangeOnHover: mergeClasses(\n verticalbarchartClassNames.opacityChangeOnHover,\n baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/,\n ),\n tooltip: mergeClasses(verticalbarchartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/),\n barLabel: mergeClasses(verticalbarchartClassNames.barLabel, baseStyles.barLabel /*props.styles?.barLabel*/),\n lineBorder: mergeClasses(verticalbarchartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/),\n };\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","typographyStyles","HighContrastSelector","verticalbarchartClassNames","opacityChangeOnHover","tooltip","barLabel","lineBorder","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","body1","display","flexDirection","padding","spacingHorizontalS","position","textAlign","top","spacingVerticalNone","fill","colorNeutralBackground1","borderRadius","borderRadiusSmall","pointerEvents","caption1Strong","colorNeutralForeground1","forcedColorAdjust","stroke","useVerticalBarChartStyles","props","baseStyles"],"mappings":"AAAA,SAASA,UAAU,EAAEC,Y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K,2BAA2BI,UAAU,EAAEmC,WAAWnC,UAAU,CAAC,0BAA0B;IAClH;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/VerticalBarChart/useVerticalBarChartStyles.styles.ts"],"sourcesContent":["import { GriffelStyle, makeStyles, mergeClasses } from '@griffel/react';\nimport { VerticalBarChartProps, VerticalBarChartStyles } from '../../index';\nimport { SlotClassNames } from '@fluentui/react-utilities/src/index';\nimport { tokens } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/utilities';\nimport { getBarLabelStyle, getTooltipStyle } from '../../utilities/index';\n\nexport const verticalbarchartClassNames: SlotClassNames<VerticalBarChartStyles> = {\n opacityChangeOnHover: 'fui-vbc__opacityChangeOnHover',\n tooltip: 'fui-vbc__tooltip',\n barLabel: 'fui-vbc__barLabel',\n lineBorder: 'fui-vbc_lineBorder',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {},\n tooltip: getTooltipStyle() as GriffelStyle,\n barLabel: getBarLabelStyle() as GriffelStyle,\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas',\n },\n },\n});\n\n/**\n * Apply styling to the Carousel slots based on the state\n */\nexport const useVerticalBarChartStyles = (props: VerticalBarChartProps): VerticalBarChartStyles => {\n const baseStyles = useStyles();\n\n return {\n opacityChangeOnHover: mergeClasses(\n verticalbarchartClassNames.opacityChangeOnHover,\n baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/,\n ),\n tooltip: mergeClasses(verticalbarchartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/),\n barLabel: mergeClasses(verticalbarchartClassNames.barLabel, baseStyles.barLabel /*props.styles?.barLabel*/),\n lineBorder: mergeClasses(verticalbarchartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","HighContrastSelector","getBarLabelStyle","getTooltipStyle","verticalbarchartClassNames","opacityChangeOnHover","tooltip","barLabel","lineBorder","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","stroke","colorNeutralBackground1","useVerticalBarChartStyles","props","baseStyles"],"mappings":"AAAA,SAAuBA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAGxE,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,oBAAoB,QAAQ,4BAA4B;AACjE,SAASC,gBAAgB,EAAEC,eAAe,QAAQ,wBAAwB;AAE1E,OAAO,MAAMC,6BAAqE;IAChFC,sBAAsB;IACtBC,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;IACPC,gBAAgB;AAClB,EAAE;AACF,MAAMC,YAAYxB,WAAW;IAC3BO,sBAAsB,CAAC;IACvBC,SAASH;IACTI,UAAUL;IACVM,YAAY;QACVe,QAAQvB,OAAOwB,uBAAuB;QACtC,CAACvB,qBAAqB,EAAE;YACtBsB,QAAQ;QACV;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAME,4BAA4B,CAACC;IACxC,MAAMC,aAAaL;IAEnB,OAAO;QACLjB,sBAAsBN,aACpBK,2BAA2BC,oBAAoB,EAC/CsB,WAAWtB,oBAAoB,CAAC,oCAAoC;QAEtEC,SAASP,aAAaK,2BAA2BE,OAAO,EAAEqB,WAAWrB,OAAO,CAAC,uBAAuB;QACpGC,UAAUR,aAAaK,2BAA2BG,QAAQ,EAAEoB,WAAWpB,QAAQ,CAAC,wBAAwB;QACxGC,YAAYT,aAAaK,2BAA2BI,UAAU,EAAEmB,WAAWnB,UAAU,CAAC,0BAA0B;IAClH;AACF,EAAE"}
@@ -6,7 +6,7 @@ import { scaleLinear as d3ScaleLinear, scaleBand as d3ScaleBand, scaleUtc as d3S
6
6
  import { useId } from '@fluentui/react-utilities';
7
7
  import { tokens } from '@fluentui/react-theme';
8
8
  import { CartesianChart, ChartPopover, Legends } from '../../index';
9
- import { ChartTypes, getAccessibleDataObject, XAxisTypes, getTypeOfAxis, tooltipOfAxislabels, formatScientificLimitWidth, getBarWidth, getScalePadding, isScalePaddingDefined, calculateAppropriateBarWidth, formatDate, areArraysEqual, calculateLongestLabelWidth, useRtl, DataVizPalette, getColorFromToken, findVSBCNumericMinMaxOfY, YAxisType, createNumericYAxis, domainRangeOfDateForAreaLineVerticalBarChart, domainRangeOfVSBCNumeric, domainRangeOfXStringAxis, createStringYAxis, calcTotalWidth, calcBandwidth, calcRequiredWidth, sortAxisCategories } from '../../utilities/index';
9
+ import { ChartTypes, getAccessibleDataObject, XAxisTypes, getTypeOfAxis, tooltipOfAxislabels, formatScientificLimitWidth, getBarWidth, getScalePadding, isScalePaddingDefined, calculateAppropriateBarWidth, formatDate, areArraysEqual, calculateLongestLabelWidth, useRtl, DataVizPalette, getColorFromToken, findVSBCNumericMinMaxOfY, YAxisType, createNumericYAxis, domainRangeOfDateForAreaLineScatterVerticalBarCharts, domainRangeOfVSBCNumeric, domainRangeOfXStringAxis, createStringYAxis, calcTotalWidth, calcBandwidth, calcRequiredWidth, sortAxisCategories } from '../../utilities/index';
10
10
  import { toImage } from '../../utilities/image-export-utils';
11
11
  import { formatDateToLocaleString } from '@fluentui/chart-utilities';
12
12
  const barGapMultiplier = 0.2;
@@ -353,7 +353,7 @@ export const VerticalStackedBarChart = /*#__PURE__*/ React.forwardRef((props = {
353
353
  if (xAxisType === XAxisTypes.NumericAxis) {
354
354
  domainNRangeValue = domainRangeOfVSBCNumeric(points, margins, width, isRTL, barWidth);
355
355
  } else if (xAxisType === XAxisTypes.DateAxis) {
356
- domainNRangeValue = domainRangeOfDateForAreaLineVerticalBarChart(points, margins, width, isRTL, tickValues, chartType, barWidth);
356
+ domainNRangeValue = domainRangeOfDateForAreaLineScatterVerticalBarCharts(points, margins, width, isRTL, tickValues, chartType, barWidth);
357
357
  } else {
358
358
  domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);
359
359
  }