@fluentui/react-charts 9.3.5 → 9.3.6
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 +23 -2
- package/dist/index.d.ts +223 -44
- package/lib/AnnotationOnlyChart.js +1 -0
- package/lib/AnnotationOnlyChart.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +208 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +1 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/index.js +2 -0
- package/lib/components/AnnotationOnlyChart/index.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +31 -0
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +23 -0
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -0
- package/lib/components/AreaChart/useAreaChartStyles.styles.js +11 -6
- package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
- package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -1
- package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.js +59 -39
- package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +5 -5
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +617 -0
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +1 -0
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
- package/lib/components/CommonComponents/Annotations/index.js +2 -0
- package/lib/components/CommonComponents/Annotations/index.js.map +1 -0
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +173 -0
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -0
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +126 -0
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -0
- package/lib/components/CommonComponents/CartesianChart.js +157 -132
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/CommonComponents/index.js +2 -0
- package/lib/components/CommonComponents/index.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +29 -13
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +14 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +2 -6
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +3 -2
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +39 -19
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +4 -8
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +644 -72
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js +23 -8
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +2 -2
- package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.js +2 -2
- package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.js +3 -3
- package/lib/components/GanttChart/GanttChart.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.types.js.map +1 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.js +3 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +1 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +3 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +11 -6
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +3 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +3 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +3 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +25 -12
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +4 -4
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -2
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +3 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +3 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
- package/lib/components/Legends/useLegendsStyles.styles.js +97 -37
- package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
- package/lib/components/Legends/useLegendsStyles.styles.raw.js +10 -11
- package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +1 -1
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/LineChart/useLineChartStyles.styles.js +15 -10
- package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib/components/LineChart/useLineChartStyles.styles.raw.js +3 -1
- package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +13 -10
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.js +1 -1
- 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 +13 -8
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +13 -8
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +3 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +11 -6
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/types/ChartAnnotation.js +1 -0
- package/lib/types/ChartAnnotation.js.map +1 -0
- package/lib/types/index.js +1 -0
- package/lib/types/index.js.map +1 -1
- package/lib/utilities/Common.styles.js +1 -2
- package/lib/utilities/Common.styles.js.map +1 -1
- package/lib/utilities/Common.styles.raw.js +1 -2
- package/lib/utilities/Common.styles.raw.js.map +1 -1
- package/lib/utilities/image-export-utils.js +108 -0
- package/lib/utilities/image-export-utils.js.map +1 -1
- package/lib/utilities/utilities.js +16 -13
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-commonjs/AnnotationOnlyChart.js +6 -0
- package/lib-commonjs/AnnotationOnlyChart.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +219 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +6 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/index.js +7 -0
- package/lib-commonjs/components/AnnotationOnlyChart/index.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +56 -0
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +33 -0
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +14 -15
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +74 -102
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +4 -4
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +628 -0
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +4 -0
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/Annotations/index.js +7 -0
- package/lib-commonjs/components/CommonComponents/Annotations/index.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +265 -0
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +161 -0
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +157 -131
- 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/index.js +2 -0
- package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +32 -21
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +14 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +0 -14
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +38 -18
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +630 -38
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +25 -16
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +2 -2
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.js +3 -3
- package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +3 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +14 -15
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +3 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +47 -34
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +3 -3
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -2
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +3 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +144 -86
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +9 -10
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +18 -19
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +16 -19
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +1 -1
- 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 +16 -17
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +16 -17
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +14 -15
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/index.js +1 -0
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types/ChartAnnotation.js +6 -0
- package/lib-commonjs/types/ChartAnnotation.js.map +1 -0
- package/lib-commonjs/types/index.js +1 -0
- package/lib-commonjs/types/index.js.map +1 -1
- package/lib-commonjs/utilities/Common.styles.js +1 -2
- package/lib-commonjs/utilities/Common.styles.js.map +1 -1
- package/lib-commonjs/utilities/Common.styles.raw.js +1 -2
- package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -1
- package/lib-commonjs/utilities/image-export-utils.js +108 -0
- package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +16 -13
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/GroupedVerticalBarChart/GroupedVerticalBarChart.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useGroupedVerticalBarChartStyles_unstable } from './useGroupedVerticalBarChartStyles.styles';\nimport { select as d3Select, pointer as d3Pointer } from 'd3-selection';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { ScaleBand, ScaleLinear, scaleBand as d3ScaleBand } from 'd3-scale';\n\nimport { useId, JSXElement } from '@fluentui/react-utilities';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n tooltipOfAxislabels,\n XAxisTypes,\n getTypeOfAxis,\n formatScientificLimitWidth,\n getScalePadding,\n getBarWidth,\n isScalePaddingDefined,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfXStringAxis,\n createStringYAxis,\n getNextColor,\n areArraysEqual,\n calculateLongestLabelWidth,\n useRtl,\n YAxisType,\n calcRequiredWidth,\n calcTotalWidth,\n calcBandwidth,\n calcTotalBandUnits,\n sortAxisCategories,\n} from '../../utilities/index';\n\nimport {\n AccessibilityProps,\n CartesianChart,\n Margins,\n Legend,\n GroupedVerticalBarChartProps,\n GroupedVerticalBarChartData,\n GVBarChartSeriesPoint,\n Legends,\n YValueHover,\n ChartPopoverProps,\n Chart,\n ImageExportOptions,\n LegendContainer,\n LineSeries,\n getColorFromToken,\n BarSeries,\n ChildProps,\n} from '../../index';\nimport { toImage } from '../../utilities/image-export-utils';\nimport { tokens } from '@fluentui/react-theme';\n\ntype NumericScale = ScaleLinear<number, number>;\ntype StringScale = ScaleBand<string>;\n\nconst MIN_DOMAIN_MARGIN = 8;\nconst X1_INNER_PADDING = 0.1;\nconst VERTICAL_BAR_GAP = 1;\nconst MIN_BAR_HEIGHT = 1;\n\n// This interface used for - While forming datapoints from given prop \"data\" in code\ninterface GVDataPoint {\n [key: string]: number | string;\n}\n\n// While forming datapoints from given prop \"data\" in code. These datapoints are used for to draw graph easily.\ninterface GVSingleDataPoint {\n [key: string]: GVDataPoint;\n}\n\ntype GVBCLineSeries = LineSeries<string, number>;\n\nexport const GroupedVerticalBarChart: React.FC<GroupedVerticalBarChartProps> = React.forwardRef<\n HTMLDivElement,\n GroupedVerticalBarChartProps\n>((_props, forwardedRef) => {\n const props: GroupedVerticalBarChartProps = {\n xAxisCategoryOrder: 'default',\n maxBarWidth: 24,\n ..._props,\n };\n const _tooltipId: string = useId('GVBCTooltipId_');\n const _emptyChartId: string = useId('_GVBC_empty');\n const _useRtl: boolean = useRtl();\n let _domainMargin: number = MIN_DOMAIN_MARGIN;\n let _xAxisLabels: string[] = [];\n let _datasetForBars: any[] = [];\n let _margins: Margins = { top: 0, right: 0, bottom: 0, left: 0 };\n let _groupedVerticalBarGraph: JSXElement[] = [];\n let _yMax: number = 0;\n let _calloutAnchorPoint: GVBarChartSeriesPoint | null = null;\n let _barWidth: number = 0;\n let _groupWidth: number = 0;\n let _xAxisInnerPadding: number = 0;\n let _xAxisOuterPadding: number = 0;\n let _barLegends: string[] = [];\n let _lineLegends: string[] = [];\n let _legendColorMap: Record<string, [string, string]> = {};\n const cartesianChartRef = React.useRef<Chart>(null);\n const Y_ORIGIN: number = 0;\n const _legendsRef = React.useRef<LegendContainer>(null);\n const _rectRef = React.useRef<SVGRectElement>(null);\n const _uniqDotId = useId('gvbc_dot_');\n\n const [color, setColor] = React.useState<string | undefined>('');\n const [dataForHoverCard, setDataForHoverCard] = React.useState<number>(0);\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const [xCalloutValue, setXCalloutValue] = React.useState<string>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string | undefined>('');\n const [yValueHover, setYValueHover] = React.useState<YValueHover[]>([]);\n const [hoverXValue, setHoverXValue] = React.useState<string>('');\n const [calloutLegend, setCalloutLegend] = React.useState<string>('');\n const [activeLegend, setActiveLegend] = React.useState<string>('');\n const [callOutAccessibilityData, setCallOutAccessibilityData] = React.useState<AccessibilityProps | undefined>(\n undefined,\n );\n const [popoverTarget, setPopoverTarget] = React.useState<SVGElement | null>(null);\n const [isPopoverOpen, setPopoverOpen] = React.useState<boolean>(false);\n const [activeLinePoint, setActiveLinePoint] = React.useState<string>('');\n const classes = useGroupedVerticalBarChartStyles_unstable(props);\n\n React.useEffect(() => {\n if (!areArraysEqual(props.legendProps?.selectedLegends, selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n }, [props.legendProps?.selectedLegends]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n toImage: (opts?: ImageExportOptions): Promise<string> => {\n return toImage(cartesianChartRef.current?.chartContainer, _legendsRef.current?.toSVG, _useRtl, opts);\n },\n }),\n [],\n );\n\n const _adjustProps = () => {\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n // x0_inner_padding = space_between_groups / (space_between_groups + group_width)\n // space_between_groups = 2 * bar_width\n // group_width = _barLegends.length * bar_width + (_barLegends.length - 1) * space_between_bars\n _xAxisInnerPadding = getScalePadding(\n props.xAxisInnerPadding,\n undefined,\n 2 / (2 + calcTotalBandUnits(_barLegends.length, X1_INNER_PADDING)),\n );\n _xAxisOuterPadding = getScalePadding(props.xAxisOuterPadding);\n };\n\n const _createDataset = (barData: GroupedVerticalBarChartData[], lineData: GVBCLineSeries[]) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const datasetForBars: any = [];\n\n const linePointsByX: Record<string, YValueHover[]> = {};\n const visitedX = new Set<string>();\n lineData.forEach(series => {\n series.data.forEach(point => {\n if (!linePointsByX[point.x]) {\n linePointsByX[point.x] = [];\n }\n linePointsByX[point.x].push({\n ...point,\n legend: series.legend,\n color: series.color,\n data: point.y,\n useSecondaryYScale: series.useSecondaryYScale,\n } as YValueHover);\n });\n });\n\n barData.forEach((point: GroupedVerticalBarChartData, index: number) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDatasetPointForBars: any = {};\n const legendToBarPoint: Record<string, GVBarChartSeriesPoint> = {};\n\n point.series.forEach((seriesPoint: GVBarChartSeriesPoint) => {\n if (!singleDatasetPointForBars[seriesPoint.legend]) {\n singleDatasetPointForBars[seriesPoint.legend] = [{ ...seriesPoint }];\n legendToBarPoint[seriesPoint.legend] = { ...seriesPoint };\n } else {\n singleDatasetPointForBars[seriesPoint.legend].push({ ...seriesPoint });\n legendToBarPoint[seriesPoint.legend].data += seriesPoint.data;\n }\n });\n\n singleDatasetPointForBars.xAxisPoint = point.name;\n singleDatasetPointForBars.indexNum = index;\n singleDatasetPointForBars.groupSeries = [\n ...Object.values(legendToBarPoint),\n ...(linePointsByX[point.name] ?? []),\n ];\n singleDatasetPointForBars.stackCallOutAccessibilityData = point.stackCallOutAccessibilityData;\n datasetForBars.push(singleDatasetPointForBars);\n visitedX.add(point.name);\n });\n\n Object.keys(linePointsByX).forEach(xPoint => {\n if (!visitedX.has(xPoint)) {\n datasetForBars.push({\n xAxisPoint: xPoint,\n groupSeries: linePointsByX[xPoint],\n });\n }\n });\n\n return datasetForBars;\n };\n\n const _createDataSetOfGVBC = (barData: GroupedVerticalBarChartData[], lineData: GVBCLineSeries[]) => {\n const barLegends = new Set<string>();\n barData.forEach((point: GroupedVerticalBarChartData) => {\n point.series.forEach((seriesPoint: GVBarChartSeriesPoint) => {\n barLegends.add(seriesPoint.legend);\n });\n });\n const lineLegends = new Set<string>(lineData.map(series => series.legend));\n const xAxisLabels: string[] = _getOrderedXAxisLabels(barData, lineData);\n const datasetForBars = _createDataset(barData, lineData);\n return {\n barLegends: Array.from(barLegends),\n lineLegends: Array.from(lineLegends),\n xAxisLabels,\n datasetForBars,\n };\n };\n\n const 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 // eslint-disable-next-line @typescript-eslint/no-deprecated\n const _getLegendData = (): JSXElement => {\n const actions: Legend[] = [];\n\n const addLegendButton = (legendTitle: string, isLineLegendInBarChart?: boolean) => {\n const legend: Legend = {\n title: legendTitle,\n color: _legendColorMap[legendTitle][0],\n isLineLegendInBarChart,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(legendTitle);\n },\n onMouseOutAction: () => {\n _onLegendLeave();\n },\n };\n\n actions.push(legend);\n };\n\n _lineLegends.forEach(legendTitle => addLegendButton(legendTitle, true));\n _barLegends.forEach(legendTitle => addLegendButton(legendTitle));\n\n return (\n <Legends\n legends={actions}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n onChange={onLegendSelectionChange}\n legendRef={_legendsRef}\n />\n );\n };\n\n const _processDataV2 = (dataV2: (BarSeries<string, number> | LineSeries<string, number>)[]) => {\n const barPointsByX: Record<string, GroupedVerticalBarChartData> = {};\n const lineData: GVBCLineSeries[] = [];\n\n dataV2.forEach(series => {\n if (series.type === 'bar') {\n series.data.forEach(point => {\n if (!barPointsByX[point.x]) {\n barPointsByX[point.x] = { name: point.x, series: [] };\n }\n\n barPointsByX[point.x].series.push({\n key: series.key ?? series.legend,\n data: point.y,\n color: point.color ?? series.color,\n // gradient: series.gradient,\n legend: series.legend,\n xAxisCalloutData: point.xAxisCalloutData,\n yAxisCalloutData: point.yAxisCalloutData,\n onClick: point.onClick,\n useSecondaryYScale: series.useSecondaryYScale,\n });\n });\n } else if (series.type === 'line') {\n lineData!.push(series);\n }\n });\n\n return { barData: Object.values(barPointsByX), lineData };\n };\n\n const _prepareChartData = () => {\n let barData = props.data;\n let lineData: GVBCLineSeries[] | undefined;\n\n if (Array.isArray(props.dataV2) && props.dataV2.length > 0) {\n ({ barData, lineData } = _processDataV2(props.dataV2));\n }\n\n _legendColorMap = {};\n let colorIndex = 0;\n\n return {\n barData:\n barData?.map(point => {\n return {\n ...point,\n series:\n point.series?.map(seriesPoint => {\n // TODO: Add support for gradient colors\n let startColor = seriesPoint.color ? seriesPoint.color : getNextColor(colorIndex, 0);\n let endColor = startColor;\n if (!_legendColorMap[seriesPoint.legend]) {\n _legendColorMap[seriesPoint.legend] = [startColor, endColor];\n }\n colorIndex += 1;\n\n return {\n ...seriesPoint,\n color: seriesPoint.color ?? _legendColorMap[seriesPoint.legend][0],\n };\n }) ?? [],\n };\n }) ?? [],\n\n lineData:\n lineData?.map(series => {\n let lineColor: string;\n if (typeof series.color === 'undefined') {\n lineColor = getNextColor(colorIndex, 0);\n } else {\n lineColor = getColorFromToken(series.color);\n }\n\n if (!_legendColorMap[series.legend]) {\n _legendColorMap[series.legend] = [lineColor, lineColor];\n }\n colorIndex += 1;\n\n return {\n ...series,\n color: _legendColorMap[series.legend][0],\n };\n }) ?? [],\n };\n };\n\n const _getOrderedXAxisLabels = (barData: GroupedVerticalBarChartData[], lineData: GVBCLineSeries[]) => {\n if (_xAxisType !== XAxisTypes.StringAxis) {\n return [];\n }\n\n return sortAxisCategories(_mapCategoryToValues(barData, lineData), props.xAxisCategoryOrder);\n };\n\n const _mapCategoryToValues = (barData: GroupedVerticalBarChartData[], lineData: GVBCLineSeries[]) => {\n const categoryToValues: Record<string, number[]> = {};\n barData.forEach(point => {\n if (!categoryToValues[point.name]) {\n categoryToValues[point.name] = [];\n }\n point.series.forEach(seriesPoint => {\n categoryToValues[point.name].push(seriesPoint.data);\n });\n });\n lineData.forEach(series => {\n series.data.forEach(point => {\n if (!categoryToValues[point.x]) {\n categoryToValues[point.x] = [];\n }\n categoryToValues[point.x].push(point.y);\n });\n });\n return categoryToValues;\n };\n\n const { barData, lineData } = _prepareChartData();\n const _xAxisType: XAxisTypes = getTypeOfAxis(barData[0].name, true) as XAxisTypes;\n const { barLegends, lineLegends, xAxisLabels, datasetForBars } = _createDataSetOfGVBC(barData, lineData);\n _barLegends = barLegends;\n _lineLegends = lineLegends;\n _xAxisLabels = xAxisLabels;\n _datasetForBars = datasetForBars;\n const legendBars: JSXElement = _getLegendData();\n _adjustProps();\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- Add commentMore actions\n function _getMinMaxOfYAxis(datasetForBars: any, yAxisType?: YAxisType, useSecondaryYScale?: boolean) {\n const values: number[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n datasetForBars.forEach((data: any) => {\n data.groupSeries.forEach((point: GVBarChartSeriesPoint) => {\n if (!useSecondaryYScale === !point.useSecondaryYScale) {\n values.push(point.data);\n }\n });\n });\n\n return { startValue: d3Min(values)!, endValue: d3Max(values)! };\n }\n\n function _getDomainNRangeValues(\n points: GroupedVerticalBarChartData[],\n margins: Margins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis || xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);\n }\n return domainNRangeValue;\n }\n\n // The maxOfYVal prop is only required for the primary y-axis, so yMax should be calculated\n // using only the data points associated with the primary y-axis.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const yMax = _getMinMaxOfYAxis(_datasetForBars).endValue;\n _yMax = Math.max(yMax, props.yMaxValue || 0);\n\n const calloutProps: ChartPopoverProps = {\n positioning: { target: popoverTarget },\n isPopoverOpen,\n color,\n legend: calloutLegend,\n XValue: xCalloutValue,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n YValueHover: yValueHover,\n hoverXValue,\n culture: props.culture,\n isCartesian: true,\n isCalloutForStack: props.isCalloutForStack,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData, 'text', false),\n };\n const tickParams = {\n tickValues: props.tickValues!,\n tickFormat: props.tickFormat!,\n };\n\n const _getGraphData = (\n xScale: StringScale | NumericScale,\n yScalePrimary: ScaleLinear<number, number>,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n yAxisElement?: SVGElement | null,\n yScaleSecondary?: ScaleLinear<number, number>,\n ) => {\n const xScale0 = _createX0Scale(containerWidth);\n\n // Setting the bar width here is safe because there are no dependencies earlier in the code\n // that rely on the width of bars in vertical bar charts with string x-axis.\n _barWidth = getBarWidth(\n props.barWidth,\n props.maxBarWidth,\n calcBandwidth(xScale0.bandwidth(), _barLegends.length, X1_INNER_PADDING),\n );\n _groupWidth = calcRequiredWidth(_barWidth, _barLegends.length, X1_INNER_PADDING);\n\n const xScale1 = _createX1Scale();\n const allGroupsBars: JSXElement[] = [];\n _datasetForBars.forEach((singleSet: GVSingleDataPoint) => {\n allGroupsBars.push(\n _buildGraph(singleSet, xScale0, xScale1, yScalePrimary, yScaleSecondary, containerHeight, xElement!),\n );\n });\n _groupedVerticalBarGraph = allGroupsBars;\n };\n\n const _getMargins = (margins: Margins) => {\n _margins = margins;\n };\n\n const onBarHover = (\n pointData: GVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void => {\n mouseEvent.persist();\n if (_calloutAnchorPoint !== pointData) {\n _calloutAnchorPoint = pointData;\n _showCallout(mouseEvent.currentTarget, pointData, groupData);\n }\n };\n\n const _onBarLeave = (): void => {\n /**/\n };\n\n const _handleChartMouseLeave = (): void => {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n };\n\n const onBarFocus = (\n focusEvent: React.FocusEvent<SVGRectElement, Element>,\n pointData: GVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n ): void => {\n _showCallout(focusEvent.currentTarget, pointData, groupData);\n };\n\n const _buildGraph = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n singleSet: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale0: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale1: any,\n yScalePrimary: ScaleLinear<number, number>,\n yScaleSecondary: ScaleLinear<number, number> | undefined,\n containerHeight: number,\n xElement: SVGElement,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ): JSXElement => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const singleGroup: JSXElement[] = [];\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const barLabelsForGroup: JSXElement[] = [];\n\n // Get the actual legends present at this x-axis point\n const presentLegends = _barLegends.filter(key => key in singleSet);\n const effectiveGroupWidth = calcRequiredWidth(_barWidth, presentLegends.length, X1_INNER_PADDING);\n\n // For stacked bars, center the single bar group in the available space\n // Instead of using the global legend position, use the local position within present legends\n const localScale = d3ScaleBand()\n .domain(presentLegends)\n .range(_useRtl ? [effectiveGroupWidth, 0] : [0, effectiveGroupWidth])\n .paddingInner(X1_INNER_PADDING);\n _barLegends.forEach((legendTitle: string, legendIndex: number) => {\n const barPoints = singleSet[legendTitle];\n if (barPoints) {\n const yBarScale = barPoints[0].useSecondaryYScale && yScaleSecondary ? yScaleSecondary : yScalePrimary;\n\n const xPoint = (localScale(legendTitle) ?? 0) + (localScale.bandwidth() - _barWidth) / 2;\n const isLegendActive = _legendHighlighted(legendTitle) || _noLegendHighlighted();\n const barOpacity = isLegendActive ? '' : '0.1';\n\n let barTotalValue = 0;\n const yBaseline = yBarScale(Y_ORIGIN);\n let yPositiveStart = yBaseline;\n let yNegativeStart = yBaseline;\n let yPoint = Y_ORIGIN;\n\n barPoints.forEach((pointData: GVBarChartSeriesPoint, pointIndex: number) => {\n if (!pointData.data) {\n // Not rendering data with 0.\n return;\n }\n const barGap = (VERTICAL_BAR_GAP / 2) * (pointIndex > 0 ? 2 : 0);\n const height = Math.max(yBarScale(Y_ORIGIN) - yBarScale(Math.abs(pointData.data)), MIN_BAR_HEIGHT);\n const pointColor = pointData.color; // Use the color of the current point\n\n if (pointData.data >= Y_ORIGIN) {\n yPositiveStart -= height + barGap;\n yPoint = yPositiveStart;\n } else {\n yPoint = yNegativeStart + barGap;\n yNegativeStart = yPoint + height;\n }\n\n singleGroup.push(\n <rect\n key={`${singleSet.indexNum}-${legendIndex}-${pointIndex}`}\n className={classes.opacityChangeOnHover}\n height={height}\n width={_barWidth}\n x={xPoint}\n y={yPoint}\n opacity={barOpacity}\n fill={pointColor}\n rx={props.roundCorners ? 3 : 0}\n onMouseOver={event => onBarHover(pointData, singleSet, event)}\n onMouseMove={event => onBarHover(pointData, singleSet, event)}\n onMouseOut={_onBarLeave}\n onFocus={event => onBarFocus(event, pointData, singleSet)}\n onBlur={_onBarLeave}\n onClick={pointData.onClick}\n aria-label={getAriaLabel(pointData, singleSet.xAxisPoint)}\n tabIndex={_legendHighlighted(pointData.legend) || _noLegendHighlighted() ? 0 : undefined}\n role=\"img\"\n />,\n );\n\n barTotalValue += pointData.data;\n });\n if (barTotalValue !== null && !props.hideLabels && Math.ceil(_barWidth) >= 16 && isLegendActive) {\n barLabelsForGroup.push(\n <text\n key={`${singleSet.indexNum}-${legendIndex}`}\n x={xPoint + _barWidth / 2}\n y={barTotalValue >= Y_ORIGIN ? yPositiveStart - 6 : yNegativeStart + 12}\n textAnchor=\"middle\"\n className={classes.barLabel}\n aria-hidden={true}\n style={{ direction: 'ltr', unicodeBidi: 'isolate' }}\n >\n {typeof props.yAxisTickFormat === 'function'\n ? props.yAxisTickFormat(barTotalValue)\n : formatScientificLimitWidth(barTotalValue)}\n </text>,\n );\n }\n }\n });\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xScale0);\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 (\n <g\n key={singleSet.indexNum}\n transform={`translate(${xScale0(singleSet.xAxisPoint) + (xScale0.bandwidth() - effectiveGroupWidth) / 2}, 0)`}\n >\n {singleGroup}\n {barLabelsForGroup}\n </g>\n );\n };\n\n // For grouped vertical bar chart, First need to define total scale (from start to end)\n // From that need to define scale for single group of bars - done by createX1Scale\n const _createX0Scale = (containerWidth: number) => {\n const x0Axis = d3ScaleBand()\n .domain(xAxisLabels)\n .range(\n _useRtl\n ? [containerWidth! - _margins.right! - _domainMargin, _margins.left! + _domainMargin]\n : [_margins.left! + _domainMargin, containerWidth! - _margins.right! - _domainMargin],\n )\n .paddingInner(_xAxisInnerPadding)\n .paddingOuter(_xAxisOuterPadding);\n return x0Axis;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _createX1Scale = (): any => {\n return (\n d3ScaleBand()\n .domain(_barLegends)\n // When there is only one group, xScale0 adds padding around it,\n // causing the bandwidth to become smaller than the actual group width.\n // So to render bars in the group correctly, use groupWidth instead of the generated scale bandwidth.\n .range(_useRtl ? [_groupWidth, 0] : [0, _groupWidth])\n .paddingInner(X1_INNER_PADDING)\n );\n };\n\n const _onLegendHover = (legendTitle: string): void => {\n setActiveLegend(legendTitle);\n };\n\n const _onLegendLeave = (): void => {\n setActiveLegend('');\n };\n\n const _getAxisData = React.useCallback(\n (yAxisData: IAxisData) => {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n _yMax = Math.max(domainValue[domainValue.length - 1], props.yMaxValue || 0);\n }\n },\n [props.yMaxValue],\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 const _legendHighlighted = (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 const _noLegendHighlighted = () => {\n return _getHighlightedLegend().length === 0;\n };\n\n const _getHighlightedLegend = () => {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n };\n\n const getAriaLabel = (point: GVBarChartSeriesPoint, xAxisPoint: string): string => {\n const xValue = point.xAxisCalloutData || xAxisPoint;\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.data;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n };\n\n const _getDomainMargins = (containerWidth: number): Margins => {\n /** Total width available to render the bars */\n const totalWidth = calcTotalWidth(containerWidth, _margins, MIN_DOMAIN_MARGIN);\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(props.xAxisOuterPadding)) {\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 group and after the last group.\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 const groupWidth = calcRequiredWidth(_barWidth, _barLegends.length, X1_INNER_PADDING);\n /** Total width required to render the groups. Directly proportional to group width */\n const reqWidth = calcRequiredWidth(groupWidth, _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 groups at their maximum allowable width\n const groupBandwidth = calcBandwidth(totalWidth, _xAxisLabels.length, _xAxisInnerPadding);\n const barBandwidth = calcBandwidth(groupBandwidth, _barLegends.length, X1_INNER_PADDING);\n const barWidth = getBarWidth(props.barWidth, props.maxBarWidth, barBandwidth);\n const groupWidth = calcRequiredWidth(barWidth, _barLegends.length, X1_INNER_PADDING);\n let reqWidth = calcRequiredWidth(groupWidth, _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 }\n\n return {\n ..._margins,\n left: _margins.left! + _domainMargin,\n right: _margins.right! + _domainMargin,\n };\n };\n\n const _isChartEmpty = (_barData: GroupedVerticalBarChartData[], _lineData: GVBCLineSeries[]): boolean => {\n return !(\n (_barData &&\n _barData.length > 0 &&\n _barData.filter((item: GroupedVerticalBarChartData) => item.series.length).length > 0) ||\n (_lineData && _lineData.length > 0 && _lineData.some(series => series.data.length > 0))\n );\n };\n\n const _getChartTitle = (): string => {\n return (\n (props.chartTitle ? `${props.chartTitle}. ` : '') +\n `Vertical bar chart with ${_barLegends.length} grouped bar series` +\n (_lineLegends.length > 0 ? ` and ${_lineLegends.length} line series. ` : '. ')\n );\n };\n\n const _createLines = (\n _lineData: GVBCLineSeries[],\n xScale: StringScale,\n yScalePrimary: NumericScale,\n yScaleSecondary?: NumericScale,\n ): React.ReactNode => {\n const lineBorders: React.ReactNode[] = [];\n const lines: React.ReactNode[] = [];\n const dots: React.ReactNode[] = [];\n\n const scaleLineX = (x: string) => xScale(x)! + xScale.bandwidth() / 2;\n\n _lineData.forEach((series, seriesIdx) => {\n const lineBorderGroup: React.ReactNode[] = [];\n const lineGroup: React.ReactNode[] = [];\n const dotGroup: React.ReactNode[] = [];\n const lineBorderWidth = series.lineOptions?.lineBorderWidth\n ? Number.parseFloat(series.lineOptions.lineBorderWidth.toString())\n : 0;\n const yScale = series.useSecondaryYScale && yScaleSecondary ? yScaleSecondary : yScalePrimary;\n const shouldHighlight = _legendHighlighted(series.legend) || _noLegendHighlighted();\n\n series.data.forEach((point, pointIdx) => {\n const x2 = scaleLineX(point.x);\n const y2 = yScale(point.y);\n\n if (pointIdx > 0) {\n const x1 = scaleLineX(series.data[pointIdx - 1].x);\n const y1 = yScale(series.data[pointIdx - 1].y);\n\n if (lineBorderWidth > 0) {\n lineBorderGroup.push(\n <line\n key={`lineBorder-${seriesIdx}-${pointIdx}`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n fill=\"transparent\"\n stroke={series.lineOptions?.lineBorderColor ?? tokens.colorNeutralBackground1}\n strokeWidth={3 + lineBorderWidth * 2}\n strokeLinecap=\"round\"\n opacity={shouldHighlight ? 1 : 0.1}\n />,\n );\n }\n\n lineGroup.push(\n <line\n key={`line-${seriesIdx}-${pointIdx}`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n stroke={series.color}\n strokeWidth={series.lineOptions?.strokeWidth ?? 3}\n strokeLinecap={series.lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={series.lineOptions?.strokeDasharray}\n opacity={shouldHighlight ? 1 : 0.1}\n onMouseOver={e => _onLineHover(e, series, seriesIdx, pointIdx, scaleLineX)}\n onMouseLeave={_onBarLeave}\n />,\n );\n }\n\n const dotId = _getDotId(seriesIdx, pointIdx);\n const isLinePointActive = activeLinePoint === point.x || activeLinePoint === dotId;\n\n dotGroup.push(\n <circle\n key={dotId}\n id={dotId}\n cx={x2}\n cy={y2}\n r={shouldHighlight && isLinePointActive ? 8 : 0.3}\n fill={tokens.colorNeutralBackground1}\n stroke={series.color}\n strokeWidth={3}\n opacity={shouldHighlight ? 1 : 0.1}\n onMouseOver={e => _onLineHover(e, series, seriesIdx, pointIdx, scaleLineX)}\n onMouseLeave={_onBarLeave}\n data-is-focusable={shouldHighlight}\n onFocus={e => _onLineFocus(e, series, seriesIdx, pointIdx)}\n onBlur={_onBarLeave}\n role=\"img\"\n aria-label={getAriaLabel(\n {\n xAxisCalloutData: point.xAxisCalloutData,\n legend: series.legend,\n yAxisCalloutData: point.yAxisCalloutData,\n data: point.y,\n callOutAccessibilityData: point.callOutAccessibilityData,\n } as GVBarChartSeriesPoint,\n point.x,\n )}\n />,\n );\n });\n\n lineBorders.push(<g key={`lineBorderGroup-${seriesIdx}`}>{lineBorderGroup}</g>);\n lines.push(<g key={`lineGroup-${seriesIdx}`}>{lineGroup}</g>);\n dots.push(<g key={`dotGroup-${seriesIdx}`}>{dotGroup}</g>);\n });\n\n return dots.length > 0 ? (\n <g>\n {lineBorders.length > 0 ? <g>{lineBorders}</g> : null}\n {lines.length > 0 ? <g>{lines}</g> : null}\n <g>{dots}</g>\n </g>\n ) : null;\n };\n\n const _onLineHover = (\n event: React.MouseEvent<SVGElement>,\n series: GVBCLineSeries,\n seriesIdx: number,\n pointIdx: number,\n scaleLineX: (x: string) => number,\n ) => {\n const pointerX = d3Pointer(event, _rectRef.current)[0];\n\n let closestPointIdx = pointIdx;\n if (pointIdx > 0) {\n const currPointPos = scaleLineX(series.data[pointIdx].x);\n const prevPointPos = scaleLineX(series.data[pointIdx - 1].x);\n\n if (Math.abs(prevPointPos - pointerX) < Math.abs(currPointPos - pointerX)) {\n closestPointIdx = pointIdx - 1;\n }\n }\n\n event.persist();\n _showCalloutForLines(event.currentTarget, series, seriesIdx, closestPointIdx);\n };\n\n const _onLineFocus = (\n event: React.FocusEvent<SVGElement>,\n series: GVBCLineSeries,\n seriesIdx: number,\n pointIdx: number,\n ) => {\n _showCalloutForLines(event.currentTarget, series, seriesIdx, pointIdx);\n };\n\n const _showCalloutForLines = (target: SVGElement, series: GVBCLineSeries, seriesIdx: number, pointIdx: number) => {\n const point = series.data[pointIdx];\n const pointData = {\n ...point,\n legend: series.legend,\n color: series.color!,\n key: series.legend,\n data: point.y,\n yAxisCalloutData: point.yAxisCalloutData as string | undefined,\n };\n const groupData = _datasetForBars.find((singleSet: { xAxisPoint: string }) => singleSet.xAxisPoint === point.x);\n\n _showCallout(target, pointData, groupData, _getDotId(seriesIdx, pointIdx));\n };\n\n const _showCallout = (\n target: SVGElement,\n pointData: GVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n _activeLinePoint = '',\n ) => {\n setPopoverTarget(target);\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(pointData.legend));\n setCalloutLegend(pointData.legend);\n setDataForHoverCard(pointData.data);\n setColor(pointData.color);\n setXCalloutValue(pointData.xAxisCalloutData ?? groupData.xAxisPoint);\n setYCalloutValue(pointData.yAxisCalloutData);\n setCallOutAccessibilityData(\n props.isCalloutForStack ? groupData.stackCallOutAccessibilityData : pointData.callOutAccessibilityData,\n );\n setYValueHover(\n groupData.groupSeries.filter((item: YValueHover) => _noLegendHighlighted() || _legendHighlighted(item.legend!)),\n );\n setHoverXValue(pointData.xAxisCalloutData ?? groupData.xAxisPoint);\n setActiveLinePoint(props.isCalloutForStack ? groupData.xAxisPoint : _activeLinePoint);\n };\n\n const _getDotId = (seriesIdx: number, pointIdx: number) => {\n return _uniqDotId + `-${seriesIdx}-${pointIdx}`;\n };\n\n return !_isChartEmpty(barData, lineData) ? (\n <CartesianChart\n {...props}\n chartTitle={_getChartTitle()}\n points={_datasetForBars}\n chartType={ChartTypes.GroupedVerticalBarChart}\n getDomainNRangeValues={_getDomainNRangeValues}\n getMinMaxOfYAxis={_getMinMaxOfYAxis}\n createStringYAxis={createStringYAxis}\n calloutProps={calloutProps}\n legendBars={legendBars}\n xAxisType={_xAxisType}\n createYAxis={createNumericYAxis}\n datasetForXAxisDomain={_xAxisLabels}\n tickParams={tickParams}\n tickPadding={props.tickPadding || 5}\n maxOfYVal={_yMax}\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 barwidth={_barWidth}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n children={(childProps: ChildProps) => {\n return (\n <>\n <rect ref={_rectRef} width=\"100%\" height=\"100%\" fill=\"transparent\" style={{ pointerEvents: 'none' }} />\n <g>{_groupedVerticalBarGraph}</g>\n {_createLines(lineData, childProps.xScale, childProps.yScalePrimary, childProps.yScaleSecondary)}\n </>\n );\n }}\n />\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n});\nGroupedVerticalBarChart.displayName = 'GroupedVerticalBarChart';\n"],"names":["React","useGroupedVerticalBarChartStyles_unstable","select","d3Select","pointer","d3Pointer","max","d3Max","min","d3Min","scaleBand","d3ScaleBand","useId","ChartTypes","getAccessibleDataObject","tooltipOfAxislabels","XAxisTypes","getTypeOfAxis","formatScientificLimitWidth","getScalePadding","getBarWidth","isScalePaddingDefined","createNumericYAxis","domainRangeOfXStringAxis","createStringYAxis","getNextColor","areArraysEqual","calculateLongestLabelWidth","useRtl","calcRequiredWidth","calcTotalWidth","calcBandwidth","calcTotalBandUnits","sortAxisCategories","CartesianChart","Legends","getColorFromToken","toImage","tokens","MIN_DOMAIN_MARGIN","X1_INNER_PADDING","VERTICAL_BAR_GAP","MIN_BAR_HEIGHT","GroupedVerticalBarChart","forwardRef","_props","forwardedRef","props","xAxisCategoryOrder","maxBarWidth","_tooltipId","_emptyChartId","_useRtl","_domainMargin","_xAxisLabels","_datasetForBars","_margins","top","right","bottom","left","_groupedVerticalBarGraph","_yMax","_calloutAnchorPoint","_barWidth","_groupWidth","_xAxisInnerPadding","_xAxisOuterPadding","_barLegends","_lineLegends","_legendColorMap","cartesianChartRef","useRef","Y_ORIGIN","_legendsRef","_rectRef","_uniqDotId","color","setColor","useState","dataForHoverCard","setDataForHoverCard","selectedLegends","setSelectedLegends","legendProps","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","yValueHover","setYValueHover","hoverXValue","setHoverXValue","calloutLegend","setCalloutLegend","activeLegend","setActiveLegend","callOutAccessibilityData","setCallOutAccessibilityData","undefined","popoverTarget","setPopoverTarget","isPopoverOpen","setPopoverOpen","activeLinePoint","setActiveLinePoint","classes","useEffect","useImperativeHandle","componentRef","chartContainer","current","opts","toSVG","_adjustProps","barWidth","xAxisInnerPadding","length","xAxisOuterPadding","_createDataset","barData","lineData","datasetForBars","linePointsByX","visitedX","Set","forEach","series","data","point","x","push","legend","y","useSecondaryYScale","index","singleDatasetPointForBars","legendToBarPoint","seriesPoint","xAxisPoint","name","indexNum","groupSeries","Object","values","stackCallOutAccessibilityData","add","keys","xPoint","has","_createDataSetOfGVBC","barLegends","lineLegends","map","xAxisLabels","_getOrderedXAxisLabels","Array","from","onLegendSelectionChange","event","currentLegend","canSelectMultipleLegends","slice","onChange","_getLegendData","actions","addLegendButton","legendTitle","isLineLegendInBarChart","title","hoverAction","_handleChartMouseLeave","_onLegendHover","onMouseOutAction","_onLegendLeave","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","legendRef","_processDataV2","dataV2","barPointsByX","type","key","xAxisCalloutData","yAxisCalloutData","onClick","_prepareChartData","isArray","colorIndex","startColor","endColor","lineColor","_xAxisType","StringAxis","_mapCategoryToValues","categoryToValues","legendBars","_getMinMaxOfYAxis","yAxisType","startValue","endValue","_getDomainNRangeValues","points","margins","width","chartType","isRTL","xAxisType","tickValues","shiftX","domainNRangeValue","NumericAxis","DateAxis","dStartValue","dEndValue","rStartValue","rEndValue","yMax","Math","yMaxValue","calloutProps","positioning","target","XValue","YValue","YValueHover","culture","isCartesian","isCalloutForStack","tickParams","tickFormat","_getGraphData","xScale","yScalePrimary","containerHeight","containerWidth","xElement","yAxisElement","yScaleSecondary","xScale0","_createX0Scale","bandwidth","xScale1","_createX1Scale","allGroupsBars","singleSet","_buildGraph","_getMargins","onBarHover","pointData","groupData","mouseEvent","persist","_showCallout","currentTarget","_onBarLeave","onBarFocus","focusEvent","singleGroup","barLabelsForGroup","presentLegends","filter","effectiveGroupWidth","localScale","domain","range","paddingInner","legendIndex","barPoints","yBarScale","isLegendActive","_legendHighlighted","_noLegendHighlighted","barOpacity","barTotalValue","yBaseline","yPositiveStart","yNegativeStart","yPoint","pointIndex","barGap","height","abs","pointColor","rect","className","opacityChangeOnHover","opacity","fill","rx","roundCorners","onMouseOver","onMouseMove","onMouseOut","onFocus","onBlur","aria-label","getAriaLabel","tabIndex","role","hideLabels","ceil","text","textAnchor","barLabel","aria-hidden","style","direction","unicodeBidi","yAxisTickFormat","wrapXAxisLables","showXAxisLablesTooltip","xAxisElement","call","document","getElementById","remove","e","tooltipProps","tooltipCls","tooltip","id","axis","g","transform","x0Axis","paddingOuter","_getAxisData","useCallback","yAxisData","yAxisDomainValues","domainValue","_getHighlightedLegend","includes","xValue","yValue","ariaLabel","_getDomainMargins","totalWidth","groupWidth","reqWidth","mode","groupBandwidth","barBandwidth","margin1","margin2","Number","POSITIVE_INFINITY","hideTickOverlap","step","_isChartEmpty","_barData","_lineData","item","some","_getChartTitle","chartTitle","_createLines","lineBorders","lines","dots","scaleLineX","seriesIdx","lineBorderGroup","lineGroup","dotGroup","lineBorderWidth","lineOptions","parseFloat","toString","yScale","shouldHighlight","pointIdx","x2","y2","x1","y1","line","stroke","lineBorderColor","colorNeutralBackground1","strokeWidth","strokeLinecap","strokeDasharray","_onLineHover","onMouseLeave","dotId","_getDotId","isLinePointActive","circle","cx","cy","r","data-is-focusable","_onLineFocus","pointerX","closestPointIdx","currPointPos","prevPointPos","_showCalloutForLines","find","_activeLinePoint","getDomainNRangeValues","getMinMaxOfYAxis","createYAxis","datasetForXAxisDomain","tickPadding","maxOfYVal","getmargins","getGraphData","getAxisData","onChartMouseLeave","getDomainMargins","barwidth","children","childProps","ref","pointerEvents","div","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yCAAyC,QAAQ,4CAA4C;AACtG,SAASC,UAAUC,QAAQ,EAAEC,WAAWC,SAAS,QAAQ,eAAe;AACxE,SAASC,OAAOC,KAAK,EAAEC,OAAOC,KAAK,QAAQ,WAAW;AACtD,SAAiCC,aAAaC,WAAW,QAAQ,WAAW;AAE5E,SAASC,KAAK,QAAoB,4BAA4B;AAC9D,SACEC,UAAU,EAEVC,uBAAuB,EACvBC,mBAAmB,EACnBC,UAAU,EACVC,aAAa,EACbC,0BAA0B,EAC1BC,eAAe,EACfC,WAAW,EACXC,qBAAqB,EACrBC,kBAAkB,EAElBC,wBAAwB,EACxBC,iBAAiB,EACjBC,YAAY,EACZC,cAAc,EACdC,0BAA0B,EAC1BC,MAAM,EAENC,iBAAiB,EACjBC,cAAc,EACdC,aAAa,EACbC,kBAAkB,EAClBC,kBAAkB,QACb,wBAAwB;AAE/B,SAEEC,cAAc,EAMdC,OAAO,EAOPC,iBAAiB,QAGZ,cAAc;AACrB,SAASC,OAAO,QAAQ,qCAAqC;AAC7D,SAASC,MAAM,QAAQ,wBAAwB;AAK/C,MAAMC,oBAAoB;AAC1B,MAAMC,mBAAmB;AACzB,MAAMC,mBAAmB;AACzB,MAAMC,iBAAiB;AAcvB,OAAO,MAAMC,wCAAkE3C,MAAM4C,UAAU,CAG7F,CAACC,QAAQC;QA+B8DC,oBAmBnEA;IAjDJ,MAAMA,QAAsC;QAC1CC,oBAAoB;QACpBC,aAAa;QACb,GAAGJ,MAAM;IACX;IACA,MAAMK,aAA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C0W,uBAAuBzM;QACvB0M,kBAAkB9M;QAClBhL,mBAAmBA;QACnBuM,cAAcA;QACdxB,YAAYA;QACZW,WAAWf;QACXoN,aAAajY;QACbkY,uBAAuBlW;QACvBkL,YAAYA;QACZiL,aAAa1W,MAAM0W,WAAW,IAAI;QAClCC,WAAW5V;QACX6V,YAAYjK;QACZkK,cAAclL;QACdmL,aAAanF;QACboF,mBAAmBnP;QACnBoP,kBAAkB3E;QACjB,GAAIjJ,eAAenL,WAAWoL,UAAU,IAAI;YAC3ChF,mBAAmBlD;YACnBoD,mBAAmBnD;QACrB,CAAC;QACD6V,UAAUhW;QACV6C,cAActC;QACd,oCAAoC,GACpC0V,UAAU,CAACC;YACT,qBACE,wDACE,oBAACnI;gBAAKoI,KAAKxV;gBAAUoI,OAAM;gBAAO6E,QAAO;gBAAOO,MAAK;gBAAckB,OAAO;oBAAE+G,eAAe;gBAAO;8BAClG,oBAAC9F,WAAGzQ,2BACH2S,aAAa/O,UAAUyS,WAAWvL,MAAM,EAAEuL,WAAWtL,aAAa,EAAEsL,WAAWjL,eAAe;QAGrG;uBAGF,oBAACoL;QAAIjG,IAAIjR;QAAe2P,MAAM;QAASO,OAAO;YAAEnB,SAAS;QAAI;QAAGS,cAAY;;AAEhF,GAAG;AACHhQ,wBAAwB2X,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../src/components/GroupedVerticalBarChart/GroupedVerticalBarChart.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useGroupedVerticalBarChartStyles_unstable } from './useGroupedVerticalBarChartStyles.styles';\nimport { select as d3Select, pointer as d3Pointer } from 'd3-selection';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { ScaleBand, ScaleLinear, scaleBand as d3ScaleBand } from 'd3-scale';\n\nimport { useId, JSXElement } from '@fluentui/react-utilities';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n tooltipOfAxislabels,\n XAxisTypes,\n getTypeOfAxis,\n formatScientificLimitWidth,\n getScalePadding,\n getBarWidth,\n isScalePaddingDefined,\n createNumericYAxis,\n IDomainNRange,\n domainRangeOfXStringAxis,\n createStringYAxis,\n getNextColor,\n areArraysEqual,\n calculateLongestLabelWidth,\n useRtl,\n YAxisType,\n calcRequiredWidth,\n calcTotalWidth,\n calcBandwidth,\n calcTotalBandUnits,\n sortAxisCategories,\n} from '../../utilities/index';\n\nimport {\n AccessibilityProps,\n CartesianChart,\n Margins,\n Legend,\n GroupedVerticalBarChartProps,\n GroupedVerticalBarChartData,\n GVBarChartSeriesPoint,\n Legends,\n YValueHover,\n ChartPopoverProps,\n Chart,\n ImageExportOptions,\n LegendContainer,\n LineSeries,\n getColorFromToken,\n BarSeries,\n ChildProps,\n} from '../../index';\nimport { toImage } from '../../utilities/image-export-utils';\nimport { tokens } from '@fluentui/react-theme';\n\ntype NumericScale = ScaleLinear<number, number>;\ntype StringScale = ScaleBand<string>;\n\nconst MIN_DOMAIN_MARGIN = 8;\nconst X1_INNER_PADDING = 0.1;\nconst VERTICAL_BAR_GAP = 1;\nconst MIN_BAR_HEIGHT = 1;\n\n// This interface used for - While forming datapoints from given prop \"data\" in code\ninterface GVDataPoint {\n [key: string]: number | string;\n}\n\n// While forming datapoints from given prop \"data\" in code. These datapoints are used for to draw graph easily.\ninterface GVSingleDataPoint {\n [key: string]: GVDataPoint;\n}\n\ntype GVBCLineSeries = LineSeries<string, number>;\n\nexport const GroupedVerticalBarChart: React.FC<GroupedVerticalBarChartProps> = React.forwardRef<\n HTMLDivElement,\n GroupedVerticalBarChartProps\n>((_props, forwardedRef) => {\n const props: GroupedVerticalBarChartProps = {\n xAxisCategoryOrder: 'default',\n maxBarWidth: 24,\n ..._props,\n };\n const _tooltipId: string = useId('GVBCTooltipId_');\n const _emptyChartId: string = useId('_GVBC_empty');\n const _useRtl: boolean = useRtl();\n let _domainMargin: number = MIN_DOMAIN_MARGIN;\n let _xAxisLabels: string[] = [];\n let _datasetForBars: any[] = [];\n let _margins: Margins = { top: 0, right: 0, bottom: 0, left: 0 };\n let _groupedVerticalBarGraph: JSXElement[] = [];\n let _yMax: number = 0;\n let _calloutAnchorPoint: GVBarChartSeriesPoint | null = null;\n let _barWidth: number = 0;\n let _groupWidth: number = 0;\n let _xAxisInnerPadding: number = 0;\n let _xAxisOuterPadding: number = 0;\n let _barLegends: string[] = [];\n let _lineLegends: string[] = [];\n let _legendColorMap: Record<string, [string, string]> = {};\n const cartesianChartRef = React.useRef<Chart>(null);\n const Y_ORIGIN: number = 0;\n const _legendsRef = React.useRef<LegendContainer>(null);\n const _rectRef = React.useRef<SVGRectElement>(null);\n const _uniqDotId = useId('gvbc_dot_');\n\n const [color, setColor] = React.useState<string | undefined>('');\n const [dataForHoverCard, setDataForHoverCard] = React.useState<number>(0);\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const [xCalloutValue, setXCalloutValue] = React.useState<string>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string | undefined>('');\n const [yValueHover, setYValueHover] = React.useState<YValueHover[]>([]);\n const [hoverXValue, setHoverXValue] = React.useState<string>('');\n const [calloutLegend, setCalloutLegend] = React.useState<string>('');\n const [activeLegend, setActiveLegend] = React.useState<string>('');\n const [callOutAccessibilityData, setCallOutAccessibilityData] = React.useState<AccessibilityProps | undefined>(\n undefined,\n );\n const [popoverTarget, setPopoverTarget] = React.useState<SVGElement | null>(null);\n const [isPopoverOpen, setPopoverOpen] = React.useState<boolean>(false);\n const [activeLinePoint, setActiveLinePoint] = React.useState<string>('');\n const classes = useGroupedVerticalBarChartStyles_unstable(props);\n\n React.useEffect(() => {\n if (!areArraysEqual(props.legendProps?.selectedLegends, selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n }, [props.legendProps?.selectedLegends]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n toImage: (opts?: ImageExportOptions): Promise<string> => {\n return toImage(cartesianChartRef.current?.chartContainer, _legendsRef.current?.toSVG, _useRtl, opts);\n },\n }),\n [],\n );\n\n const _adjustProps = () => {\n _barWidth = getBarWidth(props.barWidth, props.maxBarWidth);\n // x0_inner_padding = space_between_groups / (space_between_groups + group_width)\n // space_between_groups = 2 * bar_width\n // group_width = _barLegends.length * bar_width + (_barLegends.length - 1) * space_between_bars\n _xAxisInnerPadding = getScalePadding(\n props.xAxisInnerPadding,\n undefined,\n 2 / (2 + calcTotalBandUnits(_barLegends.length, X1_INNER_PADDING)),\n );\n _xAxisOuterPadding = getScalePadding(props.xAxisOuterPadding);\n };\n\n const _createDataset = (barData: GroupedVerticalBarChartData[], lineData: GVBCLineSeries[]) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const datasetForBars: any = [];\n\n const linePointsByX: Record<string, YValueHover[]> = {};\n const visitedX = new Set<string>();\n lineData.forEach(series => {\n series.data.forEach(point => {\n if (!linePointsByX[point.x]) {\n linePointsByX[point.x] = [];\n }\n linePointsByX[point.x].push({\n ...point,\n legend: series.legend,\n color: series.color,\n data: point.y,\n useSecondaryYScale: series.useSecondaryYScale,\n } as YValueHover);\n });\n });\n\n barData.forEach((point: GroupedVerticalBarChartData, index: number) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const singleDatasetPointForBars: any = {};\n const legendToBarPoint: Record<string, GVBarChartSeriesPoint> = {};\n\n point.series.forEach((seriesPoint: GVBarChartSeriesPoint) => {\n if (!singleDatasetPointForBars[seriesPoint.legend]) {\n singleDatasetPointForBars[seriesPoint.legend] = [{ ...seriesPoint }];\n legendToBarPoint[seriesPoint.legend] = { ...seriesPoint };\n } else {\n singleDatasetPointForBars[seriesPoint.legend].push({ ...seriesPoint });\n legendToBarPoint[seriesPoint.legend].data += seriesPoint.data;\n }\n });\n\n singleDatasetPointForBars.xAxisPoint = point.name;\n singleDatasetPointForBars.indexNum = index;\n singleDatasetPointForBars.groupSeries = [\n ...Object.values(legendToBarPoint),\n ...(linePointsByX[point.name] ?? []),\n ];\n singleDatasetPointForBars.stackCallOutAccessibilityData = point.stackCallOutAccessibilityData;\n datasetForBars.push(singleDatasetPointForBars);\n visitedX.add(point.name);\n });\n\n Object.keys(linePointsByX).forEach(xPoint => {\n if (!visitedX.has(xPoint)) {\n datasetForBars.push({\n xAxisPoint: xPoint,\n groupSeries: linePointsByX[xPoint],\n });\n }\n });\n\n return datasetForBars;\n };\n\n const _createDataSetOfGVBC = (barData: GroupedVerticalBarChartData[], lineData: GVBCLineSeries[]) => {\n const barLegends = new Set<string>();\n barData.forEach((point: GroupedVerticalBarChartData) => {\n point.series.forEach((seriesPoint: GVBarChartSeriesPoint) => {\n barLegends.add(seriesPoint.legend);\n });\n });\n const lineLegends = new Set<string>(lineData.map(series => series.legend));\n const xAxisLabels: string[] = _getOrderedXAxisLabels(barData, lineData);\n const datasetForBars = _createDataset(barData, lineData);\n return {\n barLegends: Array.from(barLegends),\n lineLegends: Array.from(lineLegends),\n xAxisLabels,\n datasetForBars,\n };\n };\n\n const 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 // eslint-disable-next-line @typescript-eslint/no-deprecated\n const _getLegendData = (): JSXElement => {\n const actions: Legend[] = [];\n\n const addLegendButton = (legendTitle: string, isLineLegendInBarChart?: boolean) => {\n const legend: Legend = {\n title: legendTitle,\n color: _legendColorMap[legendTitle][0],\n isLineLegendInBarChart,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(legendTitle);\n },\n onMouseOutAction: () => {\n _onLegendLeave();\n },\n };\n\n actions.push(legend);\n };\n\n _lineLegends.forEach(legendTitle => addLegendButton(legendTitle, true));\n _barLegends.forEach(legendTitle => addLegendButton(legendTitle));\n\n return (\n <Legends\n legends={actions}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n onChange={onLegendSelectionChange}\n legendRef={_legendsRef}\n />\n );\n };\n\n const _processDataV2 = (dataV2: (BarSeries<string, number> | LineSeries<string, number>)[]) => {\n const barPointsByX: Record<string, GroupedVerticalBarChartData> = {};\n const lineData: GVBCLineSeries[] = [];\n\n dataV2.forEach(series => {\n if (series.type === 'bar') {\n series.data.forEach(point => {\n if (!barPointsByX[point.x]) {\n barPointsByX[point.x] = { name: point.x, series: [] };\n }\n\n barPointsByX[point.x].series.push({\n key: series.key ?? series.legend,\n data: point.y,\n color: point.color ?? series.color,\n // gradient: series.gradient,\n legend: series.legend,\n xAxisCalloutData: point.xAxisCalloutData,\n yAxisCalloutData: point.yAxisCalloutData,\n onClick: point.onClick,\n useSecondaryYScale: series.useSecondaryYScale,\n });\n });\n } else if (series.type === 'line') {\n lineData!.push(series);\n }\n });\n\n return { barData: Object.values(barPointsByX), lineData };\n };\n\n const _prepareChartData = () => {\n let barData = props.data;\n let lineData: GVBCLineSeries[] | undefined;\n\n if (Array.isArray(props.dataV2) && props.dataV2.length > 0) {\n ({ barData, lineData } = _processDataV2(props.dataV2));\n }\n\n _legendColorMap = {};\n let colorIndex = 0;\n\n return {\n barData:\n barData?.map(point => {\n return {\n ...point,\n series:\n point.series?.map(seriesPoint => {\n // TODO: Add support for gradient colors\n let startColor = seriesPoint.color ? seriesPoint.color : getNextColor(colorIndex, 0);\n let endColor = startColor;\n if (!_legendColorMap[seriesPoint.legend]) {\n _legendColorMap[seriesPoint.legend] = [startColor, endColor];\n }\n colorIndex += 1;\n\n return {\n ...seriesPoint,\n color: seriesPoint.color ?? _legendColorMap[seriesPoint.legend][0],\n };\n }) ?? [],\n };\n }) ?? [],\n\n lineData:\n lineData?.map(series => {\n let lineColor: string;\n if (typeof series.color === 'undefined') {\n lineColor = getNextColor(colorIndex, 0);\n } else {\n lineColor = getColorFromToken(series.color);\n }\n\n if (!_legendColorMap[series.legend]) {\n _legendColorMap[series.legend] = [lineColor, lineColor];\n }\n colorIndex += 1;\n\n return {\n ...series,\n color: _legendColorMap[series.legend][0],\n };\n }) ?? [],\n };\n };\n\n const _getOrderedXAxisLabels = (barData: GroupedVerticalBarChartData[], lineData: GVBCLineSeries[]) => {\n if (_xAxisType !== XAxisTypes.StringAxis) {\n return [];\n }\n\n return sortAxisCategories(_mapCategoryToValues(barData, lineData), props.xAxisCategoryOrder);\n };\n\n const _mapCategoryToValues = (barData: GroupedVerticalBarChartData[], lineData: GVBCLineSeries[]) => {\n const categoryToValues: Record<string, number[]> = {};\n barData.forEach(point => {\n if (!categoryToValues[point.name]) {\n categoryToValues[point.name] = [];\n }\n point.series.forEach(seriesPoint => {\n categoryToValues[point.name].push(seriesPoint.data);\n });\n });\n lineData.forEach(series => {\n series.data.forEach(point => {\n if (!categoryToValues[point.x]) {\n categoryToValues[point.x] = [];\n }\n categoryToValues[point.x].push(point.y);\n });\n });\n return categoryToValues;\n };\n\n const { barData, lineData } = _prepareChartData();\n const _xAxisType: XAxisTypes = getTypeOfAxis(barData[0].name, true) as XAxisTypes;\n const { barLegends, lineLegends, xAxisLabels, datasetForBars } = _createDataSetOfGVBC(barData, lineData);\n _barLegends = barLegends;\n _lineLegends = lineLegends;\n _xAxisLabels = xAxisLabels;\n _datasetForBars = datasetForBars;\n const legendBars: JSXElement = _getLegendData();\n _adjustProps();\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- Add commentMore actions\n function _getMinMaxOfYAxis(datasetForBars: any, yAxisType?: YAxisType, useSecondaryYScale?: boolean) {\n const values: number[] = [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n datasetForBars.forEach((data: any) => {\n data.groupSeries.forEach((point: GVBarChartSeriesPoint) => {\n if (!useSecondaryYScale === !point.useSecondaryYScale) {\n values.push(point.data);\n }\n });\n });\n\n return { startValue: d3Min(values)!, endValue: d3Max(values)! };\n }\n\n function _getDomainNRangeValues(\n points: GroupedVerticalBarChartData[],\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 || xAxisType === XAxisTypes.DateAxis) {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n } else {\n domainNRangeValue = domainRangeOfXStringAxis(margins, width, isRTL);\n }\n return domainNRangeValue;\n }\n\n // The maxOfYVal prop is only required for the primary y-axis, so yMax should be calculated\n // using only the data points associated with the primary y-axis.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const yMax = _getMinMaxOfYAxis(_datasetForBars).endValue;\n _yMax = Math.max(yMax, props.yMaxValue || 0);\n\n const calloutProps: ChartPopoverProps = {\n positioning: { target: popoverTarget },\n isPopoverOpen,\n color,\n legend: calloutLegend,\n XValue: xCalloutValue,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n YValueHover: yValueHover,\n hoverXValue,\n culture: props.culture,\n isCartesian: true,\n isCalloutForStack: props.isCalloutForStack,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData, 'text', false),\n };\n const tickParams = {\n tickValues: props.tickValues!,\n tickFormat: props.tickFormat!,\n };\n\n const _getGraphData = (\n xScale: StringScale | NumericScale,\n yScalePrimary: ScaleLinear<number, number>,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n yAxisElement?: SVGElement | null,\n yScaleSecondary?: ScaleLinear<number, number>,\n ) => {\n const xScale0 = _createX0Scale(containerWidth);\n\n // Setting the bar width here is safe because there are no dependencies earlier in the code\n // that rely on the width of bars in vertical bar charts with string x-axis.\n _barWidth = getBarWidth(\n props.barWidth,\n props.maxBarWidth,\n calcBandwidth(xScale0.bandwidth(), _barLegends.length, X1_INNER_PADDING),\n );\n _groupWidth = calcRequiredWidth(_barWidth, _barLegends.length, X1_INNER_PADDING);\n\n const xScale1 = _createX1Scale();\n const allGroupsBars: JSXElement[] = [];\n _datasetForBars.forEach((singleSet: GVSingleDataPoint) => {\n allGroupsBars.push(\n _buildGraph(singleSet, xScale0, xScale1, yScalePrimary, yScaleSecondary, containerHeight, xElement!),\n );\n });\n _groupedVerticalBarGraph = allGroupsBars;\n };\n\n const _getMargins = (margins: Margins) => {\n _margins = margins;\n };\n\n const onBarHover = (\n pointData: GVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n mouseEvent: React.MouseEvent<SVGElement>,\n ): void => {\n mouseEvent.persist();\n if (_calloutAnchorPoint !== pointData) {\n _calloutAnchorPoint = pointData;\n _showCallout(mouseEvent.currentTarget, pointData, groupData);\n }\n };\n\n const _onBarLeave = (): void => {\n /**/\n };\n\n const _handleChartMouseLeave = (): void => {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n };\n\n const onBarFocus = (\n focusEvent: React.FocusEvent<SVGRectElement, Element>,\n pointData: GVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n ): void => {\n _showCallout(focusEvent.currentTarget, pointData, groupData);\n };\n\n const _buildGraph = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n singleSet: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale0: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale1: any,\n yScalePrimary: ScaleLinear<number, number>,\n yScaleSecondary: ScaleLinear<number, number> | undefined,\n containerHeight: number,\n xElement: SVGElement,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ): JSXElement => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const singleGroup: JSXElement[] = [];\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const barLabelsForGroup: JSXElement[] = [];\n\n // Get the actual legends present at this x-axis point\n const presentLegends = _barLegends.filter(key => key in singleSet);\n const effectiveGroupWidth = calcRequiredWidth(_barWidth, presentLegends.length, X1_INNER_PADDING);\n\n // For stacked bars, center the single bar group in the available space\n // Instead of using the global legend position, use the local position within present legends\n const localScale = d3ScaleBand()\n .domain(presentLegends)\n .range(_useRtl ? [effectiveGroupWidth, 0] : [0, effectiveGroupWidth])\n .paddingInner(X1_INNER_PADDING);\n _barLegends.forEach((legendTitle: string, legendIndex: number) => {\n const barPoints = singleSet[legendTitle];\n if (barPoints) {\n const yBarScale = barPoints[0].useSecondaryYScale && yScaleSecondary ? yScaleSecondary : yScalePrimary;\n\n const xPoint = (localScale(legendTitle) ?? 0) + (localScale.bandwidth() - _barWidth) / 2;\n const isLegendActive = _legendHighlighted(legendTitle) || _noLegendHighlighted();\n const barOpacity = isLegendActive ? '' : '0.1';\n\n let barTotalValue = 0;\n const yBaseline = yBarScale(Y_ORIGIN);\n let yPositiveStart = yBaseline;\n let yNegativeStart = yBaseline;\n let yPoint = Y_ORIGIN;\n\n barPoints.forEach((pointData: GVBarChartSeriesPoint, pointIndex: number) => {\n if (!pointData.data) {\n // Not rendering data with 0.\n return;\n }\n const barGap = (VERTICAL_BAR_GAP / 2) * (pointIndex > 0 ? 2 : 0);\n const height = Math.max(yBarScale(Y_ORIGIN) - yBarScale(Math.abs(pointData.data)), MIN_BAR_HEIGHT);\n const pointColor = pointData.color; // Use the color of the current point\n\n if (pointData.data >= Y_ORIGIN) {\n yPositiveStart -= height + barGap;\n yPoint = yPositiveStart;\n } else {\n yPoint = yNegativeStart + barGap;\n yNegativeStart = yPoint + height;\n }\n\n singleGroup.push(\n <rect\n key={`${singleSet.indexNum}-${legendIndex}-${pointIndex}`}\n className={classes.opacityChangeOnHover}\n height={height}\n width={_barWidth}\n x={xPoint}\n y={yPoint}\n opacity={barOpacity}\n fill={pointColor}\n rx={props.roundCorners ? 3 : 0}\n onMouseOver={event => onBarHover(pointData, singleSet, event)}\n onMouseMove={event => onBarHover(pointData, singleSet, event)}\n onMouseOut={_onBarLeave}\n onFocus={event => onBarFocus(event, pointData, singleSet)}\n onBlur={_onBarLeave}\n onClick={pointData.onClick}\n aria-label={getAriaLabel(pointData, singleSet.xAxisPoint)}\n tabIndex={_legendHighlighted(pointData.legend) || _noLegendHighlighted() ? 0 : undefined}\n role=\"img\"\n />,\n );\n\n barTotalValue += pointData.data;\n });\n if (barTotalValue !== null && !props.hideLabels && Math.ceil(_barWidth) >= 16 && isLegendActive) {\n barLabelsForGroup.push(\n <text\n key={`${singleSet.indexNum}-${legendIndex}`}\n x={xPoint + _barWidth / 2}\n y={barTotalValue >= Y_ORIGIN ? yPositiveStart - 6 : yNegativeStart + 12}\n textAnchor=\"middle\"\n className={classes.barLabel}\n aria-hidden={true}\n style={{ direction: 'ltr', unicodeBidi: 'isolate' }}\n >\n {typeof props.yAxisTickFormat === 'function'\n ? props.yAxisTickFormat(barTotalValue)\n : formatScientificLimitWidth(barTotalValue)}\n </text>,\n );\n }\n }\n });\n // Used to display tooltip at x axis labels.\n if (!props.wrapXAxisLables && props.showXAxisLablesTooltip) {\n const xAxisElement = d3Select(xElement).call(xScale0);\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 (\n <g\n key={singleSet.indexNum}\n transform={`translate(${xScale0(singleSet.xAxisPoint) + (xScale0.bandwidth() - effectiveGroupWidth) / 2}, 0)`}\n >\n {singleGroup}\n {barLabelsForGroup}\n </g>\n );\n };\n\n // For grouped vertical bar chart, First need to define total scale (from start to end)\n // From that need to define scale for single group of bars - done by createX1Scale\n const _createX0Scale = (containerWidth: number) => {\n const x0Axis = d3ScaleBand()\n .domain(xAxisLabels)\n .range(\n _useRtl\n ? [containerWidth! - _margins.right! - _domainMargin, _margins.left! + _domainMargin]\n : [_margins.left! + _domainMargin, containerWidth! - _margins.right! - _domainMargin],\n )\n .paddingInner(_xAxisInnerPadding)\n .paddingOuter(_xAxisOuterPadding);\n return x0Axis;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _createX1Scale = (): any => {\n return (\n d3ScaleBand()\n .domain(_barLegends)\n // When there is only one group, xScale0 adds padding around it,\n // causing the bandwidth to become smaller than the actual group width.\n // So to render bars in the group correctly, use groupWidth instead of the generated scale bandwidth.\n .range(_useRtl ? [_groupWidth, 0] : [0, _groupWidth])\n .paddingInner(X1_INNER_PADDING)\n );\n };\n\n const _onLegendHover = (legendTitle: string): void => {\n setActiveLegend(legendTitle);\n };\n\n const _onLegendLeave = (): void => {\n setActiveLegend('');\n };\n\n const _getAxisData = React.useCallback(\n (yAxisData: IAxisData) => {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n const { yAxisDomainValues: domainValue } = yAxisData;\n _yMax = Math.max(domainValue[domainValue.length - 1], props.yMaxValue || 0);\n }\n },\n [props.yMaxValue],\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 const _legendHighlighted = (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 const _noLegendHighlighted = () => {\n return _getHighlightedLegend().length === 0;\n };\n\n const _getHighlightedLegend = () => {\n return selectedLegends.length > 0 ? selectedLegends : activeLegend ? [activeLegend] : [];\n };\n\n const getAriaLabel = (point: GVBarChartSeriesPoint, xAxisPoint: string): string => {\n const xValue = point.xAxisCalloutData || xAxisPoint;\n const legend = point.legend;\n const yValue = point.yAxisCalloutData || point.data;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ${legend}, ${yValue}.`;\n };\n\n const _getDomainMargins = (containerWidth: number): Margins => {\n /** Total width available to render the bars */\n const totalWidth = calcTotalWidth(containerWidth, _margins, MIN_DOMAIN_MARGIN);\n\n if (_xAxisType === XAxisTypes.StringAxis) {\n if (isScalePaddingDefined(props.xAxisOuterPadding)) {\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 group and after the last group.\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 const groupWidth = calcRequiredWidth(_barWidth, _barLegends.length, X1_INNER_PADDING);\n /** Total width required to render the groups. Directly proportional to group width */\n const reqWidth = calcRequiredWidth(groupWidth, _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 groups at their maximum allowable width\n const groupBandwidth = calcBandwidth(totalWidth, _xAxisLabels.length, _xAxisInnerPadding);\n const barBandwidth = calcBandwidth(groupBandwidth, _barLegends.length, X1_INNER_PADDING);\n const barWidth = getBarWidth(props.barWidth, props.maxBarWidth, barBandwidth);\n const groupWidth = calcRequiredWidth(barWidth, _barLegends.length, X1_INNER_PADDING);\n let reqWidth = calcRequiredWidth(groupWidth, _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 }\n\n return {\n ..._margins,\n left: _margins.left! + _domainMargin,\n right: _margins.right! + _domainMargin,\n };\n };\n\n const _isChartEmpty = (_barData: GroupedVerticalBarChartData[], _lineData: GVBCLineSeries[]): boolean => {\n return !(\n (_barData &&\n _barData.length > 0 &&\n _barData.filter((item: GroupedVerticalBarChartData) => item.series.length).length > 0) ||\n (_lineData && _lineData.length > 0 && _lineData.some(series => series.data.length > 0))\n );\n };\n\n const _getChartTitle = (): string => {\n return (\n (props.chartTitle ? `${props.chartTitle}. ` : '') +\n `Vertical bar chart with ${_barLegends.length} grouped bar series` +\n (_lineLegends.length > 0 ? ` and ${_lineLegends.length} line series. ` : '. ')\n );\n };\n\n const _createLines = (\n _lineData: GVBCLineSeries[],\n xScale: StringScale,\n yScalePrimary: NumericScale,\n yScaleSecondary?: NumericScale,\n ): React.ReactNode => {\n const lineBorders: React.ReactNode[] = [];\n const lines: React.ReactNode[] = [];\n const dots: React.ReactNode[] = [];\n\n const scaleLineX = (x: string) => xScale(x)! + xScale.bandwidth() / 2;\n\n _lineData.forEach((series, seriesIdx) => {\n const lineBorderGroup: React.ReactNode[] = [];\n const lineGroup: React.ReactNode[] = [];\n const dotGroup: React.ReactNode[] = [];\n const lineBorderWidth = series.lineOptions?.lineBorderWidth\n ? Number.parseFloat(series.lineOptions.lineBorderWidth.toString())\n : 0;\n const yScale = series.useSecondaryYScale && yScaleSecondary ? yScaleSecondary : yScalePrimary;\n const shouldHighlight = _legendHighlighted(series.legend) || _noLegendHighlighted();\n\n series.data.forEach((point, pointIdx) => {\n const x2 = scaleLineX(point.x);\n const y2 = yScale(point.y);\n\n if (pointIdx > 0) {\n const x1 = scaleLineX(series.data[pointIdx - 1].x);\n const y1 = yScale(series.data[pointIdx - 1].y);\n\n if (lineBorderWidth > 0) {\n lineBorderGroup.push(\n <line\n key={`lineBorder-${seriesIdx}-${pointIdx}`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n fill=\"transparent\"\n stroke={series.lineOptions?.lineBorderColor ?? tokens.colorNeutralBackground1}\n strokeWidth={3 + lineBorderWidth * 2}\n strokeLinecap=\"round\"\n opacity={shouldHighlight ? 1 : 0.1}\n />,\n );\n }\n\n lineGroup.push(\n <line\n key={`line-${seriesIdx}-${pointIdx}`}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n stroke={series.color}\n strokeWidth={series.lineOptions?.strokeWidth ?? 3}\n strokeLinecap={series.lineOptions?.strokeLinecap ?? 'round'}\n strokeDasharray={series.lineOptions?.strokeDasharray}\n opacity={shouldHighlight ? 1 : 0.1}\n onMouseOver={e => _onLineHover(e, series, seriesIdx, pointIdx, scaleLineX)}\n onMouseLeave={_onBarLeave}\n />,\n );\n }\n\n const dotId = _getDotId(seriesIdx, pointIdx);\n const isLinePointActive = activeLinePoint === point.x || activeLinePoint === dotId;\n\n dotGroup.push(\n <circle\n key={dotId}\n id={dotId}\n cx={x2}\n cy={y2}\n r={shouldHighlight && isLinePointActive ? 8 : 0.3}\n fill={tokens.colorNeutralBackground1}\n stroke={series.color}\n strokeWidth={3}\n opacity={shouldHighlight ? 1 : 0.1}\n onMouseOver={e => _onLineHover(e, series, seriesIdx, pointIdx, scaleLineX)}\n onMouseLeave={_onBarLeave}\n data-is-focusable={shouldHighlight}\n onFocus={e => _onLineFocus(e, series, seriesIdx, pointIdx)}\n onBlur={_onBarLeave}\n role=\"img\"\n aria-label={getAriaLabel(\n {\n xAxisCalloutData: point.xAxisCalloutData,\n legend: series.legend,\n yAxisCalloutData: point.yAxisCalloutData,\n data: point.y,\n callOutAccessibilityData: point.callOutAccessibilityData,\n } as GVBarChartSeriesPoint,\n point.x,\n )}\n />,\n );\n });\n\n lineBorders.push(<g key={`lineBorderGroup-${seriesIdx}`}>{lineBorderGroup}</g>);\n lines.push(<g key={`lineGroup-${seriesIdx}`}>{lineGroup}</g>);\n dots.push(<g key={`dotGroup-${seriesIdx}`}>{dotGroup}</g>);\n });\n\n return dots.length > 0 ? (\n <g>\n {lineBorders.length > 0 ? <g>{lineBorders}</g> : null}\n {lines.length > 0 ? <g>{lines}</g> : null}\n <g>{dots}</g>\n </g>\n ) : null;\n };\n\n const _onLineHover = (\n event: React.MouseEvent<SVGElement>,\n series: GVBCLineSeries,\n seriesIdx: number,\n pointIdx: number,\n scaleLineX: (x: string) => number,\n ) => {\n const pointerX = d3Pointer(event, _rectRef.current)[0];\n\n let closestPointIdx = pointIdx;\n if (pointIdx > 0) {\n const currPointPos = scaleLineX(series.data[pointIdx].x);\n const prevPointPos = scaleLineX(series.data[pointIdx - 1].x);\n\n if (Math.abs(prevPointPos - pointerX) < Math.abs(currPointPos - pointerX)) {\n closestPointIdx = pointIdx - 1;\n }\n }\n\n event.persist();\n _showCalloutForLines(event.currentTarget, series, seriesIdx, closestPointIdx);\n };\n\n const _onLineFocus = (\n event: React.FocusEvent<SVGElement>,\n series: GVBCLineSeries,\n seriesIdx: number,\n pointIdx: number,\n ) => {\n _showCalloutForLines(event.currentTarget, series, seriesIdx, pointIdx);\n };\n\n const _showCalloutForLines = (target: SVGElement, series: GVBCLineSeries, seriesIdx: number, pointIdx: number) => {\n const point = series.data[pointIdx];\n const pointData = {\n ...point,\n legend: series.legend,\n color: series.color!,\n key: series.legend,\n data: point.y,\n yAxisCalloutData: point.yAxisCalloutData as string | undefined,\n };\n const groupData = _datasetForBars.find((singleSet: { xAxisPoint: string }) => singleSet.xAxisPoint === point.x);\n\n _showCallout(target, pointData, groupData, _getDotId(seriesIdx, pointIdx));\n };\n\n const _showCallout = (\n target: SVGElement,\n pointData: GVBarChartSeriesPoint,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n groupData: any,\n _activeLinePoint = '',\n ) => {\n setPopoverTarget(target);\n setPopoverOpen(_noLegendHighlighted() || _legendHighlighted(pointData.legend));\n setCalloutLegend(pointData.legend);\n setDataForHoverCard(pointData.data);\n setColor(pointData.color);\n setXCalloutValue(pointData.xAxisCalloutData ?? groupData.xAxisPoint);\n setYCalloutValue(pointData.yAxisCalloutData);\n setCallOutAccessibilityData(\n props.isCalloutForStack ? groupData.stackCallOutAccessibilityData : pointData.callOutAccessibilityData,\n );\n setYValueHover(\n groupData.groupSeries.filter((item: YValueHover) => _noLegendHighlighted() || _legendHighlighted(item.legend!)),\n );\n setHoverXValue(pointData.xAxisCalloutData ?? groupData.xAxisPoint);\n setActiveLinePoint(props.isCalloutForStack ? groupData.xAxisPoint : _activeLinePoint);\n };\n\n const _getDotId = (seriesIdx: number, pointIdx: number) => {\n return _uniqDotId + `-${seriesIdx}-${pointIdx}`;\n };\n\n return !_isChartEmpty(barData, lineData) ? (\n <CartesianChart\n {...props}\n chartTitle={_getChartTitle()}\n points={_datasetForBars}\n chartType={ChartTypes.GroupedVerticalBarChart}\n getDomainNRangeValues={_getDomainNRangeValues}\n getMinMaxOfYAxis={_getMinMaxOfYAxis}\n createStringYAxis={createStringYAxis}\n calloutProps={calloutProps}\n legendBars={legendBars}\n xAxisType={_xAxisType}\n createYAxis={createNumericYAxis}\n datasetForXAxisDomain={_xAxisLabels}\n tickParams={tickParams}\n tickPadding={props.tickPadding || 5}\n maxOfYVal={_yMax}\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 barwidth={_barWidth}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n children={(childProps: ChildProps) => {\n return (\n <>\n <rect ref={_rectRef} width=\"100%\" height=\"100%\" fill=\"transparent\" style={{ pointerEvents: 'none' }} />\n <g>{_groupedVerticalBarGraph}</g>\n {_createLines(lineData, childProps.xScale, childProps.yScalePrimary, childProps.yScaleSecondary)}\n </>\n );\n }}\n />\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n});\nGroupedVerticalBarChart.displayName = 'GroupedVerticalBarChart';\n"],"names":["React","useGroupedVerticalBarChartStyles_unstable","select","d3Select","pointer","d3Pointer","max","d3Max","min","d3Min","scaleBand","d3ScaleBand","useId","ChartTypes","getAccessibleDataObject","tooltipOfAxislabels","XAxisTypes","getTypeOfAxis","formatScientificLimitWidth","getScalePadding","getBarWidth","isScalePaddingDefined","createNumericYAxis","domainRangeOfXStringAxis","createStringYAxis","getNextColor","areArraysEqual","calculateLongestLabelWidth","useRtl","calcRequiredWidth","calcTotalWidth","calcBandwidth","calcTotalBandUnits","sortAxisCategories","CartesianChart","Legends","getColorFromToken","toImage","tokens","MIN_DOMAIN_MARGIN","X1_INNER_PADDING","VERTICAL_BAR_GAP","MIN_BAR_HEIGHT","GroupedVerticalBarChart","forwardRef","_props","forwardedRef","props","xAxisCategoryOrder","maxBarWidth","_tooltipId","_emptyChartId","_useRtl","_domainMargin","_xAxisLabels","_datasetForBars","_margins","top","right","bottom","left","_groupedVerticalBarGraph","_yMax","_calloutAnchorPoint","_barWidth","_groupWidth","_xAxisInnerPadding","_xAxisOuterPadding","_barLegends","_lineLegends","_legendColorMap","cartesianChartRef","useRef","Y_ORIGIN","_legendsRef","_rectRef","_uniqDotId","color","setColor","useState","dataForHoverCard","setDataForHoverCard","selectedLegends","setSelectedLegends","legendProps","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","yValueHover","setYValueHover","hoverXValue","setHoverXValue","calloutLegend","setCalloutLegend","activeLegend","setActiveLegend","callOutAccessibilityData","setCallOutAccessibilityData","undefined","popoverTarget","setPopoverTarget","isPopoverOpen","setPopoverOpen","activeLinePoint","setActiveLinePoint","classes","useEffect","useImperativeHandle","componentRef","chartContainer","current","opts","toSVG","_adjustProps","barWidth","xAxisInnerPadding","length","xAxisOuterPadding","_createDataset","barData","lineData","datasetForBars","linePointsByX","visitedX","Set","forEach","series","data","point","x","push","legend","y","useSecondaryYScale","index","singleDatasetPointForBars","legendToBarPoint","seriesPoint","xAxisPoint","name","indexNum","groupSeries","Object","values","stackCallOutAccessibilityData","add","keys","xPoint","has","_createDataSetOfGVBC","barLegends","lineLegends","map","xAxisLabels","_getOrderedXAxisLabels","Array","from","onLegendSelectionChange","event","currentLegend","canSelectMultipleLegends","slice","onChange","_getLegendData","actions","addLegendButton","legendTitle","isLineLegendInBarChart","title","hoverAction","_handleChartMouseLeave","_onLegendHover","onMouseOutAction","_onLegendLeave","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","legendRef","_processDataV2","dataV2","barPointsByX","type","key","xAxisCalloutData","yAxisCalloutData","onClick","_prepareChartData","isArray","colorIndex","startColor","endColor","lineColor","_xAxisType","StringAxis","_mapCategoryToValues","categoryToValues","legendBars","_getMinMaxOfYAxis","yAxisType","startValue","endValue","_getDomainNRangeValues","points","margins","width","chartType","isRTL","xAxisType","tickValues","domainNRangeValue","NumericAxis","DateAxis","dStartValue","dEndValue","rStartValue","rEndValue","yMax","Math","yMaxValue","calloutProps","positioning","target","XValue","YValue","YValueHover","culture","isCartesian","isCalloutForStack","tickParams","tickFormat","_getGraphData","xScale","yScalePrimary","containerHeight","containerWidth","xElement","yAxisElement","yScaleSecondary","xScale0","_createX0Scale","bandwidth","xScale1","_createX1Scale","allGroupsBars","singleSet","_buildGraph","_getMargins","onBarHover","pointData","groupData","mouseEvent","persist","_showCallout","currentTarget","_onBarLeave","onBarFocus","focusEvent","singleGroup","barLabelsForGroup","presentLegends","filter","effectiveGroupWidth","localScale","domain","range","paddingInner","legendIndex","barPoints","yBarScale","isLegendActive","_legendHighlighted","_noLegendHighlighted","barOpacity","barTotalValue","yBaseline","yPositiveStart","yNegativeStart","yPoint","pointIndex","barGap","height","abs","pointColor","rect","className","opacityChangeOnHover","opacity","fill","rx","roundCorners","onMouseOver","onMouseMove","onMouseOut","onFocus","onBlur","aria-label","getAriaLabel","tabIndex","role","hideLabels","ceil","text","textAnchor","barLabel","aria-hidden","style","direction","unicodeBidi","yAxisTickFormat","wrapXAxisLables","showXAxisLablesTooltip","xAxisElement","call","document","getElementById","remove","e","tooltipProps","tooltipCls","tooltip","id","axis","g","transform","x0Axis","paddingOuter","_getAxisData","useCallback","yAxisData","yAxisDomainValues","domainValue","_getHighlightedLegend","includes","xValue","yValue","ariaLabel","_getDomainMargins","totalWidth","groupWidth","reqWidth","mode","groupBandwidth","barBandwidth","margin1","margin2","Number","POSITIVE_INFINITY","hideTickOverlap","step","_isChartEmpty","_barData","_lineData","item","some","_getChartTitle","chartTitle","_createLines","lineBorders","lines","dots","scaleLineX","seriesIdx","lineBorderGroup","lineGroup","dotGroup","lineBorderWidth","lineOptions","parseFloat","toString","yScale","shouldHighlight","pointIdx","x2","y2","x1","y1","line","stroke","lineBorderColor","colorNeutralBackground1","strokeWidth","strokeLinecap","strokeDasharray","_onLineHover","onMouseLeave","dotId","_getDotId","isLinePointActive","circle","cx","cy","r","data-is-focusable","_onLineFocus","pointerX","closestPointIdx","currPointPos","prevPointPos","_showCalloutForLines","find","_activeLinePoint","getDomainNRangeValues","getMinMaxOfYAxis","createYAxis","datasetForXAxisDomain","tickPadding","maxOfYVal","getmargins","getGraphData","getAxisData","onChartMouseLeave","getDomainMargins","barwidth","children","childProps","ref","pointerEvents","div","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yCAAyC,QAAQ,4CAA4C;AACtG,SAASC,UAAUC,QAAQ,EAAEC,WAAWC,SAAS,QAAQ,eAAe;AACxE,SAASC,OAAOC,KAAK,EAAEC,OAAOC,KAAK,QAAQ,WAAW;AACtD,SAAiCC,aAAaC,WAAW,QAAQ,WAAW;AAE5E,SAASC,KAAK,QAAoB,4BAA4B;AAC9D,SACEC,UAAU,EAEVC,uBAAuB,EACvBC,mBAAmB,EACnBC,UAAU,EACVC,aAAa,EACbC,0BAA0B,EAC1BC,eAAe,EACfC,WAAW,EACXC,qBAAqB,EACrBC,kBAAkB,EAElBC,wBAAwB,EACxBC,iBAAiB,EACjBC,YAAY,EACZC,cAAc,EACdC,0BAA0B,EAC1BC,MAAM,EAENC,iBAAiB,EACjBC,cAAc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wBAAwB0X,WAAW,GAAG"}
|
|
@@ -18,7 +18,9 @@ export const groupedVerticalBarChartClassNames = {
|
|
|
18
18
|
chartWrapper: '',
|
|
19
19
|
svgTooltip: '',
|
|
20
20
|
chart: '',
|
|
21
|
-
axisAnnotation: ''
|
|
21
|
+
axisAnnotation: '',
|
|
22
|
+
plotContainer: '',
|
|
23
|
+
annotationLayer: ''
|
|
22
24
|
};
|
|
23
25
|
const useStyles = /*#__PURE__*/__styles({
|
|
24
26
|
opacityChangeOnHover: {
|
|
@@ -31,10 +33,11 @@ const useStyles = /*#__PURE__*/__styles({
|
|
|
31
33
|
Bg96gwp: "f1i3iumi",
|
|
32
34
|
mc9l5x: "f22iagw",
|
|
33
35
|
Beiy3e4: "f1vx9l62",
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
Byoj8tv: 0,
|
|
37
|
+
uwmqm3: 0,
|
|
38
|
+
z189sj: 0,
|
|
39
|
+
z8tnut: 0,
|
|
40
|
+
B0ocmuz: "f1bnz8pu",
|
|
38
41
|
qhf8xq: "f1euv43f",
|
|
39
42
|
fsow6f: "f17mccla",
|
|
40
43
|
Bhzewxz: "fr6rvge",
|
|
@@ -56,7 +59,9 @@ const useStyles = /*#__PURE__*/__styles({
|
|
|
56
59
|
Bvjb7m6: "fhv2zbx"
|
|
57
60
|
}
|
|
58
61
|
}, {
|
|
59
|
-
d: [".f158kwzp{cursor:default;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f22iagw{display:flex;}", ".f1vx9l62{flex-direction:column;}", ".
|
|
62
|
+
d: [".f158kwzp{cursor:default;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f22iagw{display:flex;}", ".f1vx9l62{flex-direction:column;}", [".f1bnz8pu{padding:var(--spacingHorizontalS);}", {
|
|
63
|
+
p: -1
|
|
64
|
+
}], ".f1euv43f{position:absolute;}", ".f17mccla{text-align:center;}", ".fr6rvge{top:var(--spacingVerticalNone);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", [".fq9zq91{border-radius:var(--borderRadiusSmall);}", {
|
|
60
65
|
p: -1
|
|
61
66
|
}], ".f1aehjj5{pointer-events:none;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fhuob2q{fill:var(--colorNeutralForeground1);}", ".fhv2zbx{forced-color-adjust:auto;}"]
|
|
62
67
|
});
|
package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","getBarLabelStyle","getTooltipStyle","groupedVerticalBarChartClassNames","opacityChangeOnHover","tooltip","barLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","Bceei9c","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","getBarLabelStyle","getTooltipStyle","groupedVerticalBarChartClassNames","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","Bhzewxz","De3pzq","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","sj55zd","Bkfmm31","Bvjb7m6","d","p","useGroupedVerticalBarChartStyles_unstable","props","baseStyles"],"sources":["useGroupedVerticalBarChartStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { getBarLabelStyle, getTooltipStyle } from '../../utilities/index';\nexport const groupedVerticalBarChartClassNames = {\n opacityChangeOnHover: 'fui-gvbc**opacityChangeOnHover',\n tooltip: 'fui-gvbc**tooltip',\n barLabel: 'fui-gvbc**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});\n/**\n * Apply styling to the GroupedVerticalBarChart slots based on the state\n */ export const useGroupedVerticalBarChartStyles_unstable = (props)=>{\n const baseStyles = useStyles();\n return {\n opacityChangeOnHover: mergeClasses(groupedVerticalBarChartClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/ ),\n tooltip: mergeClasses(groupedVerticalBarChartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ ),\n barLabel: mergeClasses(groupedVerticalBarChartClassNames.barLabel, baseStyles.barLabel /*props.styles?.barLabel*/ )\n };\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,gBAAgB,EAAEC,eAAe,QAAQ,uBAAuB;AACzE,OAAO,MAAMC,iCAAiC,GAAG;EAC7CC,oBAAoB,EAAE,gCAAgC;EACtDC,OAAO,EAAE,mBAAmB;EAC5BC,QAAQ,EAAE,oB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+C,UAAU,CAAC/C,OAAO,CAAC,yBAA0B,CAAC;IAC/GC,QAAQ,EAAEN,YAAY,CAACG,iCAAiC,CAACG,QAAQ,EAAE8C,UAAU,CAAC9C,QAAQ,CAAC,0BAA2B;EACtH,CAAC;AACL,CAAC","ignoreList":[]}
|
package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js
CHANGED
|
@@ -17,7 +17,9 @@ export const groupedVerticalBarChartClassNames = {
|
|
|
17
17
|
chartWrapper: '',
|
|
18
18
|
svgTooltip: '',
|
|
19
19
|
chart: '',
|
|
20
|
-
axisAnnotation: ''
|
|
20
|
+
axisAnnotation: '',
|
|
21
|
+
plotContainer: '',
|
|
22
|
+
annotationLayer: ''
|
|
21
23
|
};
|
|
22
24
|
const useStyles = makeStyles({
|
|
23
25
|
opacityChangeOnHover: {
|
package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { GriffelStyle, makeStyles, mergeClasses } from '@griffel/react';\nimport { GroupedVerticalBarChartProps, GroupedVerticalBarChartStyles } from '../../index';\nimport { SlotClassNames } from '@fluentui/react-utilities/src/index';\nimport { getBarLabelStyle, getTooltipStyle } from '../../utilities/index';\n\nexport const groupedVerticalBarChartClassNames: SlotClassNames<GroupedVerticalBarChartStyles> = {\n opacityChangeOnHover: 'fui-gvbc**opacityChangeOnHover',\n tooltip: 'fui-gvbc**tooltip',\n barLabel: 'fui-gvbc**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};\n\nconst useStyles = makeStyles({\n opacityChangeOnHover: {\n cursor: 'default',\n },\n tooltip: getTooltipStyle() as GriffelStyle,\n barLabel: getBarLabelStyle() as GriffelStyle,\n});\n\n/**\n * Apply styling to the GroupedVerticalBarChart slots based on the state\n */\nexport const useGroupedVerticalBarChartStyles_unstable = (\n props: GroupedVerticalBarChartProps,\n): GroupedVerticalBarChartStyles => {\n const baseStyles = useStyles();\n\n return {\n opacityChangeOnHover: mergeClasses(\n groupedVerticalBarChartClassNames.opacityChangeOnHover,\n baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/,\n ),\n tooltip: mergeClasses(groupedVerticalBarChartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/),\n barLabel: mergeClasses(groupedVerticalBarChartClassNames.barLabel, baseStyles.barLabel /*props.styles?.barLabel*/),\n };\n};\n"],"names":["makeStyles","mergeClasses","getBarLabelStyle","getTooltipStyle","groupedVerticalBarChartClassNames","opacityChangeOnHover","tooltip","barLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","cursor","useGroupedVerticalBarChartStyles_unstable","props","baseStyles"],"mappings":"AAAA;AAEA,SAAuBA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAGxE,SAASC,gBAAgB,EAAEC,eAAe,QAAQ,wBAAwB;AAE1E,OAAO,MAAMC,oCAAmF;IAC9FC,sBAAsB;IACtBC,SAAS;IACTC,UAAU;IACVC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;IACPC,gBAAgB;
|
|
1
|
+
{"version":3,"sources":["../src/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { GriffelStyle, makeStyles, mergeClasses } from '@griffel/react';\nimport { GroupedVerticalBarChartProps, GroupedVerticalBarChartStyles } from '../../index';\nimport { SlotClassNames } from '@fluentui/react-utilities/src/index';\nimport { getBarLabelStyle, getTooltipStyle } from '../../utilities/index';\n\nexport const groupedVerticalBarChartClassNames: SlotClassNames<GroupedVerticalBarChartStyles> = {\n opacityChangeOnHover: 'fui-gvbc**opacityChangeOnHover',\n tooltip: 'fui-gvbc**tooltip',\n barLabel: 'fui-gvbc**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};\n\nconst useStyles = makeStyles({\n opacityChangeOnHover: {\n cursor: 'default',\n },\n tooltip: getTooltipStyle() as GriffelStyle,\n barLabel: getBarLabelStyle() as GriffelStyle,\n});\n\n/**\n * Apply styling to the GroupedVerticalBarChart slots based on the state\n */\nexport const useGroupedVerticalBarChartStyles_unstable = (\n props: GroupedVerticalBarChartProps,\n): GroupedVerticalBarChartStyles => {\n const baseStyles = useStyles();\n\n return {\n opacityChangeOnHover: mergeClasses(\n groupedVerticalBarChartClassNames.opacityChangeOnHover,\n baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/,\n ),\n tooltip: mergeClasses(groupedVerticalBarChartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/),\n barLabel: mergeClasses(groupedVerticalBarChartClassNames.barLabel, baseStyles.barLabel /*props.styles?.barLabel*/),\n };\n};\n"],"names":["makeStyles","mergeClasses","getBarLabelStyle","getTooltipStyle","groupedVerticalBarChartClassNames","opacityChangeOnHover","tooltip","barLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","plotContainer","annotationLayer","useStyles","cursor","useGroupedVerticalBarChartStyles_unstable","props","baseStyles"],"mappings":"AAAA;AAEA,SAAuBA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAGxE,SAASC,gBAAgB,EAAEC,eAAe,QAAQ,wBAAwB;AAE1E,OAAO,MAAMC,oCAAmF;IAC9FC,sBAAsB;IACtBC,SAAS;IACTC,UAAU;IACVC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;IACPC,gBAAgB;IAChBC,eAAe;IACfC,iBAAiB;AACnB,EAAE;AAEF,MAAMC,YAAYvB,WAAW;IAC3BK,sBAAsB;QACpBmB,QAAQ;IACV;IACAlB,SAASH;IACTI,UAAUL;AACZ;AAEA;;CAEC,GACD,OAAO,MAAMuB,4CAA4C,CACvDC;IAEA,MAAMC,aAAaJ;IAEnB,OAAO;QACLlB,sBAAsBJ,aACpBG,kCAAkCC,oBAAoB,EACtDsB,WAAWtB,oBAAoB,CAAC,oCAAoC;QAEtEC,SAASL,aAAaG,kCAAkCE,OAAO,EAAEqB,WAAWrB,OAAO,CAAC,uBAAuB;QAC3GC,UAAUN,aAAaG,kCAAkCG,QAAQ,EAAEoB,WAAWpB,QAAQ,CAAC,wBAAwB;IACjH;AACF,EAAE"}
|
|
@@ -66,7 +66,7 @@ export const HeatMapChart = /*#__PURE__*/ React.forwardRef((props = {
|
|
|
66
66
|
endValue: 0
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
function _getDomainNRangeValues(points, margins, width, chartType, isRTL, xAxisType, barWidth, tickValues
|
|
69
|
+
function _getDomainNRangeValues(points, margins, width, chartType, isRTL, xAxisType, barWidth, tickValues) {
|
|
70
70
|
let domainNRangeValue;
|
|
71
71
|
if (xAxisType === XAxisTypes.NumericAxis || xAxisType === XAxisTypes.DateAxis) {
|
|
72
72
|
domainNRangeValue = {
|