@fluentui/react-charts 9.3.5 → 9.3.7
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 +42 -2
- package/dist/index.d.ts +239 -55
- package/lib/AnnotationOnlyChart.js +1 -0
- package/lib/AnnotationOnlyChart.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +194 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +1 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/index.js +2 -0
- package/lib/components/AnnotationOnlyChart/index.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +31 -0
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +23 -0
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -0
- package/lib/components/AreaChart/AreaChart.js +3 -16
- package/lib/components/AreaChart/AreaChart.js.map +1 -1
- package/lib/components/AreaChart/useAreaChartStyles.styles.js +11 -6
- package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
- package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -1
- package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.js +2 -10
- package/lib/components/ChartTable/ChartTable.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.types.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.js +59 -39
- package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +5 -5
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +617 -0
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +1 -0
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
- package/lib/components/CommonComponents/Annotations/index.js +2 -0
- package/lib/components/CommonComponents/Annotations/index.js.map +1 -0
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +173 -0
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -0
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +126 -0
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -0
- package/lib/components/CommonComponents/CartesianChart.js +159 -132
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/CommonComponents/ChartPopover.js +1 -2
- package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
- package/lib/components/CommonComponents/index.js +2 -0
- package/lib/components/CommonComponents/index.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +32 -14
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +17 -2
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +2 -6
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +1 -2
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +83 -40
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +4 -8
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +692 -94
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js +23 -8
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +2 -2
- package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.js +3 -12
- package/lib/components/DonutChart/DonutChart.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.js +4 -2
- package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.js +2 -2
- package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.js +2 -10
- package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.js +6 -19
- package/lib/components/GanttChart/GanttChart.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.types.js.map +1 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.js +3 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +1 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +3 -1
- package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.js +2 -10
- package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +8 -20
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +11 -6
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +3 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js +4 -17
- package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +3 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +3 -1
- package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +25 -12
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +4 -4
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +5 -23
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +3 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +3 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
- package/lib/components/Legends/Legends.types.js.map +1 -1
- package/lib/components/Legends/OverflowMenu.js.map +1 -1
- package/lib/components/Legends/useLegendsStyles.styles.js +97 -37
- package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
- package/lib/components/Legends/useLegendsStyles.styles.raw.js +10 -11
- package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +11 -20
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/LineChart/LineChart.types.js +1 -1
- package/lib/components/LineChart/LineChart.types.js.map +1 -1
- package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +3 -4
- package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
- package/lib/components/LineChart/useLineChartStyles.styles.js +15 -10
- package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib/components/LineChart/useLineChartStyles.styles.raw.js +3 -1
- package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.js +3 -9
- package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +13 -10
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.js +24 -24
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js +13 -8
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
- package/lib/components/Sparkline/Sparkline.js +11 -7
- package/lib/components/Sparkline/Sparkline.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +3 -15
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +13 -8
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +3 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +8 -18
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +11 -6
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/types/ChartAnnotation.js +1 -0
- package/lib/types/ChartAnnotation.js.map +1 -0
- package/lib/types/DataPoint.js.map +1 -1
- package/lib/types/index.js +1 -0
- package/lib/types/index.js.map +1 -1
- package/lib/utilities/Common.styles.js +1 -2
- package/lib/utilities/Common.styles.js.map +1 -1
- package/lib/utilities/Common.styles.raw.js +1 -2
- package/lib/utilities/Common.styles.raw.js.map +1 -1
- package/lib/utilities/FocusableTooltipText.js +1 -1
- package/lib/utilities/FocusableTooltipText.js.map +1 -1
- package/lib/utilities/getWindow.js +0 -1
- package/lib/utilities/getWindow.js.map +1 -1
- package/lib/utilities/hooks.js +34 -0
- package/lib/utilities/hooks.js.map +1 -0
- package/lib/utilities/image-export-utils.js +221 -73
- package/lib/utilities/image-export-utils.js.map +1 -1
- package/lib/utilities/utilities.js +39 -37
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-commonjs/AnnotationOnlyChart.js +6 -0
- package/lib-commonjs/AnnotationOnlyChart.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +205 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +6 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/index.js +7 -0
- package/lib-commonjs/components/AnnotationOnlyChart/index.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +56 -0
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +33 -0
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/AreaChart/AreaChart.js +2 -15
- package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +14 -15
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.js +3 -10
- package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +74 -102
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +4 -4
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +628 -0
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +4 -0
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/Annotations/index.js +7 -0
- package/lib-commonjs/components/CommonComponents/Annotations/index.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +265 -0
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +161 -0
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -0
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +159 -131
- package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/ChartPopover.js +1 -2
- package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/index.js +2 -0
- package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +35 -22
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +17 -2
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +0 -14
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +0 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +82 -39
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +678 -60
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +25 -16
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.js +2 -11
- package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.js +4 -2
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +2 -2
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.js +2 -10
- package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.js +5 -18
- package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +3 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.js +2 -10
- package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +8 -20
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +14 -15
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +3 -16
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +3 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +47 -34
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +3 -3
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +4 -21
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +3 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
- package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +144 -86
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +9 -10
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +11 -20
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.types.js +1 -1
- package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +2 -2
- package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +18 -19
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.js +3 -9
- package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +16 -19
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +22 -22
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +16 -17
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/Sparkline/Sparkline.js +11 -7
- package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +3 -15
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +16 -17
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +7 -17
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +14 -15
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/index.js +1 -0
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types/ChartAnnotation.js +6 -0
- package/lib-commonjs/types/ChartAnnotation.js.map +1 -0
- package/lib-commonjs/types/DataPoint.js.map +1 -1
- package/lib-commonjs/types/index.js +1 -0
- package/lib-commonjs/types/index.js.map +1 -1
- package/lib-commonjs/utilities/Common.styles.js +1 -2
- package/lib-commonjs/utilities/Common.styles.js.map +1 -1
- package/lib-commonjs/utilities/Common.styles.raw.js +1 -2
- package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -1
- package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/getWindow.js +0 -1
- package/lib-commonjs/utilities/getWindow.js.map +1 -1
- package/lib-commonjs/utilities/hooks.js +45 -0
- package/lib-commonjs/utilities/hooks.js.map +1 -0
- package/lib-commonjs/utilities/image-export-utils.js +222 -74
- package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +37 -33
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +11 -11
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/AnnotationOnlyChart.ts"],"sourcesContent":["export * from './components/AnnotationOnlyChart/index';\n"],"names":[],"mappings":";;;;;uBAAc,yCAAyC"}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "AnnotationOnlyChart", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function() {
|
|
9
|
+
return AnnotationOnlyChart;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
14
|
+
const _ChartAnnotationLayer = require("../CommonComponents/Annotations/ChartAnnotationLayer");
|
|
15
|
+
const _utilities = require("../../utilities");
|
|
16
|
+
const _useAnnotationOnlyChartStylesstyles = require("./useAnnotationOnlyChartStyles.styles");
|
|
17
|
+
const _hooks = require("../../utilities/hooks");
|
|
18
|
+
const DEFAULT_HEIGHT = 650;
|
|
19
|
+
const FALLBACK_WIDTH = 400;
|
|
20
|
+
const buildPadding = (margin)=>{
|
|
21
|
+
if (!margin) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
var _margin_t;
|
|
25
|
+
const top = (_margin_t = margin.t) !== null && _margin_t !== void 0 ? _margin_t : 0;
|
|
26
|
+
var _margin_r;
|
|
27
|
+
const right = (_margin_r = margin.r) !== null && _margin_r !== void 0 ? _margin_r : 0;
|
|
28
|
+
var _margin_b;
|
|
29
|
+
const bottom = (_margin_b = margin.b) !== null && _margin_b !== void 0 ? _margin_b : 0;
|
|
30
|
+
var _margin_l;
|
|
31
|
+
const left = (_margin_l = margin.l) !== null && _margin_l !== void 0 ? _margin_l : 0;
|
|
32
|
+
if (top === 0 && right === 0 && bottom === 0 && left === 0) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
return `${top}px ${right}px ${bottom}px ${left}px`;
|
|
36
|
+
};
|
|
37
|
+
const AnnotationOnlyChart = (props)=>{
|
|
38
|
+
const { annotations, chartTitle, description, width, height, paperBackgroundColor, plotBackgroundColor, fontColor, fontFamily, margin, componentRef } = props;
|
|
39
|
+
const isRtl = (0, _utilities.useRtl)();
|
|
40
|
+
const classes = (0, _useAnnotationOnlyChartStylesstyles.useAnnotationOnlyChartStyles)();
|
|
41
|
+
const { chartContainerRef: containerRef } = (0, _hooks.useImageExport)(componentRef, true, false);
|
|
42
|
+
const contentRef = _react.useRef(null);
|
|
43
|
+
const [measuredWidth, setMeasuredWidth] = _react.useState(width !== null && width !== void 0 ? width : 0);
|
|
44
|
+
const [contentHeight, setContentHeight] = _react.useState(height !== null && height !== void 0 ? height : DEFAULT_HEIGHT);
|
|
45
|
+
_react.useEffect(()=>{
|
|
46
|
+
if (typeof width === 'number' && width > 0) {
|
|
47
|
+
setMeasuredWidth(width);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const node = containerRef.current;
|
|
51
|
+
if (!node || typeof ResizeObserver === 'undefined') {
|
|
52
|
+
const rect = node === null || node === void 0 ? void 0 : node.getBoundingClientRect();
|
|
53
|
+
if (rect && rect.width > 0) {
|
|
54
|
+
setMeasuredWidth(rect.width);
|
|
55
|
+
} else {
|
|
56
|
+
setMeasuredWidth((prev)=>prev > 0 ? prev : FALLBACK_WIDTH);
|
|
57
|
+
}
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const observer = new ResizeObserver((entries)=>{
|
|
61
|
+
const entry = entries[0];
|
|
62
|
+
if (!entry) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const newWidth = entry.contentRect.width;
|
|
66
|
+
if (newWidth > 0 && Math.abs(newWidth - measuredWidth) > 0.5) {
|
|
67
|
+
setMeasuredWidth(newWidth);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
const rect = node.getBoundingClientRect();
|
|
71
|
+
if (rect.width > 0) {
|
|
72
|
+
setMeasuredWidth(rect.width);
|
|
73
|
+
}
|
|
74
|
+
observer.observe(node);
|
|
75
|
+
return ()=>observer.disconnect();
|
|
76
|
+
}, [
|
|
77
|
+
width,
|
|
78
|
+
measuredWidth
|
|
79
|
+
]);
|
|
80
|
+
const resolvedWidth = Math.max(measuredWidth || FALLBACK_WIDTH, 1);
|
|
81
|
+
const resolvedHeight = Math.max(height !== null && height !== void 0 ? height : DEFAULT_HEIGHT, 1);
|
|
82
|
+
_react.useEffect(()=>{
|
|
83
|
+
const node = contentRef.current;
|
|
84
|
+
if (!node) {
|
|
85
|
+
setContentHeight((prev)=>prev > 0 ? prev : resolvedHeight);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (typeof ResizeObserver === 'undefined') {
|
|
89
|
+
const rect = node.getBoundingClientRect();
|
|
90
|
+
setContentHeight((prev)=>rect.height > 0 ? rect.height : prev > 0 ? prev : resolvedHeight);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const observer = new ResizeObserver((entries)=>{
|
|
94
|
+
const entry = entries[0];
|
|
95
|
+
if (!entry) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const newHeight = entry.contentRect.height;
|
|
99
|
+
if (newHeight > 0) {
|
|
100
|
+
setContentHeight((prev)=>Math.abs(prev - newHeight) > 0.5 ? newHeight : prev);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
const rect = node.getBoundingClientRect();
|
|
104
|
+
setContentHeight((prev)=>rect.height > 0 ? rect.height : prev > 0 ? prev : resolvedHeight);
|
|
105
|
+
observer.observe(node);
|
|
106
|
+
return ()=>observer.disconnect();
|
|
107
|
+
}, [
|
|
108
|
+
resolvedHeight,
|
|
109
|
+
resolvedWidth,
|
|
110
|
+
annotations,
|
|
111
|
+
chartTitle,
|
|
112
|
+
description,
|
|
113
|
+
margin,
|
|
114
|
+
plotBackgroundColor,
|
|
115
|
+
paperBackgroundColor,
|
|
116
|
+
fontColor,
|
|
117
|
+
fontFamily
|
|
118
|
+
]);
|
|
119
|
+
const svgHeight = Math.max(Math.ceil(contentHeight || 0), resolvedHeight);
|
|
120
|
+
const context = {
|
|
121
|
+
plotRect: {
|
|
122
|
+
x: 0,
|
|
123
|
+
y: 0,
|
|
124
|
+
width: resolvedWidth,
|
|
125
|
+
height: resolvedHeight
|
|
126
|
+
},
|
|
127
|
+
svgRect: {
|
|
128
|
+
width: resolvedWidth,
|
|
129
|
+
height: resolvedHeight
|
|
130
|
+
},
|
|
131
|
+
isRtl
|
|
132
|
+
};
|
|
133
|
+
const padding = buildPadding(margin);
|
|
134
|
+
// Inline styles for dynamic values that can't be in makeStyles
|
|
135
|
+
const rootStyle = _react.useMemo(()=>({
|
|
136
|
+
width: width ? `${width}px` : '100%',
|
|
137
|
+
minHeight: resolvedHeight,
|
|
138
|
+
...paperBackgroundColor && {
|
|
139
|
+
backgroundColor: paperBackgroundColor
|
|
140
|
+
},
|
|
141
|
+
...fontColor && {
|
|
142
|
+
color: fontColor
|
|
143
|
+
},
|
|
144
|
+
...fontFamily && {
|
|
145
|
+
fontFamily
|
|
146
|
+
},
|
|
147
|
+
...padding && {
|
|
148
|
+
padding
|
|
149
|
+
}
|
|
150
|
+
}), [
|
|
151
|
+
fontColor,
|
|
152
|
+
fontFamily,
|
|
153
|
+
paperBackgroundColor,
|
|
154
|
+
padding,
|
|
155
|
+
resolvedHeight,
|
|
156
|
+
width
|
|
157
|
+
]);
|
|
158
|
+
const contentStyle = _react.useMemo(()=>({
|
|
159
|
+
...plotBackgroundColor && {
|
|
160
|
+
backgroundColor: plotBackgroundColor
|
|
161
|
+
}
|
|
162
|
+
}), [
|
|
163
|
+
plotBackgroundColor
|
|
164
|
+
]);
|
|
165
|
+
const resolvedAnnotations = annotations !== null && annotations !== void 0 ? annotations : [];
|
|
166
|
+
const hasAnnotations = resolvedAnnotations.length > 0;
|
|
167
|
+
const ariaLabel = hasAnnotations ? description !== null && description !== void 0 ? description : chartTitle : undefined;
|
|
168
|
+
return /*#__PURE__*/ _react.createElement("div", {
|
|
169
|
+
ref: containerRef,
|
|
170
|
+
"data-chart-annotation-container": "true"
|
|
171
|
+
}, /*#__PURE__*/ _react.createElement("svg", {
|
|
172
|
+
width: resolvedWidth,
|
|
173
|
+
height: svgHeight,
|
|
174
|
+
viewBox: `0 0 ${resolvedWidth} ${svgHeight}`,
|
|
175
|
+
style: {
|
|
176
|
+
width: width ? `${width}px` : '100%',
|
|
177
|
+
height: `${svgHeight}px`,
|
|
178
|
+
display: 'block'
|
|
179
|
+
},
|
|
180
|
+
role: ariaLabel ? 'img' : undefined,
|
|
181
|
+
"aria-label": ariaLabel
|
|
182
|
+
}, /*#__PURE__*/ _react.createElement("foreignObject", {
|
|
183
|
+
x: 0,
|
|
184
|
+
y: 0,
|
|
185
|
+
width: resolvedWidth,
|
|
186
|
+
height: svgHeight
|
|
187
|
+
}, /*#__PURE__*/ _react.createElement("div", {
|
|
188
|
+
ref: contentRef,
|
|
189
|
+
className: classes.root,
|
|
190
|
+
style: rootStyle,
|
|
191
|
+
"data-chart-annotation-only": "true",
|
|
192
|
+
"aria-label": ariaLabel
|
|
193
|
+
}, chartTitle && /*#__PURE__*/ _react.createElement("span", {
|
|
194
|
+
className: classes.title,
|
|
195
|
+
"aria-hidden": "true"
|
|
196
|
+
}, chartTitle), /*#__PURE__*/ _react.createElement("div", {
|
|
197
|
+
className: classes.content,
|
|
198
|
+
style: contentStyle,
|
|
199
|
+
role: "presentation"
|
|
200
|
+
}, hasAnnotations ? /*#__PURE__*/ _react.createElement(_ChartAnnotationLayer.ChartAnnotationLayer, {
|
|
201
|
+
annotations: resolvedAnnotations,
|
|
202
|
+
context: context
|
|
203
|
+
}) : null)))));
|
|
204
|
+
};
|
|
205
|
+
AnnotationOnlyChart.displayName = 'AnnotationOnlyChart';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AnnotationOnlyChart/AnnotationOnlyChart.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ChartAnnotationLayer } from '../CommonComponents/Annotations/ChartAnnotationLayer';\nimport { useRtl } from '../../utilities';\nimport { useAnnotationOnlyChartStyles } from './useAnnotationOnlyChartStyles.styles';\nimport type { AnnotationOnlyChartProps } from './AnnotationOnlyChart.types';\nimport type { ChartAnnotationContext } from '../CommonComponents/Annotations/ChartAnnotationLayer.types';\nimport { useImageExport } from '../../utilities/hooks';\n\nconst DEFAULT_HEIGHT = 650;\nconst FALLBACK_WIDTH = 400;\n\nconst buildPadding = (margin: AnnotationOnlyChartProps['margin']): string | undefined => {\n if (!margin) {\n return undefined;\n }\n\n const top = margin.t ?? 0;\n const right = margin.r ?? 0;\n const bottom = margin.b ?? 0;\n const left = margin.l ?? 0;\n\n if (top === 0 && right === 0 && bottom === 0 && left === 0) {\n return undefined;\n }\n\n return `${top}px ${right}px ${bottom}px ${left}px`;\n};\n\nexport const AnnotationOnlyChart: React.FC<AnnotationOnlyChartProps> = props => {\n const {\n annotations,\n chartTitle,\n description,\n width,\n height,\n paperBackgroundColor,\n plotBackgroundColor,\n fontColor,\n fontFamily,\n margin,\n componentRef,\n } = props;\n\n const isRtl = useRtl();\n const classes = useAnnotationOnlyChartStyles();\n const { chartContainerRef: containerRef } = useImageExport(componentRef, true, false);\n const contentRef = React.useRef<HTMLDivElement | null>(null);\n const [measuredWidth, setMeasuredWidth] = React.useState<number>(width ?? 0);\n const [contentHeight, setContentHeight] = React.useState<number>(height ?? DEFAULT_HEIGHT);\n\n React.useEffect(() => {\n if (typeof width === 'number' && width > 0) {\n setMeasuredWidth(width);\n return;\n }\n\n const node = containerRef.current;\n if (!node || typeof ResizeObserver === 'undefined') {\n const rect = node?.getBoundingClientRect();\n if (rect && rect.width > 0) {\n setMeasuredWidth(rect.width);\n } else {\n setMeasuredWidth(prev => (prev > 0 ? prev : FALLBACK_WIDTH));\n }\n return;\n }\n\n const observer = new ResizeObserver(entries => {\n const entry = entries[0];\n if (!entry) {\n return;\n }\n const newWidth = entry.contentRect.width;\n if (newWidth > 0 && Math.abs(newWidth - measuredWidth) > 0.5) {\n setMeasuredWidth(newWidth);\n }\n });\n\n const rect = node.getBoundingClientRect();\n if (rect.width > 0) {\n setMeasuredWidth(rect.width);\n }\n\n observer.observe(node);\n return () => observer.disconnect();\n }, [width, measuredWidth]);\n\n const resolvedWidth = Math.max(measuredWidth || FALLBACK_WIDTH, 1);\n const resolvedHeight = Math.max(height ?? DEFAULT_HEIGHT, 1);\n\n React.useEffect(() => {\n const node = contentRef.current;\n if (!node) {\n setContentHeight(prev => (prev > 0 ? prev : resolvedHeight));\n return;\n }\n\n if (typeof ResizeObserver === 'undefined') {\n const rect = node.getBoundingClientRect();\n setContentHeight(prev => (rect.height > 0 ? rect.height : prev > 0 ? prev : resolvedHeight));\n return;\n }\n\n const observer = new ResizeObserver(entries => {\n const entry = entries[0];\n if (!entry) {\n return;\n }\n\n const newHeight = entry.contentRect.height;\n if (newHeight > 0) {\n setContentHeight(prev => (Math.abs(prev - newHeight) > 0.5 ? newHeight : prev));\n }\n });\n\n const rect = node.getBoundingClientRect();\n setContentHeight(prev => (rect.height > 0 ? rect.height : prev > 0 ? prev : resolvedHeight));\n\n observer.observe(node);\n return () => observer.disconnect();\n }, [\n resolvedHeight,\n resolvedWidth,\n annotations,\n chartTitle,\n description,\n margin,\n plotBackgroundColor,\n paperBackgroundColor,\n fontColor,\n fontFamily,\n ]);\n\n const svgHeight = Math.max(Math.ceil(contentHeight || 0), resolvedHeight);\n\n const context: ChartAnnotationContext = {\n plotRect: { x: 0, y: 0, width: resolvedWidth, height: resolvedHeight },\n svgRect: { width: resolvedWidth, height: resolvedHeight },\n isRtl,\n };\n\n const padding = buildPadding(margin);\n\n // Inline styles for dynamic values that can't be in makeStyles\n const rootStyle: React.CSSProperties = React.useMemo(\n () => ({\n width: width ? `${width}px` : '100%',\n minHeight: resolvedHeight,\n ...(paperBackgroundColor && { backgroundColor: paperBackgroundColor }),\n ...(fontColor && { color: fontColor }),\n ...(fontFamily && { fontFamily }),\n ...(padding && { padding }),\n }),\n [fontColor, fontFamily, paperBackgroundColor, padding, resolvedHeight, width],\n );\n\n const contentStyle: React.CSSProperties = React.useMemo(\n () => ({\n ...(plotBackgroundColor && { backgroundColor: plotBackgroundColor }),\n }),\n [plotBackgroundColor],\n );\n\n const resolvedAnnotations = annotations ?? [];\n const hasAnnotations = resolvedAnnotations.length > 0;\n const ariaLabel = hasAnnotations ? description ?? chartTitle : undefined;\n\n return (\n <div ref={containerRef} data-chart-annotation-container=\"true\">\n <svg\n width={resolvedWidth}\n height={svgHeight}\n viewBox={`0 0 ${resolvedWidth} ${svgHeight}`}\n style={{ width: width ? `${width}px` : '100%', height: `${svgHeight}px`, display: 'block' }}\n role={ariaLabel ? 'img' : undefined}\n aria-label={ariaLabel}\n >\n <foreignObject x={0} y={0} width={resolvedWidth} height={svgHeight}>\n <div\n ref={contentRef}\n className={classes.root}\n style={rootStyle}\n data-chart-annotation-only=\"true\"\n aria-label={ariaLabel}\n >\n {chartTitle && (\n <span className={classes.title} aria-hidden=\"true\">\n {chartTitle}\n </span>\n )}\n <div className={classes.content} style={contentStyle} role=\"presentation\">\n {hasAnnotations ? <ChartAnnotationLayer annotations={resolvedAnnotations} context={context} /> : null}\n </div>\n </div>\n </foreignObject>\n </svg>\n </div>\n );\n};\n\nAnnotationOnlyChart.displayName = 'AnnotationOnlyChart';\n"],"names":["React","ChartAnnotationLayer","useRtl","useAnnotationOnlyChartStyles","useImageExport","DEFAULT_HEIGHT","FALLBACK_WIDTH","buildPadding","margin","undefined","top","t","right","r","bottom","b","left","l","AnnotationOnlyChart","props","annotations","chartTitle","description","width","height","paperBackgroundColor","plotBackgroundColor","fontColor","fontFamily","componentRef","isRtl","classes","chartContainerRef","containerRef","contentRef","useRef","measuredWidth","setMeasuredWidth","useState","contentHeight","setContentHeight","useEffect","node","current","ResizeObserver","rect","getBoundingClientRect","prev","observer","entries","entry","newWidth","contentRect","Math","abs","observe","disconnect","resolvedWidth","max","resolvedHeight","newHeight","svgHeight","ceil","context","plotRect","x","y","svgRect","padding","rootStyle","useMemo","minHeight","backgroundColor","color","contentStyle","resolvedAnnotations","hasAnnotations","length","ariaLabel","div","ref","data-chart-annotation-container","svg","viewBox","style","display","role","aria-label","foreignObject","className","root","data-chart-annotation-only","span","title","aria-hidden","content","displayName"],"mappings":"AAAA;;;;;+BA8BakB;;;;;;;iEA5BU,QAAQ;sCACM,uDAAuD;2BACrE,kBAAkB;oDACI,wCAAwC;uBAGtD,wBAAwB;AAEvD,MAAMb,iBAAiB;AACvB,MAAMC,iBAAiB;AAEvB,MAAMC,eAAe,CAACC;IACpB,IAAI,CAACA,QAAQ;QACX,OAAOC;IACT;QAEYD;IAAZ,MAAME,MAAMF,CAAAA,YAAAA,QAAOG,AAAC,MAAA,QAARH,cAAAA,KAAAA,IAAAA,YAAY;QACVA;IAAd,MAAMI,QAAQJ,CAAAA,YAAAA,QAAOK,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AE;AAEF7C,oBAAoB8E,WAAW,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AnnotationOnlyChart/AnnotationOnlyChart.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ChartAnnotation } from '../../types/ChartAnnotation';\nimport type { Chart } from '../../types/index';\nimport type { Margin } from '@fluentui/chart-utilities';\n\n/**\n * Props for the annotation-only chart renderer.\n */\nexport interface AnnotationOnlyChartProps {\n /**\n * Collection of annotations to render.\n */\n annotations: ChartAnnotation[];\n /** Optional layout title extracted from the Plotly schema. */\n chartTitle?: string;\n /** Optional descriptive text for accessibility. */\n description?: string;\n /** Desired width in pixels (if absent the chart will grow to fit the container). */\n width?: number;\n /** Desired height in pixels. */\n height?: number;\n /** Paper/background colour specified in the Plotly layout. */\n paperBackgroundColor?: string;\n /** Plot area background colour specified in the Plotly layout. */\n plotBackgroundColor?: string;\n /** Global layout font colour. */\n fontColor?: string;\n /** Global layout font family. */\n fontFamily?: string;\n /** Layout margin converted to padding for the outer wrapper. */\n margin?: Partial<Margin>;\n /** Component ref propagated by the DeclarativeChart surface. */\n componentRef?: React.Ref<Chart>;\n}\n"],"names":["React"],"mappings":";;;;;iEAAuB,QAAQ"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./AnnotationOnlyChart"), exports);
|
|
7
|
+
_export_star._(require("./AnnotationOnlyChart.types"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AnnotationOnlyChart/index.ts"],"sourcesContent":["export * from './AnnotationOnlyChart';\nexport * from './AnnotationOnlyChart.types';\n"],"names":[],"mappings":";;;;;uBAAc,wBAAwB;uBACxB,8BAA8B"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useAnnotationOnlyChartStyles", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useAnnotationOnlyChartStyles;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _react = require("@griffel/react");
|
|
12
|
+
const useAnnotationOnlyChartStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
13
|
+
root: {
|
|
14
|
+
qhf8xq: "f10pi13n",
|
|
15
|
+
mc9l5x: "f22iagw",
|
|
16
|
+
Beiy3e4: "f1vx9l62",
|
|
17
|
+
Belr9w4: "fn67r4l",
|
|
18
|
+
De3pzq: "fxugw4r",
|
|
19
|
+
sj55zd: "f19n0e5",
|
|
20
|
+
Bahqtrf: "fk6fouc"
|
|
21
|
+
},
|
|
22
|
+
content: {
|
|
23
|
+
qhf8xq: "f10pi13n",
|
|
24
|
+
Bh6795r: "fqerorx",
|
|
25
|
+
De3pzq: "f3rmtva",
|
|
26
|
+
Beyfa6y: 0,
|
|
27
|
+
Bbmb7ep: 0,
|
|
28
|
+
Btl43ni: 0,
|
|
29
|
+
B7oj6ja: 0,
|
|
30
|
+
Dimara: "ft85np5",
|
|
31
|
+
B7ck84d: "f1ewtqcl"
|
|
32
|
+
},
|
|
33
|
+
title: {
|
|
34
|
+
fsow6f: "f17mccla"
|
|
35
|
+
}
|
|
36
|
+
}, {
|
|
37
|
+
d: [
|
|
38
|
+
".f10pi13n{position:relative;}",
|
|
39
|
+
".f22iagw{display:flex;}",
|
|
40
|
+
".f1vx9l62{flex-direction:column;}",
|
|
41
|
+
".fn67r4l{row-gap:8px;}",
|
|
42
|
+
".fxugw4r{background-color:var(--colorNeutralBackground1);}",
|
|
43
|
+
".f19n0e5{color:var(--colorNeutralForeground1);}",
|
|
44
|
+
".fk6fouc{font-family:var(--fontFamilyBase);}",
|
|
45
|
+
".fqerorx{flex-grow:1;}",
|
|
46
|
+
".f3rmtva{background-color:transparent;}",
|
|
47
|
+
[
|
|
48
|
+
".ft85np5{border-radius:var(--borderRadiusMedium);}",
|
|
49
|
+
{
|
|
50
|
+
p: -1
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
".f1ewtqcl{box-sizing:border-box;}",
|
|
54
|
+
".f17mccla{text-align:center;}"
|
|
55
|
+
]
|
|
56
|
+
});
|
package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAnnotationOnlyChartStyles.styles.js"],"sourcesContent":["import { makeStyles } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const useAnnotationOnlyChartStyles = makeStyles({\n root: {\n position: 'relative',\n display: 'flex',\n flexDirection: 'column',\n rowGap: '8px',\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n fontFamily: typographyStyles.body1.fontFamily\n },\n content: {\n position: 'relative',\n flexGrow: 1,\n backgroundColor: 'transparent',\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box'\n },\n title: {\n textAlign: 'center'\n }\n});\n"],"names":["__styles","tokens","typographyStyles","useAnnotationOnlyChartStyles","root","qhf8xq","mc9l5x","Beiy3e4","Belr9w4","De3pzq","sj55zd","Bahqtrf","content","Bh6795r","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","B7ck84d","title","fsow6f","d","p"],"mappings":";;;;+BAEaG,4BAA4B;;;;;;uBAFd,gBAAgB;AAEpC,qCAAkC,WAAA,OAAGH,eAAA,EAAA;IAAAI,IAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAC,OAAA,EAAA;QAAAP,MAAA,EAAA;QAAAQ,OAAA,EAAA;QAAAJ,MAAA,EAAA;QAAAK,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAC,KAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAAAC,CAAA,EAAA,CAAA;YAAA;SAAA;QAAA;QAAA;KAAA;AAAA,CAoB3C,CAAC"}
|
package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useAnnotationOnlyChartStyles", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useAnnotationOnlyChartStyles;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _react = require("@griffel/react");
|
|
12
|
+
const _reacttheme = require("@fluentui/react-theme");
|
|
13
|
+
const useAnnotationOnlyChartStyles = (0, _react.makeStyles)({
|
|
14
|
+
root: {
|
|
15
|
+
position: 'relative',
|
|
16
|
+
display: 'flex',
|
|
17
|
+
flexDirection: 'column',
|
|
18
|
+
rowGap: '8px',
|
|
19
|
+
backgroundColor: _reacttheme.tokens.colorNeutralBackground1,
|
|
20
|
+
color: _reacttheme.tokens.colorNeutralForeground1,
|
|
21
|
+
fontFamily: _reacttheme.typographyStyles.body1.fontFamily
|
|
22
|
+
},
|
|
23
|
+
content: {
|
|
24
|
+
position: 'relative',
|
|
25
|
+
flexGrow: 1,
|
|
26
|
+
backgroundColor: 'transparent',
|
|
27
|
+
borderRadius: _reacttheme.tokens.borderRadiusMedium,
|
|
28
|
+
boxSizing: 'border-box'
|
|
29
|
+
},
|
|
30
|
+
title: {
|
|
31
|
+
textAlign: 'center'
|
|
32
|
+
}
|
|
33
|
+
});
|
package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.ts"],"sourcesContent":["import { makeStyles } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\n\nexport const useAnnotationOnlyChartStyles = makeStyles({\n root: {\n position: 'relative',\n display: 'flex',\n flexDirection: 'column',\n rowGap: '8px',\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n fontFamily: typographyStyles.body1.fontFamily,\n },\n content: {\n position: 'relative',\n flexGrow: 1,\n backgroundColor: 'transparent',\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n },\n title: {\n textAlign: 'center',\n },\n});\n"],"names":["makeStyles","tokens","typographyStyles","useAnnotationOnlyChartStyles","root","position","display","flexDirection","rowGap","backgroundColor","colorNeutralBackground1","color","colorNeutralForeground1","fontFamily","body1","content","flexGrow","borderRadius","borderRadiusMedium","boxSizing","title","textAlign"],"mappings":";;;;+BAGaG;;;;;;uBAHc,iBAAiB;4BACH,wBAAwB;AAE1D,yCAAqCH,iBAAAA,EAAW;IACrDI,MAAM;QACJC,UAAU;QACVC,SAAS;QACTC,eAAe;QACfC,QAAQ;QACRC,iBAAiBR,kBAAAA,CAAOS,uBAAuB;QAC/CC,OAAOV,kBAAAA,CAAOW,uBAAuB;QACrCC,YAAYX,4BAAAA,CAAiBY,KAAK,CAACD,UAAU;IAC/C;IACAE,SAAS;QACPV,UAAU;QACVW,UAAU;QACVP,iBAAiB;QACjBQ,cAAchB,kBAAAA,CAAOiB,kBAAkB;QACvCC,WAAW;IACb;IACAC,OAAO;QACLC,WAAW;IACb;AACF,GAAG"}
|
|
@@ -20,8 +20,8 @@ const _index = require("../../index");
|
|
|
20
20
|
const _index1 = require("../../utilities/index");
|
|
21
21
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
22
22
|
const _index2 = require("../Legends/index");
|
|
23
|
-
const _imageexportutils = require("../../utilities/image-export-utils");
|
|
24
23
|
const _chartutilities = require("@fluentui/chart-utilities");
|
|
24
|
+
const _hooks = require("../../utilities/hooks");
|
|
25
25
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26
26
|
const bisect = (0, _d3array.bisector)((d)=>d.x).left;
|
|
27
27
|
var InterceptVisibility = /*#__PURE__*/ function(InterceptVisibility) {
|
|
@@ -57,9 +57,7 @@ const AreaChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
57
57
|
let _xAxisRectScale;
|
|
58
58
|
// determines if the given area chart has multiple stacked bar charts
|
|
59
59
|
let _isMultiStackChart;
|
|
60
|
-
const cartesianChartRef =
|
|
61
|
-
const _legendsRef = _react.useRef(null);
|
|
62
|
-
const _isRTL = (0, _index1.useRtl)();
|
|
60
|
+
const { cartesianChartRef, legendsRef: _legendsRef } = (0, _hooks.useImageExport)(props.componentRef, props.hideLegend);
|
|
63
61
|
const [selectedLegends, setSelectedLegends] = _react.useState(((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends) || []);
|
|
64
62
|
const [activeLegend, setActiveLegend] = _react.useState(undefined);
|
|
65
63
|
const [hoverXValue, setHoverXValue] = _react.useState('');
|
|
@@ -92,17 +90,6 @@ const AreaChart = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
|
|
|
92
90
|
}, [
|
|
93
91
|
props
|
|
94
92
|
]);
|
|
95
|
-
_react.useImperativeHandle(props.componentRef, ()=>{
|
|
96
|
-
var _cartesianChartRef_current;
|
|
97
|
-
var _cartesianChartRef_current_chartContainer;
|
|
98
|
-
return {
|
|
99
|
-
chartContainer: (_cartesianChartRef_current_chartContainer = (_cartesianChartRef_current = cartesianChartRef.current) === null || _cartesianChartRef_current === void 0 ? void 0 : _cartesianChartRef_current.chartContainer) !== null && _cartesianChartRef_current_chartContainer !== void 0 ? _cartesianChartRef_current_chartContainer : null,
|
|
100
|
-
toImage: (opts)=>{
|
|
101
|
-
var _cartesianChartRef_current, _legendsRef_current;
|
|
102
|
-
return (0, _imageexportutils.toImage)((_cartesianChartRef_current = cartesianChartRef.current) === null || _cartesianChartRef_current === void 0 ? void 0 : _cartesianChartRef_current.chartContainer, (_legendsRef_current = _legendsRef.current) === null || _legendsRef_current === void 0 ? void 0 : _legendsRef_current.toSVG, _isRTL, opts);
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
}, []);
|
|
106
93
|
const classes = (0, _useAreaChartStylesstyles.useAreaChartStyles)(props);
|
|
107
94
|
function _getMinMaxOfYAxis(points, yAxisType, useSecondaryYScale) {
|
|
108
95
|
return (0, _index1.findNumericMinMaxOfY)(points, yAxisType, useSecondaryYScale);
|