@fluentui/react-charts 0.0.0-nightly-20251106-0410.1 → 0.0.0-nightly-20251110-0407.1
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 +31 -13
- package/dist/index.d.ts +213 -2
- package/lib/AnnotationOnlyChart.js +1 -0
- package/lib/AnnotationOnlyChart.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +208 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +1 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/index.js +2 -0
- package/lib/components/AnnotationOnlyChart/index.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +31 -0
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +23 -0
- package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -0
- package/lib/components/AreaChart/useAreaChartStyles.styles.js +3 -1
- 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 +3 -1
- package/lib/components/ChartTable/ChartTable.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 +56 -27
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/CommonComponents/index.js +2 -0
- package/lib/components/CommonComponents/index.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +17 -4
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +14 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +39 -19
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +571 -6
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.js +12 -7
- package/lib/components/DonutChart/DonutChart.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.js +5 -5
- package/lib/components/FunnelChart/FunnelChart.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 +3 -1
- package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +3 -1
- 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 +5 -5
- package/lib/components/HeatMapChart/HeatMapChart.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/HorizontalBarChart.js +3 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.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.js +3 -1
- package/lib/components/Legends/Legends.js.map +1 -1
- package/lib/components/Legends/Legends.types.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +5 -4
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
- package/lib/components/LineChart/useLineChartStyles.styles.js +3 -1
- 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/ResponsiveContainer/ResponsiveContainer.js +1 -1
- package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.js +1 -1
- package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js +3 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +3 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +3 -1
- 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 +12 -4
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +3 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/types/ChartAnnotation.js +1 -0
- package/lib/types/ChartAnnotation.js.map +1 -0
- package/lib/types/index.js +1 -0
- package/lib/types/index.js.map +1 -1
- package/lib/utilities/FocusableTooltipText.js +1 -1
- package/lib/utilities/FocusableTooltipText.js.map +1 -1
- package/lib/utilities/SVGTooltipText.js +8 -8
- package/lib/utilities/SVGTooltipText.js.map +1 -1
- package/lib/utilities/image-export-utils.js +108 -0
- package/lib/utilities/image-export-utils.js.map +1 -1
- package/lib-commonjs/AnnotationOnlyChart.js +6 -0
- package/lib-commonjs/AnnotationOnlyChart.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +219 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +6 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/index.js +7 -0
- package/lib-commonjs/components/AnnotationOnlyChart/index.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +56 -0
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +33 -0
- package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +3 -1
- 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 -1
- package/lib-commonjs/components/ChartTable/ChartTable.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 +56 -27
- package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/index.js +2 -0
- package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +16 -2
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +14 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +38 -18
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +574 -6
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.js +12 -7
- package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.js +5 -5
- package/lib-commonjs/components/FunnelChart/FunnelChart.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 +3 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +3 -1
- 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 +5 -5
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.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/HorizontalBarChart.js +3 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.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.js +3 -1
- package/lib-commonjs/components/Legends/Legends.js.map +1 -1
- package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +5 -4
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +3 -1
- 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/ResponsiveContainer/ResponsiveContainer.js +1 -1
- package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.js +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +3 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +3 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +3 -1
- 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 +12 -4
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +3 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/index.js +1 -0
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types/ChartAnnotation.js +6 -0
- package/lib-commonjs/types/ChartAnnotation.js.map +1 -0
- package/lib-commonjs/types/index.js +1 -0
- package/lib-commonjs/types/index.js.map +1 -1
- package/lib-commonjs/utilities/FocusableTooltipText.js +1 -1
- package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/SVGTooltipText.js +8 -8
- package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/image-export-utils.js +108 -0
- package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,26 +1,44 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-charts
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 10 Nov 2025 04:21:49 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [0.0.0-nightly-
|
|
7
|
+
## [0.0.0-nightly-20251110-0407.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-charts_v0.0.0-nightly-20251110-0407.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charts_v9.3.
|
|
9
|
+
Mon, 10 Nov 2025 04:21:49 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charts_v9.3.5..@fluentui/react-charts_v0.0.0-nightly-20251110-0407.1)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
|
15
|
-
- Bump @fluentui/react-button to v0.0.0-nightly-
|
|
16
|
-
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-
|
|
17
|
-
- Bump @fluentui/react-overflow to v0.0.0-nightly-
|
|
18
|
-
- Bump @fluentui/react-popover to v0.0.0-nightly-
|
|
19
|
-
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
|
20
|
-
- Bump @fluentui/react-tabster to v0.0.0-nightly-
|
|
21
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
|
22
|
-
- Bump @fluentui/react-tooltip to v0.0.0-nightly-
|
|
23
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
|
15
|
+
- Bump @fluentui/react-button to v0.0.0-nightly-20251110-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1186c9379057fa2a44aa7989c582413ec42fab01) by beachball)
|
|
16
|
+
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20251110-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1186c9379057fa2a44aa7989c582413ec42fab01) by beachball)
|
|
17
|
+
- Bump @fluentui/react-overflow to v0.0.0-nightly-20251110-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1186c9379057fa2a44aa7989c582413ec42fab01) by beachball)
|
|
18
|
+
- Bump @fluentui/react-popover to v0.0.0-nightly-20251110-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1186c9379057fa2a44aa7989c582413ec42fab01) by beachball)
|
|
19
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20251110-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1186c9379057fa2a44aa7989c582413ec42fab01) by beachball)
|
|
20
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightly-20251110-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1186c9379057fa2a44aa7989c582413ec42fab01) by beachball)
|
|
21
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20251110-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1186c9379057fa2a44aa7989c582413ec42fab01) by beachball)
|
|
22
|
+
- Bump @fluentui/react-tooltip to v0.0.0-nightly-20251110-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1186c9379057fa2a44aa7989c582413ec42fab01) by beachball)
|
|
23
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20251110-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1186c9379057fa2a44aa7989c582413ec42fab01) by beachball)
|
|
24
|
+
|
|
25
|
+
## [9.3.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-charts_v9.3.5)
|
|
26
|
+
|
|
27
|
+
Thu, 06 Nov 2025 15:01:18 GMT
|
|
28
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charts_v9.3.4..@fluentui/react-charts_v9.3.5)
|
|
29
|
+
|
|
30
|
+
### Patches
|
|
31
|
+
|
|
32
|
+
- chore: migrate source to react 19 ([PR #35434](https://github.com/microsoft/fluentui/pull/35434) by martinhochel@microsoft.com)
|
|
33
|
+
- fix plotly color issue ([PR #35451](https://github.com/microsoft/fluentui/pull/35451) by anushgupta@microsoft.com)
|
|
34
|
+
- fix reference lines bug ([PR #35406](https://github.com/microsoft/fluentui/pull/35406) by anushgupta@microsoft.com)
|
|
35
|
+
- Bump @fluentui/react-button to v9.6.11 ([PR #35466](https://github.com/microsoft/fluentui/pull/35466) by beachball)
|
|
36
|
+
- Bump @fluentui/react-jsx-runtime to v9.3.2 ([PR #35466](https://github.com/microsoft/fluentui/pull/35466) by beachball)
|
|
37
|
+
- Bump @fluentui/react-overflow to v9.6.4 ([PR #35466](https://github.com/microsoft/fluentui/pull/35466) by beachball)
|
|
38
|
+
- Bump @fluentui/react-popover to v9.12.11 ([PR #35466](https://github.com/microsoft/fluentui/pull/35466) by beachball)
|
|
39
|
+
- Bump @fluentui/react-tabster to v9.26.9 ([PR #35466](https://github.com/microsoft/fluentui/pull/35466) by beachball)
|
|
40
|
+
- Bump @fluentui/react-tooltip to v9.8.10 ([PR #35466](https://github.com/microsoft/fluentui/pull/35466) by beachball)
|
|
41
|
+
- Bump @fluentui/react-utilities to v9.25.3 ([PR #35466](https://github.com/microsoft/fluentui/pull/35466) by beachball)
|
|
24
42
|
|
|
25
43
|
## [9.3.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-charts_v9.3.4)
|
|
26
44
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CurveFactory } from 'd3-shape';
|
|
2
2
|
import type { JSXElement } from '@fluentui/react-utilities';
|
|
3
|
+
import type { Margin } from '@fluentui/chart-utilities';
|
|
3
4
|
import { PositioningShorthand } from '@fluentui/react-positioning';
|
|
4
5
|
import * as React_2 from 'react';
|
|
5
6
|
import { RefObject } from 'react';
|
|
@@ -37,6 +38,50 @@ export declare interface AccessibilityProps {
|
|
|
37
38
|
*/
|
|
38
39
|
export declare function adjustPadding(sankey: SankeyLayoutGenerator, height: number, nodesInColumn: NodesInColumns): void;
|
|
39
40
|
|
|
41
|
+
export declare const AnnotationOnlyChart: React_2.FC<AnnotationOnlyChartProps>;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Props for the annotation-only chart renderer.
|
|
45
|
+
*/
|
|
46
|
+
export declare interface AnnotationOnlyChartProps {
|
|
47
|
+
/**
|
|
48
|
+
* Collection of annotations to render.
|
|
49
|
+
*/
|
|
50
|
+
annotations: ChartAnnotation[];
|
|
51
|
+
/** Optional layout title extracted from the Plotly schema. */
|
|
52
|
+
chartTitle?: string;
|
|
53
|
+
/** Optional descriptive text for accessibility. */
|
|
54
|
+
description?: string;
|
|
55
|
+
/** Desired width in pixels (if absent the chart will grow to fit the container). */
|
|
56
|
+
width?: number;
|
|
57
|
+
/** Desired height in pixels. */
|
|
58
|
+
height?: number;
|
|
59
|
+
/** Paper/background colour specified in the Plotly layout. */
|
|
60
|
+
paperBackgroundColor?: string;
|
|
61
|
+
/** Plot area background colour specified in the Plotly layout. */
|
|
62
|
+
plotBackgroundColor?: string;
|
|
63
|
+
/** Global layout font colour. */
|
|
64
|
+
fontColor?: string;
|
|
65
|
+
/** Global layout font family. */
|
|
66
|
+
fontFamily?: string;
|
|
67
|
+
/** Layout margin converted to padding for the outer wrapper. */
|
|
68
|
+
margin?: Partial<Margin>;
|
|
69
|
+
/** Component ref propagated by the DeclarativeChart surface. */
|
|
70
|
+
componentRef?: React_2.RefObject<Chart>;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export declare interface AnnotationPlotRect {
|
|
74
|
+
x: number;
|
|
75
|
+
y: number;
|
|
76
|
+
width: number;
|
|
77
|
+
height: number;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export declare interface AnnotationPoint {
|
|
81
|
+
x: number;
|
|
82
|
+
y: number;
|
|
83
|
+
}
|
|
84
|
+
|
|
40
85
|
export declare const ARC_PADDING = 2;
|
|
41
86
|
|
|
42
87
|
export declare const AreaChart: React_2.FunctionComponent<AreaChartProps>;
|
|
@@ -378,6 +423,10 @@ export declare interface CartesianChartProps {
|
|
|
378
423
|
* @default 10
|
|
379
424
|
*/
|
|
380
425
|
xAxistickSize?: number;
|
|
426
|
+
/**
|
|
427
|
+
* Text annotations rendered on top of the chart area
|
|
428
|
+
*/
|
|
429
|
+
annotations?: ChartAnnotation[];
|
|
381
430
|
/**
|
|
382
431
|
* defines the space between the tick line and the data label
|
|
383
432
|
* @default 10
|
|
@@ -497,7 +546,7 @@ export declare interface CartesianChartProps {
|
|
|
497
546
|
* Optional callback to access the Chart interface. Use this instead of ref for accessing
|
|
498
547
|
* the public methods and properties of the component.
|
|
499
548
|
*/
|
|
500
|
-
componentRef?: React_2.RefObject<Chart>;
|
|
549
|
+
componentRef?: React_2.RefObject<Chart | null>;
|
|
501
550
|
/**
|
|
502
551
|
* Prop to set the x axis annotation. Used to display additional information on the x-axis.
|
|
503
552
|
* This is shown on the top of the chart.
|
|
@@ -657,10 +706,18 @@ export declare interface CartesianChartStyles {
|
|
|
657
706
|
* Styles for the chart wrapper div
|
|
658
707
|
*/
|
|
659
708
|
chartWrapper?: string;
|
|
709
|
+
/**
|
|
710
|
+
* Styles for the element wrapping the svg and overlays for annotation
|
|
711
|
+
*/
|
|
712
|
+
plotContainer?: string;
|
|
660
713
|
/**
|
|
661
714
|
* Styles for the svg tooltip
|
|
662
715
|
*/
|
|
663
716
|
svgTooltip?: string;
|
|
717
|
+
/**
|
|
718
|
+
* Styles applied to the annotation layer root element
|
|
719
|
+
*/
|
|
720
|
+
annotationLayer?: string;
|
|
664
721
|
/**
|
|
665
722
|
* Styles for the chart svg element
|
|
666
723
|
*/
|
|
@@ -675,6 +732,141 @@ export declare interface Chart {
|
|
|
675
732
|
toImage?: (opts?: ImageExportOptions) => Promise<string>;
|
|
676
733
|
}
|
|
677
734
|
|
|
735
|
+
export declare interface ChartAnnotation {
|
|
736
|
+
/** Optional id for React reconciliation */
|
|
737
|
+
id?: string;
|
|
738
|
+
/** Primary textual content */
|
|
739
|
+
text: string;
|
|
740
|
+
/** Coordinates describing where the annotation should be anchored */
|
|
741
|
+
coordinates: ChartAnnotationCoordinate;
|
|
742
|
+
/** Layout customisation */
|
|
743
|
+
layout?: ChartAnnotationLayoutProps;
|
|
744
|
+
/** Visual styling */
|
|
745
|
+
style?: ChartAnnotationStyleProps;
|
|
746
|
+
/** Optional connector line that links the annotation to its anchor. */
|
|
747
|
+
connector?: ChartAnnotationConnectorProps;
|
|
748
|
+
/** Accessibility metadata */
|
|
749
|
+
accessibility?: ChartAnnotationAccessibilityProps;
|
|
750
|
+
/** Optional application specific metadata */
|
|
751
|
+
data?: Record<string, unknown>;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
export declare interface ChartAnnotationAccessibilityProps {
|
|
755
|
+
/** Accessible label announced by assistive technologies */
|
|
756
|
+
ariaLabel?: string;
|
|
757
|
+
/** Accessible description id */
|
|
758
|
+
ariaDescribedBy?: string;
|
|
759
|
+
/** Custom role */
|
|
760
|
+
role?: string;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
export declare type ChartAnnotationArrowHead = 'none' | 'start' | 'end' | 'both';
|
|
764
|
+
|
|
765
|
+
export declare interface ChartAnnotationConnectorProps {
|
|
766
|
+
/** Distance in pixels between the annotation element and the start of the connector. */
|
|
767
|
+
startPadding?: number;
|
|
768
|
+
/** Distance in pixels between the anchor point and the end of the connector. */
|
|
769
|
+
endPadding?: number;
|
|
770
|
+
/** Stroke colour for the connector. */
|
|
771
|
+
strokeColor?: string;
|
|
772
|
+
/** Stroke width in pixels. */
|
|
773
|
+
strokeWidth?: number;
|
|
774
|
+
/** SVG stroke dash array for dashed connectors. */
|
|
775
|
+
dashArray?: string;
|
|
776
|
+
/** Arrow head placement. Defaults to `'end'`. */
|
|
777
|
+
arrow?: ChartAnnotationArrowHead;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
export declare interface ChartAnnotationContext {
|
|
781
|
+
/** Rectangle describing the drawable area of the chart (without margins) */
|
|
782
|
+
plotRect: AnnotationPlotRect;
|
|
783
|
+
/** Size of the owning SVG element */
|
|
784
|
+
svgRect: {
|
|
785
|
+
width: number;
|
|
786
|
+
height: number;
|
|
787
|
+
};
|
|
788
|
+
/** Indicates if layout should be mirrored */
|
|
789
|
+
isRtl?: boolean;
|
|
790
|
+
/** Primary x scale mapping data domain to pixels */
|
|
791
|
+
xScale?: (value: any) => number;
|
|
792
|
+
/** Primary y scale mapping data domain to pixels */
|
|
793
|
+
yScalePrimary?: (value: any) => number;
|
|
794
|
+
/** Secondary y scale when present */
|
|
795
|
+
yScaleSecondary?: (value: any) => number;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
export declare type ChartAnnotationCoordinate = {
|
|
799
|
+
/** Cartesian data coordinates mapped through the chart scales or
|
|
800
|
+
* Normalised coordinates within the plot area (0-1) or
|
|
801
|
+
* Absolute pixel position relative to the chart's SVG origin
|
|
802
|
+
*/
|
|
803
|
+
type: 'data' | 'relative' | 'pixel';
|
|
804
|
+
/** x-axis value in the data domain */
|
|
805
|
+
x: number | string | Date;
|
|
806
|
+
/** y-axis value in the data domain */
|
|
807
|
+
y: number | string | Date;
|
|
808
|
+
/** Use the secondary y scale when available */
|
|
809
|
+
yAxis?: 'primary' | 'secondary';
|
|
810
|
+
};
|
|
811
|
+
|
|
812
|
+
export declare type ChartAnnotationHorizontalAlign = 'start' | 'center' | 'end';
|
|
813
|
+
|
|
814
|
+
export declare const ChartAnnotationLayer: React_2.FC<ChartAnnotationLayerProps>;
|
|
815
|
+
|
|
816
|
+
export declare interface ChartAnnotationLayerProps {
|
|
817
|
+
annotations?: ChartAnnotation[];
|
|
818
|
+
context: ChartAnnotationContext;
|
|
819
|
+
className?: string;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
export declare interface ChartAnnotationLayoutProps {
|
|
823
|
+
/** Horizontal alignment of the annotation relative to the anchor point */
|
|
824
|
+
align?: ChartAnnotationHorizontalAlign;
|
|
825
|
+
/** Vertical alignment of the annotation relative to the anchor point */
|
|
826
|
+
verticalAlign?: ChartAnnotationVerticalAlign;
|
|
827
|
+
/** Horizontal offset in pixels applied after alignment */
|
|
828
|
+
offsetX?: number;
|
|
829
|
+
/** Vertical offset in pixels applied after alignment */
|
|
830
|
+
offsetY?: number;
|
|
831
|
+
/** Optional maximum width for wrapped text */
|
|
832
|
+
maxWidth?: number;
|
|
833
|
+
/** Whether the annotation should remain inside the plot area */
|
|
834
|
+
clipToBounds?: boolean;
|
|
835
|
+
/** Additional CSS classes applied to the annotation wrapper */
|
|
836
|
+
className?: string;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
export declare interface ChartAnnotationStyleProps {
|
|
840
|
+
/** Text colour */
|
|
841
|
+
textColor?: string;
|
|
842
|
+
/** Background colour for the annotation container */
|
|
843
|
+
backgroundColor?: string;
|
|
844
|
+
/** Border colour */
|
|
845
|
+
borderColor?: string;
|
|
846
|
+
/** Border width */
|
|
847
|
+
borderWidth?: number;
|
|
848
|
+
/** Border style (solid, dashed, etc.) */
|
|
849
|
+
borderStyle?: React_2.CSSProperties['borderStyle'];
|
|
850
|
+
/** Border radius */
|
|
851
|
+
borderRadius?: number;
|
|
852
|
+
/** Box shadow applied to annotation */
|
|
853
|
+
boxShadow?: string;
|
|
854
|
+
/** Font size override */
|
|
855
|
+
fontSize?: string;
|
|
856
|
+
/** Font weight override */
|
|
857
|
+
fontWeight?: React_2.CSSProperties['fontWeight'];
|
|
858
|
+
/** Padding around the text. Accepts CSS shorthand notation */
|
|
859
|
+
padding?: string;
|
|
860
|
+
/** Opacity for the annotation container */
|
|
861
|
+
opacity?: number;
|
|
862
|
+
/** Optional class name applied to the annotation element */
|
|
863
|
+
className?: string;
|
|
864
|
+
/** Rotation, in degrees, applied to the annotation container */
|
|
865
|
+
rotation?: number;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
export declare type ChartAnnotationVerticalAlign = 'top' | 'middle' | 'bottom';
|
|
869
|
+
|
|
678
870
|
/**
|
|
679
871
|
* Chart data mode for chart data text
|
|
680
872
|
* default: show the datapoint.x value
|
|
@@ -904,6 +1096,18 @@ export declare interface ColorFillBarsProps {
|
|
|
904
1096
|
|
|
905
1097
|
declare type ColorwayType = 'default' | 'builtin' | 'others' | undefined;
|
|
906
1098
|
|
|
1099
|
+
export declare type ConnectorRenderData = {
|
|
1100
|
+
key: string;
|
|
1101
|
+
start: AnnotationPoint;
|
|
1102
|
+
end: AnnotationPoint;
|
|
1103
|
+
strokeColor: string;
|
|
1104
|
+
strokeWidth: number;
|
|
1105
|
+
dashArray?: string;
|
|
1106
|
+
arrow: ChartAnnotationArrowHead;
|
|
1107
|
+
markerSize: number;
|
|
1108
|
+
markerStrokeWidth: number;
|
|
1109
|
+
};
|
|
1110
|
+
|
|
907
1111
|
/**
|
|
908
1112
|
* Used for custom callout data interface. As Area chart callout data will be prepared from given props.data,
|
|
909
1113
|
* Those required data passing to onRenderCalloutPerDataPoint and onRenderCalloutPerStack.
|
|
@@ -2737,7 +2941,7 @@ export declare interface LegendsProps {
|
|
|
2737
2941
|
/**
|
|
2738
2942
|
* Callback to access the public methods and properties of the component.
|
|
2739
2943
|
*/
|
|
2740
|
-
legendRef?: React_2.RefObject<LegendContainer>;
|
|
2944
|
+
legendRef?: React_2.RefObject<LegendContainer | null>;
|
|
2741
2945
|
}
|
|
2742
2946
|
|
|
2743
2947
|
/**
|
|
@@ -3326,6 +3530,13 @@ declare interface RenderFunction<P> {
|
|
|
3326
3530
|
(props?: P, defaultRender?: (props?: P) => JSXElement | null): JSXElement | null;
|
|
3327
3531
|
}
|
|
3328
3532
|
|
|
3533
|
+
export declare interface ResolvedAnnotationPosition {
|
|
3534
|
+
/** Final absolute position after applying layout and offsets */
|
|
3535
|
+
point: AnnotationPoint;
|
|
3536
|
+
/** Raw anchor position before offsets (used for connectors) */
|
|
3537
|
+
anchor: AnnotationPoint;
|
|
3538
|
+
}
|
|
3539
|
+
|
|
3329
3540
|
/**
|
|
3330
3541
|
* Responsive Child props
|
|
3331
3542
|
* {@docCategory ResponsiveContainer}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/AnnotationOnlyChart/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/AnnotationOnlyChart.ts"],"sourcesContent":["export * from './components/AnnotationOnlyChart/index';\n"],"names":[],"mappings":"AAAA,cAAc,yCAAyC"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ChartAnnotationLayer } from '../CommonComponents/Annotations/ChartAnnotationLayer';
|
|
4
|
+
import { toImage as exportToImage } from '../../utilities/image-export-utils';
|
|
5
|
+
import { useRtl } from '../../utilities';
|
|
6
|
+
import { useAnnotationOnlyChartStyles } from './useAnnotationOnlyChartStyles.styles';
|
|
7
|
+
const DEFAULT_HEIGHT = 650;
|
|
8
|
+
const FALLBACK_WIDTH = 400;
|
|
9
|
+
const buildPadding = (margin)=>{
|
|
10
|
+
if (!margin) {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
var _margin_t;
|
|
14
|
+
const top = (_margin_t = margin.t) !== null && _margin_t !== void 0 ? _margin_t : 0;
|
|
15
|
+
var _margin_r;
|
|
16
|
+
const right = (_margin_r = margin.r) !== null && _margin_r !== void 0 ? _margin_r : 0;
|
|
17
|
+
var _margin_b;
|
|
18
|
+
const bottom = (_margin_b = margin.b) !== null && _margin_b !== void 0 ? _margin_b : 0;
|
|
19
|
+
var _margin_l;
|
|
20
|
+
const left = (_margin_l = margin.l) !== null && _margin_l !== void 0 ? _margin_l : 0;
|
|
21
|
+
if (top === 0 && right === 0 && bottom === 0 && left === 0) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
return `${top}px ${right}px ${bottom}px ${left}px`;
|
|
25
|
+
};
|
|
26
|
+
export const AnnotationOnlyChart = (props)=>{
|
|
27
|
+
const { annotations, chartTitle, description, width, height, paperBackgroundColor, plotBackgroundColor, fontColor, fontFamily, margin, componentRef } = props;
|
|
28
|
+
const isRtl = useRtl();
|
|
29
|
+
const classes = useAnnotationOnlyChartStyles();
|
|
30
|
+
const containerRef = React.useRef(null);
|
|
31
|
+
const contentRef = React.useRef(null);
|
|
32
|
+
const [measuredWidth, setMeasuredWidth] = React.useState(width !== null && width !== void 0 ? width : 0);
|
|
33
|
+
const [contentHeight, setContentHeight] = React.useState(height !== null && height !== void 0 ? height : DEFAULT_HEIGHT);
|
|
34
|
+
React.useEffect(()=>{
|
|
35
|
+
if (typeof width === 'number' && width > 0) {
|
|
36
|
+
setMeasuredWidth(width);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const node = containerRef.current;
|
|
40
|
+
if (!node || typeof ResizeObserver === 'undefined') {
|
|
41
|
+
const rect = node === null || node === void 0 ? void 0 : node.getBoundingClientRect();
|
|
42
|
+
if (rect && rect.width > 0) {
|
|
43
|
+
setMeasuredWidth(rect.width);
|
|
44
|
+
} else {
|
|
45
|
+
setMeasuredWidth((prev)=>prev > 0 ? prev : FALLBACK_WIDTH);
|
|
46
|
+
}
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const observer = new ResizeObserver((entries)=>{
|
|
50
|
+
const entry = entries[0];
|
|
51
|
+
if (!entry) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const newWidth = entry.contentRect.width;
|
|
55
|
+
if (newWidth > 0 && Math.abs(newWidth - measuredWidth) > 0.5) {
|
|
56
|
+
setMeasuredWidth(newWidth);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
const rect = node.getBoundingClientRect();
|
|
60
|
+
if (rect.width > 0) {
|
|
61
|
+
setMeasuredWidth(rect.width);
|
|
62
|
+
}
|
|
63
|
+
observer.observe(node);
|
|
64
|
+
return ()=>observer.disconnect();
|
|
65
|
+
}, [
|
|
66
|
+
width,
|
|
67
|
+
measuredWidth
|
|
68
|
+
]);
|
|
69
|
+
const resolvedWidth = Math.max(measuredWidth || FALLBACK_WIDTH, 1);
|
|
70
|
+
const resolvedHeight = Math.max(height !== null && height !== void 0 ? height : DEFAULT_HEIGHT, 1);
|
|
71
|
+
React.useEffect(()=>{
|
|
72
|
+
const node = contentRef.current;
|
|
73
|
+
if (!node) {
|
|
74
|
+
setContentHeight((prev)=>prev > 0 ? prev : resolvedHeight);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (typeof ResizeObserver === 'undefined') {
|
|
78
|
+
const rect = node.getBoundingClientRect();
|
|
79
|
+
setContentHeight((prev)=>rect.height > 0 ? rect.height : prev > 0 ? prev : resolvedHeight);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const observer = new ResizeObserver((entries)=>{
|
|
83
|
+
const entry = entries[0];
|
|
84
|
+
if (!entry) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const newHeight = entry.contentRect.height;
|
|
88
|
+
if (newHeight > 0) {
|
|
89
|
+
setContentHeight((prev)=>Math.abs(prev - newHeight) > 0.5 ? newHeight : prev);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
const rect = node.getBoundingClientRect();
|
|
93
|
+
setContentHeight((prev)=>rect.height > 0 ? rect.height : prev > 0 ? prev : resolvedHeight);
|
|
94
|
+
observer.observe(node);
|
|
95
|
+
return ()=>observer.disconnect();
|
|
96
|
+
}, [
|
|
97
|
+
resolvedHeight,
|
|
98
|
+
resolvedWidth,
|
|
99
|
+
annotations,
|
|
100
|
+
chartTitle,
|
|
101
|
+
description,
|
|
102
|
+
margin,
|
|
103
|
+
plotBackgroundColor,
|
|
104
|
+
paperBackgroundColor,
|
|
105
|
+
fontColor,
|
|
106
|
+
fontFamily
|
|
107
|
+
]);
|
|
108
|
+
const svgHeight = Math.max(Math.ceil(contentHeight || 0), resolvedHeight);
|
|
109
|
+
const context = {
|
|
110
|
+
plotRect: {
|
|
111
|
+
x: 0,
|
|
112
|
+
y: 0,
|
|
113
|
+
width: resolvedWidth,
|
|
114
|
+
height: resolvedHeight
|
|
115
|
+
},
|
|
116
|
+
svgRect: {
|
|
117
|
+
width: resolvedWidth,
|
|
118
|
+
height: resolvedHeight
|
|
119
|
+
},
|
|
120
|
+
isRtl
|
|
121
|
+
};
|
|
122
|
+
const padding = buildPadding(margin);
|
|
123
|
+
// Inline styles for dynamic values that can't be in makeStyles
|
|
124
|
+
const rootStyle = React.useMemo(()=>({
|
|
125
|
+
width: width ? `${width}px` : '100%',
|
|
126
|
+
minHeight: resolvedHeight,
|
|
127
|
+
...paperBackgroundColor && {
|
|
128
|
+
backgroundColor: paperBackgroundColor
|
|
129
|
+
},
|
|
130
|
+
...fontColor && {
|
|
131
|
+
color: fontColor
|
|
132
|
+
},
|
|
133
|
+
...fontFamily && {
|
|
134
|
+
fontFamily
|
|
135
|
+
},
|
|
136
|
+
...padding && {
|
|
137
|
+
padding
|
|
138
|
+
}
|
|
139
|
+
}), [
|
|
140
|
+
fontColor,
|
|
141
|
+
fontFamily,
|
|
142
|
+
paperBackgroundColor,
|
|
143
|
+
padding,
|
|
144
|
+
resolvedHeight,
|
|
145
|
+
width
|
|
146
|
+
]);
|
|
147
|
+
const contentStyle = React.useMemo(()=>({
|
|
148
|
+
...plotBackgroundColor && {
|
|
149
|
+
backgroundColor: plotBackgroundColor
|
|
150
|
+
}
|
|
151
|
+
}), [
|
|
152
|
+
plotBackgroundColor
|
|
153
|
+
]);
|
|
154
|
+
const resolvedAnnotations = annotations !== null && annotations !== void 0 ? annotations : [];
|
|
155
|
+
const hasAnnotations = resolvedAnnotations.length > 0;
|
|
156
|
+
const ariaLabel = hasAnnotations ? description !== null && description !== void 0 ? description : chartTitle : undefined;
|
|
157
|
+
React.useImperativeHandle(componentRef, ()=>{
|
|
158
|
+
const chartHandle = {
|
|
159
|
+
chartContainer: containerRef.current,
|
|
160
|
+
toImage: (opts)=>{
|
|
161
|
+
if (!containerRef.current) {
|
|
162
|
+
return Promise.reject(new Error('Chart container is not defined'));
|
|
163
|
+
}
|
|
164
|
+
return exportToImage(containerRef.current, undefined, isRtl, opts);
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
return chartHandle;
|
|
168
|
+
}, [
|
|
169
|
+
isRtl
|
|
170
|
+
]);
|
|
171
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
172
|
+
ref: containerRef,
|
|
173
|
+
"data-chart-annotation-container": "true"
|
|
174
|
+
}, /*#__PURE__*/ React.createElement("svg", {
|
|
175
|
+
width: resolvedWidth,
|
|
176
|
+
height: svgHeight,
|
|
177
|
+
viewBox: `0 0 ${resolvedWidth} ${svgHeight}`,
|
|
178
|
+
style: {
|
|
179
|
+
width: width ? `${width}px` : '100%',
|
|
180
|
+
height: `${svgHeight}px`,
|
|
181
|
+
display: 'block'
|
|
182
|
+
},
|
|
183
|
+
role: ariaLabel ? 'img' : undefined,
|
|
184
|
+
"aria-label": ariaLabel
|
|
185
|
+
}, /*#__PURE__*/ React.createElement("foreignObject", {
|
|
186
|
+
x: 0,
|
|
187
|
+
y: 0,
|
|
188
|
+
width: resolvedWidth,
|
|
189
|
+
height: svgHeight
|
|
190
|
+
}, /*#__PURE__*/ React.createElement("div", {
|
|
191
|
+
ref: contentRef,
|
|
192
|
+
className: classes.root,
|
|
193
|
+
style: rootStyle,
|
|
194
|
+
"data-chart-annotation-only": "true",
|
|
195
|
+
"aria-label": ariaLabel
|
|
196
|
+
}, chartTitle && /*#__PURE__*/ React.createElement("span", {
|
|
197
|
+
className: classes.title,
|
|
198
|
+
"aria-hidden": "true"
|
|
199
|
+
}, chartTitle), /*#__PURE__*/ React.createElement("div", {
|
|
200
|
+
className: classes.content,
|
|
201
|
+
style: contentStyle,
|
|
202
|
+
role: "presentation"
|
|
203
|
+
}, hasAnnotations ? /*#__PURE__*/ React.createElement(ChartAnnotationLayer, {
|
|
204
|
+
annotations: resolvedAnnotations,
|
|
205
|
+
context: context
|
|
206
|
+
}) : null)))));
|
|
207
|
+
};
|
|
208
|
+
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 { toImage as exportToImage } from '../../utilities/image-export-utils';\nimport { useRtl } from '../../utilities';\nimport { useAnnotationOnlyChartStyles } from './useAnnotationOnlyChartStyles.styles';\nimport type { AnnotationOnlyChartProps } from './AnnotationOnlyChart.types';\nimport type { Chart, ImageExportOptions } from '../../types/index';\nimport type { ChartAnnotationContext } from '../CommonComponents/Annotations/ChartAnnotationLayer.types';\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 containerRef = React.useRef<HTMLDivElement | null>(null);\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 React.useImperativeHandle(\n componentRef,\n () => {\n const chartHandle: Chart = {\n chartContainer: containerRef.current,\n toImage: (opts?: ImageExportOptions) => {\n if (!containerRef.current) {\n return Promise.reject(new Error('Chart container is not defined'));\n }\n\n return exportToImage(containerRef.current, undefined, isRtl, opts);\n },\n };\n\n return chartHandle;\n },\n [isRtl],\n );\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","toImage","exportToImage","useRtl","useAnnotationOnlyChartStyles","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","containerRef","useRef","contentRef","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","useImperativeHandle","chartHandle","chartContainer","opts","Promise","reject","Error","div","ref","data-chart-annotation-container","svg","viewBox","style","display","role","aria-label","foreignObject","className","root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C,OAAOiC;QAAehC,QAAQoC;qBACvD,oBAACyB;QACCC,KAAKpD;QACL6D,WAAWhE,QAAQiE,IAAI;QACvBN,OAAOtB;QACP6B,8BAA2B;QAC3BJ,cAAYhB;OAEXxD,4BACC,oBAAC6E;QAAKH,WAAWhE,QAAQoE,KAAK;QAAEC,eAAY;OACzC/E,2BAGL,oBAACgE;QAAIU,WAAWhE,QAAQsE,OAAO;QAAEX,OAAOjB;QAAcmB,MAAK;OACxDjB,+BAAiB,oBAAC3E;QAAqBoB,aAAasD;QAAqBZ,SAASA;SAAc;AAO/G,EAAE;AAEF5C,oBAAoBoF,WAAW,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
@@ -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.RefObject<Chart>;\n}\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AnnotationOnlyChart/index.ts"],"sourcesContent":["export * from './AnnotationOnlyChart';\nexport * from './AnnotationOnlyChart.types';\n"],"names":[],"mappings":"AAAA,cAAc,wBAAwB;AACtC,cAAc,8BAA8B"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { __styles } from '@griffel/react';
|
|
2
|
+
import { tokens, typographyStyles } from '@fluentui/react-theme';
|
|
3
|
+
export const useAnnotationOnlyChartStyles = /*#__PURE__*/__styles({
|
|
4
|
+
root: {
|
|
5
|
+
qhf8xq: "f10pi13n",
|
|
6
|
+
mc9l5x: "f22iagw",
|
|
7
|
+
Beiy3e4: "f1vx9l62",
|
|
8
|
+
Belr9w4: "fn67r4l",
|
|
9
|
+
De3pzq: "fxugw4r",
|
|
10
|
+
sj55zd: "f19n0e5",
|
|
11
|
+
Bahqtrf: "fk6fouc"
|
|
12
|
+
},
|
|
13
|
+
content: {
|
|
14
|
+
qhf8xq: "f10pi13n",
|
|
15
|
+
Bh6795r: "fqerorx",
|
|
16
|
+
De3pzq: "f3rmtva",
|
|
17
|
+
Beyfa6y: 0,
|
|
18
|
+
Bbmb7ep: 0,
|
|
19
|
+
Btl43ni: 0,
|
|
20
|
+
B7oj6ja: 0,
|
|
21
|
+
Dimara: "ft85np5",
|
|
22
|
+
B7ck84d: "f1ewtqcl"
|
|
23
|
+
},
|
|
24
|
+
title: {
|
|
25
|
+
fsow6f: "f17mccla"
|
|
26
|
+
}
|
|
27
|
+
}, {
|
|
28
|
+
d: [".f10pi13n{position:relative;}", ".f22iagw{display:flex;}", ".f1vx9l62{flex-direction:column;}", ".fn67r4l{row-gap:8px;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fqerorx{flex-grow:1;}", ".f3rmtva{background-color:transparent;}", [".ft85np5{border-radius:var(--borderRadiusMedium);}", {
|
|
29
|
+
p: -1
|
|
30
|
+
}], ".f1ewtqcl{box-sizing:border-box;}", ".f17mccla{text-align:center;}"]
|
|
31
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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"],"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"],"mappings":"AAAA,SAAAA,QAAA,QAA2B,gBAAgB;AAC3C,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,OAAO,MAAMC,4BAA4B,gBAAGH,QAAA;EAAAI,IAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,OAAA;IAAAP,MAAA;IAAAQ,OAAA;IAAAJ,MAAA;IAAAK,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,KAAA;IAAAC,MAAA;EAAA;AAAA;EAAAC,CAAA;IAAAC,CAAA;EAAA;AAAA,CAoB3C,CAAC","ignoreList":[]}
|