@fluentui/react-charts 9.3.21 → 9.74.3-experimental.esm.20260709-49ee7a20cf.0
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 +20 -2
- package/package.json +15 -17
- package/dist/index.d.ts +0 -5724
- package/lib/AnnotationOnlyChart.js +0 -1
- package/lib/AnnotationOnlyChart.js.map +0 -1
- package/lib/AreaChart.js +0 -1
- package/lib/AreaChart.js.map +0 -1
- package/lib/CartesianChart.js +0 -1
- package/lib/CartesianChart.js.map +0 -1
- package/lib/ChartTable.js +0 -1
- package/lib/ChartTable.js.map +0 -1
- package/lib/DeclarativeChart.js +0 -1
- package/lib/DeclarativeChart.js.map +0 -1
- package/lib/DonutChart.js +0 -1
- package/lib/DonutChart.js.map +0 -1
- package/lib/FunnelChart.js +0 -1
- package/lib/FunnelChart.js.map +0 -1
- package/lib/GanttChart.js +0 -1
- package/lib/GanttChart.js.map +0 -1
- package/lib/GaugeChart.js +0 -1
- package/lib/GaugeChart.js.map +0 -1
- package/lib/GroupedVerticalBarChart.js +0 -1
- package/lib/GroupedVerticalBarChart.js.map +0 -1
- package/lib/HeatMapChart.js +0 -1
- package/lib/HeatMapChart.js.map +0 -1
- package/lib/HorizontalBarChart.js +0 -1
- package/lib/HorizontalBarChart.js.map +0 -1
- package/lib/HorizontalBarChartWithAxis.js +0 -1
- package/lib/HorizontalBarChartWithAxis.js.map +0 -1
- package/lib/Legends.js +0 -1
- package/lib/Legends.js.map +0 -1
- package/lib/LineChart.js +0 -1
- package/lib/LineChart.js.map +0 -1
- package/lib/PolarChart.js +0 -1
- package/lib/PolarChart.js.map +0 -1
- package/lib/Popover.js +0 -1
- package/lib/Popover.js.map +0 -1
- package/lib/ResponsiveContainer.js +0 -1
- package/lib/ResponsiveContainer.js.map +0 -1
- package/lib/SankeyChart.js +0 -1
- package/lib/SankeyChart.js.map +0 -1
- package/lib/ScatterChart.js +0 -1
- package/lib/ScatterChart.js.map +0 -1
- package/lib/Sparkline.js +0 -1
- package/lib/Sparkline.js.map +0 -1
- package/lib/VegaDeclarativeChart.js +0 -1
- package/lib/VegaDeclarativeChart.js.map +0 -1
- package/lib/VerticalBarChart.js +0 -1
- package/lib/VerticalBarChart.js.map +0 -1
- package/lib/VerticalStackedBarChart.js +0 -1
- package/lib/VerticalStackedBarChart.js.map +0 -1
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +0 -196
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +0 -1
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +0 -3
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +0 -1
- package/lib/components/AnnotationOnlyChart/index.js +0 -2
- package/lib/components/AnnotationOnlyChart/index.js.map +0 -1
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +0 -33
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +0 -1
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +0 -24
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +0 -1
- package/lib/components/AreaChart/AreaChart.js +0 -932
- package/lib/components/AreaChart/AreaChart.js.map +0 -1
- package/lib/components/AreaChart/AreaChart.types.js +0 -4
- package/lib/components/AreaChart/AreaChart.types.js.map +0 -1
- package/lib/components/AreaChart/index.js +0 -3
- package/lib/components/AreaChart/index.js.map +0 -1
- package/lib/components/AreaChart/useAreaChartStyles.styles.js +0 -63
- package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +0 -1
- package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +0 -33
- package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +0 -1
- package/lib/components/ChartTable/ChartTable.js +0 -160
- package/lib/components/ChartTable/ChartTable.js.map +0 -1
- package/lib/components/ChartTable/ChartTable.types.js +0 -4
- package/lib/components/ChartTable/ChartTable.types.js.map +0 -1
- package/lib/components/ChartTable/index.js +0 -3
- package/lib/components/ChartTable/index.js.map +0 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.js +0 -136
- package/lib/components/ChartTable/useChartTableStyles.styles.js.map +0 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +0 -68
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +0 -1
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +0 -659
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +0 -1
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +0 -1
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +0 -1
- package/lib/components/CommonComponents/Annotations/index.js +0 -2
- package/lib/components/CommonComponents/Annotations/index.js.map +0 -1
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +0 -223
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +0 -1
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +0 -139
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +0 -1
- package/lib/components/CommonComponents/CartesianChart.js +0 -665
- package/lib/components/CommonComponents/CartesianChart.js.map +0 -1
- package/lib/components/CommonComponents/CartesianChart.types.js +0 -2
- package/lib/components/CommonComponents/CartesianChart.types.js.map +0 -1
- package/lib/components/CommonComponents/ChartPopover.js +0 -197
- package/lib/components/CommonComponents/ChartPopover.js.map +0 -1
- package/lib/components/CommonComponents/ChartPopover.types.js +0 -1
- package/lib/components/CommonComponents/ChartPopover.types.js.map +0 -1
- package/lib/components/CommonComponents/index.js +0 -6
- package/lib/components/CommonComponents/index.js.map +0 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +0 -189
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +0 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +0 -131
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +0 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +0 -171
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +0 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +0 -127
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +0 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +0 -397
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +0 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +0 -163
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +0 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +0 -3490
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +0 -1
- package/lib/components/DeclarativeChart/index.js +0 -1
- package/lib/components/DeclarativeChart/index.js.map +0 -1
- package/lib/components/DonutChart/Arc/Arc.js +0 -118
- package/lib/components/DonutChart/Arc/Arc.js.map +0 -1
- package/lib/components/DonutChart/Arc/Arc.types.js +0 -1
- package/lib/components/DonutChart/Arc/Arc.types.js.map +0 -1
- package/lib/components/DonutChart/Arc/index.js +0 -2
- package/lib/components/DonutChart/Arc/index.js.map +0 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js +0 -80
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +0 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +0 -49
- package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +0 -1
- package/lib/components/DonutChart/DonutChart.js +0 -349
- package/lib/components/DonutChart/DonutChart.js.map +0 -1
- package/lib/components/DonutChart/DonutChart.types.js +0 -4
- package/lib/components/DonutChart/DonutChart.types.js.map +0 -1
- package/lib/components/DonutChart/Pie/Pie.js +0 -72
- package/lib/components/DonutChart/Pie/Pie.js.map +0 -1
- package/lib/components/DonutChart/Pie/Pie.types.js +0 -1
- package/lib/components/DonutChart/Pie/Pie.types.js.map +0 -1
- package/lib/components/DonutChart/Pie/index.js +0 -2
- package/lib/components/DonutChart/Pie/index.js.map +0 -1
- package/lib/components/DonutChart/Pie/usePieStyles.styles.js +0 -41
- package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +0 -1
- package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js +0 -30
- package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +0 -1
- package/lib/components/DonutChart/index.js +0 -3
- package/lib/components/DonutChart/index.js.map +0 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.js +0 -98
- package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +0 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +0 -62
- package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +0 -1
- package/lib/components/FunnelChart/FunnelChart.js +0 -401
- package/lib/components/FunnelChart/FunnelChart.js.map +0 -1
- package/lib/components/FunnelChart/FunnelChart.types.js +0 -4
- package/lib/components/FunnelChart/FunnelChart.types.js.map +0 -1
- package/lib/components/FunnelChart/funnelGeometry.js +0 -219
- package/lib/components/FunnelChart/funnelGeometry.js.map +0 -1
- package/lib/components/FunnelChart/index.js +0 -2
- package/lib/components/FunnelChart/index.js.map +0 -1
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +0 -83
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +0 -1
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +0 -65
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +0 -1
- package/lib/components/GanttChart/GanttChart.js +0 -535
- package/lib/components/GanttChart/GanttChart.js.map +0 -1
- package/lib/components/GanttChart/GanttChart.types.js +0 -4
- package/lib/components/GanttChart/GanttChart.types.js.map +0 -1
- package/lib/components/GanttChart/index.js +0 -2
- package/lib/components/GanttChart/index.js.map +0 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.js +0 -27
- package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +0 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +0 -26
- package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +0 -1
- package/lib/components/GaugeChart/GaugeChart.js +0 -568
- package/lib/components/GaugeChart/GaugeChart.js.map +0 -1
- package/lib/components/GaugeChart/GaugeChart.types.js +0 -4
- package/lib/components/GaugeChart/GaugeChart.types.js.map +0 -1
- package/lib/components/GaugeChart/index.js +0 -3
- package/lib/components/GaugeChart/index.js.map +0 -1
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +0 -197
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +0 -1
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +0 -149
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +0 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +0 -813
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +0 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +0 -4
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +0 -1
- package/lib/components/GroupedVerticalBarChart/index.js +0 -3
- package/lib/components/GroupedVerticalBarChart/index.js.map +0 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +0 -77
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +0 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +0 -40
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +0 -1
- package/lib/components/HeatMapChart/HeatMapChart.js +0 -677
- package/lib/components/HeatMapChart/HeatMapChart.js.map +0 -1
- package/lib/components/HeatMapChart/HeatMapChart.types.js +0 -4
- package/lib/components/HeatMapChart/HeatMapChart.types.js.map +0 -1
- package/lib/components/HeatMapChart/index.js +0 -3
- package/lib/components/HeatMapChart/index.js.map +0 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +0 -48
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +0 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +0 -42
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +0 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js +0 -411
- package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +0 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +0 -7
- package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +0 -1
- package/lib/components/HorizontalBarChart/index.js +0 -3
- package/lib/components/HorizontalBarChart/index.js.map +0 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +0 -175
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +0 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +0 -125
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +0 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +0 -720
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +0 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +0 -4
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +0 -1
- package/lib/components/HorizontalBarChartWithAxis/index.js +0 -3
- package/lib/components/HorizontalBarChartWithAxis/index.js.map +0 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +0 -62
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +0 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +0 -54
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +0 -1
- package/lib/components/Legends/Legends.js +0 -323
- package/lib/components/Legends/Legends.js.map +0 -1
- package/lib/components/Legends/Legends.types.js +0 -3
- package/lib/components/Legends/Legends.types.js.map +0 -1
- package/lib/components/Legends/OverflowMenu.js +0 -33
- package/lib/components/Legends/OverflowMenu.js.map +0 -1
- package/lib/components/Legends/index.js +0 -3
- package/lib/components/Legends/index.js.map +0 -1
- package/lib/components/Legends/shape.js +0 -36
- package/lib/components/Legends/shape.js.map +0 -1
- package/lib/components/Legends/useLegendsStyles.styles.js +0 -262
- package/lib/components/Legends/useLegendsStyles.styles.js.map +0 -1
- package/lib/components/Legends/useLegendsStyles.styles.raw.js +0 -142
- package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +0 -1
- package/lib/components/LineChart/LineChart.js +0 -1332
- package/lib/components/LineChart/LineChart.js.map +0 -1
- package/lib/components/LineChart/LineChart.types.js +0 -3
- package/lib/components/LineChart/LineChart.types.js.map +0 -1
- package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +0 -118
- package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +0 -1
- package/lib/components/LineChart/eventAnnotation/LabelLink.js +0 -59
- package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +0 -1
- package/lib/components/LineChart/eventAnnotation/Textbox.js +0 -42
- package/lib/components/LineChart/eventAnnotation/Textbox.js.map +0 -1
- package/lib/components/LineChart/index.js +0 -4
- package/lib/components/LineChart/index.js.map +0 -1
- package/lib/components/LineChart/useLineChartStyles.styles.js +0 -93
- package/lib/components/LineChart/useLineChartStyles.styles.js.map +0 -1
- package/lib/components/LineChart/useLineChartStyles.styles.raw.js +0 -50
- package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +0 -1
- package/lib/components/PolarChart/PolarChart.js +0 -577
- package/lib/components/PolarChart/PolarChart.js.map +0 -1
- package/lib/components/PolarChart/PolarChart.types.js +0 -4
- package/lib/components/PolarChart/PolarChart.types.js.map +0 -1
- package/lib/components/PolarChart/PolarChart.utils.js +0 -174
- package/lib/components/PolarChart/PolarChart.utils.js.map +0 -1
- package/lib/components/PolarChart/index.js +0 -2
- package/lib/components/PolarChart/index.js.map +0 -1
- package/lib/components/PolarChart/usePolarChartStyles.styles.js +0 -72
- package/lib/components/PolarChart/usePolarChartStyles.styles.js.map +0 -1
- package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js +0 -61
- package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js.map +0 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js +0 -99
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +0 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js +0 -4
- package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +0 -1
- package/lib/components/ResponsiveContainer/index.js +0 -3
- package/lib/components/ResponsiveContainer/index.js.map +0 -1
- package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +0 -30
- package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +0 -1
- package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +0 -29
- package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +0 -1
- package/lib/components/ResponsiveContainer/withResponsiveContainer.js +0 -20
- package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +0 -1
- package/lib/components/SankeyChart/SankeyChart.js +0 -1026
- package/lib/components/SankeyChart/SankeyChart.js.map +0 -1
- package/lib/components/SankeyChart/SankeyChart.types.js +0 -3
- package/lib/components/SankeyChart/SankeyChart.types.js.map +0 -1
- package/lib/components/SankeyChart/index.js +0 -3
- package/lib/components/SankeyChart/index.js.map +0 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +0 -123
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +0 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +0 -79
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +0 -1
- package/lib/components/ScatterChart/ScatterChart.js +0 -544
- package/lib/components/ScatterChart/ScatterChart.js.map +0 -1
- package/lib/components/ScatterChart/ScatterChart.types.js +0 -4
- package/lib/components/ScatterChart/ScatterChart.types.js.map +0 -1
- package/lib/components/ScatterChart/index.js +0 -3
- package/lib/components/ScatterChart/index.js.map +0 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js +0 -84
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +0 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +0 -41
- package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +0 -1
- package/lib/components/Sparkline/Sparkline.js +0 -123
- package/lib/components/Sparkline/Sparkline.js.map +0 -1
- package/lib/components/Sparkline/Sparkline.types.js +0 -4
- package/lib/components/Sparkline/Sparkline.types.js.map +0 -1
- package/lib/components/Sparkline/index.js +0 -3
- package/lib/components/Sparkline/index.js.map +0 -1
- package/lib/components/Sparkline/useSparklineStyles.styles.js +0 -40
- package/lib/components/Sparkline/useSparklineStyles.styles.js.map +0 -1
- package/lib/components/Sparkline/useSparklineStyles.styles.raw.js +0 -31
- package/lib/components/Sparkline/useSparklineStyles.styles.raw.js.map +0 -1
- package/lib/components/VegaDeclarativeChart/VegaDeclarativeChart.js +0 -405
- package/lib/components/VegaDeclarativeChart/VegaDeclarativeChart.js.map +0 -1
- package/lib/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js +0 -20
- package/lib/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js.map +0 -1
- package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js +0 -415
- package/lib/components/VegaDeclarativeChart/VegaLiteColorAdapter.js.map +0 -1
- package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js +0 -537
- package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js.map +0 -1
- package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +0 -3279
- package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +0 -1
- package/lib/components/VegaDeclarativeChart/VegaLiteTypes.js +0 -28
- package/lib/components/VegaDeclarativeChart/VegaLiteTypes.js.map +0 -1
- package/lib/components/VegaDeclarativeChart/index.js +0 -1
- package/lib/components/VegaDeclarativeChart/index.js.map +0 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +0 -930
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +0 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.types.js +0 -4
- package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +0 -1
- package/lib/components/VerticalBarChart/index.js +0 -3
- package/lib/components/VerticalBarChart/index.js.map +0 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +0 -86
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +0 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +0 -48
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +0 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +0 -1077
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +0 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +0 -4
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +0 -1
- package/lib/components/VerticalStackedBarChart/index.js +0 -3
- package/lib/components/VerticalStackedBarChart/index.js.map +0 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +0 -74
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +0 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +0 -38
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +0 -1
- package/lib/index.js +0 -26
- package/lib/index.js.map +0 -1
- package/lib/types/ChartAnnotation.js +0 -1
- package/lib/types/ChartAnnotation.js.map +0 -1
- package/lib/types/DataPoint.js +0 -3
- package/lib/types/DataPoint.js.map +0 -1
- package/lib/types/EventAnnotation.js +0 -1
- package/lib/types/EventAnnotation.js.map +0 -1
- package/lib/types/LegendDataItem.js +0 -1
- package/lib/types/LegendDataItem.js.map +0 -1
- package/lib/types/index.js +0 -3
- package/lib/types/index.js.map +0 -1
- package/lib/utilities/ChartTitle.js +0 -45
- package/lib/utilities/ChartTitle.js.map +0 -1
- package/lib/utilities/Common.styles.js +0 -117
- package/lib/utilities/Common.styles.js.map +0 -1
- package/lib/utilities/Common.styles.raw.js +0 -115
- package/lib/utilities/Common.styles.raw.js.map +0 -1
- package/lib/utilities/FocusableTooltipText.js +0 -65
- package/lib/utilities/FocusableTooltipText.js.map +0 -1
- package/lib/utilities/KeyCodes.js +0 -11
- package/lib/utilities/KeyCodes.js.map +0 -1
- package/lib/utilities/SVGTooltipText.js +0 -179
- package/lib/utilities/SVGTooltipText.js.map +0 -1
- package/lib/utilities/async-utils.js +0 -380
- package/lib/utilities/async-utils.js.map +0 -1
- package/lib/utilities/colors.js +0 -281
- package/lib/utilities/colors.js.map +0 -1
- package/lib/utilities/getWindow.js +0 -25
- package/lib/utilities/getWindow.js.map +0 -1
- package/lib/utilities/hooks.js +0 -34
- package/lib/utilities/hooks.js.map +0 -1
- package/lib/utilities/image-export-utils.js +0 -405
- package/lib/utilities/image-export-utils.js.map +0 -1
- package/lib/utilities/index.js +0 -5
- package/lib/utilities/index.js.map +0 -1
- package/lib/utilities/overflow-utils.js +0 -27
- package/lib/utilities/overflow-utils.js.map +0 -1
- package/lib/utilities/scatterpolar-utils.js +0 -52
- package/lib/utilities/scatterpolar-utils.js.map +0 -1
- package/lib/utilities/string.js +0 -32
- package/lib/utilities/string.js.map +0 -1
- package/lib/utilities/test-data.js +0 -565
- package/lib/utilities/test-data.js.map +0 -1
- package/lib/utilities/utilities.js +0 -1990
- package/lib/utilities/utilities.js.map +0 -1
- package/lib/utilities/vbc-utils.js +0 -51
- package/lib/utilities/vbc-utils.js.map +0 -1
- package/lib-commonjs/AnnotationOnlyChart.js +0 -6
- package/lib-commonjs/AnnotationOnlyChart.js.map +0 -1
- package/lib-commonjs/AreaChart.js +0 -6
- package/lib-commonjs/AreaChart.js.map +0 -1
- package/lib-commonjs/CartesianChart.js +0 -6
- package/lib-commonjs/CartesianChart.js.map +0 -1
- package/lib-commonjs/ChartTable.js +0 -6
- package/lib-commonjs/ChartTable.js.map +0 -1
- package/lib-commonjs/DeclarativeChart.js +0 -6
- package/lib-commonjs/DeclarativeChart.js.map +0 -1
- package/lib-commonjs/DonutChart.js +0 -6
- package/lib-commonjs/DonutChart.js.map +0 -1
- package/lib-commonjs/FunnelChart.js +0 -6
- package/lib-commonjs/FunnelChart.js.map +0 -1
- package/lib-commonjs/GanttChart.js +0 -6
- package/lib-commonjs/GanttChart.js.map +0 -1
- package/lib-commonjs/GaugeChart.js +0 -6
- package/lib-commonjs/GaugeChart.js.map +0 -1
- package/lib-commonjs/GroupedVerticalBarChart.js +0 -6
- package/lib-commonjs/GroupedVerticalBarChart.js.map +0 -1
- package/lib-commonjs/HeatMapChart.js +0 -6
- package/lib-commonjs/HeatMapChart.js.map +0 -1
- package/lib-commonjs/HorizontalBarChart.js +0 -6
- package/lib-commonjs/HorizontalBarChart.js.map +0 -1
- package/lib-commonjs/HorizontalBarChartWithAxis.js +0 -6
- package/lib-commonjs/HorizontalBarChartWithAxis.js.map +0 -1
- package/lib-commonjs/Legends.js +0 -6
- package/lib-commonjs/Legends.js.map +0 -1
- package/lib-commonjs/LineChart.js +0 -6
- package/lib-commonjs/LineChart.js.map +0 -1
- package/lib-commonjs/PolarChart.js +0 -6
- package/lib-commonjs/PolarChart.js.map +0 -1
- package/lib-commonjs/Popover.js +0 -6
- package/lib-commonjs/Popover.js.map +0 -1
- package/lib-commonjs/ResponsiveContainer.js +0 -6
- package/lib-commonjs/ResponsiveContainer.js.map +0 -1
- package/lib-commonjs/SankeyChart.js +0 -6
- package/lib-commonjs/SankeyChart.js.map +0 -1
- package/lib-commonjs/ScatterChart.js +0 -6
- package/lib-commonjs/ScatterChart.js.map +0 -1
- package/lib-commonjs/Sparkline.js +0 -6
- package/lib-commonjs/Sparkline.js.map +0 -1
- package/lib-commonjs/VegaDeclarativeChart.js +0 -6
- package/lib-commonjs/VegaDeclarativeChart.js.map +0 -1
- package/lib-commonjs/VerticalBarChart.js +0 -6
- package/lib-commonjs/VerticalBarChart.js.map +0 -1
- package/lib-commonjs/VerticalStackedBarChart.js +0 -6
- package/lib-commonjs/VerticalStackedBarChart.js.map +0 -1
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +0 -207
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +0 -1
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +0 -6
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +0 -1
- package/lib-commonjs/components/AnnotationOnlyChart/index.js +0 -7
- package/lib-commonjs/components/AnnotationOnlyChart/index.js.map +0 -1
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +0 -57
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +0 -34
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/AreaChart/AreaChart.js +0 -938
- package/lib-commonjs/components/AreaChart/AreaChart.js.map +0 -1
- package/lib-commonjs/components/AreaChart/AreaChart.types.js +0 -7
- package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +0 -1
- package/lib-commonjs/components/AreaChart/index.js +0 -8
- package/lib-commonjs/components/AreaChart/index.js.map +0 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +0 -96
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +0 -49
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/ChartTable/ChartTable.js +0 -171
- package/lib-commonjs/components/ChartTable/ChartTable.js.map +0 -1
- package/lib-commonjs/components/ChartTable/ChartTable.types.js +0 -7
- package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +0 -1
- package/lib-commonjs/components/ChartTable/index.js +0 -8
- package/lib-commonjs/components/ChartTable/index.js.map +0 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +0 -200
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +0 -82
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +0 -670
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +0 -4
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/Annotations/index.js +0 -7
- package/lib-commonjs/components/CommonComponents/Annotations/index.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +0 -325
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +0 -174
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +0 -673
- package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js +0 -5
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/ChartPopover.js +0 -207
- package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/ChartPopover.types.js +0 -4
- package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/index.js +0 -11
- package/lib-commonjs/components/CommonComponents/index.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +0 -268
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +0 -144
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +0 -238
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +0 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +0 -141
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +0 -400
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +0 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +0 -195
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +0 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +0 -3577
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +0 -1
- package/lib-commonjs/components/DeclarativeChart/index.js +0 -6
- package/lib-commonjs/components/DeclarativeChart/index.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js +0 -125
- package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.types.js +0 -4
- package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Arc/index.js +0 -7
- package/lib-commonjs/components/DonutChart/Arc/index.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +0 -110
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +0 -63
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/DonutChart/DonutChart.js +0 -356
- package/lib-commonjs/components/DonutChart/DonutChart.js.map +0 -1
- package/lib-commonjs/components/DonutChart/DonutChart.types.js +0 -7
- package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.js +0 -79
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.types.js +0 -4
- package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Pie/index.js +0 -7
- package/lib-commonjs/components/DonutChart/Pie/index.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +0 -55
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +0 -1
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js +0 -44
- package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/DonutChart/index.js +0 -8
- package/lib-commonjs/components/DonutChart/index.js.map +0 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +0 -145
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +0 -76
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.js +0 -412
- package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +0 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.js +0 -7
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +0 -1
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js +0 -246
- package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +0 -1
- package/lib-commonjs/components/FunnelChart/index.js +0 -7
- package/lib-commonjs/components/FunnelChart/index.js.map +0 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +0 -118
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +0 -79
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/GanttChart/GanttChart.js +0 -546
- package/lib-commonjs/components/GanttChart/GanttChart.js.map +0 -1
- package/lib-commonjs/components/GanttChart/GanttChart.types.js +0 -7
- package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +0 -1
- package/lib-commonjs/components/GanttChart/index.js +0 -7
- package/lib-commonjs/components/GanttChart/index.js.map +0 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +0 -42
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +0 -42
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.js +0 -597
- package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +0 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js +0 -7
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +0 -1
- package/lib-commonjs/components/GaugeChart/index.js +0 -8
- package/lib-commonjs/components/GaugeChart/index.js.map +0 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +0 -281
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +0 -167
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +0 -818
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +0 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +0 -7
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +0 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/index.js +0 -8
- package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +0 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +0 -116
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +0 -56
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +0 -688
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +0 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js +0 -7
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +0 -1
- package/lib-commonjs/components/HeatMapChart/index.js +0 -8
- package/lib-commonjs/components/HeatMapChart/index.js.map +0 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +0 -71
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +0 -60
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +0 -417
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +0 -17
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChart/index.js +0 -8
- package/lib-commonjs/components/HorizontalBarChart/index.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +0 -264
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +0 -139
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +0 -726
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +0 -7
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js +0 -8
- package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +0 -86
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +0 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +0 -70
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/Legends/Legends.js +0 -333
- package/lib-commonjs/components/Legends/Legends.js.map +0 -1
- package/lib-commonjs/components/Legends/Legends.types.js +0 -6
- package/lib-commonjs/components/Legends/Legends.types.js.map +0 -1
- package/lib-commonjs/components/Legends/OverflowMenu.js +0 -44
- package/lib-commonjs/components/Legends/OverflowMenu.js.map +0 -1
- package/lib-commonjs/components/Legends/index.js +0 -8
- package/lib-commonjs/components/Legends/index.js.map +0 -1
- package/lib-commonjs/components/Legends/shape.js +0 -47
- package/lib-commonjs/components/Legends/shape.js.map +0 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +0 -456
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +0 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +0 -178
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/LineChart/LineChart.js +0 -1337
- package/lib-commonjs/components/LineChart/LineChart.js.map +0 -1
- package/lib-commonjs/components/LineChart/LineChart.types.js +0 -6
- package/lib-commonjs/components/LineChart/LineChart.types.js.map +0 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +0 -129
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +0 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js +0 -70
- package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +0 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +0 -53
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +0 -1
- package/lib-commonjs/components/LineChart/index.js +0 -9
- package/lib-commonjs/components/LineChart/index.js.map +0 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +0 -132
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +0 -63
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/PolarChart/PolarChart.js +0 -587
- package/lib-commonjs/components/PolarChart/PolarChart.js.map +0 -1
- package/lib-commonjs/components/PolarChart/PolarChart.types.js +0 -7
- package/lib-commonjs/components/PolarChart/PolarChart.types.js.map +0 -1
- package/lib-commonjs/components/PolarChart/PolarChart.utils.js +0 -204
- package/lib-commonjs/components/PolarChart/PolarChart.utils.js.map +0 -1
- package/lib-commonjs/components/PolarChart/index.js +0 -7
- package/lib-commonjs/components/PolarChart/index.js.map +0 -1
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.js +0 -107
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.js +0 -75
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +0 -107
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +0 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js +0 -7
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +0 -1
- package/lib-commonjs/components/ResponsiveContainer/index.js +0 -8
- package/lib-commonjs/components/ResponsiveContainer/index.js.map +0 -1
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +0 -50
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +0 -47
- package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js +0 -28
- package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +0 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.js +0 -1042
- package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +0 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.js +0 -6
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +0 -1
- package/lib-commonjs/components/SankeyChart/index.js +0 -8
- package/lib-commonjs/components/SankeyChart/index.js.map +0 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +0 -202
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +0 -97
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +0 -550
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +0 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js +0 -7
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +0 -1
- package/lib-commonjs/components/ScatterChart/index.js +0 -8
- package/lib-commonjs/components/ScatterChart/index.js.map +0 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +0 -120
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +0 -55
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/Sparkline/Sparkline.js +0 -129
- package/lib-commonjs/components/Sparkline/Sparkline.js.map +0 -1
- package/lib-commonjs/components/Sparkline/Sparkline.types.js +0 -7
- package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +0 -1
- package/lib-commonjs/components/Sparkline/index.js +0 -8
- package/lib-commonjs/components/Sparkline/index.js.map +0 -1
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +0 -57
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +0 -1
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js +0 -45
- package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChart.js +0 -274
- package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChart.js.map +0 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js +0 -35
- package/lib-commonjs/components/VegaDeclarativeChart/VegaDeclarativeChartHooks.js.map +0 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteColorAdapter.js +0 -412
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteColorAdapter.js.map +0 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js +0 -533
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js.map +0 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +0 -3214
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +0 -1
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteTypes.js +0 -31
- package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteTypes.js.map +0 -1
- package/lib-commonjs/components/VegaDeclarativeChart/index.js +0 -6
- package/lib-commonjs/components/VegaDeclarativeChart/index.js.map +0 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +0 -932
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +0 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js +0 -7
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +0 -1
- package/lib-commonjs/components/VerticalBarChart/index.js +0 -8
- package/lib-commonjs/components/VerticalBarChart/index.js.map +0 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +0 -128
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +0 -64
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +0 -1088
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +0 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +0 -7
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +0 -1
- package/lib-commonjs/components/VerticalStackedBarChart/index.js +0 -8
- package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +0 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +0 -116
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +0 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +0 -56
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/index.js +0 -31
- package/lib-commonjs/index.js.map +0 -1
- package/lib-commonjs/types/ChartAnnotation.js +0 -4
- package/lib-commonjs/types/ChartAnnotation.js.map +0 -1
- package/lib-commonjs/types/DataPoint.js +0 -6
- package/lib-commonjs/types/DataPoint.js.map +0 -1
- package/lib-commonjs/types/EventAnnotation.js +0 -4
- package/lib-commonjs/types/EventAnnotation.js.map +0 -1
- package/lib-commonjs/types/LegendDataItem.js +0 -4
- package/lib-commonjs/types/LegendDataItem.js.map +0 -1
- package/lib-commonjs/types/index.js +0 -8
- package/lib-commonjs/types/index.js.map +0 -1
- package/lib-commonjs/utilities/ChartTitle.js +0 -53
- package/lib-commonjs/utilities/ChartTitle.js.map +0 -1
- package/lib-commonjs/utilities/Common.styles.js +0 -138
- package/lib-commonjs/utilities/Common.styles.js.map +0 -1
- package/lib-commonjs/utilities/Common.styles.raw.js +0 -138
- package/lib-commonjs/utilities/Common.styles.raw.js.map +0 -1
- package/lib-commonjs/utilities/FocusableTooltipText.js +0 -75
- package/lib-commonjs/utilities/FocusableTooltipText.js.map +0 -1
- package/lib-commonjs/utilities/KeyCodes.js +0 -21
- package/lib-commonjs/utilities/KeyCodes.js.map +0 -1
- package/lib-commonjs/utilities/SVGTooltipText.js +0 -189
- package/lib-commonjs/utilities/SVGTooltipText.js.map +0 -1
- package/lib-commonjs/utilities/async-utils.js +0 -382
- package/lib-commonjs/utilities/async-utils.js.map +0 -1
- package/lib-commonjs/utilities/colors.js +0 -311
- package/lib-commonjs/utilities/colors.js.map +0 -1
- package/lib-commonjs/utilities/getWindow.js +0 -28
- package/lib-commonjs/utilities/getWindow.js.map +0 -1
- package/lib-commonjs/utilities/hooks.js +0 -45
- package/lib-commonjs/utilities/hooks.js.map +0 -1
- package/lib-commonjs/utilities/image-export-utils.js +0 -423
- package/lib-commonjs/utilities/image-export-utils.js.map +0 -1
- package/lib-commonjs/utilities/index.js +0 -10
- package/lib-commonjs/utilities/index.js.map +0 -1
- package/lib-commonjs/utilities/overflow-utils.js +0 -36
- package/lib-commonjs/utilities/overflow-utils.js.map +0 -1
- package/lib-commonjs/utilities/scatterpolar-utils.js +0 -67
- package/lib-commonjs/utilities/scatterpolar-utils.js.map +0 -1
- package/lib-commonjs/utilities/string.js +0 -29
- package/lib-commonjs/utilities/string.js.map +0 -1
- package/lib-commonjs/utilities/test-data.js +0 -628
- package/lib-commonjs/utilities/test-data.js.map +0 -1
- package/lib-commonjs/utilities/utilities.js +0 -2016
- package/lib-commonjs/utilities/utilities.js.map +0 -1
- package/lib-commonjs/utilities/vbc-utils.js +0 -72
- package/lib-commonjs/utilities/vbc-utils.js.map +0 -1
|
@@ -1,726 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "HorizontalBarChartWithAxis", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function() {
|
|
9
|
-
return HorizontalBarChartWithAxis;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
14
|
-
const _d3array = require("d3-array");
|
|
15
|
-
const _d3scale = require("d3-scale");
|
|
16
|
-
const _Legends = require("../../components/Legends/Legends");
|
|
17
|
-
const _reactutilities = require("@fluentui/react-utilities");
|
|
18
|
-
const _CartesianChart = require("../CommonComponents/CartesianChart");
|
|
19
|
-
const _useHorizontalBarChartWithAxisStylesstyles = require("./useHorizontalBarChartWithAxisStyles.styles");
|
|
20
|
-
const _ChartPopover = require("../CommonComponents/ChartPopover");
|
|
21
|
-
const _index = require("../../utilities/index");
|
|
22
|
-
const _vbcutils = require("../../utilities/vbc-utils");
|
|
23
|
-
const _hooks = require("../../utilities/hooks");
|
|
24
|
-
const HorizontalBarChartWithAxis = /*#__PURE__*/ _react.forwardRef((props = {
|
|
25
|
-
yAxisCategoryOrder: 'default'
|
|
26
|
-
}, forwardedRef)=>{
|
|
27
|
-
var _props_legendProps, _props_legendProps1, _props_legendProps2, _props_legendProps3;
|
|
28
|
-
const _refArray = [];
|
|
29
|
-
const _calloutId = (0, _reactutilities.useId)('callout');
|
|
30
|
-
const _isRtl = (0, _index.useRtl)();
|
|
31
|
-
const _xAxisType = props.data && props.data.length > 0 ? (0, _index.getTypeOfAxis)(props.data[0].x, true) : _index.XAxisTypes.NumericAxis;
|
|
32
|
-
const _yAxisType = props.data && props.data.length > 0 ? (0, _index.getTypeOfAxis)(props.data[0].y, false) : _index.YAxisType.StringAxis;
|
|
33
|
-
const _emptyChartId = (0, _reactutilities.useId)('_HBCWithAxis_empty');
|
|
34
|
-
let _points = [];
|
|
35
|
-
let _barHeight = 0;
|
|
36
|
-
let _colors = [];
|
|
37
|
-
let _margins;
|
|
38
|
-
let _bars;
|
|
39
|
-
let _yAxisLabels;
|
|
40
|
-
let _xMax;
|
|
41
|
-
let _calloutAnchorPoint;
|
|
42
|
-
let _longestBarPositiveTotalValue;
|
|
43
|
-
let _longestBarNegativeTotalValue;
|
|
44
|
-
let _domainMargin = _index.MIN_DOMAIN_MARGIN;
|
|
45
|
-
var _props_yAxisPadding;
|
|
46
|
-
let _yAxisPadding = (_props_yAxisPadding = props.yAxisPadding) !== null && _props_yAxisPadding !== void 0 ? _props_yAxisPadding : 0.5;
|
|
47
|
-
const { cartesianChartRef, legendsRef: _legendsRef } = (0, _hooks.useImageExport)(props.componentRef, props.hideLegend);
|
|
48
|
-
const styles = (0, _useHorizontalBarChartWithAxisStylesstyles.useHorizontalBarChartWithAxisStyles)(props);
|
|
49
|
-
const X_ORIGIN = 0;
|
|
50
|
-
const [color, setColor] = _react.useState('');
|
|
51
|
-
const [dataForHoverCard, setDataForHoverCard] = _react.useState(0);
|
|
52
|
-
const [isLegendSelected, setIsLegendSelected] = _react.useState(((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends) && props.legendProps.selectedLegends.length > 0 || ((_props_legendProps1 = props.legendProps) === null || _props_legendProps1 === void 0 ? void 0 : _props_legendProps1.selectedLegend) !== undefined);
|
|
53
|
-
const [isLegendHovered, setIsLegendHovered] = _react.useState(false);
|
|
54
|
-
var _props_legendProps_selectedLegend;
|
|
55
|
-
const [selectedLegendTitle, setSelectedLegendTitle] = _react.useState((_props_legendProps_selectedLegend = (_props_legendProps2 = props.legendProps) === null || _props_legendProps2 === void 0 ? void 0 : _props_legendProps2.selectedLegend) !== null && _props_legendProps_selectedLegend !== void 0 ? _props_legendProps_selectedLegend : '');
|
|
56
|
-
const [xCalloutValue, setXCalloutValue] = _react.useState('');
|
|
57
|
-
const [yCalloutValue, setYCalloutValue] = _react.useState('');
|
|
58
|
-
const [selectedLegends, setSelectedLegends] = _react.useState(((_props_legendProps3 = props.legendProps) === null || _props_legendProps3 === void 0 ? void 0 : _props_legendProps3.selectedLegends) || []);
|
|
59
|
-
const [dataPointCalloutProps, setDataPointCalloutProps] = _react.useState();
|
|
60
|
-
const [callOutAccessibilityData, setCallOutAccessibilityData] = _react.useState();
|
|
61
|
-
const [isPopoverOpen, setPopoverOpen] = _react.useState(false);
|
|
62
|
-
const [clickPosition, setClickPosition] = _react.useState({
|
|
63
|
-
x: 0,
|
|
64
|
-
y: 0
|
|
65
|
-
});
|
|
66
|
-
const prevPropsRef = _react.useRef(null);
|
|
67
|
-
_react.useEffect(()=>{
|
|
68
|
-
if (prevPropsRef.current) {
|
|
69
|
-
var _prevProps_legendProps, _props_legendProps;
|
|
70
|
-
const prevProps = prevPropsRef.current;
|
|
71
|
-
if (!(0, _index.areArraysEqual)((_prevProps_legendProps = prevProps.legendProps) === null || _prevProps_legendProps === void 0 ? void 0 : _prevProps_legendProps.selectedLegends, (_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends)) {
|
|
72
|
-
var _props_legendProps1;
|
|
73
|
-
setSelectedLegends(((_props_legendProps1 = props.legendProps) === null || _props_legendProps1 === void 0 ? void 0 : _props_legendProps1.selectedLegends) || []);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
prevPropsRef.current = props;
|
|
77
|
-
}, [
|
|
78
|
-
props
|
|
79
|
-
]);
|
|
80
|
-
function _adjustProps() {
|
|
81
|
-
_points = props.data || [];
|
|
82
|
-
_barHeight = props.barHeight || 32;
|
|
83
|
-
const defaultPalette = [
|
|
84
|
-
(0, _index.getColorFromToken)(_index.DataVizPalette.color6),
|
|
85
|
-
(0, _index.getColorFromToken)(_index.DataVizPalette.color1),
|
|
86
|
-
(0, _index.getColorFromToken)(_index.DataVizPalette.color5),
|
|
87
|
-
(0, _index.getColorFromToken)(_index.DataVizPalette.color7)
|
|
88
|
-
];
|
|
89
|
-
_colors = props.colors || defaultPalette;
|
|
90
|
-
}
|
|
91
|
-
function _getMargins(margins) {
|
|
92
|
-
_margins = margins;
|
|
93
|
-
}
|
|
94
|
-
function _renderContentForOnlyBars(point) {
|
|
95
|
-
const { useSingleColor = false } = props;
|
|
96
|
-
let selectedPointIndex = 0;
|
|
97
|
-
props.data.forEach((yDataPoint, index)=>{
|
|
98
|
-
if (yDataPoint.y === point.y) {
|
|
99
|
-
selectedPointIndex = index;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
let color;
|
|
103
|
-
if (useSingleColor) {
|
|
104
|
-
//if useSingle color , then check if user has given a palette or not
|
|
105
|
-
// and pick the first color from that or else from our paltette.
|
|
106
|
-
color = props.colors ? _createColors()(1) : (0, _index.getNextColor)(1, 0);
|
|
107
|
-
} else {
|
|
108
|
-
color = point.color ? point.color : props.colors ? _createColors()(point.x) : (0, _index.getNextColor)(selectedPointIndex, 0);
|
|
109
|
-
}
|
|
110
|
-
return /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement(_ChartPopover.ChartPopover, {
|
|
111
|
-
XValue: point.xAxisCalloutData || point.x.toString(),
|
|
112
|
-
legend: point.legend,
|
|
113
|
-
YValue: point.yAxisCalloutData || point.y,
|
|
114
|
-
color: color,
|
|
115
|
-
culture: props.culture,
|
|
116
|
-
clickPosition: clickPosition,
|
|
117
|
-
isPopoverOpen: isPopoverOpen
|
|
118
|
-
}));
|
|
119
|
-
}
|
|
120
|
-
function _renderCallout(props) {
|
|
121
|
-
return props ? _renderContentForOnlyBars(props) : null;
|
|
122
|
-
}
|
|
123
|
-
function _getCustomizedCallout() {
|
|
124
|
-
return props.onRenderCalloutPerDataPoint ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps, _renderCallout) : null;
|
|
125
|
-
}
|
|
126
|
-
function _getGraphData(xScale, yScale, containerHeight, containerWidth, xElement, yElement) {
|
|
127
|
-
const stackedChartData = (0, _index.groupChartDataByYValue)(_points);
|
|
128
|
-
const longestBars = (0, _index.computeLongestBars)(stackedChartData, X_ORIGIN);
|
|
129
|
-
_longestBarPositiveTotalValue = longestBars.longestPositiveBar;
|
|
130
|
-
_longestBarNegativeTotalValue = longestBars.longestNegativeBar;
|
|
131
|
-
const { xBarScale, yBarScale } = _yAxisType === _index.YAxisType.NumericAxis ? _getScales(containerHeight, containerWidth, true) : _getScales(containerHeight, containerWidth, false);
|
|
132
|
-
const xRange = xBarScale.range();
|
|
133
|
-
let allBars = [];
|
|
134
|
-
// when the chart mounts, the xRange[1] is sometimes seen to be < 0 (like -40) while xRange[0] > 0.
|
|
135
|
-
if (xRange[0] < xRange[1]) {
|
|
136
|
-
allBars = stackedChartData.map((singleBarData)=>_yAxisType === _index.YAxisType.NumericAxis ? _createNumericBars(containerHeight, containerWidth, xElement, yElement, singleBarData, xBarScale, yBarScale) : _createStringBars(containerHeight, containerWidth, xElement, yElement, singleBarData, xBarScale, yBarScale)).flat();
|
|
137
|
-
}
|
|
138
|
-
return _bars = allBars;
|
|
139
|
-
}
|
|
140
|
-
function _createColors() {
|
|
141
|
-
const increment = _colors.length <= 1 ? 1 : 1 / (_colors.length - 1);
|
|
142
|
-
const { useSingleColor = false } = props;
|
|
143
|
-
if (useSingleColor) {
|
|
144
|
-
return (_p)=>{
|
|
145
|
-
const { colors } = props;
|
|
146
|
-
return colors && colors.length > 0 ? colors[0] : (0, _index.getColorFromToken)(_index.DataVizPalette.color16);
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
const domainValues = [];
|
|
150
|
-
for(let i = 0; i < _colors.length; i++){
|
|
151
|
-
domainValues.push(increment * i * _xMax);
|
|
152
|
-
}
|
|
153
|
-
const colorScale = (0, _d3scale.scaleLinear)().domain(domainValues).range(_colors);
|
|
154
|
-
return colorScale;
|
|
155
|
-
}
|
|
156
|
-
function _refCallback(element, legendTitle) {
|
|
157
|
-
_refArray.push({
|
|
158
|
-
index: legendTitle,
|
|
159
|
-
refElement: element
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
function _onBarHover(point, color, mouseEvent) {
|
|
163
|
-
mouseEvent.persist();
|
|
164
|
-
if ((isLegendSelected === false || _isLegendHighlighted(point.legend)) && _calloutAnchorPoint !== point) {
|
|
165
|
-
_calloutAnchorPoint = point;
|
|
166
|
-
setPopoverOpen(true);
|
|
167
|
-
_updatePosition(mouseEvent.clientX, mouseEvent.clientY);
|
|
168
|
-
setDataForHoverCard(point.x);
|
|
169
|
-
setSelectedLegendTitle(point.legend);
|
|
170
|
-
setColor(props.useSingleColor || props.enableGradient ? color : point.color);
|
|
171
|
-
// To display callout value, if no callout value given, taking given point.x value as a string.
|
|
172
|
-
setXCalloutValue(point.yAxisCalloutData || point.y.toString());
|
|
173
|
-
setYCalloutValue(point.xAxisCalloutData || point.x.toString());
|
|
174
|
-
setDataPointCalloutProps(point);
|
|
175
|
-
setCallOutAccessibilityData(point.callOutAccessibilityData);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
function _onBarLeave() {
|
|
179
|
-
setPopoverOpen(false);
|
|
180
|
-
}
|
|
181
|
-
function _handleChartMouseLeave() {
|
|
182
|
-
_calloutAnchorPoint = null;
|
|
183
|
-
setPopoverOpen(false);
|
|
184
|
-
}
|
|
185
|
-
function _onBarFocus(event, point, refArrayIndexNumber, color) {
|
|
186
|
-
let cx = 0;
|
|
187
|
-
let cy = 0;
|
|
188
|
-
const targetRect = event.target.getBoundingClientRect();
|
|
189
|
-
cx = targetRect.left + targetRect.width / 2;
|
|
190
|
-
cy = targetRect.top + targetRect.height / 2;
|
|
191
|
-
_updatePosition(cx, cy);
|
|
192
|
-
if ((isLegendSelected === false || _isLegendHighlighted(point.legend)) && _calloutAnchorPoint !== point) {
|
|
193
|
-
_refArray.forEach((obj, index)=>{
|
|
194
|
-
if (refArrayIndexNumber === index) {
|
|
195
|
-
setPopoverOpen(true);
|
|
196
|
-
setSelectedLegendTitle(point.legend);
|
|
197
|
-
setDataForHoverCard(point.x);
|
|
198
|
-
setColor(props.useSingleColor ? color : point.color);
|
|
199
|
-
setXCalloutValue(point.yAxisCalloutData || point.y.toString());
|
|
200
|
-
setYCalloutValue(point.xAxisCalloutData || point.x.toString());
|
|
201
|
-
setDataPointCalloutProps(point);
|
|
202
|
-
setCallOutAccessibilityData(point.callOutAccessibilityData);
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
function _getScales(containerHeight, containerWidth, isNumericScale) {
|
|
208
|
-
const xMax = _longestBarPositiveTotalValue;
|
|
209
|
-
const xMin = _longestBarNegativeTotalValue;
|
|
210
|
-
const xDomain = [
|
|
211
|
-
Math.min(X_ORIGIN, xMin),
|
|
212
|
-
Math.max(X_ORIGIN, xMax)
|
|
213
|
-
];
|
|
214
|
-
if (isNumericScale) {
|
|
215
|
-
const yMax = (0, _d3array.max)(_points, (point)=>point.y);
|
|
216
|
-
const yMin = (0, _d3array.min)(_points, (point)=>point.y);
|
|
217
|
-
const yDomainMax = Math.max(yMax, props.yMaxValue || 0);
|
|
218
|
-
// Default to 0 if yMinValue is not provided.
|
|
219
|
-
const yMinProp = props.yMinValue || 0;
|
|
220
|
-
const yDomainMin = Math.min(yMin, yMinProp);
|
|
221
|
-
const xBarScale = (0, _d3scale.scaleLinear)().domain(xDomain).nice().range([
|
|
222
|
-
_margins.left,
|
|
223
|
-
containerWidth - _margins.right
|
|
224
|
-
]);
|
|
225
|
-
const yBarScale = (0, _d3scale.scaleLinear)().domain([
|
|
226
|
-
yDomainMin,
|
|
227
|
-
yDomainMax
|
|
228
|
-
]).range([
|
|
229
|
-
containerHeight - (_margins.bottom + _domainMargin),
|
|
230
|
-
_margins.top + _domainMargin
|
|
231
|
-
]);
|
|
232
|
-
return {
|
|
233
|
-
xBarScale,
|
|
234
|
-
yBarScale
|
|
235
|
-
};
|
|
236
|
-
} else {
|
|
237
|
-
// please note these padding default values must be consistent in here
|
|
238
|
-
// and CatrtesianChartBase w for more details refer example
|
|
239
|
-
// http://using-d3js.com/04_07_ordinal_scales.html
|
|
240
|
-
const yBarScale = (0, _d3scale.scaleBand)().domain(_yAxisLabels).range([
|
|
241
|
-
containerHeight - (_margins.bottom + _domainMargin),
|
|
242
|
-
_margins.top + _domainMargin
|
|
243
|
-
]).padding(_yAxisPadding);
|
|
244
|
-
const xBarScale = (0, _d3scale.scaleLinear)().domain(xDomain).nice().range([
|
|
245
|
-
_margins.left,
|
|
246
|
-
containerWidth - _margins.right
|
|
247
|
-
]);
|
|
248
|
-
return {
|
|
249
|
-
xBarScale,
|
|
250
|
-
yBarScale
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
function _calculateBarTotals(singleBarData) {
|
|
255
|
-
const totalPositiveValue = singleBarData.filter((point)=>point.x >= X_ORIGIN).reduce((sum, point)=>sum + point.x, 0);
|
|
256
|
-
const totalNegativeValue = singleBarData.filter((point)=>point.x < X_ORIGIN).reduce((sum, point)=>sum + point.x, 0);
|
|
257
|
-
const totalBarValue = totalPositiveValue + totalNegativeValue;
|
|
258
|
-
const showLabelOnPositiveSide = totalBarValue >= 0;
|
|
259
|
-
const totalPositiveBars = singleBarData.filter((point)=>point.x >= X_ORIGIN).length;
|
|
260
|
-
const totalNegativeBars = singleBarData.length - totalPositiveBars;
|
|
261
|
-
const shouldShowLabel = (isPositiveBar, currPositiveCounter, currNegativeCounter)=>{
|
|
262
|
-
const isLastPositiveBar = isPositiveBar && currPositiveCounter === totalPositiveBars;
|
|
263
|
-
const isLastNegativeBar = !isPositiveBar && currNegativeCounter === totalNegativeBars;
|
|
264
|
-
return showLabelOnPositiveSide ? isLastPositiveBar : isLastNegativeBar;
|
|
265
|
-
};
|
|
266
|
-
return {
|
|
267
|
-
totalPositiveValue,
|
|
268
|
-
totalNegativeValue,
|
|
269
|
-
totalBarValue,
|
|
270
|
-
showLabelOnPositiveSide,
|
|
271
|
-
shouldShowLabel
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
function _createNumericBars(containerHeight, containerWidth, xElement, yElement, singleBarData, xBarScale, yBarScale) {
|
|
275
|
-
const { useSingleColor = false } = props;
|
|
276
|
-
const sortedBars = [
|
|
277
|
-
...singleBarData
|
|
278
|
-
];
|
|
279
|
-
sortedBars.sort((a, b)=>{
|
|
280
|
-
const aValue = typeof a.y === 'number' ? a.y : parseFloat(a.y);
|
|
281
|
-
const bValue = typeof b.y === 'number' ? b.y : parseFloat(b.y);
|
|
282
|
-
return bValue - aValue;
|
|
283
|
-
});
|
|
284
|
-
let prevWidthPositive = 0;
|
|
285
|
-
let prevWidthNegative = 0;
|
|
286
|
-
let prevPoint = 0;
|
|
287
|
-
const totalPositiveBars = singleBarData.filter((point)=>point.x >= X_ORIGIN).length;
|
|
288
|
-
const totalNegativeBars = singleBarData.length - totalPositiveBars;
|
|
289
|
-
const { totalBarValue, shouldShowLabel } = _calculateBarTotals(singleBarData);
|
|
290
|
-
let currPositiveCounter = 0;
|
|
291
|
-
let currNegativeCounter = 0;
|
|
292
|
-
const bars = sortedBars.map((point, index)=>{
|
|
293
|
-
let shouldHighlight = true;
|
|
294
|
-
if (isLegendHovered || isLegendSelected) {
|
|
295
|
-
shouldHighlight = _isLegendHighlighted(point.legend);
|
|
296
|
-
}
|
|
297
|
-
if (point.x >= X_ORIGIN) {
|
|
298
|
-
++currPositiveCounter;
|
|
299
|
-
}
|
|
300
|
-
if (point.x < X_ORIGIN) {
|
|
301
|
-
++currNegativeCounter;
|
|
302
|
-
}
|
|
303
|
-
const barStartX = _isRtl ? containerWidth - (_margins.right + Math.max(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN)) - _margins.left) : Math.min(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN));
|
|
304
|
-
const barHeight = Math.max(yBarScale(point.y), 0);
|
|
305
|
-
if (barHeight < 1) {
|
|
306
|
-
return /*#__PURE__*/ _react.createElement(_react.Fragment, {
|
|
307
|
-
key: point.x
|
|
308
|
-
}, " ");
|
|
309
|
-
}
|
|
310
|
-
let startColor;
|
|
311
|
-
if (useSingleColor) {
|
|
312
|
-
//if useSingle color , then check if user has given a palette or not
|
|
313
|
-
// and pick the first color from that or else from our paltette.
|
|
314
|
-
startColor = props.colors ? _createColors()(1) : (0, _index.getNextColor)(1, 0);
|
|
315
|
-
} else {
|
|
316
|
-
startColor = props.colors ? _createColors()(point.x) : (0, _index.getNextColor)(index, 0);
|
|
317
|
-
}
|
|
318
|
-
startColor = point.color && !useSingleColor ? point.color : startColor;
|
|
319
|
-
const prevBarWidth = Math.abs(xBarScale(prevPoint + X_ORIGIN) - xBarScale(X_ORIGIN));
|
|
320
|
-
prevPoint > X_ORIGIN ? prevWidthPositive += prevBarWidth : prevWidthNegative += prevBarWidth;
|
|
321
|
-
const currentWidth = Math.abs(xBarScale(point.x + X_ORIGIN) - xBarScale(X_ORIGIN));
|
|
322
|
-
const gapWidthLTR = currentWidth > 2 && (point.x > X_ORIGIN && currPositiveCounter !== totalPositiveBars || point.x < X_ORIGIN && (totalPositiveBars !== 0 || currNegativeCounter > 1)) ? 2 : 0;
|
|
323
|
-
const gapWidthRTL = currentWidth > 2 && (point.x > X_ORIGIN && (totalNegativeBars !== 0 || currPositiveCounter > 1) || point.x < X_ORIGIN && currNegativeCounter !== totalNegativeBars) ? 2 : 0;
|
|
324
|
-
let xStart = X_ORIGIN;
|
|
325
|
-
if (_isRtl) {
|
|
326
|
-
xStart = point.x > X_ORIGIN ? barStartX - prevWidthPositive : barStartX + prevWidthNegative;
|
|
327
|
-
} else {
|
|
328
|
-
xStart = point.x > X_ORIGIN ? barStartX + prevWidthPositive : barStartX - prevWidthNegative;
|
|
329
|
-
}
|
|
330
|
-
prevPoint = point.x;
|
|
331
|
-
const barWidth = currentWidth - (_isRtl ? gapWidthRTL : gapWidthLTR);
|
|
332
|
-
const barEndX = _isRtl ? point.x >= X_ORIGIN ? xStart : xStart + barWidth : point.x >= X_ORIGIN ? xStart + barWidth : xStart;
|
|
333
|
-
const isPositiveBar = point.x >= X_ORIGIN;
|
|
334
|
-
const showLabel = shouldShowLabel(isPositiveBar, currPositiveCounter, currNegativeCounter);
|
|
335
|
-
return /*#__PURE__*/ _react.createElement(_react.Fragment, {
|
|
336
|
-
key: `${index}_${point.x}`
|
|
337
|
-
}, /*#__PURE__*/ _react.createElement("rect", {
|
|
338
|
-
key: point.y,
|
|
339
|
-
x: xStart,
|
|
340
|
-
y: yBarScale(point.y) - _barHeight / 2,
|
|
341
|
-
width: barWidth,
|
|
342
|
-
height: _barHeight,
|
|
343
|
-
ref: (e)=>{
|
|
344
|
-
_refCallback(e, point.legend);
|
|
345
|
-
},
|
|
346
|
-
rx: props.roundCorners ? 3 : 0,
|
|
347
|
-
onClick: point.onClick,
|
|
348
|
-
onMouseOver: (event)=>_onBarHover(point, startColor, event),
|
|
349
|
-
"aria-label": _getAriaLabel(point),
|
|
350
|
-
role: "img",
|
|
351
|
-
"aria-labelledby": `toolTip${_calloutId}`,
|
|
352
|
-
onMouseLeave: _onBarLeave,
|
|
353
|
-
onFocus: (event)=>_onBarFocus(event, point, index, startColor),
|
|
354
|
-
onBlur: _onBarLeave,
|
|
355
|
-
fill: startColor,
|
|
356
|
-
opacity: shouldHighlight ? 1 : 0.1,
|
|
357
|
-
tabIndex: shouldHighlight ? 0 : undefined
|
|
358
|
-
}), showLabel && _renderBarLabel(barEndX, yBarScale(point.y) - _barHeight / 2, totalBarValue, isPositiveBar));
|
|
359
|
-
});
|
|
360
|
-
return bars;
|
|
361
|
-
}
|
|
362
|
-
function _getUniqueYValues() {
|
|
363
|
-
var _props_data;
|
|
364
|
-
const mapY = {};
|
|
365
|
-
(_props_data = props.data) === null || _props_data === void 0 ? void 0 : _props_data.forEach((point)=>{
|
|
366
|
-
mapY[point.y] = point.y;
|
|
367
|
-
});
|
|
368
|
-
const uniqueY = Object.values(mapY);
|
|
369
|
-
return uniqueY;
|
|
370
|
-
}
|
|
371
|
-
function _calculateAppropriateBarHeight(data, totalWidth, innerPadding) {
|
|
372
|
-
const result = (0, _vbcutils.getClosestPairDiffAndRange)(data);
|
|
373
|
-
if (!result || result[1] === 0) {
|
|
374
|
-
return 16;
|
|
375
|
-
}
|
|
376
|
-
const closestPairDiff = result[0];
|
|
377
|
-
let range = result[1];
|
|
378
|
-
const yMax = (0, _d3array.max)(_points, (point)=>point.y);
|
|
379
|
-
// Since we are always rendering from 0 to yMax, we need to ensure that the range is at least yMax
|
|
380
|
-
// to calculate the bar height correctly.
|
|
381
|
-
range = Math.max(range, yMax);
|
|
382
|
-
// Refer to https://microsoft.github.io/fluentui-charting-contrib/docs/rfcs/fix-overlapping-bars-on-continuous-axes
|
|
383
|
-
// for the derivation of the following formula.
|
|
384
|
-
const barWidth = Math.floor(totalWidth * closestPairDiff * (1 - innerPadding) / (range + closestPairDiff * (1 - innerPadding)));
|
|
385
|
-
return barWidth;
|
|
386
|
-
}
|
|
387
|
-
function _getDomainMarginsForHorizontalBarChart(containerHeight) {
|
|
388
|
-
_domainMargin = _index.MIN_DOMAIN_MARGIN;
|
|
389
|
-
const uniqueY = _getUniqueYValues();
|
|
390
|
-
/** Rate at which the space between the bars changes wrt the bar height */ _yAxisPadding = _yAxisPadding === 1 ? 0.99 : _yAxisPadding;
|
|
391
|
-
const barGapRate = _yAxisPadding / (1 - _yAxisPadding);
|
|
392
|
-
const numBars = uniqueY.length + (uniqueY.length - 1) * barGapRate;
|
|
393
|
-
// Total height available to render the bars
|
|
394
|
-
const totalHeight = containerHeight - (_margins.top + _index.MIN_DOMAIN_MARGIN) - (_margins.bottom + _index.MIN_DOMAIN_MARGIN);
|
|
395
|
-
if (_yAxisType !== _index.YAxisType.StringAxis) {
|
|
396
|
-
// Calculate bar height dynamically
|
|
397
|
-
_barHeight = props.barHeight || _calculateAppropriateBarHeight(uniqueY, totalHeight, _yAxisPadding);
|
|
398
|
-
_barHeight = Math.max(_barHeight, 1);
|
|
399
|
-
_domainMargin += _barHeight / 2;
|
|
400
|
-
} else {
|
|
401
|
-
// Calculate the appropriate bar height
|
|
402
|
-
_barHeight = props.barHeight || totalHeight / numBars;
|
|
403
|
-
/** Total height required to render the bars. Directly proportional to bar height */ const reqHeight = numBars * _barHeight;
|
|
404
|
-
if (totalHeight >= reqHeight) {
|
|
405
|
-
// Center align the chart by setting equal left and right margins for domain
|
|
406
|
-
_domainMargin = _index.MIN_DOMAIN_MARGIN + (totalHeight - reqHeight) / 2;
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
return {
|
|
410
|
-
..._margins,
|
|
411
|
-
top: _margins.top + _domainMargin,
|
|
412
|
-
bottom: _margins.bottom + _domainMargin
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
|
-
function _createStringBars(containerHeight, containerWidth, xElement, yElement, singleBarData, xBarScale, yBarScale) {
|
|
416
|
-
const { useSingleColor = false } = props;
|
|
417
|
-
let prevWidthPositive = 0;
|
|
418
|
-
let prevWidthNegative = 0;
|
|
419
|
-
let prevPoint = 0;
|
|
420
|
-
const totalPositiveBars = singleBarData.filter((point)=>point.x >= X_ORIGIN).length;
|
|
421
|
-
const totalNegativeBars = singleBarData.length - totalPositiveBars;
|
|
422
|
-
const { totalBarValue, shouldShowLabel } = _calculateBarTotals(singleBarData);
|
|
423
|
-
let currPositiveCounter = 0;
|
|
424
|
-
let currNegativeCounter = 0;
|
|
425
|
-
const bars = singleBarData.map((point, index)=>{
|
|
426
|
-
let shouldHighlight = true;
|
|
427
|
-
if (isLegendHovered || isLegendSelected) {
|
|
428
|
-
shouldHighlight = _isLegendHighlighted(point.legend);
|
|
429
|
-
}
|
|
430
|
-
if (point.x >= X_ORIGIN) {
|
|
431
|
-
++currPositiveCounter;
|
|
432
|
-
}
|
|
433
|
-
if (point.x < X_ORIGIN) {
|
|
434
|
-
++currNegativeCounter;
|
|
435
|
-
}
|
|
436
|
-
const barStartX = _isRtl ? containerWidth - (_margins.right + Math.max(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN)) - _margins.left) : Math.min(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN));
|
|
437
|
-
const barHeight = Math.max(yBarScale(point.y), 0);
|
|
438
|
-
if (barHeight < 1) {
|
|
439
|
-
return /*#__PURE__*/ _react.createElement(_react.Fragment, {
|
|
440
|
-
key: point.x
|
|
441
|
-
}, " ");
|
|
442
|
-
}
|
|
443
|
-
let startColor;
|
|
444
|
-
if (useSingleColor) {
|
|
445
|
-
//if useSingle color , then check if user has given a palette or not
|
|
446
|
-
// and pick the first color from that or else from our paltette.
|
|
447
|
-
startColor = props.colors ? _createColors()(1) : (0, _index.getNextColor)(1, 0);
|
|
448
|
-
} else {
|
|
449
|
-
startColor = props.colors ? _createColors()(point.x) : (0, _index.getNextColor)(index, 0);
|
|
450
|
-
}
|
|
451
|
-
startColor = point.color && !useSingleColor ? point.color : startColor;
|
|
452
|
-
const prevBarWidth = Math.abs(xBarScale(prevPoint + X_ORIGIN) - xBarScale(X_ORIGIN));
|
|
453
|
-
prevPoint > 0 ? prevWidthPositive += prevBarWidth : prevWidthNegative += prevBarWidth;
|
|
454
|
-
const currentWidth = Math.abs(xBarScale(point.x + X_ORIGIN) - xBarScale(X_ORIGIN));
|
|
455
|
-
const gapWidthLTR = currentWidth > 2 && (point.x > X_ORIGIN && currPositiveCounter !== totalPositiveBars || point.x < X_ORIGIN && (totalPositiveBars !== 0 || currNegativeCounter > 1)) ? 2 : 0;
|
|
456
|
-
const gapWidthRTL = currentWidth > 2 && (point.x > X_ORIGIN && (totalNegativeBars !== 0 || currPositiveCounter > 1) || point.x < X_ORIGIN && currNegativeCounter !== totalNegativeBars) ? 2 : 0;
|
|
457
|
-
prevPoint = point.x;
|
|
458
|
-
let xStart = X_ORIGIN;
|
|
459
|
-
if (_isRtl) {
|
|
460
|
-
xStart = point.x > X_ORIGIN ? barStartX - prevWidthPositive : barStartX + prevWidthNegative;
|
|
461
|
-
} else {
|
|
462
|
-
xStart = point.x > X_ORIGIN ? barStartX + prevWidthPositive : barStartX - prevWidthNegative;
|
|
463
|
-
}
|
|
464
|
-
const barWidth = currentWidth - (_isRtl ? gapWidthRTL : gapWidthLTR);
|
|
465
|
-
const barEndX = _isRtl ? point.x >= X_ORIGIN ? xStart : xStart + barWidth : point.x >= X_ORIGIN ? xStart + barWidth : xStart;
|
|
466
|
-
const isPositiveBar = point.x >= X_ORIGIN;
|
|
467
|
-
const yPosition = yBarScale(point.y) + 0.5 * (yBarScale.bandwidth() - _barHeight);
|
|
468
|
-
const showLabel = shouldShowLabel(isPositiveBar, currPositiveCounter, currNegativeCounter);
|
|
469
|
-
return /*#__PURE__*/ _react.createElement(_react.Fragment, {
|
|
470
|
-
key: `${index}_${point.x}`
|
|
471
|
-
}, /*#__PURE__*/ _react.createElement("rect", {
|
|
472
|
-
transform: `translate(0,${0.5 * (yBarScale.bandwidth() - _barHeight)})`,
|
|
473
|
-
key: point.x,
|
|
474
|
-
x: xStart,
|
|
475
|
-
y: yBarScale(point.y),
|
|
476
|
-
rx: props.roundCorners ? 3 : 0,
|
|
477
|
-
width: barWidth,
|
|
478
|
-
height: _barHeight,
|
|
479
|
-
"aria-labelledby": `toolTip${_calloutId}`,
|
|
480
|
-
"aria-label": _getAriaLabel(point),
|
|
481
|
-
role: "img",
|
|
482
|
-
ref: (e)=>{
|
|
483
|
-
_refCallback(e, point.legend);
|
|
484
|
-
},
|
|
485
|
-
onClick: point.onClick,
|
|
486
|
-
onMouseOver: (event)=>_onBarHover(point, startColor, event),
|
|
487
|
-
onMouseLeave: _onBarLeave,
|
|
488
|
-
onBlur: _onBarLeave,
|
|
489
|
-
opacity: shouldHighlight ? 1 : 0.1,
|
|
490
|
-
onFocus: (event)=>_onBarFocus(event, point, index, startColor),
|
|
491
|
-
fill: startColor,
|
|
492
|
-
tabIndex: shouldHighlight ? 0 : undefined
|
|
493
|
-
}), showLabel && _renderBarLabel(barEndX, yPosition, totalBarValue, isPositiveBar));
|
|
494
|
-
});
|
|
495
|
-
return bars;
|
|
496
|
-
}
|
|
497
|
-
function _onLegendHover(customMessage) {
|
|
498
|
-
if (!_isLegendSelected()) {
|
|
499
|
-
setIsLegendHovered(true);
|
|
500
|
-
setSelectedLegendTitle(customMessage);
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
function _onLegendLeave(isLegendFocused) {
|
|
504
|
-
if (!!isLegendFocused || !_isLegendSelected()) {
|
|
505
|
-
setIsLegendHovered(false);
|
|
506
|
-
setSelectedLegendTitle('');
|
|
507
|
-
setIsLegendSelected(isLegendFocused ? false : _isLegendSelected());
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
function _getLegendData(data) {
|
|
511
|
-
const { useSingleColor } = props;
|
|
512
|
-
const actions = [];
|
|
513
|
-
const mapLegendToColor = {};
|
|
514
|
-
data.forEach((point, _index1)=>{
|
|
515
|
-
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
516
|
-
const color = useSingleColor ? props.colors ? _createColors()(1) : (0, _index.getNextColor)(1, 0) : point.color;
|
|
517
|
-
mapLegendToColor[point.legend] = color;
|
|
518
|
-
});
|
|
519
|
-
Object.entries(mapLegendToColor).forEach(([legendTitle, color])=>{
|
|
520
|
-
// mapping data to the format Legends component needs
|
|
521
|
-
const legend = {
|
|
522
|
-
title: legendTitle,
|
|
523
|
-
color,
|
|
524
|
-
hoverAction: ()=>{
|
|
525
|
-
_handleChartMouseLeave();
|
|
526
|
-
_onLegendHover(legendTitle);
|
|
527
|
-
},
|
|
528
|
-
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
529
|
-
onMouseOutAction: (isLegendSelected)=>{
|
|
530
|
-
_onLegendLeave(isLegendSelected);
|
|
531
|
-
}
|
|
532
|
-
};
|
|
533
|
-
actions.push(legend);
|
|
534
|
-
});
|
|
535
|
-
const legends = /*#__PURE__*/ _react.createElement(_Legends.Legends, {
|
|
536
|
-
legends: actions,
|
|
537
|
-
enabledWrapLines: props.enabledLegendsWrapLines,
|
|
538
|
-
overflowText: props.legendsOverflowText,
|
|
539
|
-
...props.legendProps,
|
|
540
|
-
onChange: _onLegendSelectionChange,
|
|
541
|
-
legendRef: _legendsRef
|
|
542
|
-
});
|
|
543
|
-
return legends;
|
|
544
|
-
}
|
|
545
|
-
function _isLegendSelected() {
|
|
546
|
-
return isLegendSelected;
|
|
547
|
-
}
|
|
548
|
-
/**
|
|
549
|
-
* This function checks if the given legend is highlighted or not.
|
|
550
|
-
* A legend can be highlighted in 2 ways:
|
|
551
|
-
* 1. selection: if the user clicks on it
|
|
552
|
-
* 2. hovering: if there is no selected legend and the user hovers over it
|
|
553
|
-
*/ function _isLegendHighlighted(legend) {
|
|
554
|
-
return _getHighlightedLegend().includes(legend);
|
|
555
|
-
}
|
|
556
|
-
function _getHighlightedLegend() {
|
|
557
|
-
return selectedLegends.length > 0 ? selectedLegends : selectedLegendTitle ? [
|
|
558
|
-
selectedLegendTitle
|
|
559
|
-
] : [];
|
|
560
|
-
}
|
|
561
|
-
function _onLegendSelectionChange(selectedLegends, event, currentLegend) {
|
|
562
|
-
var _props_legendProps, _props_legendProps1;
|
|
563
|
-
if ((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.canSelectMultipleLegends) {
|
|
564
|
-
setSelectedLegends(selectedLegends);
|
|
565
|
-
setSelectedLegendTitle(currentLegend === null || currentLegend === void 0 ? void 0 : currentLegend.title);
|
|
566
|
-
} else {
|
|
567
|
-
setSelectedLegends(selectedLegends.slice(-1));
|
|
568
|
-
setSelectedLegendTitle(currentLegend === null || currentLegend === void 0 ? void 0 : currentLegend.title);
|
|
569
|
-
}
|
|
570
|
-
setIsLegendSelected(selectedLegends.length > 0);
|
|
571
|
-
if ((_props_legendProps1 = props.legendProps) === null || _props_legendProps1 === void 0 ? void 0 : _props_legendProps1.onChange) {
|
|
572
|
-
props.legendProps.onChange(selectedLegends, event, currentLegend);
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
function _getAxisData(yAxisData) {
|
|
576
|
-
if (yAxisData && yAxisData.yAxisDomainValues.length) {
|
|
577
|
-
// For HBCWA x and y Values are swapped
|
|
578
|
-
const { yAxisDomainValues: domainValue } = yAxisData;
|
|
579
|
-
_xMax = Math.max(domainValue[domainValue.length - 1], props.xMaxValue || 0);
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
function _getAriaLabel(point) {
|
|
583
|
-
var _point_callOutAccessibilityData;
|
|
584
|
-
const xValue = point.xAxisCalloutData || point.x;
|
|
585
|
-
const legend = point.legend;
|
|
586
|
-
const yValue = point.yAxisCalloutData || point.y;
|
|
587
|
-
return ((_point_callOutAccessibilityData = point.callOutAccessibilityData) === null || _point_callOutAccessibilityData === void 0 ? void 0 : _point_callOutAccessibilityData.ariaLabel) || `${yValue}. ` + (legend ? `${legend}, ` : '') + `${xValue}.`;
|
|
588
|
-
}
|
|
589
|
-
function _renderBarLabel(xPosition, yPosition, value, isPositiveBar) {
|
|
590
|
-
if (props.hideLabels || _barHeight < 16) {
|
|
591
|
-
return null;
|
|
592
|
-
}
|
|
593
|
-
return /*#__PURE__*/ _react.createElement("text", {
|
|
594
|
-
x: xPosition,
|
|
595
|
-
y: yPosition + _barHeight / 2,
|
|
596
|
-
textAnchor: _isRtl ? isPositiveBar ? 'end' : 'start' : isPositiveBar ? 'start' : 'end',
|
|
597
|
-
transform: `translate(${isPositiveBar ? _isRtl ? -4 : 4 : _isRtl ? 4 : -4})`,
|
|
598
|
-
dominantBaseline: "central",
|
|
599
|
-
className: styles.barLabel,
|
|
600
|
-
"aria-hidden": true,
|
|
601
|
-
style: {
|
|
602
|
-
direction: 'ltr',
|
|
603
|
-
unicodeBidi: 'isolate'
|
|
604
|
-
}
|
|
605
|
-
}, (0, _index.formatScientificLimitWidth)(value));
|
|
606
|
-
}
|
|
607
|
-
function _getChartTitle() {
|
|
608
|
-
const { chartTitle, data } = props;
|
|
609
|
-
return (chartTitle ? `${chartTitle}. ` : '') + `Horizontal bar chart with ${(data === null || data === void 0 ? void 0 : data.length) || 0} bars. `;
|
|
610
|
-
}
|
|
611
|
-
function _getOrderedYAxisLabels() {
|
|
612
|
-
const shouldOrderYAxisLabelsByCategoryOrder = _yAxisType === _index.YAxisType.StringAxis && props.yAxisCategoryOrder !== 'default';
|
|
613
|
-
if (!shouldOrderYAxisLabelsByCategoryOrder) {
|
|
614
|
-
// Keep the original ordering logic as the default behavior to ensure backward compatibility
|
|
615
|
-
const reversedBars = [
|
|
616
|
-
..._points
|
|
617
|
-
].reverse();
|
|
618
|
-
return reversedBars.map((point)=>point.y);
|
|
619
|
-
}
|
|
620
|
-
return (0, _index.sortAxisCategories)(_mapCategoryToValues(), props.yAxisCategoryOrder);
|
|
621
|
-
}
|
|
622
|
-
function _mapCategoryToValues() {
|
|
623
|
-
const categoryToValues = {};
|
|
624
|
-
_points.forEach((point)=>{
|
|
625
|
-
if (!categoryToValues[point.y]) {
|
|
626
|
-
categoryToValues[point.y] = [];
|
|
627
|
-
}
|
|
628
|
-
categoryToValues[point.y].push(point.x);
|
|
629
|
-
});
|
|
630
|
-
return categoryToValues;
|
|
631
|
-
}
|
|
632
|
-
function _isChartEmpty() {
|
|
633
|
-
return !(props.data && props.data.length > 0);
|
|
634
|
-
}
|
|
635
|
-
function _updatePosition(newX, newY) {
|
|
636
|
-
const threshold = 1; // Set a threshold for movement
|
|
637
|
-
const { x, y } = clickPosition;
|
|
638
|
-
// Calculate the distance moved
|
|
639
|
-
const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));
|
|
640
|
-
// Update the position only if the distance moved is greater than the threshold
|
|
641
|
-
if (distance > threshold) {
|
|
642
|
-
setClickPosition({
|
|
643
|
-
x: newX,
|
|
644
|
-
y: newY
|
|
645
|
-
});
|
|
646
|
-
setPopoverOpen(true);
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
function _getDomainNRangeValues(points, margins, width, chartType, isRTL, xAxisType, barWidth, tickValues) {
|
|
650
|
-
let domainNRangeValue;
|
|
651
|
-
if (xAxisType === _index.XAxisTypes.NumericAxis) {
|
|
652
|
-
domainNRangeValue = (0, _index.domainRangeOfNumericForHorizontalBarChartWithAxis)(points, margins, width, isRTL, X_ORIGIN);
|
|
653
|
-
} else {
|
|
654
|
-
domainNRangeValue = {
|
|
655
|
-
dStartValue: 0,
|
|
656
|
-
dEndValue: 0,
|
|
657
|
-
rStartValue: 0,
|
|
658
|
-
rEndValue: 0
|
|
659
|
-
};
|
|
660
|
-
}
|
|
661
|
-
return domainNRangeValue;
|
|
662
|
-
}
|
|
663
|
-
if (!_isChartEmpty()) {
|
|
664
|
-
_adjustProps();
|
|
665
|
-
const calloutProps = {
|
|
666
|
-
color,
|
|
667
|
-
legend: selectedLegendTitle,
|
|
668
|
-
XValue: xCalloutValue,
|
|
669
|
-
YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,
|
|
670
|
-
...props.calloutProps,
|
|
671
|
-
...(0, _index.getAccessibleDataObject)(callOutAccessibilityData),
|
|
672
|
-
customCallout: {
|
|
673
|
-
customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout() : undefined,
|
|
674
|
-
customCalloutProps: props.calloutPropsPerDataPoint ? props.calloutPropsPerDataPoint(dataPointCalloutProps) : undefined
|
|
675
|
-
},
|
|
676
|
-
isCartesian: true,
|
|
677
|
-
isPopoverOpen,
|
|
678
|
-
clickPosition
|
|
679
|
-
};
|
|
680
|
-
const tickParams = {
|
|
681
|
-
tickValues: props.tickValues,
|
|
682
|
-
tickFormat: props.tickFormat
|
|
683
|
-
};
|
|
684
|
-
_yAxisLabels = _getOrderedYAxisLabels();
|
|
685
|
-
_xMax = Math.max((0, _d3array.max)(_points, (point)=>point.x), props.xMaxValue || 0);
|
|
686
|
-
const legendBars = _getLegendData(_points);
|
|
687
|
-
return /*#__PURE__*/ _react.createElement(_CartesianChart.CartesianChart, {
|
|
688
|
-
yAxisPadding: _yAxisPadding,
|
|
689
|
-
...props,
|
|
690
|
-
chartTitle: _getChartTitle(),
|
|
691
|
-
points: _points,
|
|
692
|
-
chartType: _index.ChartTypes.HorizontalBarChartWithAxis,
|
|
693
|
-
xAxisType: _xAxisType,
|
|
694
|
-
yAxisType: _yAxisType,
|
|
695
|
-
getDomainNRangeValues: _getDomainNRangeValues,
|
|
696
|
-
stringDatasetForYAxisDomain: _yAxisLabels,
|
|
697
|
-
calloutProps: calloutProps,
|
|
698
|
-
tickParams: tickParams,
|
|
699
|
-
legendBars: legendBars,
|
|
700
|
-
createYAxis: _index.createYAxisForHorizontalBarChartWithAxis,
|
|
701
|
-
createStringYAxis: _index.createStringYAxisForHorizontalBarChartWithAxis,
|
|
702
|
-
getMinMaxOfYAxis: _index.findHBCWANumericMinMaxOfY,
|
|
703
|
-
barwidth: _barHeight,
|
|
704
|
-
getmargins: _getMargins,
|
|
705
|
-
getYDomainMargins: _getDomainMarginsForHorizontalBarChart,
|
|
706
|
-
getGraphData: _getGraphData,
|
|
707
|
-
getAxisData: _getAxisData,
|
|
708
|
-
onChartMouseLeave: _handleChartMouseLeave,
|
|
709
|
-
componentRef: cartesianChartRef,
|
|
710
|
-
/* eslint-disable react/jsx-no-bind */ // eslint-disable-next-line @typescript-eslint/no-shadow
|
|
711
|
-
children: (props)=>{
|
|
712
|
-
return /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement("g", null, _bars));
|
|
713
|
-
}
|
|
714
|
-
});
|
|
715
|
-
} else {
|
|
716
|
-
return /*#__PURE__*/ _react.createElement("div", {
|
|
717
|
-
id: _emptyChartId,
|
|
718
|
-
role: 'alert',
|
|
719
|
-
style: {
|
|
720
|
-
opacity: '0'
|
|
721
|
-
},
|
|
722
|
-
"aria-label": 'Graph has no data to display'
|
|
723
|
-
});
|
|
724
|
-
}
|
|
725
|
-
});
|
|
726
|
-
HorizontalBarChartWithAxis.displayName = 'HorizontalBarChartWithAxis';
|