@fluentui/react-charts 9.3.3 → 9.3.5
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.
- package/CHANGELOG.md +45 -7
- package/dist/index.d.ts +6 -2
- package/lib/components/AreaChart/AreaChart.js +188 -36
- package/lib/components/AreaChart/AreaChart.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.js +17 -13
- package/lib/components/ChartTable/ChartTable.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.js +3 -3
- package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +2 -2
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.js +30 -27
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +3 -2
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +2 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +3 -2
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +2 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +3 -6
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +8 -4
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +148 -80
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.js +12 -7
- package/lib/components/DonutChart/DonutChart.js.map +1 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.js +3 -2
- package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +2 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.js +5 -5
- package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +3 -2
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +2 -1
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.js +3 -1
- package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +3 -2
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +2 -1
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js +5 -5
- package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js +3 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +3 -2
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +2 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/Legends/Legends.js +3 -1
- package/lib/components/Legends/Legends.js.map +1 -1
- package/lib/components/Legends/Legends.types.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +5 -4
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js +1 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.js +1 -1
- package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +3 -2
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +2 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +3 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +12 -4
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib/types/DataPoint.js.map +1 -1
- package/lib/utilities/FocusableTooltipText.js +1 -1
- package/lib/utilities/FocusableTooltipText.js.map +1 -1
- package/lib/utilities/SVGTooltipText.js +8 -8
- package/lib/utilities/SVGTooltipText.js.map +1 -1
- package/lib/utilities/utilities.js +63 -18
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.js +188 -36
- package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.js +16 -13
- package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +3 -3
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +2 -2
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +30 -27
- package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +7 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +7 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +3 -6
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +114 -63
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.js +12 -7
- package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +7 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.js +5 -5
- package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +7 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.js +3 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +7 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +5 -5
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +3 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +7 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.js +3 -1
- package/lib-commonjs/components/Legends/Legends.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +5 -4
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +1 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.js +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +7 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +3 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +12 -4
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib-commonjs/types/DataPoint.js.map +1 -1
- package/lib-commonjs/utilities/FocusableTooltipText.js +1 -1
- package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/SVGTooltipText.js +8 -8
- package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +63 -18
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/VerticalBarChart/VerticalBarChart.tsx"],"sourcesContent":["'use client';\n\nimport * 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, forwardedRef) => {\n const props: VerticalBarChartProps = {\n xAxisCategoryOrder: 'default',\n maxBarWidth: 24,\n ..._props,\n };\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}\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}\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 style={{ direction: 'ltr', unicodeBidi: 'isolate' }}\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,\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","forwardedRef","props","xAxisCategoryOrder","maxBarWidth","_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","mode","defaultColors","colorPaletteBlueForeground2","colorPaletteCornflowerForeground2","colorPaletteDarkGreenForeground2","colorPaletteNavyForeground2","colorPaletteDarkOrangeForeground2","colors","xAxisInnerPadding","xAxisPadding","xAxisOuterPadding","_getMargins","_margins","_renderContentForBothLineAndBars","YValueHover","_getCalloutContentForLineAndBar","content","culture","XValue","YValue","isCalloutForStack","_renderContentForOnlyBars","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","style","direction","unicodeBidi","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","displayName"],"mappings":"AAAA;;;;;+BA2Ea+C;;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,MAAMwF,cAAc,EACpBxF,MAAMyF,eAAe;QAMjC;uBAGF,OAAA,aAAA,CAACwR,OAAAA;QAAI3P,IAAInG;QAAe8O,MAAM;QAASkE,OAAO;YAAE5M,SAAS;QAAI;QAAGwI,cAAY;;AAEhF,GAAG;AACHnQ,iBAAiBsX,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../src/components/VerticalBarChart/VerticalBarChart.tsx"],"sourcesContent":["'use client';\n\nimport * 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, forwardedRef) => {\n const props: VerticalBarChartProps = {\n xAxisCategoryOrder: 'default',\n maxBarWidth: 24,\n ..._props,\n };\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 => {\n circleRef.refElement = e;\n }}\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}\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}\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 style={{ direction: 'ltr', unicodeBidi: 'isolate' }}\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,\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","forwardedRef","props","xAxisCategoryOrder","maxBarWidth","_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","mode","defaultColors","colorPaletteBlueForeground2","colorPaletteCornflowerForeground2","colorPaletteDarkGreenForeground2","colorPaletteNavyForeground2","colorPaletteDarkOrangeForeground2","colors","xAxisInnerPadding","xAxisPadding","xAxisOuterPadding","_getMargins","_margins","_renderContentForBothLineAndBars","YValueHover","_getCalloutContentForLineAndBar","content","culture","XValue","YValue","isCalloutForStack","_renderContentForOnlyBars","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","style","direction","unicodeBidi","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","displayName"],"mappings":"AAAA;;;;;+BA2Ea+C;;;;;;;iEAzEU,QAAQ;iDACW,qCAAqC;yBACpC,WAAW;yBACvB,WAAW;6BACP,eAAe;yBAM3C,WAAW;gCACI,4BAA4B;4BAE3B,wBAAwB;uBAiBxC,cAAc;wBA4Bd,wBAAwB;kCACP,qCAAqC;AAE7D,IAAKF,kBAAAA,WAAAA,GAAAA,SAAAA,eAAAA;;;WAAAA;EAAAA,mBAAAA,CAAAA;AAKL,MAAMC,oBAAoB;AAOnB,yBAAMC,WAAAA,GAAmE/C,OAAMgD,UAAU,CAG9F,CAACC,QAAQC;QA4C8DC;IA3CvE,MAAMA,QAA+B;QACnCC,oBAAoB;QACpBC,aAAa;QACb,GAAGJ,MAAM;IACX;IACA,IAAIK,UAAuC,EAAE;IAC7C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BiG,0BAA0B;YAAEoE,mBAAmB;QAAK,CAAC;QAC3E0K,YAAYA;QACZU,uBAAuB5V;QACvB6V,UAAUnW;QACVhB,mBAAmBA,yBAAAA;QACnBoX,YAAY/L;QACZgM,kBAAkB1X,oCAAAA;QAClB2X,cAAchL;QACdiL,uBAAuBlS;QACvBmS,aAAa3D;QACb4D,mBAAmBrN;QACnBsN,kBAAkBvC;QACjB,GAAIvT,eAAgB5C,kBAAAA,CAAWuH,UAAU,IAAI;YAC5C2E,mBAAmB/I;YACnBiJ,mBAAmBhJ;QACrB,CAAC;QACDuC,cAActC;QACdsV,yBACE,KAACrY,6BAAAA,EAAsBsB,MAAMsK,iBAAiB,EAAEtK,MAAMuK,YAAY,KAAKvK,MAAM8J,IAAI,KAAK;QAExF,oCAAoC,GACpC,kDAAkD;QAClDkN,UAAU,CAAChX;YACT,OAAA,WAAA,GACE,OAAA,aAAA,CAAA,OAAA,QAAA,EAAA,MAAA,WAAA,GACE,OAAA,aAAA,CAAC6P,KAAAA,MAAGpP,QACHI,iBAAAA,WAAAA,GACC,OAAA,aAAA,CAACgP,KAAAA,MACEzK,YACCpF,MAAMqF,MAAM,EACZrF,MAAMsF,aAAa,EACnBtF,MAAMuF,eAAe,EACrBvF,MAAMwF,cAAc,EACpBxF,MAAMyF,eAAe;QAMjC;uBAGF,OAAA,aAAA,CAACwR,OAAAA;QAAI3P,IAAInG;QAAe8O,MAAM;QAASkE,OAAO;YAAE5M,SAAS;QAAI;QAAGwI,cAAY;;AAEhF,GAAG;AACHnQ,iBAAiBsX,WAAW,GAAG"}
|
|
@@ -482,7 +482,9 @@ const VerticalStackedBarChart = /*#__PURE__*/ _react.forwardRef((_props, forward
|
|
|
482
482
|
// For more information, see https://fuzzbomb.github.io/accessibility-demos/visually-hidden-focus-test.html
|
|
483
483
|
opacity: _getCircleOpacityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).opacity,
|
|
484
484
|
transform: `translate(${xScaleBandwidthTranslate}, ${yScaleBandwidthTranslate})`,
|
|
485
|
-
ref: (e)=>
|
|
485
|
+
ref: (e)=>{
|
|
486
|
+
circleRef.refElement = e;
|
|
487
|
+
},
|
|
486
488
|
...noBarsAndLinesActive ? {
|
|
487
489
|
tabIndex: !props.hideTooltip ? 0 : undefined,
|
|
488
490
|
onFocus: (event)=>_lineFocus(event, circlePoint, circleRef),
|
|
@@ -832,7 +834,9 @@ const VerticalStackedBarChart = /*#__PURE__*/ _react.forwardRef((_props, forward
|
|
|
832
834
|
`,
|
|
833
835
|
fill: startColor,
|
|
834
836
|
rx: props.roundCorners ? 3 : 0,
|
|
835
|
-
ref: (e)=>
|
|
837
|
+
ref: (e)=>{
|
|
838
|
+
ref.refElement = e;
|
|
839
|
+
},
|
|
836
840
|
transform: `translate(${xScaleBandwidthTranslate}, 0)`,
|
|
837
841
|
cursor: props.href ? 'pointer' : 'default',
|
|
838
842
|
...rectFocusProps
|
|
@@ -855,7 +859,9 @@ const VerticalStackedBarChart = /*#__PURE__*/ _react.forwardRef((_props, forward
|
|
|
855
859
|
opacity: shouldHighlight ? 1 : 0.1,
|
|
856
860
|
cursor: props.href ? 'pointer' : 'default',
|
|
857
861
|
rx: props.roundCorners ? 3 : 0,
|
|
858
|
-
ref: (e)=>
|
|
862
|
+
ref: (e)=>{
|
|
863
|
+
ref.refElement = e;
|
|
864
|
+
},
|
|
859
865
|
...rectFocusProps,
|
|
860
866
|
transform: `translate(${xScaleBandwidthTranslate}, 0)`
|
|
861
867
|
}));
|
|
@@ -895,7 +901,9 @@ const VerticalStackedBarChart = /*#__PURE__*/ _react.forwardRef((_props, forward
|
|
|
895
901
|
key: indexNumber + `${shouldFocusWholeStack}`
|
|
896
902
|
}, /*#__PURE__*/ _react.createElement("g", {
|
|
897
903
|
id: `${indexNumber}-singleBar`,
|
|
898
|
-
ref: (e)=>
|
|
904
|
+
ref: (e)=>{
|
|
905
|
+
groupRef.refElement = e;
|
|
906
|
+
},
|
|
899
907
|
...stackFocusProps
|
|
900
908
|
}, singleBar), !props.hideLabels && _barWidth >= 16 && showLabel && /*#__PURE__*/ _react.createElement("text", {
|
|
901
909
|
x: xPoint + _barWidth / 2,
|