@fluentui/react-charts 9.3.6 → 9.3.8
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 +46 -2
- package/dist/index.d.ts +70 -17
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +2 -16
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -1
- package/lib/components/AreaChart/AreaChart.js +3 -43
- package/lib/components/AreaChart/AreaChart.js.map +1 -1
- package/lib/components/AreaChart/useAreaChartStyles.styles.js +1 -2
- package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.js +8 -11
- package/lib/components/ChartTable/ChartTable.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.types.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +107 -67
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +7 -1
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +7 -1
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.js +52 -32
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/CommonComponents/ChartPopover.js +1 -2
- package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +9 -7
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +8 -5
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +0 -2
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +48 -25
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +309 -209
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.js +9 -15
- package/lib/components/DonutChart/DonutChart.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.js +4 -2
- package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.js +8 -13
- package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.js +4 -17
- package/lib/components/GanttChart/GanttChart.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.js +8 -13
- package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +24 -36
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +1 -2
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js +3 -16
- package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +5 -25
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib/components/Legends/Legends.js +3 -4
- package/lib/components/Legends/Legends.js.map +1 -1
- package/lib/components/Legends/Legends.types.js.map +1 -1
- package/lib/components/Legends/OverflowMenu.js.map +1 -1
- package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +68 -75
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/LineChart/LineChart.types.js +1 -1
- package/lib/components/LineChart/LineChart.types.js.map +1 -1
- package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +3 -4
- package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
- package/lib/components/LineChart/useLineChartStyles.styles.js +1 -2
- package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.js +4 -10
- package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +1 -2
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.js +41 -49
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js +1 -2
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib/components/Sparkline/Sparkline.js +11 -7
- package/lib/components/Sparkline/Sparkline.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +15 -92
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +1 -2
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +28 -49
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +1 -2
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib/types/ChartAnnotation.js.map +1 -1
- package/lib/types/DataPoint.js.map +1 -1
- package/lib/utilities/Common.styles.js +0 -1
- package/lib/utilities/Common.styles.js.map +1 -1
- package/lib/utilities/Common.styles.raw.js +0 -1
- package/lib/utilities/Common.styles.raw.js.map +1 -1
- package/lib/utilities/FocusableTooltipText.js +1 -1
- package/lib/utilities/FocusableTooltipText.js.map +1 -1
- package/lib/utilities/getWindow.js +0 -1
- package/lib/utilities/getWindow.js.map +1 -1
- package/lib/utilities/hooks.js +34 -0
- package/lib/utilities/hooks.js.map +1 -0
- package/lib/utilities/image-export-utils.js +118 -78
- package/lib/utilities/image-export-utils.js.map +1 -1
- package/lib/utilities/utilities.js +243 -102
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +2 -16
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -1
- package/lib-commonjs/components/AreaChart/AreaChart.js +2 -41
- package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +0 -2
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.js +9 -11
- package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +107 -67
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +7 -1
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +7 -1
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +51 -31
- 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/ChartPopover.js +1 -2
- package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +7 -6
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +7 -4
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +0 -2
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +48 -25
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +309 -208
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.js +7 -13
- package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.js +4 -2
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.js +7 -12
- package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.js +3 -16
- package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.js +7 -12
- package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +22 -34
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +0 -2
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +2 -15
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +4 -23
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.js +3 -4
- 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/Legends/OverflowMenu.js.map +1 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +67 -74
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.types.js +1 -1
- package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +2 -2
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +0 -2
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.js +4 -10
- package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +0 -2
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +38 -46
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +0 -2
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Sparkline/Sparkline.js +11 -7
- package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +14 -91
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +0 -2
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +26 -47
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +0 -2
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/types/ChartAnnotation.js.map +1 -1
- package/lib-commonjs/types/DataPoint.js.map +1 -1
- package/lib-commonjs/utilities/Common.styles.js +0 -1
- package/lib-commonjs/utilities/Common.styles.js.map +1 -1
- package/lib-commonjs/utilities/Common.styles.raw.js +0 -1
- package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -1
- package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/getWindow.js +0 -1
- package/lib-commonjs/utilities/getWindow.js.map +1 -1
- package/lib-commonjs/utilities/hooks.js +45 -0
- package/lib-commonjs/utilities/hooks.js.map +1 -0
- package/lib-commonjs/utilities/image-export-utils.js +119 -79
- package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +253 -101
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +9 -9
- package/lib/components/DeclarativeChart/imageExporter.js +0 -223
- package/lib/components/DeclarativeChart/imageExporter.js.map +0 -1
- package/lib-commonjs/components/DeclarativeChart/imageExporter.js +0 -233
- package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/VerticalStackedBarChart/VerticalStackedBarChart.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { select as d3Select } from 'd3-selection';\nimport { useVerticalStackedBarChartStyles } from './useVerticalStackedBarChartStyles.styles';\nimport {\n scaleLinear as d3ScaleLinear,\n ScaleLinear as D3ScaleLinear,\n scaleBand as d3ScaleBand,\n scaleUtc as d3ScaleUtc,\n scaleTime as d3ScaleTime,\n ScaleBand,\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 ChildProps,\n VerticalStackedBarDataPoint,\n Margins,\n VerticalStackedBarChartProps,\n VerticalStackedChartProps,\n VSChartDataPoint,\n LineDataInVerticalStackedBarChart,\n ModifiedCartesianChartProps,\n Legend,\n ChartPopover,\n Legends,\n Chart,\n DataPoint,\n ImageExportOptions,\n LegendContainer,\n} from '../../index';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n getTypeOfAxis,\n tooltipOfAxislabels,\n formatScientificLimitWidth,\n getBarWidth,\n getScalePadding,\n isScalePaddingDefined,\n calculateAppropriateBarWidth,\n areArraysEqual,\n calculateLongestLabelWidth,\n useRtl,\n DataVizPalette,\n getColorFromToken,\n findVSBCNumericMinMaxOfY,\n YAxisType,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfDateForAreaLineScatterVerticalBarCharts,\n domainRangeOfVSBCNumeric,\n domainRangeOfXStringAxis,\n createStringYAxis,\n calcTotalWidth,\n calcBandwidth,\n calcRequiredWidth,\n sortAxisCategories,\n} from '../../utilities/index';\nimport { toImage } from '../../utilities/image-export-utils';\nimport { formatDateToLocaleString } from '@fluentui/chart-utilities';\n\ntype NumericScale = D3ScaleLinear<number, number>;\ntype StringScale = ScaleBand<string>;\nconst barGapMultiplier = 0.2;\nconst barGapMin = 1;\nconst MIN_DOMAIN_MARGIN = 8;\n\ninterface RefArrayData {\n refElement?: SVGGElement | null;\n}\n\ntype LinePoint = LineDataInVerticalStackedBarChart & { index: number; xItem: VerticalStackedChartProps };\ntype LineObject = { [key: string]: LinePoint[] };\ntype LineLegends = {\n title: string;\n color: string;\n};\ntype CalloutAnchorPointData = {\n xAxisDataPoint: string;\n chartDataPoint: VSChartDataPoint;\n};\n\nexport const VerticalStackedBarChart: React.FunctionComponent<VerticalStackedBarChartProps> = React.forwardRef<\n HTMLDivElement,\n VerticalStackedBarChartProps\n>((_props, forwardedRef) => {\n const props: VerticalStackedBarChartProps = {\n xAxisCategoryOrder: 'default',\n yAxisCategoryOrder: 'default',\n maxBarWidth: 24,\n ..._props,\n };\n const _isRtl: boolean = useRtl();\n const _createLegendsForLine: (data: VerticalStackedChartProps[]) => LineLegends[] = (\n data: VerticalStackedChartProps[],\n ) => _getLineLegends(data);\n const _tooltipId: string = useId('VSBCTooltipId_');\n const _emptyChartId: string = useId('_VSBC_empty');\n let _points: VerticalStackedChartProps[] = [];\n let _dataset: VerticalStackedBarDataPoint[];\n let _xAxisLabels: string[] = [];\n let _bars: JSXElement[];\n let _xAxisType: XAxisTypes =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data[0]!.xAxisPoint, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\n let _barWidth: number = 0;\n let _colors: string[];\n let _margins: Margins;\n let _lineObject: LineObject;\n let _yMax: number;\n let _yMin: number;\n let _calloutAnchorPoint: CalloutAnchorPointData | null;\n let _domainMargin: number = MIN_DOMAIN_MARGIN;\n let _xAxisInnerPadding: number = 0;\n let _xAxisOuterPadding: number = 0;\n const cartesianChartRef = React.useRef<Chart>(null);\n const Y_ORIGIN: number = 0;\n const _legendsRef = React.useRef<LegendContainer>(null);\n let _yAxisType: YAxisType;\n let _yAxisLabels: string[] = [];\n\n const [selectedLegends, setSelectedLegends] = React.useState(props.legendProps?.selectedLegends || []);\n const [activeLegend, setActiveLegend] = React.useState<string | undefined>(undefined);\n const [dataForHoverCard, setDataForHoverCard] = React.useState(0);\n const [color, setColor] = React.useState('');\n const [hoverXValue, setHoverXValue] = React.useState<string | number>('');\n const [YValueHover, setYValueHover] = React.useState<(LineDataInVerticalStackedBarChart | VSChartDataPoint)[]>([]);\n const [xCalloutValue, setXCalloutValue] = React.useState('');\n const [yCalloutValue, setYCalloutValue] = React.useState('');\n const [activeXAxisDataPoint, setActiveXAxisDataPoint] = React.useState<number | string | Date>('');\n const [calloutLegend, setCalloutLegend] = React.useState('');\n const [stackCalloutProps, setStackCalloutProps] = React.useState<VerticalStackedChartProps>();\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<VSChartDataPoint>();\n const [callOutAccessibilityData, setCallOutAccessibilityData] = React.useState<AccessibilityProps>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n const prevPropsRef = React.useRef<VerticalStackedBarChartProps | null>(null);\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 || prevProps.data !== props.data) {\n _adjustProps();\n _dataset = _createDataSetLayer();\n }\n }\n prevPropsRef.current = props;\n }, [props]);\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, _isRtl, opts);\n },\n }),\n [],\n );\n\n function _getLegendData(data: VerticalStackedChartProps[], lineLegends: LineLegends[]): JSXElement {\n if (props.hideLegend) {\n return <></>;\n }\n const defaultPalette: string[] = [\n getColorFromToken(DataVizPalette.color6),\n getColorFromToken(DataVizPalette.color1),\n getColorFromToken(DataVizPalette.color5),\n getColorFromToken(DataVizPalette.color7),\n getColorFromToken(DataVizPalette.color10),\n ];\n const actions: Legend[] = [];\n const { allowHoverOnLegend = true } = props;\n\n data.forEach((singleChartData: VerticalStackedChartProps) => {\n singleChartData.chartData.forEach((point: VSChartDataPoint) => {\n const color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n const checkSimilarLegends = actions.filter((leg: Legend) => leg.title === point.legend && leg.color === color);\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n\n const legend: Legend = {\n title: point.legend,\n color,\n hoverAction: allowHoverOnLegend\n ? () => {\n _handleChartMouseLeave();\n _onLegendHover(point.legend);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => _onLegendLeave() : undefined,\n };\n\n actions.push(legend);\n });\n });\n const legendsOfLine: Legend[] = [];\n if (lineLegends && lineLegends.length > 0) {\n lineLegends.forEach((point: LineLegends) => {\n const legend: Legend = {\n title: point.title,\n color: point.color,\n isLineLegendInBarChart: true,\n hoverAction: allowHoverOnLegend\n ? () => {\n _handleChartMouseLeave();\n _onLegendHover(point.title);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => _onLegendLeave() : undefined,\n };\n legendsOfLine.push(legend);\n });\n }\n const totalLegends: Legend[] = legendsOfLine.concat(actions);\n return (\n <Legends\n legends={totalLegends}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n onChange={_onLegendSelectionChange}\n legendRef={_legendsRef}\n />\n );\n }\n\n function _getHighlightedLegend() {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n }\n\n function _lineHoverFocus(\n lineData: LinePoint,\n event: React.MouseEvent<SVGElement> | React.FocusEvent<SVGCircleElement, Element>,\n ): void {\n let clientX = 0;\n let clientY = 0;\n if ('clientX' in event) {\n clientX = event.clientX;\n clientY = event.clientY;\n } else {\n const boundingRect = event.target.getBoundingClientRect();\n clientX = boundingRect.left + boundingRect.width / 2;\n clientY = boundingRect.top + boundingRect.height / 2;\n }\n if (_getHighlightedLegend().length === 1) {\n if (_noLegendHighlighted() || _isLegendHighlighted(lineData.legend)) {\n _updatePosition(clientX, clientY);\n setPopoverOpen(true);\n setXCalloutValue(`${lineData.xItem.xAxisPoint}`);\n setYCalloutValue(`${lineData.yAxisCalloutData || lineData.data || lineData.y}`);\n setActiveXAxisDataPoint(lineData.xItem.xAxisPoint);\n setColor(lineData.color);\n }\n } else {\n _onStackHoverFocus(lineData.xItem, event as React.MouseEvent<SVGElement>);\n }\n }\n\n function _onStackHoverFocus(\n stack: VerticalStackedChartProps,\n mouseEvent: React.MouseEvent<SVGElement> | SVGGElement,\n ): void {\n let clientX = 0;\n let clientY = 0;\n if ('clientX' in mouseEvent) {\n clientX = mouseEvent.clientX;\n clientY = mouseEvent.clientY;\n } else {\n // Handle case where mouseEvent is an SVGGElement\n const boundingRect = mouseEvent.getBoundingClientRect();\n clientX = boundingRect.left + boundingRect.width / 2;\n clientY = boundingRect.top + boundingRect.height / 2;\n }\n if (!_noLegendHighlighted()) {\n stack = {\n ...stack,\n chartData: stack.chartData.filter((dataPoint: { legend: any }) => _isLegendHighlighted(dataPoint.legend)),\n lineData: stack.lineData?.filter((dataPoint: { legend: any }) => _isLegendHighlighted(dataPoint.legend)),\n };\n }\n const lineData = stack.lineData;\n const isLinesPresent: boolean = lineData !== undefined && lineData.length > 0;\n if (isLinesPresent) {\n lineData!.forEach((item: LineDataInVerticalStackedBarChart & { shouldDrawBorderBottom?: boolean }) => {\n item.data = item.data || item.y;\n item.shouldDrawBorderBottom = true;\n });\n }\n _updatePosition(clientX, clientY);\n setPopoverOpen(stack.chartData.length > 0 || (stack.lineData?.length ?? 0) > 0);\n setYValueHover(\n isLinesPresent\n ? [...lineData!.sort((a, b) => (a.data! < b.data! ? 1 : -1)), ...stack.chartData.slice().reverse()]\n : stack.chartData.slice().reverse(),\n );\n setHoverXValue(\n stack.xAxisPoint instanceof Date\n ? formatDateToLocaleString(stack.xAxisPoint, props.culture, props.useUTC as boolean)\n : stack.xAxisPoint,\n );\n setStackCalloutProps(stack);\n setActiveXAxisDataPoint(stack.xAxisPoint);\n setCallOutAccessibilityData(stack.stackCallOutAccessibilityData);\n }\n\n function _handleChartMouseLeave(): void {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n setActiveXAxisDataPoint('');\n }\n\n const _onClick = (\n data: VerticalStackedChartProps | VSChartDataPoint,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void => {\n props.onBarClick?.(mouseEvent, data);\n props.href ? (window.location.href = props.href) : '';\n };\n\n function _adjustProps(): void {\n _points = props.data || [];\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n const defaultColors: string[] = [\n getColorFromToken(DataVizPalette.color6),\n getColorFromToken(DataVizPalette.color1),\n getColorFromToken(DataVizPalette.color5),\n getColorFromToken(DataVizPalette.color7),\n getColorFromToken(DataVizPalette.color10),\n ];\n _colors = defaultColors;\n _xAxisType = getTypeOfAxis(props.data[0].xAxisPoint, true) as XAxisTypes;\n _lineObject = _getFormattedLineData(props.data);\n _xAxisInnerPadding = 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 _initYAxisParams();\n }\n\n function _createDataSetLayer(): VerticalStackedBarDataPoint[] {\n const dataset: VerticalStackedBarDataPoint[] = _points.map(singlePointData => {\n if (_yAxisType === YAxisType.StringAxis) {\n return {\n x: singlePointData.xAxisPoint,\n y: 0,\n };\n }\n let total: number = 0;\n singlePointData.chartData!.forEach((point: VSChartDataPoint) => {\n total = total + (point.data as number);\n });\n return {\n x: singlePointData.xAxisPoint,\n y: total,\n };\n });\n _xAxisLabels = _getOrderedXAxisLabels();\n return dataset;\n }\n\n function _onLegendHover(legendTitle: string): void {\n setActiveLegend(legendTitle);\n }\n\n function _onLegendLeave(): void {\n setActiveLegend(undefined);\n }\n\n function _onLegendSelectionChange(\n _selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(_selectedLegends);\n } else {\n setSelectedLegends(_selectedLegends.slice(-1));\n }\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(_selectedLegends, event, currentLegend);\n }\n }\n\n function _getMargins(margins: Margins) {\n _margins = margins;\n }\n\n function _getGraphData(\n xScale: any,\n yScale: NumericScale | StringScale,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) {\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);\n return (_bars = _createBar(\n xBarScale,\n _yAxisType === YAxisType.StringAxis ? yScale : yBarScale,\n containerHeight,\n xElement!,\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 || Y_ORIGIN);\n _yMin = Math.min(domainValue[0], props.yMinValue || Y_ORIGIN);\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 _isLegendHighlighted(legendTitle: string) {\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() {\n return _getHighlightedLegend().length === 0;\n }\n\n function _getAriaLabel(\n singleChartData: VerticalStackedChartProps,\n point?: VSChartDataPoint | LineDataInVerticalStackedBarChart,\n isLinePoint?: boolean,\n ): string {\n if (!point) {\n /** if shouldFocusWholeStack is true */\n const xValue =\n singleChartData.xAxisCalloutData ||\n (singleChartData.xAxisPoint instanceof Date\n ? formatDateToLocaleString(singleChartData.xAxisPoint, props.culture, props.useUTC as boolean)\n : singleChartData.xAxisPoint);\n const pointValues = singleChartData.chartData\n .map(pt => {\n const legend = pt.legend;\n const yValue = pt.yAxisCalloutData || pt.data;\n return _noLegendHighlighted() || _isLegendHighlighted(legend) ? `${legend}, ${yValue}.` : '';\n })\n .filter(str => str !== '')\n .join(' ');\n const lineValues = singleChartData.lineData\n ?.map(ln => {\n const legend = ln.legend;\n const yValue = ln.yAxisCalloutData || ln.data || ln.y;\n return _noLegendHighlighted() || _isLegendHighlighted(legend) ? `${legend}, ${yValue}.` : '';\n })\n .filter(str => str !== '')\n .join(' ');\n return (\n singleChartData.stackCallOutAccessibilityData?.ariaLabel ||\n `${xValue}. ${pointValues}` + (lineValues ? ` ${lineValues}` : '')\n );\n }\n /** if shouldFocusWholeStack is false */\n const xValue =\n singleChartData.xAxisCalloutData ||\n (!isLinePoint && (point as VSChartDataPoint).xAxisCalloutData) ||\n (singleChartData.xAxisPoint instanceof Date\n ? formatDateToLocaleString(singleChartData.xAxisPoint, props.culture, props.useUTC as boolean)\n : singleChartData.xAxisPoint);\n const legend = point.legend;\n const yValue =\n point.yAxisCalloutData ||\n (isLinePoint ? point.data || (point as LineDataInVerticalStackedBarChart).y : point.data);\n return (\n (!isLinePoint && (point as VSChartDataPoint).callOutAccessibilityData?.ariaLabel) ||\n `${xValue}. ${legend}, ${yValue}.`\n );\n }\n\n function _getCustomizedCallout() {\n const _isHavingLines = props.data.some(\n (item: VerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n return props.onRenderCalloutPerStack\n ? props.onRenderCalloutPerStack(stackCalloutProps)\n : props.onRenderCalloutPerDataPoint && !_isHavingLines\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps, _renderCallout)\n : null;\n }\n\n function _toFocusWholeStack(_isHavingLines: boolean): boolean {\n const { isCalloutForStack = false } = props;\n let shouldFocusStackOnly: boolean = false;\n if (_isHavingLines) {\n if (_getHighlightedLegend().length === 1) {\n shouldFocusStackOnly = false;\n } else {\n shouldFocusStackOnly = true;\n }\n } else {\n shouldFocusStackOnly = isCalloutForStack;\n }\n return shouldFocusStackOnly;\n }\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 ) {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfVSBCNumeric(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 _getFormattedLineData(data: VerticalStackedChartProps[]): LineObject {\n const linesData: LinePoint[] = [];\n const formattedLineData: LineObject = {};\n data.forEach((item: VerticalStackedChartProps, index: number) => {\n if (item.lineData) {\n item.lineData.forEach((line: any) => {\n linesData.push({\n ...line,\n index,\n xItem: item,\n });\n });\n }\n });\n linesData.forEach(item => {\n if (formattedLineData[item.legend]) {\n formattedLineData[item.legend].push(item);\n } else {\n formattedLineData[item.legend] = [item];\n }\n });\n return formattedLineData;\n }\n\n function _getLineLegends(data: VerticalStackedChartProps[]): LineLegends[] {\n const lineObject: LineObject = _lineObject;\n const lineLegends: LineLegends[] = [];\n Object.keys(lineObject).forEach((item: string) => {\n lineLegends.push({\n title: item,\n color: lineObject[item][0].color,\n });\n });\n return lineLegends;\n }\n\n function _createLines(\n xScale: any,\n yScalePrimary: NumericScale | StringScale,\n containerHeight: number,\n containerWidth: number,\n yScaleSecondary?: NumericScale,\n ): JSXElement {\n const lineObject: LineObject = _getFormattedLineData(props.data);\n const lines: React.ReactNode[] = [];\n const borderForLines: React.ReactNode[] = [];\n const dots: React.ReactNode[] = [];\n //const { theme } = props;\n const lineBorderWidth = props.lineOptions?.lineBorderWidth\n ? Number.parseFloat(props.lineOptions!.lineBorderWidth!.toString())\n : 0;\n const xScaleBandwidthTranslate = _xAxisType !== XAxisTypes.StringAxis ? 0 : xScale.bandwidth() / 2;\n Object.keys(lineObject).forEach((item: string, index: number) => {\n const shouldHighlight = _isLegendHighlighted(item) || _noLegendHighlighted();\n for (let i = 1; i < lineObject[item].length; i++) {\n const x1 = xScale(lineObject[item][i - 1].xItem.xAxisPoint);\n const useSecondaryYScale =\n lineObject[item][i - 1].useSecondaryYScale && lineObject[item][i].useSecondaryYScale && yScaleSecondary;\n const y1 = useSecondaryYScale\n ? yScaleSecondary!(lineObject[item][i - 1].y as number)\n : //eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScalePrimary(lineObject[item][i - 1].y as any);\n const x2 = xScale(lineObject[item][i].xItem.xAxisPoint);\n const y2 = useSecondaryYScale\n ? yScaleSecondary!(lineObject[item][i].y as number)\n : //eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScalePrimary(lineObject[item][i].y as any);\n const yScaleBandwidthTranslate =\n !useSecondaryYScale && _yAxisType === YAxisType.StringAxis\n ? (yScalePrimary as StringScale).bandwidth() / 2\n : 0;\n if (lineBorderWidth > 0) {\n borderForLines.push(\n <line\n key={`${index}-${i}-BorderLine`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={3 + lineBorderWidth * 2}\n fill=\"transparent\"\n strokeLinecap=\"round\"\n stroke={tokens.colorNeutralBackground1}\n transform={`translate(${xScaleBandwidthTranslate}, ${yScaleBandwidthTranslate})`}\n />,\n );\n }\n lines.push(\n <line\n key={`${index}-${i}-line`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={lineObject[item][0].lineOptions?.strokeWidth ?? 3}\n strokeLinecap={lineObject[item][0].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={lineObject[item][0].lineOptions?.strokeDasharray}\n stroke={lineObject[item][i].color}\n transform={`translate(${xScaleBandwidthTranslate}, ${yScaleBandwidthTranslate})`}\n onMouseOver={event => _lineHover(lineObject[item][i - 1], event)}\n onMouseLeave={_handleMouseOut}\n />,\n );\n }\n });\n Object.keys(lineObject).forEach((item: string, index: number) => {\n lineObject[item].forEach((circlePoint: LinePoint, subIndex: number) => {\n const circleRef: { refElement: SVGCircleElement | null } = { refElement: null };\n const noBarsAndLinesActive =\n circlePoint.xItem.chartData.filter(\n dataPoint => _noLegendHighlighted() || _isLegendHighlighted(dataPoint.legend),\n ).length === 0;\n const yScaleBandwidthTranslate =\n !circlePoint.useSecondaryYScale && _yAxisType === YAxisType.StringAxis\n ? (yScalePrimary as StringScale).bandwidth() / 2\n : 0;\n dots.push(\n <circle\n key={`${index}-${subIndex}-dot`}\n cx={xScale(circlePoint.xItem.xAxisPoint)}\n cy={\n circlePoint.useSecondaryYScale && yScaleSecondary\n ? yScaleSecondary(circlePoint.y as number)\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScalePrimary(circlePoint.y as any)\n }\n onMouseOver={event => _lineHover(circlePoint, event)}\n onMouseLeave={_handleMouseOut}\n r={_getCircleOpacityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).radius}\n stroke={circlePoint.color}\n fill={tokens.colorNeutralBackground1}\n strokeWidth={3}\n // Elements with visibility: hidden cannot receive focus, so use opacity: 0 instead to hide them.\n // For more information, see https://fuzzbomb.github.io/accessibility-demos/visually-hidden-focus-test.html\n opacity={_getCircleOpacityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).opacity}\n transform={`translate(${xScaleBandwidthTranslate}, ${yScaleBandwidthTranslate})`}\n ref={e => {\n circleRef.refElement = e;\n }}\n {...(noBarsAndLinesActive\n ? {\n tabIndex: !props.hideTooltip ? 0 : undefined,\n onFocus: event => _lineFocus(event, circlePoint, circleRef),\n onBlur: _handleMouseOut,\n role: 'img',\n 'aria-label': _getAriaLabel(circlePoint.xItem, circlePoint as VSChartDataPoint),\n }\n : {})}\n />,\n );\n });\n });\n return (\n <>\n {borderForLines}\n {lines}\n {dots}\n </>\n );\n }\n\n function _getCircleOpacityAndRadius(\n xAxisPoint: string | number | Date,\n legend: string,\n ): { opacity: number; radius: number } {\n if (!_noLegendHighlighted()) {\n if (xAxisPoint === activeXAxisDataPoint && _isLegendHighlighted(legend)) {\n return { opacity: 1, radius: 8 };\n } else if (_isLegendHighlighted(legend)) {\n return { opacity: 1, radius: 0.3 };\n } else {\n return { opacity: 0, radius: 0 };\n }\n } else {\n return {\n opacity: activeXAxisDataPoint === xAxisPoint ? 1 : 0,\n radius: 8,\n };\n }\n }\n\n function _renderCallout(props?: VSChartDataPoint): JSXElement | null {\n return props ? (\n <ChartPopover\n culture={props.culture}\n XValue={props.xAxisCalloutData}\n xCalloutValue={xCalloutValue}\n yCalloutValue={yCalloutValue}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n legend={props.legend}\n YValue={props.yAxisCalloutData}\n color={props.color}\n />\n ) : null;\n }\n\n function _onRectHover(\n xAxisPoint: string | number | Date,\n point: VSChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n _onRectFocusHover(xAxisPoint, point, color, mouseEvent);\n }\n\n function _onRectFocusHover(\n xAxisPoint: string | number | Date,\n point: VSChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement> | SVGGElement,\n ) {\n let clientX = 0;\n let clientY = 0;\n if ('clientX' in mouseEvent) {\n clientX = mouseEvent.clientX;\n clientY = mouseEvent.clientY;\n } else {\n // Handle case where mouseEvent is an SVGGElement\n const boundingRect = mouseEvent.getBoundingClientRect();\n clientX = boundingRect.left + boundingRect.width / 2;\n clientY = boundingRect.top + boundingRect.height / 2;\n }\n if (_calloutAnchorPoint?.chartDataPoint !== point || _calloutAnchorPoint?.xAxisDataPoint !== xAxisPoint) {\n _calloutAnchorPoint = {\n chartDataPoint: point,\n xAxisDataPoint:\n xAxisPoint instanceof Date\n ? formatDateToLocaleString(xAxisPoint, props.culture, props.useUTC as boolean)\n : xAxisPoint.toString(),\n };\n const xCalloutValue =\n point.xAxisCalloutData ||\n (xAxisPoint instanceof Date\n ? formatDateToLocaleString(xAxisPoint, props.culture, props.useUTC as boolean)\n : xAxisPoint.toString());\n\n _updatePosition(clientX, clientY);\n setPopoverOpen(_noLegendHighlighted() || _isLegendHighlighted(point.legend));\n setCalloutLegend(point.legend);\n setDataForHoverCard(point.data as number);\n setColor(color);\n setXCalloutValue(xCalloutValue);\n setYCalloutValue(point.yAxisCalloutData!);\n setDataPointCalloutProps(point);\n setCallOutAccessibilityData(point.callOutAccessibilityData);\n }\n }\n\n function _lineHover(lineData: LinePoint, mouseEvent: React.MouseEvent<SVGElement>) {\n mouseEvent.persist();\n _lineHoverFocus(lineData, mouseEvent);\n }\n\n function _lineFocus(\n event: React.FocusEvent<SVGCircleElement, Element>,\n lineData: LinePoint,\n ref: { refElement: SVGCircleElement | null },\n ) {\n if (ref.refElement) {\n _lineHoverFocus(lineData, event);\n }\n }\n\n function _onStackHover(stack: VerticalStackedChartProps, mouseEvent: React.MouseEvent<SVGElement>): void {\n mouseEvent.persist();\n _onStackHoverFocus(stack, mouseEvent);\n }\n\n function _onRectFocus(point: VSChartDataPoint, xAxisPoint: string, color: string, ref: RefArrayData): void {\n if (ref.refElement) {\n _onRectFocusHover(xAxisPoint, point, color, ref.refElement);\n }\n }\n\n function _onStackFocus(stack: VerticalStackedChartProps, groupRef: RefArrayData): void {\n if (groupRef.refElement) {\n _onStackHoverFocus(stack, groupRef.refElement);\n }\n }\n\n function _handleMouseOut(): void {\n /**/\n }\n\n function _getBarGapAndScale(\n bars: VSChartDataPoint[],\n yBarScale: NumericScale | StringScale,\n defaultTotalHeight?: number,\n ): {\n readonly gapHeight: number;\n readonly heightValueScale: number;\n readonly absStackTotal: number;\n } {\n const { barGapMax = 0 } = props;\n let totalData = 0;\n let totalHeight: number;\n let sumOfPercent = 0;\n let scalingRatio: number;\n if (_yAxisType === YAxisType.StringAxis) {\n totalHeight =\n defaultTotalHeight ?? bars.reduce((total, bar) => total + (yBarScale as StringScale)(bar.data as string)!, 0);\n } else {\n // When displaying gaps between the bars, the height of each bar is\n // adjusted so that the total of all bars is not changed by the gaps\n totalData = bars.reduce((iter, value) => iter + Math.abs(value.data as number), 0);\n totalHeight =\n defaultTotalHeight ?? Math.abs((yBarScale as NumericScale)(totalData) - (yBarScale as NumericScale)(Y_ORIGIN));\n bars.forEach(point => {\n let value = (Math.abs(point.data as number) / totalData) * 100;\n if (value < 1 && value !== 0) {\n value = 1;\n }\n sumOfPercent += value;\n });\n scalingRatio = sumOfPercent !== 0 ? sumOfPercent / 100 : 1;\n }\n const gaps = barGapMax && bars.length - 1;\n const gapHeight = gaps && Math.max(barGapMin, Math.min(barGapMax, (totalHeight * barGapMultiplier) / gaps));\n const heightValueScale =\n _yAxisType === YAxisType.StringAxis ? 0 : (totalHeight - gapHeight * gaps) / (totalData * scalingRatio!);\n return {\n gapHeight,\n heightValueScale,\n absStackTotal: totalData,\n } as const;\n }\n\n function _getScales(containerHeight: number, containerWidth: number) {\n const yDomain = [Math.min(Y_ORIGIN, _yMin), Math.max(Y_ORIGIN, _yMax)];\n const yBarScale = d3ScaleLinear()\n .domain(yDomain)\n .range([0, containerHeight - _margins.bottom! - _margins.top!]);\n if (_xAxisType === XAxisTypes.NumericAxis) {\n const xMax = d3Max(_dataset, (point: VerticalStackedBarDataPoint) => point.x as number)!;\n const xMin = d3Min(_dataset, (point: VerticalStackedBarDataPoint) => point.x as number)!;\n\n const xBarScale = d3ScaleLinear()\n .domain(_isRtl ? [xMax, xMin] : [xMin, xMax])\n .range([_margins.left! + _domainMargin, containerWidth - _margins.right! - _domainMargin]);\n if (!isScalePaddingDefined(props.xAxisInnerPadding, props.xAxisPadding)) {\n xBarScale.nice();\n }\n return { xBarScale, yBarScale };\n }\n if (_xAxisType === XAxisTypes.DateAxis) {\n const sDate = d3Min(_dataset, (point: VerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const lDate = d3Max(_dataset, (point: VerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const xBarScale = props.useUTC ? d3ScaleUtc() : d3ScaleTime();\n xBarScale\n .domain(_isRtl ? [lDate, sDate] : [sDate, lDate])\n .range([_margins.left! + _domainMargin, containerWidth - _margins.right! - _domainMargin]);\n\n return { xBarScale, yBarScale };\n }\n const xBarScale = d3ScaleBand()\n .domain(_xAxisLabels)\n .range(\n _isRtl\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 return { xBarScale, yBarScale };\n }\n\n const _isChartEmpty = (): boolean => {\n return !(\n props.data &&\n props.data.length > 0 &&\n props.data.some(item => item.chartData.length > 0 || (item.lineData && item.lineData.length > 0))\n );\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 function _getDomainMargins(containerWidth: number): Margins {\n _domainMargin = MIN_DOMAIN_MARGIN;\n\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') {\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, _xAxisLabels.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 (props.mode === 'plotly' && _xAxisLabels.length > 1) {\n // Calculate the remaining width after rendering bars at their maximum allowable width\n const bandwidth = calcBandwidth(totalWidth, _xAxisLabels.length, _xAxisInnerPadding);\n const barWidth = getBarWidth(props.barWidth, props.maxBarWidth, bandwidth);\n let reqWidth = calcRequiredWidth(barWidth, _xAxisLabels.length, _xAxisInnerPadding);\n const margin1 = (totalWidth - reqWidth) / 2;\n\n let margin2 = Number.POSITIVE_INFINITY;\n if (!props.hideTickOverlap) {\n // Calculate the remaining width after accounting for the space required to render x-axis labels\n const step = calculateLongestLabelWidth(_xAxisLabels) + 20;\n reqWidth = (_xAxisLabels.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 const data = (props.data?.map(point => point.xAxisPoint) as number[] | Date[] | undefined) || [];\n _barWidth = getBarWidth(\n props.barWidth,\n props.maxBarWidth,\n calculateAppropriateBarWidth(data, totalWidth, _xAxisInnerPadding),\n );\n _domainMargin = MIN_DOMAIN_MARGIN + _barWidth / 2;\n }\n\n return {\n ..._margins,\n left: _margins.left! + _domainMargin,\n right: _margins.right! + _domainMargin,\n };\n }\n\n function _getChartTitle(): string {\n const { chartTitle, data } = props;\n const numLines = Object.keys(_lineObject).length;\n return (\n (chartTitle ? `${chartTitle}. ` : '') +\n `Vertical bar chart with ${data?.length || 0} stacked bars` +\n (numLines > 0 ? ` and ${numLines} lines` : '') +\n '. '\n );\n }\n\n const classes = useVerticalStackedBarChartStyles(props);\n function _createBar(\n xBarScale: any,\n yBarScale: NumericScale | StringScale,\n containerHeight: number,\n xElement: SVGElement,\n ): JSXElement[] {\n const { barCornerRadius = 0, barMinimumHeight = 0 } = props;\n const _isHavingLines = props.data.some(\n (item: VerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = _toFocusWholeStack(_isHavingLines);\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, xBarScale.bandwidth());\n }\n\n const bars = _points.map((singleChartData: VerticalStackedChartProps, indexNumber: number) => {\n const xPoint = xBarScale(\n _xAxisType === XAxisTypes.NumericAxis\n ? (singleChartData.xAxisPoint as number)\n : _xAxisType === XAxisTypes.DateAxis\n ? (singleChartData.xAxisPoint as Date)\n : (singleChartData.xAxisPoint as string),\n );\n const xScaleBandwidthTranslate =\n _xAxisType !== XAxisTypes.StringAxis ? -_barWidth / 2 : (xBarScale.bandwidth() - _barWidth) / 2;\n\n let barTotalValue = 0;\n\n const barsToDisplay = singleChartData.chartData.filter(\n point =>\n point.data !== 0 &&\n point.data !== '' &&\n !(\n _yAxisType === YAxisType.StringAxis &&\n typeof (yBarScale as StringScale)(point.data as string) === 'undefined'\n ),\n );\n\n if (!barsToDisplay.length) {\n return undefined;\n }\n\n const { gapHeight, heightValueScale, absStackTotal } = _getBarGapAndScale(barsToDisplay, yBarScale);\n\n if (heightValueScale < 0) {\n return undefined;\n }\n\n const yBaseline =\n containerHeight -\n _margins.bottom! -\n (_yAxisType === YAxisType.StringAxis ? 0 : (yBarScale as NumericScale)(Y_ORIGIN));\n let yPositiveStart = yBaseline;\n let yNegativeStart = yBaseline;\n let yPoint = 0;\n let heightOfLastBar = 0;\n\n const singleBar = barsToDisplay.map((point: VSChartDataPoint, index: number) => {\n const startColor = point.color ? point.color : _colors[index];\n const ref: RefArrayData = {};\n const shouldHighlight = _isLegendHighlighted(point.legend) || _noLegendHighlighted() ? true : false;\n const rectFocusProps = !shouldFocusWholeStack &&\n shouldHighlight && {\n 'aria-label': _getAriaLabel(singleChartData, point),\n onMouseOver: (event: React.MouseEvent<SVGElement, MouseEvent>) =>\n _onRectHover(singleChartData.xAxisPoint, point, startColor, event),\n onMouseMove: (event: React.MouseEvent<SVGElement, MouseEvent>) =>\n _onRectHover(singleChartData.xAxisPoint, point, startColor, event),\n onMouseLeave: _handleMouseOut,\n onFocus: () => _onRectFocus(point, singleChartData.xAxisPoint as string, startColor, ref),\n onBlur: _handleMouseOut,\n onClick: (event: React.MouseEvent<SVGElement, MouseEvent>) => _onClick(point, event),\n role: 'img',\n tabIndex: !props.hideTooltip && shouldHighlight ? 0 : undefined,\n };\n\n let barHeight: number;\n const gapOffset = index ? gapHeight : 0;\n if (_yAxisType === YAxisType.StringAxis) {\n barHeight = Math.max(\n containerHeight -\n _margins.bottom! -\n ((yBarScale as StringScale)(point.data as string)! + (yBarScale as StringScale).bandwidth() / 2) -\n gapOffset,\n barMinimumHeight,\n 1,\n );\n yPositiveStart -= barHeight + gapOffset;\n yPoint = yPositiveStart;\n } else {\n barHeight = Math.abs(heightValueScale * (point.data as number));\n // FIXME: The current scaling logic may produce different min and gap heights for each bar stack.\n const minHeight = Math.max((heightValueScale * absStackTotal) / 100.0, barMinimumHeight);\n if (barHeight < minHeight) {\n barHeight = minHeight;\n }\n if ((point.data as number) >= Y_ORIGIN) {\n yPositiveStart -= barHeight + gapOffset;\n yPoint = yPositiveStart;\n } else {\n yPoint = yNegativeStart + gapOffset;\n yNegativeStart = yPoint + barHeight;\n }\n\n barTotalValue += point.data as number;\n heightOfLastBar = index === barsToDisplay.length - 1 ? barHeight : 0;\n }\n\n if (barCornerRadius && barHeight > barCornerRadius && index === barsToDisplay.length - 1) {\n return (\n <React.Fragment key={index + indexNumber + `${shouldFocusWholeStack}`}>\n <path\n className={classes.opacityChangeOnHover}\n d={`\n M ${xPoint} ${yPoint + barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${-barCornerRadius}\n h ${_barWidth - 2 * barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${barCornerRadius}\n v ${barHeight - barCornerRadius}\n h ${-_barWidth}\n z\n `}\n fill={startColor}\n rx={props.roundCorners ? 3 : 0}\n ref={e => {\n ref.refElement = e;\n }}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n cursor={props.href ? 'pointer' : 'default'}\n {...rectFocusProps}\n />\n </React.Fragment>\n );\n }\n if (barHeight < 0) {\n return <React.Fragment key={index + indexNumber}> </React.Fragment>;\n }\n return (\n <React.Fragment key={index + indexNumber}>\n <rect\n className={classes.opacityChangeOnHover}\n x={xPoint}\n y={yPoint}\n width={_barWidth}\n height={barHeight}\n fill={startColor}\n opacity={shouldHighlight ? 1 : 0.1}\n cursor={props.href ? 'pointer' : 'default'}\n rx={props.roundCorners ? 3 : 0}\n ref={e => {\n ref.refElement = e;\n }}\n {...rectFocusProps}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />\n </React.Fragment>\n );\n });\n const groupRef: RefArrayData = {};\n const someBarsActive =\n singleChartData.chartData.filter(dataPoint => _noLegendHighlighted() || _isLegendHighlighted(dataPoint.legend))\n .length > 0;\n // FIXME: Making the entire stack focusable when stack callout is enabled adds unnecessary complexity\n // and can reduce usability in certain scenarios. Instead, each individual element within the stack\n // should be focusable on its own, with its own aria-label. This behavior is also seen in Highcharts.\n const stackFocusProps = shouldFocusWholeStack &&\n someBarsActive && {\n 'aria-label': _getAriaLabel(singleChartData),\n onMouseOver: (event: any) => _onStackHover(singleChartData, event),\n onMouseMove: (event: any) => _onStackHover(singleChartData, event),\n onMouseLeave: _handleMouseOut,\n onFocus: () => _onStackFocus(singleChartData, groupRef),\n onBlur: _handleMouseOut,\n onClick: (event: any) => _onClick(singleChartData, event),\n role: 'img',\n tabIndex: !props.hideTooltip ? 0 : undefined,\n };\n let showLabel = false;\n let barLabel = 0;\n if (!props.hideLabels && _yAxisType !== YAxisType.StringAxis) {\n if (_noLegendHighlighted()) {\n showLabel = true;\n barLabel = barTotalValue;\n } else {\n barsToDisplay.forEach(point => {\n if (_isLegendHighlighted(point.legend)) {\n showLabel = true;\n barLabel += point.data as number;\n }\n });\n }\n }\n return (\n <g key={indexNumber + `${shouldFocusWholeStack}`}>\n <g\n id={`${indexNumber}-singleBar`}\n ref={e => {\n groupRef.refElement = e;\n }}\n {...stackFocusProps}\n >\n {singleBar}\n </g>\n {/*\n Note: No need to check hideLabels here, as showLabel is only set to true\n when hideLabels is false earlier in the code.\n */}\n {!props.hideLabels && _barWidth >= 16 && showLabel && (\n <text\n x={xPoint + _barWidth / 2}\n //if total bar value >=0, show label above top bar, otherwise below bottom bar\n y={barLabel >= Y_ORIGIN ? yPoint - 6 : yPoint + heightOfLastBar + 12}\n textAnchor=\"middle\"\n className={classes.barLabel}\n aria-label={`Total: ${barLabel}`}\n role=\"img\"\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n style={{ direction: 'ltr', unicodeBidi: 'isolate' }}\n >\n {typeof props.yAxisTickFormat === 'function'\n ? props.yAxisTickFormat(barLabel)\n : formatScientificLimitWidth(barLabel)}\n </text>\n )}\n </g>\n );\n });\n if (!props.showXAxisLablesTooltip) {\n try {\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xBarScale);\n try {\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.filter((bar): bar is JSXElement => !!bar);\n }\n\n function _getMinMaxOfYAxis(\n dataset: DataPoint[],\n yAxisType?: YAxisType,\n useSecondaryYScale?: boolean,\n ): { startValue: number; endValue: number } {\n if (!useSecondaryYScale) {\n return findVSBCNumericMinMaxOfY(dataset);\n }\n\n const values: number[] = [];\n props.data.forEach(xPoint => {\n xPoint.lineData?.forEach(point => {\n // useSecondaryYScale is applicable only for lines in VSBC\n if (point.useSecondaryYScale) {\n values.push(point.y as number);\n }\n });\n });\n\n return { startValue: d3Min(values)!, endValue: d3Max(values)! };\n }\n\n function _initYAxisParams() {\n if (_points[0].chartData.length > 0) {\n _yAxisType = getTypeOfAxis(_points[0].chartData[0].data, false) as YAxisType;\n } else {\n Object.keys(_lineObject).forEach(lineLegend => {\n if (!_lineObject[lineLegend][0].useSecondaryYScale) {\n _yAxisType = getTypeOfAxis(_lineObject[lineLegend][0].y, false) as YAxisType;\n }\n });\n }\n\n _yAxisLabels = _getOrderedYAxisLabels();\n }\n\n function _getYDomainMargins(containerHeight: number): Margins {\n /**\n * Specifies the extra top margin to apply above the highest y-axis tick label.\n * Useful when stacked bars extend beyond the combined height of all y-axis labels (or categories).\n */\n let yAxisTickMarginTop = 0;\n\n /** Total height available to render the bars */\n const totalHeight = containerHeight - _margins.bottom! - _margins.top!;\n\n if (_yAxisType === YAxisType.StringAxis) {\n /** Maximum height of the stacked bars, expressed in multiples of the height of a y-axis label (or category) */\n let maxBarHeightInLabels = 0;\n _points.forEach(xPoint => {\n /** Height of the stacked bar, expressed in multiples of the height of a y-axis label (or category) */\n let barHeightInLabels = 0;\n xPoint.chartData.forEach(bar => {\n barHeightInLabels += _yAxisLabels.indexOf(`${bar.data}`) + 1;\n });\n maxBarHeightInLabels = Math.max(maxBarHeightInLabels, barHeightInLabels);\n });\n /** Height of a y-axis label (or category) */\n const yAxisLabelHeight = maxBarHeightInLabels === 0 ? 0 : totalHeight / maxBarHeightInLabels;\n yAxisTickMarginTop += yAxisLabelHeight * (maxBarHeightInLabels - _yAxisLabels.length);\n }\n\n return {\n ..._margins,\n top: _margins.top! + yAxisTickMarginTop,\n };\n }\n\n function _getOrderedXAxisLabels() {\n if (_xAxisType !== XAxisTypes.StringAxis) {\n return [];\n }\n\n return sortAxisCategories(_mapCategoryToValues(), props.xAxisCategoryOrder);\n }\n\n function _getOrderedYAxisLabels() {\n if (_yAxisType !== YAxisType.StringAxis) {\n return [];\n }\n\n return sortAxisCategories(_mapCategoryToValues(true), props.yAxisCategoryOrder);\n }\n\n function _mapCategoryToValues(isYAxis = false) {\n const categoryToValues: Record<string, number[]> = {};\n _points.forEach(point => {\n point.chartData.forEach(bar => {\n const category = (isYAxis ? bar.data : point.xAxisPoint) as string;\n const value = isYAxis ? point.xAxisPoint : bar.data;\n if (!categoryToValues[category]) {\n categoryToValues[category] = [];\n }\n if (typeof value === 'number') {\n categoryToValues[category].push(value);\n }\n });\n point.lineData?.forEach(linePoint => {\n if (isYAxis && linePoint.useSecondaryYScale) {\n return;\n }\n const category = (isYAxis ? linePoint.y : point.xAxisPoint) as string;\n const value = isYAxis ? point.xAxisPoint : linePoint.y;\n if (!categoryToValues[category]) {\n categoryToValues[category] = [];\n }\n if (typeof value === 'number') {\n categoryToValues[category].push(value);\n }\n });\n });\n return categoryToValues;\n }\n\n if (!_isChartEmpty()) {\n _adjustProps();\n const _isHavingLines = props.data.some(\n (item: VerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = _toFocusWholeStack(_isHavingLines);\n _dataset = _createDataSetLayer();\n const legendBars: JSXElement = _getLegendData(_points, _createLegendsForLine(props.data));\n const calloutProps: ModifiedCartesianChartProps['calloutProps'] = {\n color: color,\n legend: calloutLegend,\n XValue: xCalloutValue!,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n YValueHover: YValueHover,\n hoverXValue: hoverXValue,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData),\n clickPosition: clickPosition,\n isPopoverOpen: isPopoverOpen,\n isCalloutForStack:\n props.isCalloutForStack || (_isHavingLines && (_noLegendHighlighted() || _getHighlightedLegend().length > 1)),\n isCartesian: true,\n customCallout: {\n customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n };\n const tickParams = {\n tickValues: props.tickValues,\n tickFormat: props.tickFormat,\n };\n return (\n <CartesianChart\n {...props}\n chartTitle={_getChartTitle()}\n points={_dataset}\n chartType={ChartTypes.VerticalStackedBarChart}\n xAxisType={_xAxisType}\n getMinMaxOfYAxis={_getMinMaxOfYAxis}\n calloutProps={calloutProps}\n createYAxis={createNumericYAxis}\n tickParams={tickParams}\n legendBars={legendBars}\n datasetForXAxisDomain={_xAxisLabels}\n isCalloutForStack={shouldFocusWholeStack}\n getDomainNRangeValues={_getDomainNRangeValues}\n createStringYAxis={createStringYAxis}\n barwidth={_barWidth}\n getmargins={_getMargins}\n getGraphData={_getGraphData}\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={!isScalePaddingDefined(props.xAxisInnerPadding, props.xAxisPadding)}\n yAxisType={_yAxisType!}\n stringDatasetForYAxisDomain={['', ..._yAxisLabels]}\n getYDomainMargins={_getYDomainMargins}\n /* eslint-disable react/jsx-no-bind */\n children={(props: ChildProps) => {\n return (\n <>\n <g>{_bars}</g>\n <g>\n {_isHavingLines &&\n _createLines(\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 return <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />;\n});\nVerticalStackedBarChart.displayName = 'VerticalStackedBarChart';\n"],"names":["React","max","d3Max","min","d3Min","select","d3Select","useVerticalStackedBarChartStyles","scaleLinear","d3ScaleLinear","scaleBand","d3ScaleBand","scaleUtc","d3ScaleUtc","scaleTime","d3ScaleTime","useId","tokens","CartesianChart","ChartPopover","Legends","ChartTypes","getAccessibleDataObject","XAxisTypes","getTypeOfAxis","tooltipOfAxislabels","formatScientificLimitWidth","getBarWidth","getScalePadding","isScalePaddingDefined","calculateAppropriateBarWidth","areArraysEqual","calculateLongestLabelWidth","useRtl","DataVizPalette","getColorFromToken","findVSBCNumericMinMaxOfY","YAxisType","createNumericYAxis","domainRangeOfDateForAreaLineScatterVerticalBarCharts","domainRangeOfVSBCNumeric","domainRangeOfXStringAxis","createStringYAxis","calcTotalWidth","calcBandwidth","calcRequiredWidth","sortAxisCategories","toImage","formatDateToLocaleString","barGapMultiplier","barGapMin","MIN_DOMAIN_MARGIN","VerticalStackedBarChart","forwardRef","_props","forwardedRef","props","xAxisCategoryOrder","yAxisCategoryOrder","maxBarWidth","_isRtl","_createLegendsForLine","data","_getLineLegends","_tooltipId","_emptyChartId","_points","_dataset","_xAxisLabels","_bars","_xAxisType","length","xAxisPoint","StringAxis","_barWidth","_colors","_margins","_lineObject","_yMax","_yMin","_calloutAnchorPoint","_domainMargin","_xAxisInnerPadding","_xAxisOuterPadding","cartesianChartRef","useRef","Y_ORIGIN","_legendsRef","_yAxisType","_yAxisLabels","selectedLegends","setSelectedLegends","useState","legendProps","activeLegend","setActiveLegend","undefined","dataForHoverCard","setDataForHoverCard","color","setColor","hoverXValue","setHoverXValue","YValueHover","setYValueHover","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","activeXAxisDataPoint","setActiveXAxisDataPoint","calloutLegend","setCalloutLegend","stackCalloutProps","setStackCalloutProps","dataPointCalloutProps","setDataPointCalloutProps","callOutAccessibilityData","setCallOutAccessibilityData","clickPosition","setClickPosition","x","y","isPopoverOpen","setPopoverOpen","prevPropsRef","useEffect","current","prevProps","height","width","_adjustProps","_createDataSetLayer","useImperativeHandle","componentRef","chartContainer","opts","toSVG","_getLegendData","lineLegends","hideLegend","defaultPalette","color6","color1","color5","color7","color10","actions","allowHoverOnLegend","forEach","singleChartData","chartData","point","Math","floor","random","checkSimilarLegends","filter","leg","title","legend","hoverAction","_handleChartMouseLeave","_onLegendHover","onMouseOutAction","_onLegendLeave","push","legendsOfLine","isLineLegendInBarChart","totalLegends","concat","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onChange","_onLegendSelectionChange","legendRef","_getHighlightedLegend","_lineHoverFocus","lineData","event","clientX","clientY","boundingRect","target","getBoundingClientRect","left","top","_noLegendHighlighted","_isLegendHighlighted","_updatePosition","xItem","yAxisCalloutData","_onStackHoverFocus","stack","mouseEvent","dataPoint","isLinesPresent","item","shouldDrawBorderBottom","sort","a","b","slice","reverse","Date","culture","useUTC","stackCallOutAccessibilityData","_onClick","onBarClick","href","window","location","barWidth","defaultColors","_getFormattedLineData","xAxisInnerPadding","xAxisPadding","xAxisOuterPadding","_initYAxisParams","dataset","map","singlePointData","total","_getOrderedXAxisLabels","legendTitle","_selectedLegends","currentLegend","canSelectMultipleLegends","_getMargins","margins","_getGraphData","xScale","yScale","containerHeight","containerWidth","xElement","xBarScale","yBarScale","_getScales","_createBar","_getAxisData","yAxisData","yAxisDomainValues","domainValue","yMaxValue","yMinValue","includes","_getAriaLabel","isLinePoint","xValue","xAxisCalloutData","pointValues","pt","yValue","str","join","lineValues","ln","ariaLabel","_getCustomizedCallout","_isHavingLines","some","onRenderCalloutPerStack","onRenderCalloutPerDataPoint","_renderCallout","_toFocusWholeStack","isCalloutForStack","shouldFocusStackOnly","_getDomainNRangeValues","points","chartType","isRTL","xAxisType","tickValues","domainNRangeValue","NumericAxis","DateAxis","linesData","formattedLineData","index","line","lineObject","Object","keys","_createLines","yScalePrimary","yScaleSecondary","lines","borderForLines","dots","lineBorderWidth","lineOptions","Number","parseFloat","toString","xScaleBandwidthTranslate","bandwidth","shouldHighlight","i","x1","useSecondaryYScale","y1","x2","y2","yScaleBandwidthTranslate","key","opacity","strokeWidth","fill","strokeLinecap","stroke","colorNeutralBackground1","transform","strokeDasharray","onMouseOver","_lineHover","onMouseLeave","_handleMouseOut","circlePoint","subIndex","circleRef","refElement","noBarsAndLinesActive","circle","cx","cy","r","_getCircleOpacityAndRadius","radius","ref","e","tabIndex","hideTooltip","onFocus","_lineFocus","onBlur","role","XValue","YValue","_onRectHover","persist","_onRectFocusHover","chartDataPoint","xAxisDataPoint","_onStackHover","_onRectFocus","_onStackFocus","groupRef","_getBarGapAndScale","bars","defaultTotalHeight","barGapMax","totalData","totalHeight","sumOfPercent","scalingRatio","reduce","bar","iter","value","abs","gaps","gapHeight","heightValueScale","absStackTotal","yDomain","domain","range","bottom","xMax","xMin","right","nice","sDate","lDate","paddingInner","paddingOuter","_isChartEmpty","newX","newY","threshold","distance","sqrt","pow","_getDomainMargins","totalWidth","reqWidth","mode","margin1","margin2","POSITIVE_INFINITY","hideTickOverlap","step","_getChartTitle","chartTitle","numLines","classes","barCornerRadius","barMinimumHeight","shouldFocusWholeStack","indexNumber","xPoint","barTotalValue","barsToDisplay","yBaseline","yPositiveStart","yNegativeStart","yPoint","heightOfLastBar","singleBar","startColor","rectFocusProps","onMouseMove","onClick","barHeight","gapOffset","minHeight","Fragment","path","className","opacityChangeOnHover","d","rx","roundCorners","cursor","rect","someBarsActive","stackFocusProps","showLabel","barLabel","hideLabels","g","id","text","textAnchor","aria-label","style","direction","unicodeBidi","yAxisTickFormat","showXAxisLablesTooltip","document","getElementById","remove","wrapXAxisLables","xAxisElement","call","tooltipProps","tooltipCls","tooltip","axis","_getMinMaxOfYAxis","yAxisType","values","startValue","endValue","lineLegend","_getOrderedYAxisLabels","_getYDomainMargins","yAxisTickMarginTop","maxBarHeightInLabels","barHeightInLabels","indexOf","yAxisLabelHeight","_mapCategoryToValues","isYAxis","categoryToValues","category","linePoint","legendBars","calloutProps","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","tickFormat","getMinMaxOfYAxis","createYAxis","datasetForXAxisDomain","getDomainNRangeValues","barwidth","getmargins","getGraphData","getAxisData","onChartMouseLeave","getDomainMargins","showRoundOffXTickValues","stringDatasetForYAxisDomain","getYDomainMargins","children","div","displayName"],"mappings":"AAAA;;;;;+BA0FaoD;;;;;;;iEAxFU,QAAQ;yBACY,WAAW;6BACnB,eAAe;wDACD,4CAA4C;yBAQtF,WAAW;gCACI,4BAA4B;4BAE3B,wBAAwB;uBAmBxC,cAAc;wBA8Bd,wBAAwB;kCACP,qCAAqC;gCACpB,4BAA4B;AAIrE,MAAMH,mBAAmB;AACzB,MAAMC,YAAY;AAClB,MAAMC,oBAAoB;AAiBnB,gCAAMC,WAAAA,GAAiFpD,OAAMqD,UAAU,CAG5G,CAACC,QAAQC;QAqCoDC;IApC7D,MAAMA,QAAsC;QAC1CC,oBAAoB;QACpBC,oBAAoB;QACpBC,aAAa;QACb,GAAGL,MAAM;IACX;IACA,MAAMM,aAAkB3B,cAAAA;IACxB,MAAM4B,wBAA8E,CAClFC,OACGC,gBAAgBD;IACrB,MAAME,iBAAqBhD,qBAAAA,EAAM;IACjC,MAAMiD,oBAAwBjD,qBAAAA,EAAM;IACpC,IAAIkD,UAAuC,EAAE;IAC7C,I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A,aAAA,CAAC8M,OAAAA;QAAI5D,IAAInX;QAAemR,MAAM;QAASoG,OAAO;YAAElI,SAAS;QAAI;QAAGiI,cAAY;;AACrF,GAAG;AACHnY,wBAAwB6b,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../src/components/VerticalStackedBarChart/VerticalStackedBarChart.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { useVerticalStackedBarChartStyles } from './useVerticalStackedBarChartStyles.styles';\nimport {\n scaleLinear as d3ScaleLinear,\n ScaleLinear as D3ScaleLinear,\n scaleBand as d3ScaleBand,\n scaleUtc as d3ScaleUtc,\n scaleTime as d3ScaleTime,\n ScaleBand,\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 ChildProps,\n VerticalStackedBarDataPoint,\n Margins,\n VerticalStackedBarChartProps,\n VerticalStackedChartProps,\n VSChartDataPoint,\n LineDataInVerticalStackedBarChart,\n ModifiedCartesianChartProps,\n Legend,\n ChartPopover,\n Legends,\n DataPoint,\n} from '../../index';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n XAxisTypes,\n getTypeOfAxis,\n formatScientificLimitWidth,\n getBarWidth,\n getScalePadding,\n isScalePaddingDefined,\n calculateAppropriateBarWidth,\n areArraysEqual,\n calculateLongestLabelWidth,\n useRtl,\n DataVizPalette,\n getColorFromToken,\n findVSBCNumericMinMaxOfY,\n YAxisType,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfDateForAreaLineScatterVerticalBarCharts,\n domainRangeOfVSBCNumeric,\n domainRangeOfXStringAxis,\n createStringYAxis,\n calcTotalWidth,\n calcBandwidth,\n calcRequiredWidth,\n sortAxisCategories,\n} from '../../utilities/index';\nimport { formatDateToLocaleString, isInvalidValue } from '@fluentui/chart-utilities';\nimport { useImageExport } from '../../utilities/hooks';\n\ntype NumericScale = D3ScaleLinear<number, number>;\ntype StringScale = ScaleBand<string>;\nconst barGapMultiplier = 0.2;\nconst barGapMin = 1;\nconst MIN_DOMAIN_MARGIN = 8;\n\ninterface RefArrayData {\n refElement?: SVGGElement | null;\n}\n\ntype LinePoint = LineDataInVerticalStackedBarChart & { index: number; xItem: VerticalStackedChartProps };\ntype LineObject = { [key: string]: LinePoint[] };\ntype LineLegends = {\n title: string;\n color: string;\n};\ntype CalloutAnchorPointData = {\n xAxisDataPoint: string;\n chartDataPoint: VSChartDataPoint;\n};\n\nexport const VerticalStackedBarChart: React.FunctionComponent<VerticalStackedBarChartProps> = React.forwardRef<\n HTMLDivElement,\n VerticalStackedBarChartProps\n>((_props, forwardedRef) => {\n const props: VerticalStackedBarChartProps = {\n xAxisCategoryOrder: 'default',\n yAxisCategoryOrder: 'default',\n maxBarWidth: 24,\n ..._props,\n };\n const _isRtl: boolean = useRtl();\n const _createLegendsForLine: (data: VerticalStackedChartProps[]) => LineLegends[] = (\n data: VerticalStackedChartProps[],\n ) => _getLineLegends(data);\n const _emptyChartId: string = useId('_VSBC_empty');\n let _points: VerticalStackedChartProps[] = [];\n let _dataset: VerticalStackedBarDataPoint[];\n let _xAxisLabels: string[] = [];\n let _bars: JSXElement[];\n let _xAxisType: XAxisTypes =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data[0]!.xAxisPoint, true) as XAxisTypes)\n : XAxisTypes.StringAxis;\n let _barWidth: number = 0;\n let _colors: string[];\n let _margins: Margins;\n let _lineObject: LineObject;\n let _yMax: number;\n let _yMin: number;\n let _calloutAnchorPoint: CalloutAnchorPointData | null;\n let _domainMargin: number = MIN_DOMAIN_MARGIN;\n let _xAxisInnerPadding: number = 0;\n let _xAxisOuterPadding: number = 0;\n const { cartesianChartRef, legendsRef: _legendsRef } = useImageExport(props.componentRef, props.hideLegend);\n const Y_ORIGIN: number = 0;\n let _yAxisType: YAxisType;\n let _yAxisLabels: string[] = [];\n\n const [selectedLegends, setSelectedLegends] = React.useState(props.legendProps?.selectedLegends || []);\n const [activeLegend, setActiveLegend] = React.useState<string | undefined>(undefined);\n const [dataForHoverCard, setDataForHoverCard] = React.useState(0);\n const [color, setColor] = React.useState('');\n const [hoverXValue, setHoverXValue] = React.useState<string | number>('');\n const [YValueHover, setYValueHover] = React.useState<(LineDataInVerticalStackedBarChart | VSChartDataPoint)[]>([]);\n const [xCalloutValue, setXCalloutValue] = React.useState('');\n const [yCalloutValue, setYCalloutValue] = React.useState('');\n const [activeXAxisDataPoint, setActiveXAxisDataPoint] = React.useState<number | string | Date>('');\n const [calloutLegend, setCalloutLegend] = React.useState('');\n const [stackCalloutProps, setStackCalloutProps] = React.useState<VerticalStackedChartProps>();\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<VSChartDataPoint>();\n const [callOutAccessibilityData, setCallOutAccessibilityData] = React.useState<AccessibilityProps>();\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const [isPopoverOpen, setPopoverOpen] = React.useState(false);\n const prevPropsRef = React.useRef<VerticalStackedBarChartProps | null>(null);\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 || prevProps.data !== props.data) {\n _adjustProps();\n _dataset = _createDataSetLayer();\n }\n }\n prevPropsRef.current = props;\n }, [props]);\n\n function _getLegendData(data: VerticalStackedChartProps[], lineLegends: LineLegends[]): JSXElement {\n if (props.hideLegend) {\n return <></>;\n }\n const defaultPalette: string[] = [\n getColorFromToken(DataVizPalette.color6),\n getColorFromToken(DataVizPalette.color1),\n getColorFromToken(DataVizPalette.color5),\n getColorFromToken(DataVizPalette.color7),\n getColorFromToken(DataVizPalette.color10),\n ];\n const actions: Legend[] = [];\n const { allowHoverOnLegend = true } = props;\n\n data.forEach((singleChartData: VerticalStackedChartProps) => {\n singleChartData.chartData.forEach((point: VSChartDataPoint) => {\n const color: string = point.color ? point.color : defaultPalette[Math.floor(Math.random() * 4 + 1)];\n const checkSimilarLegends = actions.filter((leg: Legend) => leg.title === point.legend && leg.color === color);\n if (checkSimilarLegends!.length > 0) {\n return;\n }\n\n const legend: Legend = {\n title: point.legend,\n color,\n hoverAction: allowHoverOnLegend\n ? () => {\n _handleChartMouseLeave();\n _onLegendHover(point.legend);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => _onLegendLeave() : undefined,\n };\n\n actions.push(legend);\n });\n });\n const legendsOfLine: Legend[] = [];\n if (lineLegends && lineLegends.length > 0) {\n lineLegends.forEach((point: LineLegends) => {\n const legend: Legend = {\n title: point.title,\n color: point.color,\n isLineLegendInBarChart: true,\n hoverAction: allowHoverOnLegend\n ? () => {\n _handleChartMouseLeave();\n _onLegendHover(point.title);\n }\n : undefined,\n onMouseOutAction: allowHoverOnLegend ? () => _onLegendLeave() : undefined,\n };\n legendsOfLine.push(legend);\n });\n }\n const totalLegends: Legend[] = actions.concat(legendsOfLine);\n return (\n <Legends\n legends={totalLegends}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n onChange={_onLegendSelectionChange}\n legendRef={_legendsRef}\n />\n );\n }\n\n function _getHighlightedLegend() {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n }\n\n function _lineHoverFocus(\n lineData: LinePoint,\n event: React.MouseEvent<SVGElement> | React.FocusEvent<SVGElement, Element>,\n ): void {\n let clientX = 0;\n let clientY = 0;\n if ('clientX' in event) {\n clientX = event.clientX;\n clientY = event.clientY;\n } else {\n const boundingRect = event.target.getBoundingClientRect();\n clientX = boundingRect.left + boundingRect.width / 2;\n clientY = boundingRect.top + boundingRect.height / 2;\n }\n if (_getHighlightedLegend().length === 1) {\n if (_noLegendHighlighted() || _isLegendHighlighted(lineData.legend)) {\n _updatePosition(clientX, clientY);\n setPopoverOpen(true);\n setXCalloutValue(`${lineData.xItem.xAxisPoint}`);\n setYCalloutValue(`${lineData.yAxisCalloutData || lineData.data || lineData.y}`);\n setActiveXAxisDataPoint(lineData.xItem.xAxisPoint);\n setColor(lineData.color);\n }\n } else {\n _onStackHoverFocus(lineData.xItem, event);\n }\n }\n\n function _onStackHoverFocus(\n stack: VerticalStackedChartProps,\n event: React.MouseEvent<SVGElement> | React.FocusEvent<SVGElement> | SVGGElement,\n ): void {\n let clientX = 0;\n let clientY = 0;\n if ('clientX' in event) {\n clientX = event.clientX;\n clientY = event.clientY;\n } else {\n // Handle React FocusEvent or SVGGElement\n const element = 'target' in event ? (event.target as SVGElement) : event;\n const boundingRect = element.getBoundingClientRect();\n clientX = boundingRect.left + boundingRect.width / 2;\n clientY = boundingRect.top + boundingRect.height / 2;\n }\n if (!_noLegendHighlighted()) {\n stack = {\n ...stack,\n chartData: stack.chartData.filter((dataPoint: { legend: any }) => _isLegendHighlighted(dataPoint.legend)),\n lineData: stack.lineData?.filter((dataPoint: { legend: any }) => _isLegendHighlighted(dataPoint.legend)),\n };\n }\n const lineData = stack.lineData;\n const isLinesPresent: boolean = lineData !== undefined && lineData.length > 0;\n if (isLinesPresent) {\n lineData!.forEach((item: LineDataInVerticalStackedBarChart & { shouldDrawBorderBottom?: boolean }) => {\n item.data = item.data || item.y;\n item.shouldDrawBorderBottom = true;\n });\n }\n _updatePosition(clientX, clientY);\n setPopoverOpen(stack.chartData.length > 0 || (stack.lineData?.length ?? 0) > 0);\n setYValueHover(\n isLinesPresent\n ? [...lineData!.sort((a, b) => (a.data! < b.data! ? 1 : -1)), ...stack.chartData.slice().reverse()]\n : stack.chartData.slice().reverse(),\n );\n setHoverXValue(\n stack.xAxisPoint instanceof Date\n ? formatDateToLocaleString(stack.xAxisPoint, props.culture, props.useUTC as boolean)\n : stack.xAxisPoint,\n );\n setStackCalloutProps(stack);\n setActiveXAxisDataPoint(stack.xAxisPoint);\n setCallOutAccessibilityData(stack.stackCallOutAccessibilityData);\n }\n\n function _handleChartMouseLeave(): void {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n setActiveXAxisDataPoint('');\n }\n\n const _onClick = (\n data: VerticalStackedChartProps | VSChartDataPoint,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void => {\n props.onBarClick?.(mouseEvent, data);\n props.href ? (window.location.href = props.href) : '';\n };\n\n function _adjustProps(): void {\n _points = props.data || [];\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n const defaultColors: string[] = [\n getColorFromToken(DataVizPalette.color6),\n getColorFromToken(DataVizPalette.color1),\n getColorFromToken(DataVizPalette.color5),\n getColorFromToken(DataVizPalette.color7),\n getColorFromToken(DataVizPalette.color10),\n ];\n _colors = defaultColors;\n const firstXValue = _points[0]?.xAxisPoint;\n _xAxisType = isInvalidValue(firstXValue) ? XAxisTypes.StringAxis : (getTypeOfAxis(firstXValue, true) as XAxisTypes);\n _lineObject = _getFormattedLineData(props.data);\n _xAxisInnerPadding = 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 _initYAxisParams();\n }\n\n function _createDataSetLayer(): VerticalStackedBarDataPoint[] {\n const dataset: VerticalStackedBarDataPoint[] = _points.map(singlePointData => {\n if (_yAxisType === YAxisType.StringAxis) {\n return {\n x: singlePointData.xAxisPoint,\n y: 0,\n };\n }\n let total: number = 0;\n singlePointData.chartData!.forEach((point: VSChartDataPoint) => {\n total = total + (point.data as number);\n });\n return {\n x: singlePointData.xAxisPoint,\n y: total,\n };\n });\n _xAxisLabels = _getOrderedXAxisLabels();\n return dataset;\n }\n\n function _onLegendHover(legendTitle: string): void {\n setActiveLegend(legendTitle);\n }\n\n function _onLegendLeave(): void {\n setActiveLegend(undefined);\n }\n\n function _onLegendSelectionChange(\n _selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(_selectedLegends);\n } else {\n setSelectedLegends(_selectedLegends.slice(-1));\n }\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(_selectedLegends, event, currentLegend);\n }\n }\n\n function _getMargins(margins: Margins) {\n _margins = margins;\n }\n\n function _getGraphData(\n xScale: any,\n yScale: NumericScale | StringScale,\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement | null,\n ) {\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth);\n return (_bars = _createBar(\n xBarScale,\n _yAxisType === YAxisType.StringAxis ? yScale : yBarScale,\n containerHeight,\n xElement!,\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 || Y_ORIGIN);\n _yMin = Math.min(domainValue[0], props.yMinValue || Y_ORIGIN);\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 _isLegendHighlighted(legendTitle: string) {\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() {\n return _getHighlightedLegend().length === 0;\n }\n\n function _getAriaLabel(\n singleChartData: VerticalStackedChartProps,\n point?: VSChartDataPoint | LineDataInVerticalStackedBarChart,\n isLinePoint?: boolean,\n ): string {\n if (!point) {\n /** if shouldFocusWholeStack is true */\n const xValue =\n singleChartData.xAxisCalloutData ||\n (singleChartData.xAxisPoint instanceof Date\n ? formatDateToLocaleString(singleChartData.xAxisPoint, props.culture, props.useUTC as boolean)\n : singleChartData.xAxisPoint);\n const pointValues = singleChartData.chartData\n .map(pt => {\n const legend = pt.legend;\n const yValue = pt.yAxisCalloutData || pt.data;\n return _noLegendHighlighted() || _isLegendHighlighted(legend) ? `${legend}, ${yValue}.` : '';\n })\n .filter(str => str !== '')\n .join(' ');\n const lineValues = singleChartData.lineData\n ?.map(ln => {\n const legend = ln.legend;\n const yValue = ln.yAxisCalloutData || ln.data || ln.y;\n return _noLegendHighlighted() || _isLegendHighlighted(legend) ? `${legend}, ${yValue}.` : '';\n })\n .filter(str => str !== '')\n .join(' ');\n return (\n singleChartData.stackCallOutAccessibilityData?.ariaLabel ||\n `${xValue}. ${pointValues}` + (lineValues ? ` ${lineValues}` : '')\n );\n }\n /** if shouldFocusWholeStack is false */\n const xValue =\n singleChartData.xAxisCalloutData ||\n (!isLinePoint && (point as VSChartDataPoint).xAxisCalloutData) ||\n (singleChartData.xAxisPoint instanceof Date\n ? formatDateToLocaleString(singleChartData.xAxisPoint, props.culture, props.useUTC as boolean)\n : singleChartData.xAxisPoint);\n const legend = point.legend;\n const yValue =\n point.yAxisCalloutData ||\n (isLinePoint ? point.data || (point as LineDataInVerticalStackedBarChart).y : point.data);\n return (\n (!isLinePoint && (point as VSChartDataPoint).callOutAccessibilityData?.ariaLabel) ||\n `${xValue}. ${legend}, ${yValue}.`\n );\n }\n\n function _getCustomizedCallout() {\n const _isHavingLines = props.data.some(\n (item: VerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n return props.onRenderCalloutPerStack\n ? props.onRenderCalloutPerStack(stackCalloutProps)\n : props.onRenderCalloutPerDataPoint && !_isHavingLines\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps, _renderCallout)\n : null;\n }\n\n function _toFocusWholeStack(_isHavingLines: boolean): boolean {\n const { isCalloutForStack = false } = props;\n let shouldFocusStackOnly: boolean = false;\n if (_isHavingLines) {\n if (_getHighlightedLegend().length === 1) {\n shouldFocusStackOnly = false;\n } else {\n shouldFocusStackOnly = true;\n }\n } else {\n shouldFocusStackOnly = isCalloutForStack;\n }\n return shouldFocusStackOnly;\n }\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 ) {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfVSBCNumeric(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 _getFormattedLineData(data: VerticalStackedChartProps[]): LineObject {\n const linesData: LinePoint[] = [];\n const formattedLineData: LineObject = {};\n data.forEach((item: VerticalStackedChartProps, index: number) => {\n if (item.lineData) {\n item.lineData.forEach((line: any) => {\n linesData.push({\n ...line,\n index,\n xItem: item,\n });\n });\n }\n });\n linesData.forEach(item => {\n if (formattedLineData[item.legend]) {\n formattedLineData[item.legend].push(item);\n } else {\n formattedLineData[item.legend] = [item];\n }\n });\n return formattedLineData;\n }\n\n function _getLineLegends(data: VerticalStackedChartProps[]): LineLegends[] {\n const lineObject: LineObject = _lineObject;\n const lineLegends: LineLegends[] = [];\n Object.keys(lineObject).forEach((item: string) => {\n lineLegends.push({\n title: item,\n color: lineObject[item][0].color,\n });\n });\n return lineLegends;\n }\n\n function _createLines(\n xScale: any,\n yScalePrimary: NumericScale | StringScale,\n containerHeight: number,\n containerWidth: number,\n yScaleSecondary?: NumericScale,\n ): JSXElement {\n const lineObject: LineObject = _getFormattedLineData(props.data);\n const lines: React.ReactNode[] = [];\n const borderForLines: React.ReactNode[] = [];\n const dots: React.ReactNode[] = [];\n //const { theme } = props;\n const lineBorderWidth = props.lineOptions?.lineBorderWidth\n ? Number.parseFloat(props.lineOptions!.lineBorderWidth!.toString())\n : 0;\n const xScaleBandwidthTranslate = _xAxisType !== XAxisTypes.StringAxis ? 0 : xScale.bandwidth() / 2;\n Object.keys(lineObject).forEach((item: string, index: number) => {\n const shouldHighlight = _isLegendHighlighted(item) || _noLegendHighlighted();\n for (let i = 1; i < lineObject[item].length; i++) {\n const x1 = xScale(lineObject[item][i - 1].xItem.xAxisPoint);\n const useSecondaryYScale =\n lineObject[item][i - 1].useSecondaryYScale && lineObject[item][i].useSecondaryYScale && yScaleSecondary;\n const y1 = useSecondaryYScale\n ? yScaleSecondary!(lineObject[item][i - 1].y as number)\n : //eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScalePrimary(lineObject[item][i - 1].y as any);\n const x2 = xScale(lineObject[item][i].xItem.xAxisPoint);\n const y2 = useSecondaryYScale\n ? yScaleSecondary!(lineObject[item][i].y as number)\n : //eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScalePrimary(lineObject[item][i].y as any);\n const yScaleBandwidthTranslate =\n !useSecondaryYScale && _yAxisType === YAxisType.StringAxis\n ? (yScalePrimary as StringScale).bandwidth() / 2\n : 0;\n if (lineBorderWidth > 0) {\n borderForLines.push(\n <line\n key={`${index}-${i}-BorderLine`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={3 + lineBorderWidth * 2}\n fill=\"transparent\"\n strokeLinecap=\"round\"\n stroke={tokens.colorNeutralBackground1}\n transform={`translate(${xScaleBandwidthTranslate}, ${yScaleBandwidthTranslate})`}\n />,\n );\n }\n lines.push(\n <line\n key={`${index}-${i}-line`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n opacity={shouldHighlight ? 1 : 0.1}\n strokeWidth={lineObject[item][0].lineOptions?.strokeWidth ?? 3}\n strokeLinecap={lineObject[item][0].lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={lineObject[item][0].lineOptions?.strokeDasharray}\n stroke={lineObject[item][i].color}\n transform={`translate(${xScaleBandwidthTranslate}, ${yScaleBandwidthTranslate})`}\n onMouseOver={event => _lineHover(lineObject[item][i - 1], event)}\n onMouseLeave={_handleMouseOut}\n />,\n );\n }\n });\n Object.keys(lineObject).forEach((item: string, index: number) => {\n lineObject[item].forEach((circlePoint: LinePoint, subIndex: number) => {\n const circleRef: { refElement: SVGCircleElement | null } = { refElement: null };\n const noBarsAndLinesActive =\n circlePoint.xItem.chartData.filter(\n dataPoint => _noLegendHighlighted() || _isLegendHighlighted(dataPoint.legend),\n ).length === 0;\n const yScaleBandwidthTranslate =\n !circlePoint.useSecondaryYScale && _yAxisType === YAxisType.StringAxis\n ? (yScalePrimary as StringScale).bandwidth() / 2\n : 0;\n dots.push(\n <circle\n key={`${index}-${subIndex}-dot`}\n cx={xScale(circlePoint.xItem.xAxisPoint)}\n cy={\n circlePoint.useSecondaryYScale && yScaleSecondary\n ? yScaleSecondary(circlePoint.y as number)\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScalePrimary(circlePoint.y as any)\n }\n onMouseOver={event => _lineHover(circlePoint, event)}\n onMouseLeave={_handleMouseOut}\n r={_getCircleOpacityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).radius}\n stroke={circlePoint.color}\n fill={tokens.colorNeutralBackground1}\n strokeWidth={3}\n // Elements with visibility: hidden cannot receive focus, so use opacity: 0 instead to hide them.\n // For more information, see https://fuzzbomb.github.io/accessibility-demos/visually-hidden-focus-test.html\n opacity={_getCircleOpacityAndRadius(circlePoint.xItem.xAxisPoint, circlePoint.legend).opacity}\n transform={`translate(${xScaleBandwidthTranslate}, ${yScaleBandwidthTranslate})`}\n ref={e => {\n circleRef.refElement = e;\n }}\n {...(noBarsAndLinesActive\n ? {\n tabIndex: !props.hideTooltip ? 0 : undefined,\n onFocus: event => _lineFocus(event, circlePoint, circleRef),\n onBlur: _handleMouseOut,\n role: 'img',\n 'aria-label': _getAriaLabel(circlePoint.xItem, circlePoint as VSChartDataPoint),\n }\n : {})}\n />,\n );\n });\n });\n return (\n <>\n {borderForLines}\n {lines}\n {dots}\n </>\n );\n }\n\n function _getCircleOpacityAndRadius(\n xAxisPoint: string | number | Date,\n legend: string,\n ): { opacity: number; radius: number } {\n if (!_noLegendHighlighted()) {\n if (xAxisPoint === activeXAxisDataPoint && _isLegendHighlighted(legend)) {\n return { opacity: 1, radius: 8 };\n } else if (_isLegendHighlighted(legend)) {\n return { opacity: 1, radius: 0.3 };\n } else {\n return { opacity: 0, radius: 0 };\n }\n } else {\n return {\n opacity: activeXAxisDataPoint === xAxisPoint ? 1 : 0,\n radius: 8,\n };\n }\n }\n\n function _renderCallout(props?: VSChartDataPoint): JSXElement | null {\n return props ? (\n <ChartPopover\n culture={props.culture}\n XValue={props.xAxisCalloutData}\n xCalloutValue={xCalloutValue}\n yCalloutValue={yCalloutValue}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n legend={props.legend}\n YValue={props.yAxisCalloutData}\n color={props.color}\n />\n ) : null;\n }\n\n function _onRectHover(\n xAxisPoint: string | number | Date,\n point: VSChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void {\n mouseEvent.persist();\n _onRectFocusHover(xAxisPoint, point, color, mouseEvent);\n }\n\n function _onRectFocusHover(\n xAxisPoint: string | number | Date,\n point: VSChartDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement> | SVGGElement,\n ) {\n let clientX = 0;\n let clientY = 0;\n if ('clientX' in mouseEvent) {\n clientX = mouseEvent.clientX;\n clientY = mouseEvent.clientY;\n } else {\n // Handle case where mouseEvent is an SVGGElement\n const boundingRect = mouseEvent.getBoundingClientRect();\n clientX = boundingRect.left + boundingRect.width / 2;\n clientY = boundingRect.top + boundingRect.height / 2;\n }\n if (_calloutAnchorPoint?.chartDataPoint !== point || _calloutAnchorPoint?.xAxisDataPoint !== xAxisPoint) {\n _calloutAnchorPoint = {\n chartDataPoint: point,\n xAxisDataPoint:\n xAxisPoint instanceof Date\n ? formatDateToLocaleString(xAxisPoint, props.culture, props.useUTC as boolean)\n : xAxisPoint.toString(),\n };\n const xCalloutValue =\n point.xAxisCalloutData ||\n (xAxisPoint instanceof Date\n ? formatDateToLocaleString(xAxisPoint, props.culture, props.useUTC as boolean)\n : xAxisPoint.toString());\n\n _updatePosition(clientX, clientY);\n setPopoverOpen(_noLegendHighlighted() || _isLegendHighlighted(point.legend));\n setCalloutLegend(point.legend);\n setDataForHoverCard(point.data as number);\n setColor(color);\n setXCalloutValue(xCalloutValue);\n setYCalloutValue(point.yAxisCalloutData!);\n setDataPointCalloutProps(point);\n setCallOutAccessibilityData(point.callOutAccessibilityData);\n }\n }\n\n function _lineHover(lineData: LinePoint, mouseEvent: React.MouseEvent<SVGElement>) {\n mouseEvent.persist();\n _lineHoverFocus(lineData, mouseEvent);\n }\n\n function _lineFocus(\n event: React.FocusEvent<SVGElement, Element>,\n lineData: LinePoint,\n ref: { refElement: SVGElement | null },\n ) {\n if (ref.refElement) {\n _lineHoverFocus(lineData, event);\n }\n }\n\n function _onStackHover(stack: VerticalStackedChartProps, mouseEvent: React.MouseEvent<SVGElement>): void {\n mouseEvent.persist();\n _onStackHoverFocus(stack, mouseEvent);\n }\n\n function _onRectFocus(point: VSChartDataPoint, xAxisPoint: string, color: string, ref: RefArrayData): void {\n if (ref.refElement) {\n _onRectFocusHover(xAxisPoint, point, color, ref.refElement);\n }\n }\n\n function _onStackFocus(stack: VerticalStackedChartProps, groupRef: RefArrayData): void {\n if (groupRef.refElement) {\n _onStackHoverFocus(stack, groupRef.refElement);\n }\n }\n\n function _handleMouseOut(): void {\n /**/\n }\n\n function _getBarGapAndScale(\n bars: VSChartDataPoint[],\n yBarScale: NumericScale | StringScale,\n defaultTotalHeight?: number,\n ): {\n readonly gapHeight: number;\n readonly heightValueScale: number;\n readonly absStackTotal: number;\n } {\n const { barGapMax = 0 } = props;\n let totalData = 0;\n let totalHeight: number;\n let sumOfPercent = 0;\n let scalingRatio: number;\n if (_yAxisType === YAxisType.StringAxis) {\n totalHeight =\n defaultTotalHeight ?? bars.reduce((total, bar) => total + (yBarScale as StringScale)(bar.data as string)!, 0);\n } else {\n // When displaying gaps between the bars, the height of each bar is\n // adjusted so that the total of all bars is not changed by the gaps\n totalData = bars.reduce((iter, value) => iter + Math.abs(value.data as number), 0);\n totalHeight =\n defaultTotalHeight ?? Math.abs((yBarScale as NumericScale)(totalData) - (yBarScale as NumericScale)(Y_ORIGIN));\n bars.forEach(point => {\n let value = (Math.abs(point.data as number) / totalData) * 100;\n if (value < 1 && value !== 0) {\n value = 1;\n }\n sumOfPercent += value;\n });\n scalingRatio = sumOfPercent !== 0 ? sumOfPercent / 100 : 1;\n }\n const gaps = barGapMax && bars.length - 1;\n const gapHeight = gaps && Math.max(barGapMin, Math.min(barGapMax, (totalHeight * barGapMultiplier) / gaps));\n const heightValueScale =\n _yAxisType === YAxisType.StringAxis ? 0 : (totalHeight - gapHeight * gaps) / (totalData * scalingRatio!);\n return {\n gapHeight,\n heightValueScale,\n absStackTotal: totalData,\n } as const;\n }\n\n function _getScales(containerHeight: number, containerWidth: number) {\n const yDomain = [Math.min(Y_ORIGIN, _yMin), Math.max(Y_ORIGIN, _yMax)];\n const yBarScale = d3ScaleLinear()\n .domain(yDomain)\n .range([0, containerHeight - _margins.bottom! - _margins.top!]);\n if (_xAxisType === XAxisTypes.NumericAxis) {\n const xMax = d3Max(_dataset, (point: VerticalStackedBarDataPoint) => point.x as number)!;\n const xMin = d3Min(_dataset, (point: VerticalStackedBarDataPoint) => point.x as number)!;\n\n const xBarScale = d3ScaleLinear()\n .domain(_isRtl ? [xMax, xMin] : [xMin, xMax])\n .range([_margins.left! + _domainMargin, containerWidth - _margins.right! - _domainMargin]);\n if (!isScalePaddingDefined(props.xAxisInnerPadding, props.xAxisPadding)) {\n xBarScale.nice();\n }\n return { xBarScale, yBarScale };\n }\n if (_xAxisType === XAxisTypes.DateAxis) {\n const sDate = d3Min(_dataset, (point: VerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const lDate = d3Max(_dataset, (point: VerticalStackedBarDataPoint) => {\n return point.x as Date;\n })!;\n const xBarScale = props.useUTC ? d3ScaleUtc() : d3ScaleTime();\n xBarScale\n .domain(_isRtl ? [lDate, sDate] : [sDate, lDate])\n .range([_margins.left! + _domainMargin, containerWidth - _margins.right! - _domainMargin]);\n\n return { xBarScale, yBarScale };\n }\n const xBarScale = d3ScaleBand()\n .domain(_xAxisLabels)\n .range(\n _isRtl\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 return { xBarScale, yBarScale };\n }\n\n const _isChartEmpty = (): boolean => {\n return !(\n props.data &&\n props.data.length > 0 &&\n props.data.some(item => item.chartData.length > 0 || (item.lineData && item.lineData.length > 0))\n );\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 function _getDomainMargins(containerWidth: number): Margins {\n _domainMargin = MIN_DOMAIN_MARGIN;\n\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') {\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, _xAxisLabels.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 (props.mode === 'plotly' && _xAxisLabels.length > 1) {\n // Calculate the remaining width after rendering bars at their maximum allowable width\n const bandwidth = calcBandwidth(totalWidth, _xAxisLabels.length, _xAxisInnerPadding);\n const barWidth = getBarWidth(props.barWidth, props.maxBarWidth, bandwidth);\n let reqWidth = calcRequiredWidth(barWidth, _xAxisLabels.length, _xAxisInnerPadding);\n const margin1 = (totalWidth - reqWidth) / 2;\n\n let margin2 = Number.POSITIVE_INFINITY;\n if (!props.hideTickOverlap) {\n // Calculate the remaining width after accounting for the space required to render x-axis labels\n const step = calculateLongestLabelWidth(_xAxisLabels) + 20;\n reqWidth = (_xAxisLabels.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 const data = (props.data?.map(point => point.xAxisPoint) as number[] | Date[] | undefined) || [];\n _barWidth = getBarWidth(\n props.barWidth,\n props.maxBarWidth,\n calculateAppropriateBarWidth(data, totalWidth, _xAxisInnerPadding),\n );\n _domainMargin = MIN_DOMAIN_MARGIN + _barWidth / 2;\n }\n\n return {\n ..._margins,\n left: _margins.left! + _domainMargin,\n right: _margins.right! + _domainMargin,\n };\n }\n\n function _getChartTitle(): string {\n const { chartTitle, data } = props;\n const numLines = Object.keys(_lineObject).length;\n return (\n (chartTitle ? `${chartTitle}. ` : '') +\n `Vertical bar chart with ${data?.length || 0} stacked bars` +\n (numLines > 0 ? ` and ${numLines} lines` : '') +\n '. '\n );\n }\n\n const classes = useVerticalStackedBarChartStyles(props);\n function _createBar(\n xBarScale: any,\n yBarScale: NumericScale | StringScale,\n containerHeight: number,\n xElement: SVGElement,\n ): JSXElement[] {\n const { barCornerRadius = 0, barMinimumHeight = 0 } = props;\n const _isHavingLines = props.data.some(\n (item: VerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = _toFocusWholeStack(_isHavingLines);\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth, xBarScale.bandwidth());\n }\n\n const bars = _points.map((singleChartData: VerticalStackedChartProps, indexNumber: number) => {\n const xPoint = xBarScale(\n _xAxisType === XAxisTypes.NumericAxis\n ? (singleChartData.xAxisPoint as number)\n : _xAxisType === XAxisTypes.DateAxis\n ? (singleChartData.xAxisPoint as Date)\n : (singleChartData.xAxisPoint as string),\n );\n const xScaleBandwidthTranslate =\n _xAxisType !== XAxisTypes.StringAxis ? -_barWidth / 2 : (xBarScale.bandwidth() - _barWidth) / 2;\n\n let barTotalValue = 0;\n\n const barsToDisplay = singleChartData.chartData.filter(\n point =>\n point.data !== 0 &&\n point.data !== '' &&\n !(\n _yAxisType === YAxisType.StringAxis &&\n typeof (yBarScale as StringScale)(point.data as string) === 'undefined'\n ),\n );\n\n if (!barsToDisplay.length) {\n return undefined;\n }\n\n const { gapHeight, heightValueScale, absStackTotal } = _getBarGapAndScale(barsToDisplay, yBarScale);\n\n if (heightValueScale < 0) {\n return undefined;\n }\n\n const yBaseline =\n containerHeight -\n _margins.bottom! -\n (_yAxisType === YAxisType.StringAxis ? 0 : (yBarScale as NumericScale)(Y_ORIGIN));\n let yPositiveStart = yBaseline;\n let yNegativeStart = yBaseline;\n let yPoint = 0;\n let heightOfLastBar = 0;\n\n const singleBar = barsToDisplay.map((point: VSChartDataPoint, index: number) => {\n const startColor = point.color ? point.color : _colors[index];\n const ref: RefArrayData = {};\n const shouldHighlight = _isLegendHighlighted(point.legend) || _noLegendHighlighted() ? true : false;\n const rectFocusProps = !shouldFocusWholeStack &&\n shouldHighlight && {\n 'aria-label': _getAriaLabel(singleChartData, point),\n onMouseOver: (event: React.MouseEvent<SVGElement, MouseEvent>) =>\n _onRectHover(singleChartData.xAxisPoint, point, startColor, event),\n onMouseMove: (event: React.MouseEvent<SVGElement, MouseEvent>) =>\n _onRectHover(singleChartData.xAxisPoint, point, startColor, event),\n onMouseLeave: _handleMouseOut,\n onFocus: () => _onRectFocus(point, singleChartData.xAxisPoint as string, startColor, ref),\n onBlur: _handleMouseOut,\n onClick: (event: React.MouseEvent<SVGElement, MouseEvent>) => _onClick(point, event),\n role: 'img',\n tabIndex: !props.hideTooltip && shouldHighlight ? 0 : undefined,\n };\n\n let barHeight: number;\n const gapOffset = index ? gapHeight : 0;\n if (_yAxisType === YAxisType.StringAxis) {\n barHeight = Math.max(\n containerHeight -\n _margins.bottom! -\n ((yBarScale as StringScale)(point.data as string)! + (yBarScale as StringScale).bandwidth() / 2) -\n gapOffset,\n barMinimumHeight,\n 1,\n );\n yPositiveStart -= barHeight + gapOffset;\n yPoint = yPositiveStart;\n } else {\n barHeight = Math.abs(heightValueScale * (point.data as number));\n // FIXME: The current scaling logic may produce different min and gap heights for each bar stack.\n const minHeight = Math.max((heightValueScale * absStackTotal) / 100.0, barMinimumHeight);\n if (barHeight < minHeight) {\n barHeight = minHeight;\n }\n if ((point.data as number) >= Y_ORIGIN) {\n yPositiveStart -= barHeight + gapOffset;\n yPoint = yPositiveStart;\n } else {\n yPoint = yNegativeStart + gapOffset;\n yNegativeStart = yPoint + barHeight;\n }\n\n barTotalValue += point.data as number;\n heightOfLastBar = index === barsToDisplay.length - 1 ? barHeight : 0;\n }\n\n if (barCornerRadius && barHeight > barCornerRadius && index === barsToDisplay.length - 1) {\n return (\n <React.Fragment key={index + indexNumber + `${shouldFocusWholeStack}`}>\n <path\n className={classes.opacityChangeOnHover}\n d={`\n M ${xPoint} ${yPoint + barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${-barCornerRadius}\n h ${_barWidth - 2 * barCornerRadius}\n a ${barCornerRadius} ${barCornerRadius} 0 0 1 ${barCornerRadius} ${barCornerRadius}\n v ${barHeight - barCornerRadius}\n h ${-_barWidth}\n z\n `}\n fill={startColor}\n rx={props.roundCorners ? 3 : 0}\n ref={e => {\n ref.refElement = e;\n }}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n cursor={props.href ? 'pointer' : 'default'}\n {...rectFocusProps}\n />\n </React.Fragment>\n );\n }\n if (barHeight < 0) {\n return <React.Fragment key={index + indexNumber}> </React.Fragment>;\n }\n return (\n <React.Fragment key={index + indexNumber}>\n <rect\n className={classes.opacityChangeOnHover}\n x={xPoint}\n y={yPoint}\n width={_barWidth}\n height={barHeight}\n fill={startColor}\n opacity={shouldHighlight ? 1 : 0.1}\n cursor={props.href ? 'pointer' : 'default'}\n rx={props.roundCorners ? 3 : 0}\n ref={e => {\n ref.refElement = e;\n }}\n {...rectFocusProps}\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n />\n </React.Fragment>\n );\n });\n const groupRef: RefArrayData = {};\n const someBarsActive =\n singleChartData.chartData.filter(dataPoint => _noLegendHighlighted() || _isLegendHighlighted(dataPoint.legend))\n .length > 0;\n // FIXME: Making the entire stack focusable when stack callout is enabled adds unnecessary complexity\n // and can reduce usability in certain scenarios. Instead, each individual element within the stack\n // should be focusable on its own, with its own aria-label. This behavior is also seen in Highcharts.\n const stackFocusProps = shouldFocusWholeStack &&\n someBarsActive && {\n 'aria-label': _getAriaLabel(singleChartData),\n onMouseOver: (event: any) => _onStackHover(singleChartData, event),\n onMouseMove: (event: any) => _onStackHover(singleChartData, event),\n onMouseLeave: _handleMouseOut,\n onFocus: () => _onStackFocus(singleChartData, groupRef),\n onBlur: _handleMouseOut,\n onClick: (event: any) => _onClick(singleChartData, event),\n role: 'img',\n tabIndex: !props.hideTooltip ? 0 : undefined,\n };\n let showLabel = false;\n let barLabel: string | number = 0;\n let selectedBarTotalValue: number = 0;\n let customBarLabel: string | undefined = undefined;\n if (!props.hideLabels && _yAxisType !== YAxisType.StringAxis) {\n // Collect all bars with barLabel that match the legend filter\n const barLabelsToDisplay = barsToDisplay.filter(\n point => point.barLabel && (_noLegendHighlighted() || _isLegendHighlighted(point.legend)),\n );\n if (barLabelsToDisplay.length > 0) {\n customBarLabel = barLabelsToDisplay[barLabelsToDisplay.length - 1].barLabel!;\n }\n if (_noLegendHighlighted()) {\n showLabel = true;\n barLabel = customBarLabel ?? barTotalValue;\n selectedBarTotalValue = barTotalValue;\n } else {\n barsToDisplay.forEach(point => {\n if (_isLegendHighlighted(point.legend)) {\n showLabel = true;\n selectedBarTotalValue += point.data as number;\n }\n });\n barLabel = customBarLabel ?? selectedBarTotalValue;\n }\n }\n return (\n <g key={indexNumber + `${shouldFocusWholeStack}`}>\n <g\n id={`${indexNumber}-singleBar`}\n ref={e => {\n groupRef.refElement = e;\n }}\n {...stackFocusProps}\n >\n {singleBar}\n </g>\n {/*\n Note: No need to check hideLabels here, as showLabel is only set to true\n when hideLabels is false earlier in the code.\n */}\n {!props.hideLabels && _barWidth >= 16 && showLabel && (\n <text\n x={xPoint + _barWidth / 2}\n //if total bar value >=0, show label above top bar, otherwise below bottom bar\n y={selectedBarTotalValue >= Y_ORIGIN ? yPoint - 6 : yPoint + heightOfLastBar + 12}\n textAnchor=\"middle\"\n className={classes.barLabel}\n aria-label={`Total: ${barLabel}`}\n role=\"img\"\n transform={`translate(${xScaleBandwidthTranslate}, 0)`}\n style={{ direction: 'ltr', unicodeBidi: 'isolate' }}\n >\n {typeof barLabel === 'string'\n ? barLabel\n : typeof props.yAxisTickFormat === 'function'\n ? props.yAxisTickFormat(barLabel)\n : formatScientificLimitWidth(barLabel)}\n </text>\n )}\n </g>\n );\n });\n return bars.filter((bar): bar is JSXElement => !!bar);\n }\n\n function _getMinMaxOfYAxis(\n dataset: DataPoint[],\n yAxisType?: YAxisType,\n useSecondaryYScale?: boolean,\n ): { startValue: number; endValue: number } {\n if (!useSecondaryYScale) {\n return findVSBCNumericMinMaxOfY(dataset);\n }\n\n const values: number[] = [];\n props.data.forEach(xPoint => {\n xPoint.lineData?.forEach(point => {\n // useSecondaryYScale is applicable only for lines in VSBC\n if (point.useSecondaryYScale) {\n values.push(point.y as number);\n }\n });\n });\n\n return { startValue: d3Min(values)!, endValue: d3Max(values)! };\n }\n\n function _initYAxisParams() {\n if (_points[0].chartData.length > 0) {\n _yAxisType = getTypeOfAxis(_points[0].chartData[0].data, false) as YAxisType;\n } else {\n Object.keys(_lineObject).forEach(lineLegend => {\n if (!_lineObject[lineLegend][0].useSecondaryYScale) {\n _yAxisType = getTypeOfAxis(_lineObject[lineLegend][0].y, false) as YAxisType;\n }\n });\n }\n\n _yAxisLabels = _getOrderedYAxisLabels();\n }\n\n function _getYDomainMargins(containerHeight: number): Margins {\n /**\n * Specifies the extra top margin to apply above the highest y-axis tick label.\n * Useful when stacked bars extend beyond the combined height of all y-axis labels (or categories).\n */\n let yAxisTickMarginTop = 0;\n\n /** Total height available to render the bars */\n const totalHeight = containerHeight - _margins.bottom! - _margins.top!;\n\n if (_yAxisType === YAxisType.StringAxis) {\n /** Maximum height of the stacked bars, expressed in multiples of the height of a y-axis label (or category) */\n let maxBarHeightInLabels = 0;\n _points.forEach(xPoint => {\n /** Height of the stacked bar, expressed in multiples of the height of a y-axis label (or category) */\n let barHeightInLabels = 0;\n xPoint.chartData.forEach(bar => {\n barHeightInLabels += _yAxisLabels.indexOf(`${bar.data}`) + 1;\n });\n maxBarHeightInLabels = Math.max(maxBarHeightInLabels, barHeightInLabels);\n });\n /** Height of a y-axis label (or category) */\n const yAxisLabelHeight = maxBarHeightInLabels === 0 ? 0 : totalHeight / maxBarHeightInLabels;\n yAxisTickMarginTop += yAxisLabelHeight * (maxBarHeightInLabels - _yAxisLabels.length);\n }\n\n return {\n ..._margins,\n top: _margins.top! + yAxisTickMarginTop,\n };\n }\n\n function _getOrderedXAxisLabels() {\n if (_xAxisType !== XAxisTypes.StringAxis) {\n return [];\n }\n\n return sortAxisCategories(_mapCategoryToValues(), props.xAxisCategoryOrder);\n }\n\n function _getOrderedYAxisLabels() {\n if (_yAxisType !== YAxisType.StringAxis) {\n return [];\n }\n\n return sortAxisCategories(_mapCategoryToValues(true), props.yAxisCategoryOrder);\n }\n\n function _mapCategoryToValues(isYAxis = false) {\n const categoryToValues: Record<string, number[]> = {};\n _points.forEach(point => {\n point.chartData.forEach(bar => {\n const category = (isYAxis ? bar.data : point.xAxisPoint) as string;\n const value = isYAxis ? point.xAxisPoint : bar.data;\n if (!categoryToValues[category]) {\n categoryToValues[category] = [];\n }\n if (typeof value === 'number') {\n categoryToValues[category].push(value);\n }\n });\n point.lineData?.forEach(linePoint => {\n if (isYAxis && linePoint.useSecondaryYScale) {\n return;\n }\n const category = (isYAxis ? linePoint.y : point.xAxisPoint) as string;\n const value = isYAxis ? point.xAxisPoint : linePoint.y;\n if (!categoryToValues[category]) {\n categoryToValues[category] = [];\n }\n if (typeof value === 'number') {\n categoryToValues[category].push(value);\n }\n });\n });\n return categoryToValues;\n }\n\n if (!_isChartEmpty()) {\n _adjustProps();\n const _isHavingLines = props.data.some(\n (item: VerticalStackedChartProps) => item.lineData && item.lineData.length > 0,\n );\n const shouldFocusWholeStack = _toFocusWholeStack(_isHavingLines);\n _dataset = _createDataSetLayer();\n const legendBars: JSXElement = _getLegendData(_points, _createLegendsForLine(props.data));\n const calloutProps: ModifiedCartesianChartProps['calloutProps'] = {\n color: color,\n legend: calloutLegend,\n XValue: xCalloutValue!,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n YValueHover: YValueHover,\n hoverXValue: hoverXValue,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData),\n clickPosition: clickPosition,\n isPopoverOpen: isPopoverOpen,\n isCalloutForStack:\n props.isCalloutForStack || (_isHavingLines && (_noLegendHighlighted() || _getHighlightedLegend().length > 1)),\n isCartesian: true,\n customCallout: {\n customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n };\n const tickParams = {\n tickValues: props.tickValues,\n tickFormat: props.tickFormat,\n };\n return (\n <CartesianChart\n {...props}\n chartTitle={_getChartTitle()}\n points={_dataset}\n chartType={ChartTypes.VerticalStackedBarChart}\n xAxisType={_xAxisType}\n getMinMaxOfYAxis={_getMinMaxOfYAxis}\n calloutProps={calloutProps}\n createYAxis={createNumericYAxis}\n tickParams={tickParams}\n legendBars={legendBars}\n datasetForXAxisDomain={_xAxisLabels}\n isCalloutForStack={shouldFocusWholeStack}\n getDomainNRangeValues={_getDomainNRangeValues}\n createStringYAxis={createStringYAxis}\n barwidth={_barWidth}\n getmargins={_getMargins}\n getGraphData={_getGraphData}\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={!isScalePaddingDefined(props.xAxisInnerPadding, props.xAxisPadding)}\n yAxisType={_yAxisType!}\n stringDatasetForYAxisDomain={['', ..._yAxisLabels]}\n getYDomainMargins={_getYDomainMargins}\n /* eslint-disable react/jsx-no-bind */\n children={(props: ChildProps) => {\n return (\n <>\n <g>{_bars}</g>\n <g>\n {_isHavingLines &&\n _createLines(\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 return <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />;\n});\nVerticalStackedBarChart.displayName = 'VerticalStackedBarChart';\n"],"names":["React","max","d3Max","min","d3Min","useVerticalStackedBarChartStyles","scaleLinear","d3ScaleLinear","scaleBand","d3ScaleBand","scaleUtc","d3ScaleUtc","scaleTime","d3ScaleTime","useId","tokens","CartesianChart","ChartPopover","Legends","ChartTypes","getAccessibleDataObject","XAxisTypes","getTypeOfAxis","formatScientificLimitWidth","getBarWidth","getScalePadding","isScalePaddingDefined","calculateAppropriateBarWidth","areArraysEqual","calculateLongestLabelWidth","useRtl","DataVizPalette","getColorFromToken","findVSBCNumericMinMaxOfY","YAxisType","createNumericYAxis","domainRangeOfDateForAreaLineScatterVerticalBarCharts","domainRangeOfVSBCNumeric","domainRangeOfXStringAxis","createStringYAxis","calcTotalWidth","calcBandwidth","calcRequiredWidth","sortAxisCategories","formatDateToLocaleString","isInvalidValue","useImageExport","barGapMultiplier","barGapMin","MIN_DOMAIN_MARGIN","VerticalStackedBarChart","forwardRef","_props","forwardedRef","props","xAxisCategoryOrder","yAxisCategoryOrder","maxBarWidth","_isRtl","_createLegendsForLine","data","_getLineLegends","_emptyChartId","_points","_dataset","_xAxisLabels","_bars","_xAxisType","length","xAxisPoint","StringAxis","_barWidth","_colors","_margins","_lineObject","_yMax","_yMin","_calloutAnchorPoint","_domainMargin","_xAxisInnerPadding","_xAxisOuterPadding","cartesianChartRef","legendsRef","_legendsRef","componentRef","hideLegend","Y_ORIGIN","_yAxisType","_yAxisLabels","selectedLegends","setSelectedLegends","useState","legendProps","activeLegend","setActiveLegend","undefined","dataForHoverCard","setDataForHoverCard","color","setColor","hoverXValue","setHoverXValue","YValueHover","setYValueHover","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","activeXAxisDataPoint","setActiveXAxisDataPoint","calloutLegend","setCalloutLegend","stackCalloutProps","setStackCalloutProps","dataPointCalloutProps","setDataPointCalloutProps","callOutAccessibilityData","setCallOutAccessibilityData","clickPosition","setClickPosition","x","y","isPopoverOpen","setPopoverOpen","prevPropsRef","useRef","useEffect","current","prevProps","height","width","_adjustProps","_createDataSetLayer","_getLegendData","lineLegends","defaultPalette","color6","color1","color5","color7","color10","actions","allowHoverOnLegend","forEach","singleChartData","chartData","point","Math","floor","random","checkSimilarLegends","filter","leg","title","legend","hoverAction","_handleChartMouseLeave","_onLegendHover","onMouseOutAction","_onLegendLeave","push","legendsOfLine","isLineLegendInBarChart","totalLegends","concat","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onChange","_onLegendSelectionChange","legendRef","_getHighlightedLegend","_lineHoverFocus","lineData","event","clientX","clientY","boundingRect","target","getBoundingClientRect","left","top","_noLegendHighlighted","_isLegendHighlighted","_updatePosition","xItem","yAxisCalloutData","_onStackHoverFocus","stack","element","dataPoint","isLinesPresent","item","shouldDrawBorderBottom","sort","a","b","slice","reverse","Date","culture","useUTC","stackCallOutAccessibilityData","_onClick","mouseEvent","onBarClick","href","window","location","barWidth","defaultColors","firstXValue","_getFormattedLineData","xAxisInnerPadding","xAxisPadding","xAxisOuterPadding","_initYAxisParams","dataset","map","singlePointData","total","_getOrderedXAxisLabels","legendTitle","_selectedLegends","currentLegend","canSelectMultipleLegends","_getMargins","margins","_getGraphData","xScale","yScale","containerHeight","containerWidth","xElement","xBarScale","yBarScale","_getScales","_createBar","_getAxisData","yAxisData","yAxisDomainValues","domainValue","yMaxValue","yMinValue","includes","_getAriaLabel","isLinePoint","xValue","xAxisCalloutData","pointValues","pt","yValue","str","join","lineValues","ln","ariaLabel","_getCustomizedCallout","_isHavingLines","some","onRenderCalloutPerStack","onRenderCalloutPerDataPoint","_renderCallout","_toFocusWholeStack","isCalloutForStack","shouldFocusStackOnly","_getDomainNRangeValues","points","chartType","isRTL","xAxisType","tickValues","domainNRangeValue","NumericAxis","DateAxis","linesData","formattedLineData","index","line","lineObject","Object","keys","_createLines","yScalePrimary","yScaleSecondary","lines","borderForLines","dots","lineBorderWidth","lineOptions","Number","parseFloat","toString","xScaleBandwidthTranslate","bandwidth","shouldHighlight","i","x1","useSecondaryYScale","y1","x2","y2","yScaleBandwidthTranslate","key","opacity","strokeWidth","fill","strokeLinecap","stroke","colorNeutralBackground1","transform","strokeDasharray","onMouseOver","_lineHover","onMouseLeave","_handleMouseOut","circlePoint","subIndex","circleRef","refElement","noBarsAndLinesActive","circle","cx","cy","r","_getCircleOpacityAndRadius","radius","ref","e","tabIndex","hideTooltip","onFocus","_lineFocus","onBlur","role","XValue","YValue","_onRectHover","persist","_onRectFocusHover","chartDataPoint","xAxisDataPoint","_onStackHover","_onRectFocus","_onStackFocus","groupRef","_getBarGapAndScale","bars","defaultTotalHeight","barGapMax","totalData","totalHeight","sumOfPercent","scalingRatio","reduce","bar","iter","value","abs","gaps","gapHeight","heightValueScale","absStackTotal","yDomain","domain","range","bottom","xMax","xMin","right","nice","sDate","lDate","paddingInner","paddingOuter","_isChartEmpty","newX","newY","threshold","distance","sqrt","pow","_getDomainMargins","totalWidth","reqWidth","mode","margin1","margin2","POSITIVE_INFINITY","hideTickOverlap","step","_getChartTitle","chartTitle","numLines","classes","barCornerRadius","barMinimumHeight","shouldFocusWholeStack","indexNumber","xPoint","barTotalValue","barsToDisplay","yBaseline","yPositiveStart","yNegativeStart","yPoint","heightOfLastBar","singleBar","startColor","rectFocusProps","onMouseMove","onClick","barHeight","gapOffset","minHeight","Fragment","path","className","opacityChangeOnHover","d","rx","roundCorners","cursor","rect","someBarsActive","stackFocusProps","showLabel","barLabel","selectedBarTotalValue","customBarLabel","hideLabels","barLabelsToDisplay","g","id","text","textAnchor","aria-label","style","direction","unicodeBidi","yAxisTickFormat","_getMinMaxOfYAxis","yAxisType","values","startValue","endValue","lineLegend","_getOrderedYAxisLabels","_getYDomainMargins","yAxisTickMarginTop","maxBarHeightInLabels","barHeightInLabels","indexOf","yAxisLabelHeight","_mapCategoryToValues","isYAxis","categoryToValues","category","linePoint","legendBars","calloutProps","isCartesian","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","tickParams","tickFormat","getMinMaxOfYAxis","createYAxis","datasetForXAxisDomain","getDomainNRangeValues","barwidth","getmargins","getGraphData","getAxisData","onChartMouseLeave","getDomainMargins","showRoundOffXTickValues","stringDatasetForYAxisDomain","getYDomainMargins","children","div","displayName"],"mappings":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MiL,MAAM,EACZjL,MAAMuO,aAAa,EACnBvO,MAAMmL,eAAe,EACrBnL,MAAMoL,cAAc,EACpBpL,MAAMwO,eAAe;YAKjC;;IAGN;IACA,OAAA,WAAA,GAAO,OAAA,aAAA,CAACsM,OAAAA;QAAIjD,IAAIrX;QAAekR,MAAM;QAASuG,OAAO;YAAErI,SAAS;QAAI;QAAGoI,cAAY;;AACrF,GAAG;AACHpY,wBAAwBmb,WAAW,GAAG"}
|
package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js
CHANGED
|
@@ -56,7 +56,6 @@ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
|
56
56
|
B0ocmuz: "f1bnz8pu",
|
|
57
57
|
qhf8xq: "f1euv43f",
|
|
58
58
|
fsow6f: "f17mccla",
|
|
59
|
-
Bhzewxz: "fr6rvge",
|
|
60
59
|
De3pzq: "fxugw4r",
|
|
61
60
|
Beyfa6y: 0,
|
|
62
61
|
Bbmb7ep: 0,
|
|
@@ -91,7 +90,6 @@ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
|
91
90
|
],
|
|
92
91
|
".f1euv43f{position:absolute;}",
|
|
93
92
|
".f17mccla{text-align:center;}",
|
|
94
|
-
".fr6rvge{top:var(--spacingVerticalNone);}",
|
|
95
93
|
".fxugw4r{background-color:var(--colorNeutralBackground1);}",
|
|
96
94
|
[
|
|
97
95
|
".fq9zq91{border-radius:var(--borderRadiusSmall);}",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useVerticalStackedBarChartStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { getBarLabelStyle, getTooltipStyle } from '../../utilities/index';\nexport const verticalstackedbarchartClassNames = {\n opacityChangeOnHover: 'fui-vsbc__opacityChangeOnHover',\n tooltip: 'fui-vsbc__tooltip',\n barLabel: 'fui-vsbc__barLabel',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n plotContainer: '',\n annotationLayer: ''\n};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {\n cursor: 'default'\n },\n tooltip: getTooltipStyle(),\n barLabel: getBarLabelStyle()\n});\nexport const useVerticalStackedBarChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n opacityChangeOnHover: mergeClasses(verticalstackedbarchartClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover, props.href ? 'pointer' : 'default'),\n tooltip: mergeClasses(verticalstackedbarchartClassNames.tooltip, baseStyles.tooltip),\n barLabel: mergeClasses(verticalstackedbarchartClassNames.barLabel, baseStyles.barLabel)\n };\n};\n"],"names":["__styles","mergeClasses","getBarLabelStyle","getTooltipStyle","verticalstackedbarchartClassNames","opacityChangeOnHover","tooltip","barLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","plotContainer","annotationLayer","useStyles","Bceei9c","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","qhf8xq","fsow6f","
|
|
1
|
+
{"version":3,"sources":["useVerticalStackedBarChartStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { getBarLabelStyle, getTooltipStyle } from '../../utilities/index';\nexport const verticalstackedbarchartClassNames = {\n opacityChangeOnHover: 'fui-vsbc__opacityChangeOnHover',\n tooltip: 'fui-vsbc__tooltip',\n barLabel: 'fui-vsbc__barLabel',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n plotContainer: '',\n annotationLayer: ''\n};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {\n cursor: 'default'\n },\n tooltip: getTooltipStyle(),\n barLabel: getBarLabelStyle()\n});\nexport const useVerticalStackedBarChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n opacityChangeOnHover: mergeClasses(verticalstackedbarchartClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover, props.href ? 'pointer' : 'default'),\n tooltip: mergeClasses(verticalstackedbarchartClassNames.tooltip, baseStyles.tooltip),\n barLabel: mergeClasses(verticalstackedbarchartClassNames.barLabel, baseStyles.barLabel)\n };\n};\n"],"names":["__styles","mergeClasses","getBarLabelStyle","getTooltipStyle","verticalstackedbarchartClassNames","opacityChangeOnHover","tooltip","barLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","plotContainer","annotationLayer","useStyles","Bceei9c","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","qhf8xq","fsow6f","De3pzq","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","sj55zd","Bkfmm31","Bvjb7m6","d","p","useVerticalStackedBarChartStyles","props","baseStyles","href"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IA8BCkD,gCAAgC;;;IA3BhC9C,iCAAiC;;;;uBAFL,gBAAgB;AAElD,0CAA0C;IAC7CC,oBAAoB,EAAE,gCAAgC;IACtDC,OAAO,EAAE,mBAAmB;IAC5BC,QAAQ,EAAE,oBAAoB;IAC9BC,IAAI,EAAE,EAAE;IACRC,KAAK,EAAE,EAAE;IACTC,KAAK,EAAE,EAAE;IACTC,eAAe,EAAE,EAAE;IACnBC,KAAK,EAAE,EAAE;IACTC,kBAAkB,EAAE,EAAE;IACtBC,SAAS,EAAE,EAAE;IACbC,UAAU,EAAE,EAAE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,mBAAY,EAACG,iCAAiC,CAACC,oBAAoB,EAAE+C,UAAU,CAAC/C,oBAAoB,EAAE8C,KAAK,CAACE,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC;QAC/J/C,OAAO,MAAEL,mBAAY,EAACG,iCAAiC,CAACE,OAAO,EAAE8C,UAAU,CAAC9C,OAAO,CAAC;QACpFC,QAAQ,MAAEN,mBAAY,EAACG,iCAAiC,CAACG,QAAQ,EAAE6C,UAAU,CAAC7C,QAAQ;IAC1F,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/ChartAnnotation.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type ChartAnnotationCoordinate
|
|
1
|
+
{"version":3,"sources":["../src/types/ChartAnnotation.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type ChartAnnotationCoordinate =\n | {\n /** Cartesian data coordinates mapped through the chart scales */\n type: 'data';\n /** x-axis value in the data domain */\n x: number | string | Date;\n /** y-axis value in the data domain */\n y: number | string | Date;\n /** Use the secondary y scale when available */\n yAxis?: 'primary' | 'secondary';\n }\n | {\n /** Normalised coordinates within the plot area (0-1) */\n type: 'relative';\n /** Fractional x-position inside the plot area */\n x: number;\n /** Fractional y-position inside the plot area */\n y: number;\n }\n | {\n /** Absolute pixel position relative to the chart's plot origin */\n type: 'pixel';\n /** Horizontal pixel offset from the plot origin */\n x: number;\n /** Vertical pixel offset from the plot origin */\n y: number;\n }\n | {\n /** Mixed coordinate systems per axis (e.g., data X + relative Y) */\n type: 'mixed';\n xCoordinateType: 'data' | 'relative' | 'pixel';\n yCoordinateType: 'data' | 'relative' | 'pixel';\n x: number | string | Date;\n y: number | string | Date;\n /** Use the secondary y scale when the Y coordinate maps to data */\n yAxis?: 'primary' | 'secondary';\n };\n\nexport type ChartAnnotationHorizontalAlign = 'start' | 'center' | 'end';\nexport type ChartAnnotationVerticalAlign = 'top' | 'middle' | 'bottom';\n\nexport type ChartAnnotationArrowHead = 'none' | 'start' | 'end' | 'both';\n\nexport interface ChartAnnotationConnectorProps {\n /** Distance in pixels between the annotation element and the start of the connector. */\n startPadding?: number;\n /** Distance in pixels between the anchor point and the end of the connector. */\n endPadding?: number;\n /** Stroke colour for the connector. */\n strokeColor?: string;\n /** Stroke width in pixels. */\n strokeWidth?: number;\n /** SVG stroke dash array for dashed connectors. */\n dashArray?: string;\n /** Arrow head placement. Defaults to `'end'`. */\n arrow?: ChartAnnotationArrowHead;\n}\n\nexport interface ChartAnnotationLayoutProps {\n /** Horizontal alignment of the annotation relative to the anchor point */\n align?: ChartAnnotationHorizontalAlign;\n /** Vertical alignment of the annotation relative to the anchor point */\n verticalAlign?: ChartAnnotationVerticalAlign;\n /** Horizontal offset in pixels applied after alignment */\n offsetX?: number;\n /** Vertical offset in pixels applied after alignment */\n offsetY?: number;\n /** Optional maximum width for wrapped text */\n maxWidth?: number;\n /** Whether the annotation should remain inside the plot area */\n clipToBounds?: boolean;\n /** Additional CSS classes applied to the annotation wrapper */\n className?: string;\n}\n\nexport interface ChartAnnotationStyleProps {\n /** Text colour */\n textColor?: string;\n /** Background colour for the annotation container */\n backgroundColor?: string;\n /** Border colour */\n borderColor?: string;\n /** Border width */\n borderWidth?: number;\n /** Border style (solid, dashed, etc.) */\n borderStyle?: React.CSSProperties['borderStyle'];\n /** Border radius */\n borderRadius?: number;\n /** Box shadow applied to annotation */\n boxShadow?: string;\n /** Font size override */\n fontSize?: string;\n /** Font weight override */\n fontWeight?: React.CSSProperties['fontWeight'];\n /** Padding around the text. Accepts CSS shorthand notation */\n padding?: string;\n /** Opacity for the annotation container */\n opacity?: number;\n /** Optional class name applied to the annotation element */\n className?: string;\n /** Rotation, in degrees, applied to the annotation container */\n rotation?: number;\n}\n\nexport interface ChartAnnotationAccessibilityProps {\n /** Accessible label announced by assistive technologies */\n ariaLabel?: string;\n /** Accessible description id */\n ariaDescribedBy?: string;\n /** Custom role */\n role?: string;\n}\n\nexport interface ChartAnnotation {\n /** Optional id for React reconciliation */\n id?: string;\n /** Primary textual content */\n text: string;\n /** Coordinates describing where the annotation should be anchored */\n coordinates: ChartAnnotationCoordinate;\n /** Layout customisation */\n layout?: ChartAnnotationLayoutProps;\n /** Visual styling */\n style?: ChartAnnotationStyleProps;\n /** Optional connector line that links the annotation to its anchor. */\n connector?: ChartAnnotationConnectorProps;\n /** Accessibility metadata */\n accessibility?: ChartAnnotationAccessibilityProps;\n /** Optional application specific metadata */\n data?: Record<string, unknown>;\n}\n"],"names":["React"],"mappings":";;;;;iEAAuB,QAAQ"}
|