@fluentui/react-charts 0.0.0-nightly-20260109-0406.1 → 0.0.0-nightly-20260113-0406.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.
Files changed (173) hide show
  1. package/CHANGELOG.md +13 -13
  2. package/dist/index.d.ts +361 -0
  3. package/lib/PolarChart.js +1 -0
  4. package/lib/PolarChart.js.map +1 -0
  5. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +2 -1
  6. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
  7. package/lib/components/ChartTable/ChartTable.js +21 -7
  8. package/lib/components/ChartTable/ChartTable.js.map +1 -1
  9. package/lib/components/ChartTable/ChartTable.types.js.map +1 -1
  10. package/lib/components/ChartTable/useChartTableStyles.styles.js +24 -3
  11. package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  12. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +14 -2
  13. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  14. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +7 -5
  15. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
  16. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -1
  17. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +47 -3
  18. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -1
  19. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +24 -17
  20. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -1
  21. package/lib/components/CommonComponents/CartesianChart.js +5 -3
  22. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  23. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  24. package/lib/components/DeclarativeChart/DeclarativeChart.js +33 -29
  25. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  26. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +250 -153
  27. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  28. package/lib/components/DonutChart/DonutChart.js +12 -4
  29. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  30. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  31. package/lib/components/DonutChart/useDonutChartStyles.styles.js +25 -5
  32. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  33. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +16 -5
  34. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  35. package/lib/components/FunnelChart/FunnelChart.js +27 -5
  36. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  37. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -1
  38. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +26 -4
  39. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
  40. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +15 -3
  41. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
  42. package/lib/components/GaugeChart/GaugeChart.js +5 -5
  43. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  44. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  45. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +8 -5
  46. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  47. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +2 -5
  48. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
  49. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -1
  50. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  51. package/lib/components/LineChart/LineChart.js +4 -1
  52. package/lib/components/LineChart/LineChart.js.map +1 -1
  53. package/lib/components/PolarChart/PolarChart.js +576 -0
  54. package/lib/components/PolarChart/PolarChart.js.map +1 -0
  55. package/lib/components/PolarChart/PolarChart.types.js +1 -0
  56. package/lib/components/PolarChart/PolarChart.types.js.map +1 -0
  57. package/lib/components/PolarChart/PolarChart.utils.js +174 -0
  58. package/lib/components/PolarChart/PolarChart.utils.js.map +1 -0
  59. package/lib/components/PolarChart/index.js +2 -0
  60. package/lib/components/PolarChart/index.js.map +1 -0
  61. package/lib/components/PolarChart/usePolarChartStyles.styles.js +72 -0
  62. package/lib/components/PolarChart/usePolarChartStyles.styles.js.map +1 -0
  63. package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js +61 -0
  64. package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js.map +1 -0
  65. package/lib/components/SankeyChart/SankeyChart.js +13 -3
  66. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  67. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  68. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +23 -6
  69. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  70. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +15 -5
  71. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  72. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +25 -36
  73. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  74. package/lib/index.js +1 -0
  75. package/lib/index.js.map +1 -1
  76. package/lib/types/DataPoint.js +1 -1
  77. package/lib/types/DataPoint.js.map +1 -1
  78. package/lib/utilities/ChartTitle.js +33 -0
  79. package/lib/utilities/ChartTitle.js.map +1 -0
  80. package/lib/utilities/Common.styles.js +73 -1
  81. package/lib/utilities/Common.styles.js.map +1 -1
  82. package/lib/utilities/Common.styles.raw.js +70 -0
  83. package/lib/utilities/Common.styles.raw.js.map +1 -1
  84. package/lib/utilities/index.js +1 -0
  85. package/lib/utilities/index.js.map +1 -1
  86. package/lib/utilities/utilities.js +2 -2
  87. package/lib/utilities/utilities.js.map +1 -1
  88. package/lib-commonjs/PolarChart.js +6 -0
  89. package/lib-commonjs/PolarChart.js.map +1 -0
  90. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +2 -1
  91. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
  92. package/lib-commonjs/components/ChartTable/ChartTable.js +21 -7
  93. package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
  94. package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +1 -1
  95. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +34 -3
  96. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  97. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +14 -2
  98. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  99. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +7 -5
  100. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
  101. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -1
  102. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +58 -4
  103. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -1
  104. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +24 -17
  105. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -1
  106. package/lib-commonjs/components/CommonComponents/CartesianChart.js +4 -2
  107. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  108. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  109. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +59 -56
  110. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  111. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +256 -156
  112. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  113. package/lib-commonjs/components/DonutChart/DonutChart.js +11 -3
  114. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  115. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  116. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +31 -4
  117. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  118. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +15 -4
  119. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  120. package/lib-commonjs/components/FunnelChart/FunnelChart.js +26 -4
  121. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
  122. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -1
  123. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +36 -4
  124. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
  125. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +15 -3
  126. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
  127. package/lib-commonjs/components/GaugeChart/GaugeChart.js +4 -4
  128. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  129. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  130. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +10 -4
  131. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  132. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +2 -5
  133. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
  134. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -1
  135. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  136. package/lib-commonjs/components/LineChart/LineChart.js +4 -1
  137. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  138. package/lib-commonjs/components/PolarChart/PolarChart.js +586 -0
  139. package/lib-commonjs/components/PolarChart/PolarChart.js.map +1 -0
  140. package/lib-commonjs/components/PolarChart/PolarChart.types.js +6 -0
  141. package/lib-commonjs/components/PolarChart/PolarChart.types.js.map +1 -0
  142. package/lib-commonjs/components/PolarChart/PolarChart.utils.js +204 -0
  143. package/lib-commonjs/components/PolarChart/PolarChart.utils.js.map +1 -0
  144. package/lib-commonjs/components/PolarChart/index.js +7 -0
  145. package/lib-commonjs/components/PolarChart/index.js.map +1 -0
  146. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.js +107 -0
  147. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.js.map +1 -0
  148. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.js +75 -0
  149. package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.js.map +1 -0
  150. package/lib-commonjs/components/SankeyChart/SankeyChart.js +13 -3
  151. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  152. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  153. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +28 -4
  154. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  155. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +14 -3
  156. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  157. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +25 -36
  158. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  159. package/lib-commonjs/index.js +1 -0
  160. package/lib-commonjs/index.js.map +1 -1
  161. package/lib-commonjs/types/DataPoint.js +1 -1
  162. package/lib-commonjs/types/DataPoint.js.map +1 -1
  163. package/lib-commonjs/utilities/ChartTitle.js +41 -0
  164. package/lib-commonjs/utilities/ChartTitle.js.map +1 -0
  165. package/lib-commonjs/utilities/Common.styles.js +69 -0
  166. package/lib-commonjs/utilities/Common.styles.js.map +1 -1
  167. package/lib-commonjs/utilities/Common.styles.raw.js +69 -0
  168. package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -1
  169. package/lib-commonjs/utilities/index.js +1 -0
  170. package/lib-commonjs/utilities/index.js.map +1 -1
  171. package/lib-commonjs/utilities/utilities.js +6 -0
  172. package/lib-commonjs/utilities/utilities.js.map +1 -1
  173. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -1,26 +1,26 @@
1
1
  # Change Log - @fluentui/react-charts
2
2
 
3
- This log was last generated on Fri, 09 Jan 2026 04:21:33 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 13 Jan 2026 04:21:22 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20260109-0406.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-charts_v0.0.0-nightly-20260109-0406.1)
7
+ ## [0.0.0-nightly-20260113-0406.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-charts_v0.0.0-nightly-20260113-0406.1)
8
8
 
9
- Fri, 09 Jan 2026 04:21:33 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charts_v9.3.8..@fluentui/react-charts_v0.0.0-nightly-20260109-0406.1)
9
+ Tue, 13 Jan 2026 04:21:22 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charts_v9.3.8..@fluentui/react-charts_v0.0.0-nightly-20260113-0406.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-20260109-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/6b02cd49b3424ef75f31d84a4046598222f63e65) by beachball)
16
- - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20260109-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/6b02cd49b3424ef75f31d84a4046598222f63e65) by beachball)
17
- - Bump @fluentui/react-overflow to v0.0.0-nightly-20260109-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/6b02cd49b3424ef75f31d84a4046598222f63e65) by beachball)
18
- - Bump @fluentui/react-popover to v0.0.0-nightly-20260109-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/6b02cd49b3424ef75f31d84a4046598222f63e65) by beachball)
19
- - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20260109-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/6b02cd49b3424ef75f31d84a4046598222f63e65) by beachball)
20
- - Bump @fluentui/react-tabster to v0.0.0-nightly-20260109-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/6b02cd49b3424ef75f31d84a4046598222f63e65) by beachball)
21
- - Bump @fluentui/react-theme to v0.0.0-nightly-20260109-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/6b02cd49b3424ef75f31d84a4046598222f63e65) by beachball)
22
- - Bump @fluentui/react-tooltip to v0.0.0-nightly-20260109-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/6b02cd49b3424ef75f31d84a4046598222f63e65) by beachball)
23
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20260109-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/6b02cd49b3424ef75f31d84a4046598222f63e65) by beachball)
15
+ - Bump @fluentui/react-button to v0.0.0-nightly-20260113-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b3ee65b30567b6bd25ced8c45d631a56377d08ee) by beachball)
16
+ - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20260113-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b3ee65b30567b6bd25ced8c45d631a56377d08ee) by beachball)
17
+ - Bump @fluentui/react-overflow to v0.0.0-nightly-20260113-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b3ee65b30567b6bd25ced8c45d631a56377d08ee) by beachball)
18
+ - Bump @fluentui/react-popover to v0.0.0-nightly-20260113-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b3ee65b30567b6bd25ced8c45d631a56377d08ee) by beachball)
19
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20260113-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b3ee65b30567b6bd25ced8c45d631a56377d08ee) by beachball)
20
+ - Bump @fluentui/react-tabster to v0.0.0-nightly-20260113-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b3ee65b30567b6bd25ced8c45d631a56377d08ee) by beachball)
21
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20260113-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b3ee65b30567b6bd25ced8c45d631a56377d08ee) by beachball)
22
+ - Bump @fluentui/react-tooltip to v0.0.0-nightly-20260113-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b3ee65b30567b6bd25ced8c45d631a56377d08ee) by beachball)
23
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20260113-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/b3ee65b30567b6bd25ced8c45d631a56377d08ee) by beachball)
24
24
 
25
25
  ## [9.3.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-charts_v9.3.8)
26
26
 
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { CurveFactory } from 'd3-shape';
2
+ import type { Font } from '@fluentui/chart-utilities';
2
3
  import type { JSXElement } from '@fluentui/react-utilities';
3
4
  import type { Margin } from '@fluentui/chart-utilities';
4
5
  import { PositioningShorthand } from '@fluentui/react-positioning';
@@ -152,6 +153,24 @@ export declare interface AreaChartStyleProps extends CartesianChartStyleProps {
152
153
  export declare interface AreaChartStyles extends CartesianChartStyles {
153
154
  }
154
155
 
156
+ /**
157
+ * Represents a areapolar series.
158
+ */
159
+ export declare interface AreaPolarSeries extends DataSeries {
160
+ /**
161
+ * Type discriminator: always 'areapolar' for this series.
162
+ */
163
+ type: 'areapolar';
164
+ /**
165
+ * Array of data points for the series.
166
+ */
167
+ data: PolarDataPoint[];
168
+ /**
169
+ * Additional line rendering options (e.g., stroke width, curve type).
170
+ */
171
+ lineOptions?: LineChartLineOptions;
172
+ }
173
+
155
174
  /**
156
175
  * Specifies the ordering options for axis categories in Cartesian charts.
157
176
  *
@@ -322,6 +341,10 @@ export declare const CartesianChart: React_2.FunctionComponent<ModifiedCartesian
322
341
  * {@docCategory CartesianChart}
323
342
  */
324
343
  export declare interface CartesianChartProps {
344
+ /**
345
+ * Title styles configuration for the chart title
346
+ */
347
+ titleStyles?: TitleStyles;
325
348
  /**
326
349
  * Below height used for resizing of the chart
327
350
  * Wrap chart in your container and send the updated height and width to these props.
@@ -860,6 +883,11 @@ export declare interface ChartAnnotationLayerProps {
860
883
  annotations?: ChartAnnotation[];
861
884
  context: ChartAnnotationContext;
862
885
  className?: string;
886
+ /**
887
+ * When true, removes default border, shadow, and background styling from annotations.
888
+ * @default false
889
+ */
890
+ hideDefaultStyles?: boolean;
863
891
  }
864
892
 
865
893
  export declare interface ChartAnnotationLayoutProps {
@@ -1046,6 +1074,10 @@ export declare const ChartTable: React_2.FunctionComponent<ChartTableProps>;
1046
1074
  * {@docCategory ChartTable}
1047
1075
  */
1048
1076
  export declare interface ChartTableProps {
1077
+ /**
1078
+ * Title styles configuration for the chart title
1079
+ */
1080
+ titleStyles?: TitleStyles;
1049
1081
  /**
1050
1082
  * 1d or 2d Array of header values.
1051
1083
  */
@@ -1070,6 +1102,10 @@ export declare interface ChartTableProps {
1070
1102
  * @default '650px'
1071
1103
  */
1072
1104
  height?: string | number;
1105
+ /**
1106
+ * Chart title to display above the table
1107
+ */
1108
+ chartTitle?: string;
1073
1109
  /**
1074
1110
  * Additional class name(s) to apply to the table chart
1075
1111
  */
@@ -1095,6 +1131,8 @@ export declare interface ChartTableStyles {
1095
1131
  headerCell?: string;
1096
1132
  bodyCell?: string;
1097
1133
  chart?: string;
1134
+ chartTitle?: string;
1135
+ svgTooltip?: string;
1098
1136
  }
1099
1137
 
1100
1138
  declare enum ChartTypes {
@@ -1369,6 +1407,10 @@ export declare const DonutChart: React_2.FunctionComponent<DonutChartProps>;
1369
1407
  * {@docCategory DonutChart}
1370
1408
  */
1371
1409
  export declare interface DonutChartProps extends CartesianChartProps {
1410
+ /**
1411
+ * Title styles configuration for the chart title
1412
+ */
1413
+ titleStyles?: TitleStyles;
1372
1414
  /**
1373
1415
  * Data to render in the chart.
1374
1416
  */
@@ -1489,6 +1531,10 @@ export declare interface DonutChartStyles {
1489
1531
  * Style for the legend container.
1490
1532
  */
1491
1533
  legendContainer: string;
1534
+ /**
1535
+ * Style for the chart title.
1536
+ */
1537
+ chartTitle?: string;
1492
1538
  /**
1493
1539
  * styles for axis annotation
1494
1540
  */
@@ -1497,6 +1543,10 @@ export declare interface DonutChartStyles {
1497
1543
  * Styles for the chart wrapper div
1498
1544
  */
1499
1545
  chartWrapper?: string;
1546
+ /**
1547
+ * Style for SVG tooltip text
1548
+ */
1549
+ svgTooltip?: string;
1500
1550
  }
1501
1551
 
1502
1552
  export declare interface DPointType {
@@ -1566,6 +1616,10 @@ export declare interface FunnelChartDataPoint {
1566
1616
  * {@docCategory FunnelChart}
1567
1617
  */
1568
1618
  export declare interface FunnelChartProps {
1619
+ /**
1620
+ * Title styles configuration for the chart title
1621
+ */
1622
+ titleStyles?: TitleStyles;
1569
1623
  /**
1570
1624
  * Data points for the funnel chart
1571
1625
  */
@@ -1650,10 +1704,18 @@ export declare interface FunnelChartStyles {
1650
1704
  * Styles for the chart
1651
1705
  */
1652
1706
  chart?: string;
1707
+ /**
1708
+ * Style for the chart title.
1709
+ */
1710
+ chartTitle?: string;
1653
1711
  /**
1654
1712
  * Styles for text elements
1655
1713
  */
1656
1714
  text?: string;
1715
+ /**
1716
+ * Style for SVG tooltip text
1717
+ */
1718
+ svgTooltip?: string;
1657
1719
  /**
1658
1720
  * Styles for the callout root element
1659
1721
  */
@@ -1782,6 +1844,10 @@ export declare const GaugeChart: React_2.FunctionComponent<GaugeChartProps>;
1782
1844
  * {@docCategory GaugeChart}
1783
1845
  */
1784
1846
  export declare interface GaugeChartProps {
1847
+ /**
1848
+ * Title styles configuration for the chart title
1849
+ */
1850
+ titleStyles?: TitleStyles;
1785
1851
  /**
1786
1852
  * Width of the chart
1787
1853
  */
@@ -3308,6 +3374,24 @@ export declare interface LineDataInVerticalStackedBarChart {
3308
3374
  lineOptions?: LineChartLineOptions;
3309
3375
  }
3310
3376
 
3377
+ /**
3378
+ * Represents a linepolar series.
3379
+ */
3380
+ export declare interface LinePolarSeries extends DataSeries {
3381
+ /**
3382
+ * Type discriminator: always 'linepolar' for this series.
3383
+ */
3384
+ type: 'linepolar';
3385
+ /**
3386
+ * Array of data points for the series.
3387
+ */
3388
+ data: PolarDataPoint[];
3389
+ /**
3390
+ * Additional line rendering options (e.g., stroke width, curve type).
3391
+ */
3392
+ lineOptions?: LineChartLineOptions;
3393
+ }
3394
+
3311
3395
  /**
3312
3396
  * Represents a line series.
3313
3397
  */
@@ -3524,6 +3608,223 @@ declare enum Points {
3524
3608
  octagon = 7
3525
3609
  }
3526
3610
 
3611
+ /**
3612
+ * Configuration options for a polar axis.
3613
+ * {@docCategory PolarChart}
3614
+ */
3615
+ export declare type PolarAxisProps = AxisProps & {
3616
+ /**
3617
+ * Values at which ticks should be placed on the axis.
3618
+ */
3619
+ tickValues?: number[] | Date[] | string[];
3620
+ /**
3621
+ * Format string for the axis ticks.
3622
+ * For numbers, see: https://d3js.org/d3-format.
3623
+ * And for dates see: https://d3js.org/d3-time-format.
3624
+ */
3625
+ tickFormat?: string;
3626
+ /**
3627
+ * Number of ticks to display on the axis.
3628
+ */
3629
+ tickCount?: number;
3630
+ /**
3631
+ * Defines the order of categories on the axis.
3632
+ * @default 'default'
3633
+ */
3634
+ categoryOrder?: AxisCategoryOrder;
3635
+ /**
3636
+ * Scale type for the axis.
3637
+ * @default 'default'
3638
+ */
3639
+ scaleType?: AxisScaleType;
3640
+ /**
3641
+ * Start value of the axis range.
3642
+ */
3643
+ rangeStart?: number | Date;
3644
+ /**
3645
+ * End value of the axis range.
3646
+ */
3647
+ rangeEnd?: number | Date;
3648
+ };
3649
+
3650
+ export declare const PolarChart: React_2.FunctionComponent<PolarChartProps>;
3651
+
3652
+ /**
3653
+ * Polar Chart properties
3654
+ * {@docCategory PolarChart}
3655
+ */
3656
+ export declare interface PolarChartProps {
3657
+ /**
3658
+ * Data series to be rendered in the polar chart.
3659
+ */
3660
+ data: (AreaPolarSeries | LinePolarSeries | ScatterPolarSeries)[];
3661
+ /**
3662
+ * Width of the polar chart.
3663
+ * @default 200
3664
+ */
3665
+ width?: number;
3666
+ /**
3667
+ * Height of the polar chart.
3668
+ * @default 200
3669
+ */
3670
+ height?: number;
3671
+ /**
3672
+ * Margins around the chart area.
3673
+ */
3674
+ margins?: Margins;
3675
+ /**
3676
+ * If true, hides the legend.
3677
+ * @default false
3678
+ */
3679
+ hideLegend?: boolean;
3680
+ /**
3681
+ * If true, hides the tooltip.
3682
+ * @default false
3683
+ */
3684
+ hideTooltip?: boolean;
3685
+ legendProps?: Partial<LegendsProps>;
3686
+ /**
3687
+ * Style properties for the polar chart.
3688
+ */
3689
+ styles?: PolarChartStyles;
3690
+ /**
3691
+ * Title of the chart.
3692
+ */
3693
+ chartTitle?: string;
3694
+ /**
3695
+ * Fraction of the radius to cut out from the center of the chart.
3696
+ * Accepts values in the range [0, 1].
3697
+ */
3698
+ hole?: number;
3699
+ /**
3700
+ * Shape of the polar chart.
3701
+ * @default 'circle'
3702
+ */
3703
+ shape?: 'circle' | 'polygon';
3704
+ /**
3705
+ * Direction in which the chart is drawn.
3706
+ * @default 'counterclockwise'
3707
+ */
3708
+ direction?: 'clockwise' | 'counterclockwise';
3709
+ /**
3710
+ * Configuration options for the radial axis.
3711
+ */
3712
+ radialAxis?: PolarAxisProps;
3713
+ /**
3714
+ * Configuration options for the angular axis.
3715
+ */
3716
+ angularAxis?: PolarAxisProps & {
3717
+ /**
3718
+ * Format unit for angular values.
3719
+ * @default 'degrees'
3720
+ */
3721
+ unit?: 'radians' | 'degrees';
3722
+ };
3723
+ /**
3724
+ * Optional callback to access the Chart interface. Use this instead of ref for accessing
3725
+ * the public methods and properties of the component.
3726
+ */
3727
+ componentRef?: React_2.Ref<Chart>;
3728
+ /**
3729
+ * Locale identifier string used to format numbers and dates according to the specified culture.
3730
+ * Example: 'en-US', 'fr-FR'.
3731
+ */
3732
+ culture?: string;
3733
+ /**
3734
+ * Options for localizing date values.
3735
+ */
3736
+ dateLocalizeOptions?: Intl.DateTimeFormatOptions;
3737
+ /**
3738
+ * If true, date values are treated as UTC dates.
3739
+ * @default false
3740
+ */
3741
+ useUTC?: boolean;
3742
+ }
3743
+
3744
+ /**
3745
+ * Polar Chart style properties
3746
+ * {@docCategory PolarChart}
3747
+ */
3748
+ export declare interface PolarChartStyleProps {
3749
+ }
3750
+
3751
+ /**
3752
+ * Polar Chart styles
3753
+ * {@docCategory PolarChart}
3754
+ */
3755
+ export declare interface PolarChartStyles {
3756
+ /**
3757
+ * Style for the root element.
3758
+ */
3759
+ root?: string;
3760
+ /**
3761
+ * Style for the chart wrapper element.
3762
+ */
3763
+ chartWrapper?: string;
3764
+ /**
3765
+ * Style for the chart element.
3766
+ */
3767
+ chart?: string;
3768
+ /**
3769
+ * Style for the inner grid lines.
3770
+ */
3771
+ gridLineInner?: string;
3772
+ /**
3773
+ * Style for the outer grid lines.
3774
+ */
3775
+ gridLineOuter?: string;
3776
+ /**
3777
+ * Style for the tick labels.
3778
+ */
3779
+ tickLabel?: string;
3780
+ /**
3781
+ * Style for the legend container.
3782
+ */
3783
+ legendContainer?: string;
3784
+ }
3785
+
3786
+ /**
3787
+ * Represents a single data point in a polar series.
3788
+ */
3789
+ export declare interface PolarDataPoint {
3790
+ /**
3791
+ * Radial value of the data point.
3792
+ */
3793
+ r: string | number | Date;
3794
+ /**
3795
+ * Angular value of the data point, specified as a category or in degrees.
3796
+ */
3797
+ theta: string | number;
3798
+ /**
3799
+ * Optional click handler for the data point.
3800
+ */
3801
+ onClick?: () => void;
3802
+ /**
3803
+ * Custom text to show in the callout in place of the radial axis value.
3804
+ */
3805
+ radialAxisCalloutData?: string;
3806
+ /**
3807
+ * Custom text to show in the callout in place of the angular axis value.
3808
+ */
3809
+ angularAxisCalloutData?: string;
3810
+ /**
3811
+ * Accessibility properties for the data point.
3812
+ */
3813
+ callOutAccessibilityData?: AccessibilityProps;
3814
+ /**
3815
+ * Custom marker size for the data point.
3816
+ */
3817
+ markerSize?: number;
3818
+ /**
3819
+ * Optional text to annotate or label the data point.
3820
+ */
3821
+ text?: string;
3822
+ /**
3823
+ * Color of the data point. If not provided, it will inherit the series color.
3824
+ */
3825
+ color?: string;
3826
+ }
3827
+
3527
3828
  export declare interface PopoverComponentStyles {
3528
3829
  calloutContentRoot: string;
3529
3830
  calloutDateTimeContainer: string;
@@ -3671,6 +3972,10 @@ export declare interface SankeyChartData {
3671
3972
  * {@docCategory SankeyChart}
3672
3973
  */
3673
3974
  export declare interface SankeyChartProps {
3975
+ /**
3976
+ * Title styles configuration for the chart title
3977
+ */
3978
+ titleStyles?: TitleStyles;
3674
3979
  /**
3675
3980
  * Data to render in the chart.
3676
3981
  */
@@ -3741,6 +4046,11 @@ export declare interface SankeyChartProps {
3741
4046
  * The prop used to define the culture to localize the numbers and date
3742
4047
  */
3743
4048
  culture?: string;
4049
+ /**
4050
+ * Whether to hide the legend
4051
+ * @default false
4052
+ */
4053
+ hideLegend?: boolean;
3744
4054
  /**
3745
4055
  * Props related to reflow behavior of the chart
3746
4056
  */
@@ -3798,6 +4108,14 @@ export declare interface SankeyChartStyles {
3798
4108
  * Styles for the chart svg element
3799
4109
  */
3800
4110
  chart?: string;
4111
+ /**
4112
+ * Style for SVG tooltip text
4113
+ */
4114
+ svgTooltip?: string;
4115
+ /**
4116
+ * Style for the chart title.
4117
+ */
4118
+ chartTitle?: string;
3801
4119
  }
3802
4120
 
3803
4121
  declare type SankeyLayoutGenerator = SankeyLayout<SankeyGraph<{}, {}>, {}, {}>;
@@ -3924,6 +4242,20 @@ export declare interface ScatterChartStyles extends CartesianChartStyles {
3924
4242
  markerLabel?: string;
3925
4243
  }
3926
4244
 
4245
+ /**
4246
+ * Represents a scatterpolar series.
4247
+ */
4248
+ export declare interface ScatterPolarSeries extends DataSeries {
4249
+ /**
4250
+ * Type discriminator: always 'scatterpolar' for this series.
4251
+ */
4252
+ type: 'scatterpolar';
4253
+ /**
4254
+ * Array of data points for the series.
4255
+ */
4256
+ data: PolarDataPoint[];
4257
+ }
4258
+
3927
4259
  /**
3928
4260
  * DeclarativeChart schema.
3929
4261
  * {@docCategory DeclarativeChart}
@@ -4056,6 +4388,35 @@ declare interface TextboxProps {
4056
4388
  fill?: string;
4057
4389
  }
4058
4390
 
4391
+ /**
4392
+ * Shared interface for chart title styling properties.
4393
+ * Used by components that display a chart title with customizable font, alignment, and padding.
4394
+ * {@docCategory TitleStyles}
4395
+ */
4396
+ declare interface TitleStyles {
4397
+ /**
4398
+ * Font configuration for the title
4399
+ */
4400
+ titleFont?: Partial<Font>;
4401
+ /**
4402
+ * Horizontal anchor/alignment for the chart title
4403
+ */
4404
+ titleXAnchor?: 'auto' | 'left' | 'center' | 'right';
4405
+ /**
4406
+ * Vertical anchor/alignment for the chart title
4407
+ */
4408
+ titleYAnchor?: 'auto' | 'top' | 'middle' | 'bottom';
4409
+ /**
4410
+ * Padding for the chart title
4411
+ */
4412
+ titlePad?: {
4413
+ t?: number;
4414
+ r?: number;
4415
+ b?: number;
4416
+ l?: number;
4417
+ };
4418
+ }
4419
+
4059
4420
  /**
4060
4421
  * VerticalBarchart component
4061
4422
  * {@docCategory VerticalBarChart}
@@ -0,0 +1 @@
1
+ export * from './components/PolarChart/index';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/PolarChart.ts"],"sourcesContent":["export * from './components/PolarChart/index';\n"],"names":[],"mappings":"AAAA,cAAc,gCAAgC"}
@@ -188,7 +188,8 @@ export const AnnotationOnlyChart = (props)=>{
188
188
  role: "presentation"
189
189
  }, hasAnnotations ? /*#__PURE__*/ React.createElement(ChartAnnotationLayer, {
190
190
  annotations: resolvedAnnotations,
191
- context: context
191
+ context: context,
192
+ hideDefaultStyles: true
192
193
  }) : null)))));
193
194
  };
194
195
  AnnotationOnlyChart.displayName = 'AnnotationOnlyChart';
@@ -1 +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;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,uDAAuD;AAC5F,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SAASC,4BAA4B,QAAQ,wCAAwC;AAGrF,SAASC,cAAc,QAAQ,wBAAwB;AAEvD,MAAMC,iBAAiB;AACvB,MAAMC,iBAAiB;AAEvB,MAAMC,eAAe,CAACC;IACpB,IAAI,CAACA,QAAQ;QACX,OAAOC;IACT;QAEYD;IAAZ,MAAME,MAAMF,CAAAA,YAAAA,OAAOG,CAAC,cAARH,uBAAAA,YAAY;QACVA;IAAd,MAAMI,QAAQJ,CAAAA,YAAAA,OAAOK,CAAC,cAARL,uBAAAA,YAAY;QACXA;IAAf,MAAMM,SAASN,CAAAA,YAAAA,OAAOO,CAAC,cAARP,uBAAAA,YAAY;QACdA;IAAb,MAAMQ,OAAOR,CAAAA,YAAAA,OAAOS,CAAC,cAART,uBAAAA,YAAY;IAEzB,IAAIE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QqC;QACRsB,SAAS,CAAC,IAAI,EAAE1B,cAAc,CAAC,EAAEI,WAAW;QAC5CuB,OAAO;YAAE7D,OAAOA,QAAQ,GAAGA,MAAM,EAAE,CAAC,GAAG;YAAQC,QAAQ,GAAGqC,UAAU,EAAE,CAAC;YAAEwB,SAAS;QAAQ;QAC1FC,MAAMR,YAAY,QAAQrE;QAC1B8E,cAAYT;qBAEZ,oBAACU;QAAcvB,GAAG;QAAGC,GAAG;QAAG3C,OAAOkC;QAAejC,QAAQqC;qBACvD,oBAACkB;QACCC,KAAK9C;QACLuD,WAAW1D,QAAQ2D,IAAI;QACvBN,OAAOf;QACPsB,8BAA2B;QAC3BJ,cAAYT;OAEXzD,4BACC,oBAACuE;QAAKH,WAAW1D,QAAQ8D,KAAK;QAAEC,eAAY;OACzCzE,2BAGL,oBAAC0D;QAAIU,WAAW1D,QAAQgE,OAAO;QAAEX,OAAOV;QAAcY,MAAK;OACxDV,+BAAiB,oBAAC3E;QAAqBmB,aAAauD;QAAqBZ,SAASA;SAAc;AAO/G,EAAE;AAEF7C,oBAAoB8E,WAAW,GAAG"}
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 ? (\n <ChartAnnotationLayer annotations={resolvedAnnotations} context={context} hideDefaultStyles={true} />\n ) : 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","hideDefaultStyles","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,uDAAuD;AAC5F,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SAASC,4BAA4B,QAAQ,wCAAwC;AAGrF,SAASC,cAAc,QAAQ,wBAAwB;AAEvD,MAAMC,iBAAiB;AACvB,MAAMC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D,eAAoC1E,MAAMsE,OAAO,CACrD,IAAO,CAAA;YACL,GAAI5C,uBAAuB;gBAAE8C,iBAAiB9C;YAAoB,CAAC;QACrE,CAAA,GACA;QAACA;KAAoB;IAGvB,MAAMiD,sBAAsBvD,wBAAAA,yBAAAA,cAAe,EAAE;IAC7C,MAAMwD,iBAAiBD,oBAAoBE,MAAM,GAAG;IACpD,MAAMC,YAAYF,iBAAiBtD,wBAAAA,yBAAAA,cAAeD,aAAaZ;IAE/D,qBACE,oBAACsE;QAAIC,KAAK/C;QAAcgD,mCAAgC;qBACtD,oBAACC;QACC3D,OAAOkC;QACPjC,QAAQqC;QACRsB,SAAS,CAAC,IAAI,EAAE1B,cAAc,CAAC,EAAEI,WAAW;QAC5CuB,OAAO;YAAE7D,OAAOA,QAAQ,GAAGA,MAAM,EAAE,CAAC,GAAG;YAAQC,QAAQ,GAAGqC,UAAU,EAAE,CAAC;YAAEwB,SAAS;QAAQ;QAC1FC,MAAMR,YAAY,QAAQrE;QAC1B8E,cAAYT;qBAEZ,oBAACU;QAAcvB,GAAG;QAAGC,GAAG;QAAG3C,OAAOkC;QAAejC,QAAQqC;qBACvD,oBAACkB;QACCC,KAAK9C;QACLuD,WAAW1D,QAAQ2D,IAAI;QACvBN,OAAOf;QACPsB,8BAA2B;QAC3BJ,cAAYT;OAEXzD,4BACC,oBAACuE;QAAKH,WAAW1D,QAAQ8D,KAAK;QAAEC,eAAY;OACzCzE,2BAGL,oBAAC0D;QAAIU,WAAW1D,QAAQgE,OAAO;QAAEX,OAAOV;QAAcY,MAAK;OACxDV,+BACC,oBAAC3E;QAAqBmB,aAAauD;QAAqBZ,SAASA;QAASiC,mBAAmB;SAC3F;AAOlB,EAAE;AAEF9E,oBAAoB+E,WAAW,GAAG"}
@@ -5,6 +5,7 @@ import { tokens } from '@fluentui/react-theme';
5
5
  import * as d3 from 'd3-color';
6
6
  import { getColorContrast } from '../../utilities/colors';
7
7
  import { resolveCSSVariables } from '../../utilities/utilities';
8
+ import { ChartTitle } from '../../utilities/index';
8
9
  import { useImageExport } from '../../utilities/hooks';
9
10
  import { useArrowNavigationGroup } from '@fluentui/react-tabster';
10
11
  function invertHexColor(hex) {
@@ -37,7 +38,7 @@ function getSafeBackgroundColor(chartContainer, foreground, background) {
37
38
  return invertedContrast >= 3 ? invertedBg : fallbackBg;
38
39
  }
39
40
  export const ChartTable = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
40
- const { headers, rows, width, height } = props;
41
+ const { headers, rows, width, height, chartTitle } = props;
41
42
  const { chartContainerRef: _rootElem } = useImageExport(props.componentRef, true, false);
42
43
  const classes = useChartTableStyles(props);
43
44
  const arrowAttributes = useArrowNavigationGroup({
@@ -78,23 +79,36 @@ export const ChartTable = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>
78
79
  }
79
80
  }
80
81
  }
82
+ const titleHeight = chartTitle ? 30 : 0;
83
+ const totalHeight = typeof height === 'number' ? height : 650;
84
+ const tableHeight = `${totalHeight - titleHeight}px`;
85
+ const svgWidth = typeof width === 'number' ? width : '100%';
86
+ const titleMaxWidth = typeof width === 'number' ? width - 20 : undefined;
87
+ const titleX = typeof width === 'number' ? width / 2 : 0;
81
88
  return /*#__PURE__*/ React.createElement("div", {
82
89
  ref: (el)=>{
83
90
  _rootElem.current = el;
84
91
  },
85
92
  className: classes.root,
86
93
  style: {
87
- height: height ? `${height}px` : '650px',
94
+ height: `${totalHeight}px`,
88
95
  overflow: 'hidden'
89
96
  }
90
97
  }, /*#__PURE__*/ React.createElement("svg", {
91
- width: width !== null && width !== void 0 ? width : '100%',
92
- height: height !== null && height !== void 0 ? height : '650px'
93
- }, /*#__PURE__*/ React.createElement("foreignObject", {
98
+ width: svgWidth,
99
+ height: `${totalHeight}px`
100
+ }, chartTitle && /*#__PURE__*/ React.createElement(ChartTitle, {
101
+ title: chartTitle,
102
+ x: titleX,
103
+ maxWidth: titleMaxWidth,
104
+ className: classes.chartTitle,
105
+ titleStyles: props.titleStyles,
106
+ tooltipClassName: classes.svgTooltip
107
+ }), /*#__PURE__*/ React.createElement("foreignObject", {
94
108
  x: "0",
95
- y: "0",
109
+ y: titleHeight,
96
110
  width: "100%",
97
- height: "100%"
111
+ height: tableHeight
98
112
  }, /*#__PURE__*/ React.createElement("div", {
99
113
  style: {
100
114
  maxHeight: height ? `${height}px` : '650px',