@fluentui/react-charting 5.24.39 → 5.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/CHANGELOG.json +60 -1
  2. package/CHANGELOG.md +21 -2
  3. package/dist/react-charting.d.ts +127 -0
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +74 -0
  7. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.d.ts +3 -0
  8. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +343 -0
  9. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
  10. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.d.ts +28 -0
  11. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js +111 -0
  12. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js.map +1 -0
  13. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.d.ts +52 -0
  14. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +2 -0
  15. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
  16. package/lib/components/CommonComponents/CartesianChart.base.js +38 -46
  17. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  18. package/lib/components/CommonComponents/CartesianChart.styles.js +9 -1
  19. package/lib/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  20. package/lib/components/CommonComponents/CartesianChart.types.d.ts +17 -1
  21. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  22. package/lib/components/CommonComponents/index.d.ts +2 -0
  23. package/lib/components/CommonComponents/index.js +2 -0
  24. package/lib/components/CommonComponents/index.js.map +1 -1
  25. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +641 -76
  26. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  27. package/lib/index.d.ts +1 -1
  28. package/lib/index.js.map +1 -1
  29. package/lib/types/IChartAnnotation.d.ts +99 -0
  30. package/lib/types/IChartAnnotation.js +2 -0
  31. package/lib/types/IChartAnnotation.js.map +1 -0
  32. package/lib/types/IDataPoint.d.ts +4 -0
  33. package/lib/types/IDataPoint.js.map +1 -1
  34. package/lib/types/index.d.ts +1 -0
  35. package/lib/types/index.js +1 -0
  36. package/lib/types/index.js.map +1 -1
  37. package/lib/utilities/image-export-utils.js +55 -0
  38. package/lib/utilities/image-export-utils.js.map +1 -1
  39. package/lib/utilities/utilities.js +72 -20
  40. package/lib/utilities/utilities.js.map +1 -1
  41. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.d.ts +3 -0
  42. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.js +344 -0
  43. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
  44. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.d.ts +28 -0
  45. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js +119 -0
  46. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js.map +1 -0
  47. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.types.d.ts +52 -0
  48. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +5 -0
  49. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
  50. package/lib-amd/components/CommonComponents/CartesianChart.base.js +38 -47
  51. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  52. package/lib-amd/components/CommonComponents/CartesianChart.styles.js +9 -1
  53. package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  54. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +17 -1
  55. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  56. package/lib-amd/components/CommonComponents/index.d.ts +2 -0
  57. package/lib-amd/components/CommonComponents/index.js +3 -1
  58. package/lib-amd/components/CommonComponents/index.js.map +1 -1
  59. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +641 -76
  60. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  61. package/lib-amd/index.d.ts +1 -1
  62. package/lib-amd/index.js.map +1 -1
  63. package/lib-amd/types/IChartAnnotation.d.ts +99 -0
  64. package/lib-amd/types/IChartAnnotation.js +5 -0
  65. package/lib-amd/types/IChartAnnotation.js.map +1 -0
  66. package/lib-amd/types/IDataPoint.d.ts +4 -0
  67. package/lib-amd/types/IDataPoint.js.map +1 -1
  68. package/lib-amd/types/index.d.ts +1 -0
  69. package/lib-amd/types/index.js +2 -1
  70. package/lib-amd/types/index.js.map +1 -1
  71. package/lib-amd/utilities/image-export-utils.js +55 -0
  72. package/lib-amd/utilities/image-export-utils.js.map +1 -1
  73. package/lib-amd/utilities/utilities.js +72 -20
  74. package/lib-amd/utilities/utilities.js.map +1 -1
  75. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.d.ts +3 -0
  76. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +346 -0
  77. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
  78. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.d.ts +28 -0
  79. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js +118 -0
  80. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js.map +1 -0
  81. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.d.ts +52 -0
  82. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +3 -0
  83. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
  84. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +38 -46
  85. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  86. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js +9 -1
  87. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  88. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +17 -1
  89. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  90. package/lib-commonjs/components/CommonComponents/index.d.ts +2 -0
  91. package/lib-commonjs/components/CommonComponents/index.js +2 -0
  92. package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
  93. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +641 -76
  94. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  95. package/lib-commonjs/index.d.ts +1 -1
  96. package/lib-commonjs/index.js.map +1 -1
  97. package/lib-commonjs/types/IChartAnnotation.d.ts +99 -0
  98. package/lib-commonjs/types/IChartAnnotation.js +3 -0
  99. package/lib-commonjs/types/IChartAnnotation.js.map +1 -0
  100. package/lib-commonjs/types/IDataPoint.d.ts +4 -0
  101. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  102. package/lib-commonjs/types/index.d.ts +1 -0
  103. package/lib-commonjs/types/index.js +1 -0
  104. package/lib-commonjs/types/index.js.map +1 -1
  105. package/lib-commonjs/utilities/image-export-utils.js +55 -0
  106. package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
  107. package/lib-commonjs/utilities/utilities.js +72 -20
  108. package/lib-commonjs/utilities/utilities.js.map +1 -1
  109. package/package.json +9 -9
  110. package/src/components/CommonComponents/Annotations/ChartAnnotationLayer.types.ts +58 -0
  111. package/src/components/CommonComponents/CartesianChart.types.ts +21 -0
package/CHANGELOG.json CHANGED
@@ -2,7 +2,66 @@
2
2
  "name": "@fluentui/react-charting",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 16 Oct 2025 07:19:28 GMT",
5
+ "date": "Thu, 23 Oct 2025 10:20:51 GMT",
6
+ "tag": "@fluentui/react-charting_v5.25.0",
7
+ "version": "5.25.0",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "kumarkshitij@microsoft.com",
12
+ "package": "@fluentui/react-charting",
13
+ "commit": "83942b2faa689b1ab6b9e0f0b56fdbd625ac7631",
14
+ "comment": "feat: map deprecated plotly create_gantt() scatter traces to gantt chart"
15
+ },
16
+ {
17
+ "author": "anushgupta@microsoft.com",
18
+ "package": "@fluentui/react-charting",
19
+ "commit": "002f3d9ca75a903654557218aedee7a198edc804",
20
+ "comment": "fix chart exception issue"
21
+ },
22
+ {
23
+ "author": "120183316+srmukher@users.noreply.github.com",
24
+ "package": "@fluentui/react-charting",
25
+ "commit": "ad8b6d128850dbf3b6f7e4b74ebe137435ef15c1",
26
+ "comment": "feat(react-charting): Annotations"
27
+ }
28
+ ],
29
+ "minor": [
30
+ {
31
+ "author": "martinhochel@microsoft.com",
32
+ "package": "@fluentui/react-charting",
33
+ "commit": "6b3885cb0c984861ea8342fea64e95a2c9668125",
34
+ "comment": "feat: bump react range to support React 19"
35
+ },
36
+ {
37
+ "author": "beachball",
38
+ "package": "@fluentui/react-charting",
39
+ "comment": "Bump @fluentui/chart-utilities to v1.1.35",
40
+ "commit": "c16125427e4d796ae4a1143f482baa0da962bac1"
41
+ },
42
+ {
43
+ "author": "beachball",
44
+ "package": "@fluentui/react-charting",
45
+ "comment": "Bump @fluentui/react-focus to v8.10.0",
46
+ "commit": "c16125427e4d796ae4a1143f482baa0da962bac1"
47
+ },
48
+ {
49
+ "author": "beachball",
50
+ "package": "@fluentui/react-charting",
51
+ "comment": "Bump @fluentui/theme-samples to v8.7.219",
52
+ "commit": "c16125427e4d796ae4a1143f482baa0da962bac1"
53
+ },
54
+ {
55
+ "author": "beachball",
56
+ "package": "@fluentui/react-charting",
57
+ "comment": "Bump @fluentui/react to v8.125.0",
58
+ "commit": "c16125427e4d796ae4a1143f482baa0da962bac1"
59
+ }
60
+ ]
61
+ }
62
+ },
63
+ {
64
+ "date": "Thu, 16 Oct 2025 07:21:58 GMT",
6
65
  "tag": "@fluentui/react-charting_v5.24.39",
7
66
  "version": "5.24.39",
8
67
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,31 @@
1
1
  # Change Log - @fluentui/react-charting
2
2
 
3
- This log was last generated on Thu, 16 Oct 2025 07:19:28 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 23 Oct 2025 10:20:51 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [5.25.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-charting_v5.25.0)
8
+
9
+ Thu, 23 Oct 2025 10:20:51 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charting_v5.24.39..@fluentui/react-charting_v5.25.0)
11
+
12
+ ### Minor changes
13
+
14
+ - feat: bump react range to support React 19 ([PR #35362](https://github.com/microsoft/fluentui/pull/35362) by martinhochel@microsoft.com)
15
+ - Bump @fluentui/chart-utilities to v1.1.35 ([PR #35364](https://github.com/microsoft/fluentui/pull/35364) by beachball)
16
+ - Bump @fluentui/react-focus to v8.10.0 ([PR #35364](https://github.com/microsoft/fluentui/pull/35364) by beachball)
17
+ - Bump @fluentui/theme-samples to v8.7.219 ([PR #35364](https://github.com/microsoft/fluentui/pull/35364) by beachball)
18
+ - Bump @fluentui/react to v8.125.0 ([PR #35364](https://github.com/microsoft/fluentui/pull/35364) by beachball)
19
+
20
+ ### Patches
21
+
22
+ - feat: map deprecated plotly create_gantt() scatter traces to gantt chart ([PR #35334](https://github.com/microsoft/fluentui/pull/35334) by kumarkshitij@microsoft.com)
23
+ - fix chart exception issue ([PR #35342](https://github.com/microsoft/fluentui/pull/35342) by anushgupta@microsoft.com)
24
+ - feat(react-charting): Annotations ([PR #35324](https://github.com/microsoft/fluentui/pull/35324) by 120183316+srmukher@users.noreply.github.com)
25
+
7
26
  ## [5.24.39](https://github.com/microsoft/fluentui/tree/@fluentui/react-charting_v5.24.39)
8
27
 
9
- Thu, 16 Oct 2025 07:19:28 GMT
28
+ Thu, 16 Oct 2025 07:21:58 GMT
10
29
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charting_v5.24.38..@fluentui/react-charting_v5.24.39)
11
30
 
12
31
  ### Patches
@@ -84,6 +84,10 @@ export declare type AxisProps = {
84
84
  * - Exception: when `tickStep` uses `"L<f>"`, you can specify the raw value directly.
85
85
  */
86
86
  tick0?: number | Date;
87
+ /**
88
+ * Sets the text displayed at each tick position specified by `tickValues`. Used with `tickValues`.
89
+ */
90
+ tickText?: string[];
87
91
  };
88
92
 
89
93
  /**
@@ -102,6 +106,113 @@ export declare type AxisScaleType = 'default' | 'log';
102
106
  */
103
107
  export declare const CartesianChart: React_2.FunctionComponent<IModifiedCartesianChartProps>;
104
108
 
109
+ export declare interface ChartAnnotation {
110
+ /** Optional id for React reconciliation */
111
+ id?: string;
112
+ /** Primary textual content */
113
+ text: string;
114
+ /** Coordinates describing where the annotation should be anchored */
115
+ coordinates: ChartAnnotationCoordinate;
116
+ /** Layout customisation */
117
+ layout?: ChartAnnotationLayoutProps;
118
+ /** Visual styling */
119
+ style?: ChartAnnotationStyleProps;
120
+ /** Optional connector line that links the annotation to its anchor. */
121
+ connector?: ChartAnnotationConnectorProps;
122
+ /** Accessibility metadata */
123
+ accessibility?: ChartAnnotationAccessibilityProps;
124
+ /** Optional application specific metadata */
125
+ data?: Record<string, unknown>;
126
+ }
127
+
128
+ export declare interface ChartAnnotationAccessibilityProps {
129
+ /** Accessible label announced by assistive technologies */
130
+ ariaLabel?: string;
131
+ /** Accessible description id */
132
+ ariaDescribedBy?: string;
133
+ /** Custom role */
134
+ role?: string;
135
+ }
136
+
137
+ export declare type ChartAnnotationArrowHead = 'none' | 'start' | 'end' | 'both';
138
+
139
+ export declare interface ChartAnnotationConnectorProps {
140
+ /** Distance in pixels between the annotation element and the start of the connector. */
141
+ startPadding?: number;
142
+ /** Distance in pixels between the anchor point and the end of the connector. */
143
+ endPadding?: number;
144
+ /** Stroke colour for the connector. */
145
+ strokeColor?: string;
146
+ /** Stroke width in pixels. */
147
+ strokeWidth?: number;
148
+ /** SVG stroke dash array for dashed connectors. */
149
+ dashArray?: string;
150
+ /** Arrow head placement. Defaults to `'end'`. */
151
+ arrow?: ChartAnnotationArrowHead;
152
+ }
153
+
154
+ export declare type ChartAnnotationCoordinate = {
155
+ /** Cartesian data coordinates mapped through the chart scales or
156
+ * Normalised coordinates within the plot area (0-1) or
157
+ * Absolute pixel position relative to the chart's SVG origin
158
+ */
159
+ type: 'data' | 'relative' | 'pixel';
160
+ /** x-axis value in the data domain */
161
+ x: number | string | Date;
162
+ /** y-axis value in the data domain */
163
+ y: number | string | Date;
164
+ /** Use the secondary y scale when available */
165
+ yAxis?: 'primary' | 'secondary';
166
+ };
167
+
168
+ declare type ChartAnnotationHorizontalAlign = 'start' | 'center' | 'end';
169
+
170
+ export declare interface ChartAnnotationLayoutProps {
171
+ /** Horizontal alignment of the annotation relative to the anchor point */
172
+ align?: ChartAnnotationHorizontalAlign;
173
+ /** Vertical alignment of the annotation relative to the anchor point */
174
+ verticalAlign?: ChartAnnotationVerticalAlign;
175
+ /** Horizontal offset in pixels applied after alignment */
176
+ offsetX?: number;
177
+ /** Vertical offset in pixels applied after alignment */
178
+ offsetY?: number;
179
+ /** Optional maximum width for wrapped text */
180
+ maxWidth?: number;
181
+ /** Whether the annotation should remain inside the plot area */
182
+ clipToBounds?: boolean;
183
+ /** Additional CSS classes applied to the annotation wrapper */
184
+ className?: string;
185
+ }
186
+
187
+ export declare interface ChartAnnotationStyleProps {
188
+ /** Text colour */
189
+ textColor?: string;
190
+ /** Background colour for the annotation container */
191
+ backgroundColor?: string;
192
+ /** Border colour */
193
+ borderColor?: string;
194
+ /** Border width */
195
+ borderWidth?: number;
196
+ /** Border style (solid, dashed, etc.) */
197
+ borderStyle?: React_2.CSSProperties['borderStyle'];
198
+ /** Border radius */
199
+ borderRadius?: number;
200
+ /** Box shadow applied to annotation */
201
+ boxShadow?: string;
202
+ /** Font size override */
203
+ fontSize?: string;
204
+ /** Font weight override */
205
+ fontWeight?: React_2.CSSProperties['fontWeight'];
206
+ /** Padding around the text. Accepts CSS shorthand notation */
207
+ padding?: string;
208
+ /** Opacity for the annotation container */
209
+ opacity?: number;
210
+ /** Optional class name applied to the annotation element */
211
+ className?: string;
212
+ }
213
+
214
+ declare type ChartAnnotationVerticalAlign = 'top' | 'middle' | 'bottom';
215
+
105
216
  /**
106
217
  * Chart data mode for chart data text
107
218
  * default: show the datapoint.x value
@@ -615,6 +726,10 @@ export declare interface ICartesianChartProps {
615
726
  * @default 10
616
727
  */
617
728
  xAxistickSize?: number;
729
+ /**
730
+ * Text annotations rendered on top of the chart area
731
+ */
732
+ annotations?: ChartAnnotation[];
618
733
  /**
619
734
  * defines the space between the tick line and the data label
620
735
  * @default 10
@@ -928,10 +1043,18 @@ export declare interface ICartesianChartStyles {
928
1043
  * Styles for the chart wrapper div
929
1044
  */
930
1045
  chartWrapper?: IStyle;
1046
+ /**
1047
+ * Styles for the element wrapping the svg and overlays for annotation
1048
+ */
1049
+ plotContainer?: IStyle;
931
1050
  /**
932
1051
  * Styles for the svg tooltip
933
1052
  */
934
1053
  svgTooltip?: IStyle;
1054
+ /**
1055
+ * Styles applied to the annotation layer root element
1056
+ */
1057
+ annotationLayer?: IStyle;
935
1058
  /**
936
1059
  * Styles for the chart svg element
937
1060
  */
@@ -3488,6 +3611,10 @@ export declare interface IModifiedCartesianChartProps extends ICartesianChartPro
3488
3611
  * props to send to the focuszone
3489
3612
  */
3490
3613
  svgFocusZoneProps?: IFocusZoneProps;
3614
+ /**
3615
+ * Annotations to render on top of the chart area.
3616
+ */
3617
+ annotations?: ChartAnnotation[];
3491
3618
  /**
3492
3619
  * The prop used to define the culture to localize the numbers and date
3493
3620
  */