@fluentui/react-charting 5.25.4 → 5.25.6

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 (379) hide show
  1. package/CHANGELOG.json +107 -1
  2. package/CHANGELOG.md +30 -2
  3. package/bundle-size/PolarChart.fixture.js +7 -0
  4. package/dist/react-charting.d.ts +424 -1
  5. package/dist/react-charting.js +1 -1
  6. package/dist/react-charting.min.js +1 -1
  7. package/etc/react-charting.api.md +93 -1
  8. package/lib/PolarChart.d.ts +1 -0
  9. package/lib/PolarChart.js +2 -0
  10. package/lib/PolarChart.js.map +1 -0
  11. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +1 -1
  12. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
  13. package/lib/components/AreaChart/AreaChart.base.d.ts +0 -1
  14. package/lib/components/AreaChart/AreaChart.base.js +2 -31
  15. package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
  16. package/lib/components/ChartTable/ChartTable.base.js +12 -4
  17. package/lib/components/ChartTable/ChartTable.base.js.map +1 -1
  18. package/lib/components/ChartTable/ChartTable.styles.js +3 -0
  19. package/lib/components/ChartTable/ChartTable.styles.js.map +1 -1
  20. package/lib/components/ChartTable/ChartTable.types.d.ts +11 -0
  21. package/lib/components/ChartTable/ChartTable.types.js.map +1 -1
  22. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +11 -6
  23. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
  24. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.d.ts +1 -0
  25. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js +17 -1
  26. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js.map +1 -1
  27. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.d.ts +5 -0
  28. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -1
  29. package/lib/components/CommonComponents/CartesianChart.base.d.ts +1 -1
  30. package/lib/components/CommonComponents/CartesianChart.base.js +82 -42
  31. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  32. package/lib/components/CommonComponents/CartesianChart.styles.js +31 -27
  33. package/lib/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  34. package/lib/components/CommonComponents/CartesianChart.types.d.ts +20 -1
  35. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  36. package/lib/components/DeclarativeChart/DeclarativeChart.js +24 -28
  37. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  38. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +3 -1
  39. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +390 -267
  40. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  41. package/lib/components/DonutChart/DonutChart.base.d.ts +1 -0
  42. package/lib/components/DonutChart/DonutChart.base.js +16 -4
  43. package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
  44. package/lib/components/DonutChart/DonutChart.styles.js +3 -1
  45. package/lib/components/DonutChart/DonutChart.styles.js.map +1 -1
  46. package/lib/components/DonutChart/DonutChart.types.d.ts +13 -0
  47. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  48. package/lib/components/DonutChart/Pie/Pie.js +4 -2
  49. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  50. package/lib/components/FunnelChart/FunnelChart.base.js +14 -8
  51. package/lib/components/FunnelChart/FunnelChart.base.js.map +1 -1
  52. package/lib/components/FunnelChart/FunnelChart.styles.js +3 -0
  53. package/lib/components/FunnelChart/FunnelChart.styles.js.map +1 -1
  54. package/lib/components/FunnelChart/FunnelChart.types.d.ts +13 -0
  55. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -1
  56. package/lib/components/GaugeChart/GaugeChart.base.js +2 -2
  57. package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
  58. package/lib/components/GaugeChart/GaugeChart.styles.js +16 -22
  59. package/lib/components/GaugeChart/GaugeChart.styles.js.map +1 -1
  60. package/lib/components/GaugeChart/GaugeChart.types.d.ts +9 -0
  61. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  62. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +0 -1
  63. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +6 -18
  64. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  65. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +2 -0
  66. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +55 -5
  67. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  68. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js +12 -1
  69. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -1
  70. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +9 -0
  71. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  72. package/lib/components/LineChart/LineChart.base.d.ts +0 -1
  73. package/lib/components/LineChart/LineChart.base.js +2 -26
  74. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  75. package/lib/components/PolarChart/PolarChart.base.d.ts +3 -0
  76. package/lib/components/PolarChart/PolarChart.base.js +426 -0
  77. package/lib/components/PolarChart/PolarChart.base.js.map +1 -0
  78. package/lib/components/PolarChart/PolarChart.d.ts +7 -0
  79. package/lib/components/PolarChart/PolarChart.js +9 -0
  80. package/lib/components/PolarChart/PolarChart.js.map +1 -0
  81. package/lib/components/PolarChart/PolarChart.styles.d.ts +2 -0
  82. package/lib/components/PolarChart/PolarChart.styles.js +39 -0
  83. package/lib/components/PolarChart/PolarChart.styles.js.map +1 -0
  84. package/lib/components/PolarChart/PolarChart.types.d.ts +185 -0
  85. package/lib/components/PolarChart/PolarChart.types.js +2 -0
  86. package/lib/components/PolarChart/PolarChart.types.js.map +1 -0
  87. package/lib/components/PolarChart/PolarChart.utils.d.ts +43 -0
  88. package/lib/components/PolarChart/PolarChart.utils.js +180 -0
  89. package/lib/components/PolarChart/PolarChart.utils.js.map +1 -0
  90. package/lib/components/PolarChart/index.d.ts +2 -0
  91. package/lib/components/PolarChart/index.js +3 -0
  92. package/lib/components/PolarChart/index.js.map +1 -0
  93. package/lib/components/SankeyChart/SankeyChart.base.js +10 -3
  94. package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
  95. package/lib/components/SankeyChart/SankeyChart.styles.js +3 -0
  96. package/lib/components/SankeyChart/SankeyChart.styles.js.map +1 -1
  97. package/lib/components/SankeyChart/SankeyChart.types.d.ts +18 -0
  98. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  99. package/lib/components/ScatterChart/ScatterChart.base.js +14 -32
  100. package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -1
  101. package/lib/components/ScatterChart/ScatterChart.types.d.ts +4 -0
  102. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  103. package/lib/components/VerticalBarChart/VerticalBarChart.base.d.ts +0 -1
  104. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +12 -80
  105. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  106. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +0 -1
  107. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +19 -31
  108. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  109. package/lib/index.d.ts +2 -0
  110. package/lib/index.js +1 -0
  111. package/lib/index.js.map +1 -1
  112. package/lib/types/IDataPoint.d.ts +107 -0
  113. package/lib/types/IDataPoint.js.map +1 -1
  114. package/lib/utilities/ChartTitle.d.ts +55 -0
  115. package/lib/utilities/ChartTitle.js +45 -0
  116. package/lib/utilities/ChartTitle.js.map +1 -0
  117. package/lib/utilities/Common.styles.d.ts +51 -0
  118. package/lib/utilities/Common.styles.js +70 -1
  119. package/lib/utilities/Common.styles.js.map +1 -1
  120. package/lib/utilities/image-export-utils.js +4 -4
  121. package/lib/utilities/image-export-utils.js.map +1 -1
  122. package/lib/utilities/index.d.ts +1 -0
  123. package/lib/utilities/index.js +1 -0
  124. package/lib/utilities/index.js.map +1 -1
  125. package/lib/utilities/utilities.d.ts +32 -8
  126. package/lib/utilities/utilities.js +232 -111
  127. package/lib/utilities/utilities.js.map +1 -1
  128. package/lib-amd/PolarChart.d.ts +1 -0
  129. package/lib-amd/PolarChart.js +6 -0
  130. package/lib-amd/PolarChart.js.map +1 -0
  131. package/lib-amd/components/AnnotationOnlyChart/AnnotationOnlyChart.js +1 -1
  132. package/lib-amd/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
  133. package/lib-amd/components/AreaChart/AreaChart.base.d.ts +0 -1
  134. package/lib-amd/components/AreaChart/AreaChart.base.js +1 -29
  135. package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
  136. package/lib-amd/components/ChartTable/ChartTable.base.js +12 -5
  137. package/lib-amd/components/ChartTable/ChartTable.base.js.map +1 -1
  138. package/lib-amd/components/ChartTable/ChartTable.styles.js +3 -1
  139. package/lib-amd/components/ChartTable/ChartTable.styles.js.map +1 -1
  140. package/lib-amd/components/ChartTable/ChartTable.types.d.ts +11 -0
  141. package/lib-amd/components/ChartTable/ChartTable.types.js.map +1 -1
  142. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.js +11 -6
  143. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
  144. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.d.ts +1 -0
  145. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js +17 -1
  146. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js.map +1 -1
  147. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.types.d.ts +5 -0
  148. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -1
  149. package/lib-amd/components/CommonComponents/CartesianChart.base.d.ts +1 -1
  150. package/lib-amd/components/CommonComponents/CartesianChart.base.js +81 -41
  151. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  152. package/lib-amd/components/CommonComponents/CartesianChart.styles.js +30 -26
  153. package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  154. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +20 -1
  155. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  156. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +22 -28
  157. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  158. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +3 -1
  159. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +392 -269
  160. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  161. package/lib-amd/components/DonutChart/DonutChart.base.d.ts +1 -0
  162. package/lib-amd/components/DonutChart/DonutChart.base.js +15 -3
  163. package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
  164. package/lib-amd/components/DonutChart/DonutChart.styles.js +2 -0
  165. package/lib-amd/components/DonutChart/DonutChart.styles.js.map +1 -1
  166. package/lib-amd/components/DonutChart/DonutChart.types.d.ts +13 -0
  167. package/lib-amd/components/DonutChart/DonutChart.types.js.map +1 -1
  168. package/lib-amd/components/DonutChart/Pie/Pie.js +4 -2
  169. package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -1
  170. package/lib-amd/components/FunnelChart/FunnelChart.base.js +14 -9
  171. package/lib-amd/components/FunnelChart/FunnelChart.base.js.map +1 -1
  172. package/lib-amd/components/FunnelChart/FunnelChart.styles.js +3 -1
  173. package/lib-amd/components/FunnelChart/FunnelChart.styles.js.map +1 -1
  174. package/lib-amd/components/FunnelChart/FunnelChart.types.d.ts +13 -0
  175. package/lib-amd/components/FunnelChart/FunnelChart.types.js.map +1 -1
  176. package/lib-amd/components/GaugeChart/GaugeChart.base.js +1 -1
  177. package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
  178. package/lib-amd/components/GaugeChart/GaugeChart.styles.js +16 -23
  179. package/lib-amd/components/GaugeChart/GaugeChart.styles.js.map +1 -1
  180. package/lib-amd/components/GaugeChart/GaugeChart.types.d.ts +9 -0
  181. package/lib-amd/components/GaugeChart/GaugeChart.types.js.map +1 -1
  182. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +0 -1
  183. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +4 -16
  184. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  185. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +2 -0
  186. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +54 -4
  187. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  188. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js +12 -2
  189. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -1
  190. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +9 -0
  191. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  192. package/lib-amd/components/LineChart/LineChart.base.d.ts +0 -1
  193. package/lib-amd/components/LineChart/LineChart.base.js +1 -25
  194. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  195. package/lib-amd/components/PolarChart/PolarChart.base.d.ts +3 -0
  196. package/lib-amd/components/PolarChart/PolarChart.base.js +421 -0
  197. package/lib-amd/components/PolarChart/PolarChart.base.js.map +1 -0
  198. package/lib-amd/components/PolarChart/PolarChart.d.ts +7 -0
  199. package/lib-amd/components/PolarChart/PolarChart.js +11 -0
  200. package/lib-amd/components/PolarChart/PolarChart.js.map +1 -0
  201. package/lib-amd/components/PolarChart/PolarChart.styles.d.ts +2 -0
  202. package/lib-amd/components/PolarChart/PolarChart.styles.js +43 -0
  203. package/lib-amd/components/PolarChart/PolarChart.styles.js.map +1 -0
  204. package/lib-amd/components/PolarChart/PolarChart.types.d.ts +185 -0
  205. package/lib-amd/components/PolarChart/PolarChart.types.js +5 -0
  206. package/lib-amd/components/PolarChart/PolarChart.types.js.map +1 -0
  207. package/lib-amd/components/PolarChart/PolarChart.utils.d.ts +43 -0
  208. package/lib-amd/components/PolarChart/PolarChart.utils.js +183 -0
  209. package/lib-amd/components/PolarChart/PolarChart.utils.js.map +1 -0
  210. package/lib-amd/components/PolarChart/index.d.ts +2 -0
  211. package/lib-amd/components/PolarChart/index.js +7 -0
  212. package/lib-amd/components/PolarChart/index.js.map +1 -0
  213. package/lib-amd/components/SankeyChart/SankeyChart.base.js +10 -4
  214. package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
  215. package/lib-amd/components/SankeyChart/SankeyChart.styles.js +3 -1
  216. package/lib-amd/components/SankeyChart/SankeyChart.styles.js.map +1 -1
  217. package/lib-amd/components/SankeyChart/SankeyChart.types.d.ts +18 -0
  218. package/lib-amd/components/SankeyChart/SankeyChart.types.js.map +1 -1
  219. package/lib-amd/components/ScatterChart/ScatterChart.base.js +13 -31
  220. package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -1
  221. package/lib-amd/components/ScatterChart/ScatterChart.types.d.ts +4 -0
  222. package/lib-amd/components/ScatterChart/ScatterChart.types.js.map +1 -1
  223. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.d.ts +0 -1
  224. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +12 -79
  225. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  226. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +0 -1
  227. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +19 -30
  228. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  229. package/lib-amd/index.d.ts +2 -0
  230. package/lib-amd/index.js +3 -2
  231. package/lib-amd/index.js.map +1 -1
  232. package/lib-amd/types/IDataPoint.d.ts +107 -0
  233. package/lib-amd/types/IDataPoint.js.map +1 -1
  234. package/lib-amd/utilities/ChartTitle.d.ts +55 -0
  235. package/lib-amd/utilities/ChartTitle.js +46 -0
  236. package/lib-amd/utilities/ChartTitle.js.map +1 -0
  237. package/lib-amd/utilities/Common.styles.d.ts +51 -0
  238. package/lib-amd/utilities/Common.styles.js +74 -2
  239. package/lib-amd/utilities/Common.styles.js.map +1 -1
  240. package/lib-amd/utilities/image-export-utils.js +3 -3
  241. package/lib-amd/utilities/image-export-utils.js.map +1 -1
  242. package/lib-amd/utilities/index.d.ts +1 -0
  243. package/lib-amd/utilities/index.js +2 -1
  244. package/lib-amd/utilities/index.js.map +1 -1
  245. package/lib-amd/utilities/utilities.d.ts +32 -8
  246. package/lib-amd/utilities/utilities.js +239 -114
  247. package/lib-amd/utilities/utilities.js.map +1 -1
  248. package/lib-commonjs/PolarChart.d.ts +1 -0
  249. package/lib-commonjs/PolarChart.js +5 -0
  250. package/lib-commonjs/PolarChart.js.map +1 -0
  251. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +1 -1
  252. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
  253. package/lib-commonjs/components/AreaChart/AreaChart.base.d.ts +0 -1
  254. package/lib-commonjs/components/AreaChart/AreaChart.base.js +0 -29
  255. package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
  256. package/lib-commonjs/components/ChartTable/ChartTable.base.js +12 -4
  257. package/lib-commonjs/components/ChartTable/ChartTable.base.js.map +1 -1
  258. package/lib-commonjs/components/ChartTable/ChartTable.styles.js +3 -0
  259. package/lib-commonjs/components/ChartTable/ChartTable.styles.js.map +1 -1
  260. package/lib-commonjs/components/ChartTable/ChartTable.types.d.ts +11 -0
  261. package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +1 -1
  262. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +11 -6
  263. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
  264. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.d.ts +1 -0
  265. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js +17 -1
  266. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js.map +1 -1
  267. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.d.ts +5 -0
  268. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -1
  269. package/lib-commonjs/components/CommonComponents/CartesianChart.base.d.ts +1 -1
  270. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +81 -41
  271. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  272. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js +30 -26
  273. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  274. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +20 -1
  275. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  276. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +23 -27
  277. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  278. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +3 -1
  279. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +392 -269
  280. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  281. package/lib-commonjs/components/DonutChart/DonutChart.base.d.ts +1 -0
  282. package/lib-commonjs/components/DonutChart/DonutChart.base.js +15 -3
  283. package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
  284. package/lib-commonjs/components/DonutChart/DonutChart.styles.js +2 -0
  285. package/lib-commonjs/components/DonutChart/DonutChart.styles.js.map +1 -1
  286. package/lib-commonjs/components/DonutChart/DonutChart.types.d.ts +13 -0
  287. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  288. package/lib-commonjs/components/DonutChart/Pie/Pie.js +4 -2
  289. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  290. package/lib-commonjs/components/FunnelChart/FunnelChart.base.js +14 -8
  291. package/lib-commonjs/components/FunnelChart/FunnelChart.base.js.map +1 -1
  292. package/lib-commonjs/components/FunnelChart/FunnelChart.styles.js +3 -0
  293. package/lib-commonjs/components/FunnelChart/FunnelChart.styles.js.map +1 -1
  294. package/lib-commonjs/components/FunnelChart/FunnelChart.types.d.ts +13 -0
  295. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -1
  296. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +1 -1
  297. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
  298. package/lib-commonjs/components/GaugeChart/GaugeChart.styles.js +16 -22
  299. package/lib-commonjs/components/GaugeChart/GaugeChart.styles.js.map +1 -1
  300. package/lib-commonjs/components/GaugeChart/GaugeChart.types.d.ts +9 -0
  301. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  302. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +0 -1
  303. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +4 -16
  304. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  305. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +2 -0
  306. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +54 -4
  307. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  308. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js +12 -1
  309. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.styles.js.map +1 -1
  310. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +9 -0
  311. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  312. package/lib-commonjs/components/LineChart/LineChart.base.d.ts +0 -1
  313. package/lib-commonjs/components/LineChart/LineChart.base.js +1 -25
  314. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  315. package/lib-commonjs/components/PolarChart/PolarChart.base.d.ts +3 -0
  316. package/lib-commonjs/components/PolarChart/PolarChart.base.js +429 -0
  317. package/lib-commonjs/components/PolarChart/PolarChart.base.js.map +1 -0
  318. package/lib-commonjs/components/PolarChart/PolarChart.d.ts +7 -0
  319. package/lib-commonjs/components/PolarChart/PolarChart.js +12 -0
  320. package/lib-commonjs/components/PolarChart/PolarChart.js.map +1 -0
  321. package/lib-commonjs/components/PolarChart/PolarChart.styles.d.ts +2 -0
  322. package/lib-commonjs/components/PolarChart/PolarChart.styles.js +43 -0
  323. package/lib-commonjs/components/PolarChart/PolarChart.styles.js.map +1 -0
  324. package/lib-commonjs/components/PolarChart/PolarChart.types.d.ts +185 -0
  325. package/lib-commonjs/components/PolarChart/PolarChart.types.js +3 -0
  326. package/lib-commonjs/components/PolarChart/PolarChart.types.js.map +1 -0
  327. package/lib-commonjs/components/PolarChart/PolarChart.utils.d.ts +43 -0
  328. package/lib-commonjs/components/PolarChart/PolarChart.utils.js +188 -0
  329. package/lib-commonjs/components/PolarChart/PolarChart.utils.js.map +1 -0
  330. package/lib-commonjs/components/PolarChart/index.d.ts +2 -0
  331. package/lib-commonjs/components/PolarChart/index.js +6 -0
  332. package/lib-commonjs/components/PolarChart/index.js.map +1 -0
  333. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js +10 -3
  334. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
  335. package/lib-commonjs/components/SankeyChart/SankeyChart.styles.js +3 -0
  336. package/lib-commonjs/components/SankeyChart/SankeyChart.styles.js.map +1 -1
  337. package/lib-commonjs/components/SankeyChart/SankeyChart.types.d.ts +18 -0
  338. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  339. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +13 -31
  340. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -1
  341. package/lib-commonjs/components/ScatterChart/ScatterChart.types.d.ts +4 -0
  342. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  343. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.d.ts +0 -1
  344. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +11 -79
  345. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  346. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +0 -1
  347. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +18 -30
  348. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  349. package/lib-commonjs/index.d.ts +2 -0
  350. package/lib-commonjs/index.js +3 -1
  351. package/lib-commonjs/index.js.map +1 -1
  352. package/lib-commonjs/types/IDataPoint.d.ts +107 -0
  353. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  354. package/lib-commonjs/utilities/ChartTitle.d.ts +55 -0
  355. package/lib-commonjs/utilities/ChartTitle.js +49 -0
  356. package/lib-commonjs/utilities/ChartTitle.js.map +1 -0
  357. package/lib-commonjs/utilities/Common.styles.d.ts +51 -0
  358. package/lib-commonjs/utilities/Common.styles.js +74 -2
  359. package/lib-commonjs/utilities/Common.styles.js.map +1 -1
  360. package/lib-commonjs/utilities/image-export-utils.js +3 -3
  361. package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
  362. package/lib-commonjs/utilities/index.d.ts +1 -0
  363. package/lib-commonjs/utilities/index.js +1 -0
  364. package/lib-commonjs/utilities/index.js.map +1 -1
  365. package/lib-commonjs/utilities/utilities.d.ts +32 -8
  366. package/lib-commonjs/utilities/utilities.js +239 -114
  367. package/lib-commonjs/utilities/utilities.js.map +1 -1
  368. package/package.json +4 -12
  369. package/project.json +0 -1
  370. package/src/components/ChartTable/ChartTable.types.ts +13 -0
  371. package/src/components/CommonComponents/Annotations/ChartAnnotationLayer.types.ts +5 -0
  372. package/src/components/CommonComponents/CartesianChart.types.ts +22 -1
  373. package/src/components/DonutChart/DonutChart.types.ts +16 -0
  374. package/src/components/FunnelChart/FunnelChart.types.ts +16 -0
  375. package/src/components/GaugeChart/GaugeChart.types.ts +11 -0
  376. package/src/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.ts +11 -0
  377. package/src/components/PolarChart/PolarChart.types.ts +232 -0
  378. package/src/components/SankeyChart/SankeyChart.types.ts +22 -0
  379. package/src/components/ScatterChart/ScatterChart.types.ts +5 -0
@@ -195,6 +195,11 @@ export interface IVerticalBarChartDataPoint {
195
195
  * Accessibility data for callout
196
196
  */
197
197
  callOutAccessibilityData?: IAccessibilityProps;
198
+ /**
199
+ * Label to display on the bar
200
+ * This is an optional prop that can be used to show custom text on bars
201
+ */
202
+ barLabel?: string;
198
203
  }
199
204
  /**
200
205
  * {@docCategory IChartData}
@@ -233,6 +238,10 @@ export interface IHorizontalBarChartWithAxisDataPoint {
233
238
  * This is an optional prop, If haven't given data will take
234
239
  */
235
240
  yAxisCalloutData?: string;
241
+ /**
242
+ * Label to display on the bar
243
+ */
244
+ barLabel?: string;
236
245
  /**
237
246
  * onClick action for each datapoint in the chart
238
247
  */
@@ -500,6 +509,7 @@ interface ISLinkExtra {
500
509
  */
501
510
  value: number;
502
511
  unnormalizedValue?: number;
512
+ color?: string;
503
513
  }
504
514
  export type SNode = SankeyNode<ISNodeExtra, ISLinkExtra>;
505
515
  export type SLink = SankeyLink<ISNodeExtra, ISLinkExtra>;
@@ -555,6 +565,11 @@ export interface IVSChartDataPoint {
555
565
  * Accessibility data for callout
556
566
  */
557
567
  callOutAccessibilityData?: IAccessibilityProps;
568
+ /**
569
+ * Label to display on the bar
570
+ * This is an optional prop that can be used to show custom text on bars
571
+ */
572
+ barLabel?: string;
558
573
  }
559
574
  /**
560
575
  * {@docCategory IChartProps}
@@ -652,6 +667,10 @@ export interface IGVBarChartSeriesPoint {
652
667
  * Accessibility data for callout
653
668
  */
654
669
  callOutAccessibilityData?: IAccessibilityProps;
670
+ /**
671
+ * Label to display on the bar
672
+ */
673
+ barLabel?: string;
655
674
  /**
656
675
  * Whether to use the secondary y scale or not
657
676
  * False by default.
@@ -1064,4 +1083,92 @@ export interface ILineSeries<X extends string | number | Date, Y extends string
1064
1083
  */
1065
1084
  onLineClick?: () => void;
1066
1085
  }
1086
+ /**
1087
+ * Represents a single data point in a polar series.
1088
+ */
1089
+ export interface IPolarDataPoint {
1090
+ /**
1091
+ * Radial value of the data point.
1092
+ */
1093
+ r: string | number | Date;
1094
+ /**
1095
+ * Angular value of the data point, specified as a category or in degrees.
1096
+ */
1097
+ theta: string | number;
1098
+ /**
1099
+ * Optional click handler for the data point.
1100
+ */
1101
+ onClick?: () => void;
1102
+ /**
1103
+ * Custom text to show in the callout in place of the radial axis value.
1104
+ */
1105
+ radialAxisCalloutData?: string;
1106
+ /**
1107
+ * Custom text to show in the callout in place of the angular axis value.
1108
+ */
1109
+ angularAxisCalloutData?: string;
1110
+ /**
1111
+ * Accessibility properties for the data point.
1112
+ */
1113
+ callOutAccessibilityData?: IAccessibilityProps;
1114
+ /**
1115
+ * Custom marker size for the data point.
1116
+ */
1117
+ markerSize?: number;
1118
+ /**
1119
+ * Optional text to annotate or label the data point.
1120
+ */
1121
+ text?: string;
1122
+ /**
1123
+ * Color of the data point. If not provided, it will inherit the series color.
1124
+ */
1125
+ color?: string;
1126
+ }
1127
+ /**
1128
+ * Represents a scatterpolar series.
1129
+ */
1130
+ export interface IScatterPolarSeries extends IDataSeries {
1131
+ /**
1132
+ * Type discriminator: always 'scatterpolar' for this series.
1133
+ */
1134
+ type: 'scatterpolar';
1135
+ /**
1136
+ * Array of data points for the series.
1137
+ */
1138
+ data: IPolarDataPoint[];
1139
+ }
1140
+ /**
1141
+ * Represents a linepolar series.
1142
+ */
1143
+ export interface ILinePolarSeries extends IDataSeries {
1144
+ /**
1145
+ * Type discriminator: always 'linepolar' for this series.
1146
+ */
1147
+ type: 'linepolar';
1148
+ /**
1149
+ * Array of data points for the series.
1150
+ */
1151
+ data: IPolarDataPoint[];
1152
+ /**
1153
+ * Additional line rendering options (e.g., stroke width, curve type).
1154
+ */
1155
+ lineOptions?: ILineChartLineOptions;
1156
+ }
1157
+ /**
1158
+ * Represents a areapolar series.
1159
+ */
1160
+ export interface IAreaPolarSeries extends IDataSeries {
1161
+ /**
1162
+ * Type discriminator: always 'areapolar' for this series.
1163
+ */
1164
+ type: 'areapolar';
1165
+ /**
1166
+ * Array of data points for the series.
1167
+ */
1168
+ data: IPolarDataPoint[];
1169
+ /**
1170
+ * Additional line rendering options (e.g., stroke width, curve type).
1171
+ */
1172
+ lineOptions?: ILineChartLineOptions;
1173
+ }
1067
1174
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"IDataPoint.js","sourceRoot":"../src/","sources":["types/IDataPoint.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { SankeyLink, SankeyNode } from 'd3-sankey';\nimport { LegendShape } from '../components/Legends/Legends.types';\nimport { CurveFactory } from 'd3-shape';\n\nexport interface IBasestate {\n _width?: number;\n _height?: number;\n activeLegend?: string;\n color?: string;\n dataForHoverCard?: number | string;\n isCalloutVisible: boolean;\n isLegendSelected?: boolean;\n isLegendHovered?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n refSelected?: any;\n YValueHover?: { legend?: string; y?: number | string; color?: string }[];\n hoverYValue?: string | number | null;\n hoverXValue?: string | number | null;\n xCalloutValue?: string;\n yCalloutValue?: string;\n lineColor?: string;\n hoveredLineColor?: string;\n selectedLegend?: string;\n containerWidth?: number;\n containerHeight?: number;\n}\n\nexport interface IRefArrayData {\n index?: string;\n refElement?: SVGGElement;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IMargins {\n /**\n * left margin for the chart.\n */\n left?: number;\n /**\n * Right margin for the chart.\n */\n right?: number;\n /**\n * Top margin for the chart.\n */\n top?: number;\n /**\n * Bottom margin for the chart.\n */\n bottom?: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n // NOTE: VerticalStackedBarChart, PieChart\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVerticalStackedBarDataPoint extends Omit<IDataPoint, 'x'> {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n * If data type on x is Date, then the data is spaced evenly by d3-scale.\n */\n x: number | string | Date;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IChartDataPoint {\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * data the datapoint in the chart\n */\n data?: number;\n\n /**\n * data the datapoint in the chart\n */\n horizontalBarChartdata?: IHorizontalDataPoint;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Color for the legend in the chart. If not provided, it will fallback on the default color palette.\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * placeholder data point\n */\n placeHolder?: boolean;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVerticalBarChartDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string | Date;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * data to render the line along with bars\n */\n lineData?: ILineDataInVerticalBarChart;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalBarChartWithAxisDataPoint {\n /**\n * Dependent value of the data point, rendered along the x-axis.\n */\n x: number;\n\n /**\n * Independent value of the data point, rendered along the y-axis.\n * If y is a number, then each y-coordinate is plotted at its y-coordinate.\n * If y is a string, then the data is evenly spaced along the y-axis.\n */\n y: number | string;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalBarChart {\n y: IVerticalBarChartDataPoint['y'];\n yAxisCalloutData?: string | undefined;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IBaseDataPoint {\n /**\n * Defines the function that is executed on clicking line\n */\n onDataPointClick?: () => void;\n\n /**\n * Callout data for x axis\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n */\n yAxisCalloutData?: string | { [id: string]: number };\n\n /**\n * Whether to hide callout data for the point.\n */\n hideCallout?: boolean;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n\n /**\n * X axis Accessibility data for callout\n */\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n\n /**\n * Marker size of the points\n */\n markerSize?: number;\n\n /**\n * text labels of marker points\n */\n text?: string;\n\n /**\n * Per-point marker color (overrides series color when present)\n */\n markerColor?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartDataPoint extends IBaseDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If data type on x is Date, then the data is spaced evenly by d3-scale\n */\n x: number | Date;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartGap {\n /**\n * Starting index of the gap.\n */\n startIndex: number;\n\n /**\n * Ending index of the gap.\n */\n endIndex: number;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface ILineChartLineOptions extends React.SVGProps<SVGPathElement> {\n /**\n * Width of the line/stroke.\n * Overrides the strokeWidth set on ICartesianChartProps level.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-width\n */\n strokeWidth?: number | string;\n\n /**\n * Pattern of dashes and gaps.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray\n */\n strokeDasharray?: string | number;\n\n /**\n * Offset on rendering of stroke dash array.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dashoffset\n */\n strokeDashoffset?: string | number;\n\n /**\n * Shape at the end of a subpath.\n * Default round.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linecap\n */\n strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit';\n\n /**\n * Width of border around the line. Default no border.\n */\n lineBorderWidth?: string | number;\n\n /**\n * Color of border around the line. Default white.\n */\n lineBorderColor?: string;\n\n /**\n * Defines the type of interpolation used to render the line.\n * @default 'linear'\n */\n curve?: 'linear' | 'natural' | 'step' | 'stepAfter' | 'stepBefore' | CurveFactory;\n\n /**\n * Defines the mode of points to be rendered.\n */\n mode?:\n | 'lines'\n | 'markers'\n | 'text'\n | 'lines+markers'\n | 'text+markers'\n | 'text+lines'\n | 'text+lines+markers'\n | 'none'\n | 'gauge'\n | 'number'\n | 'delta'\n | 'number+delta'\n | 'gauge+number'\n | 'gauge+number+delta'\n | 'gauge+delta'\n | 'markers+text'\n | 'lines+text'\n | 'lines+markers+text';\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartPoints {\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * The shape for the legend\n * default: show the rect legend\n */\n legendShape?: LegendShape;\n\n /**\n * dataPoints for the line chart\n */\n data: ILineChartDataPoint[];\n\n /**\n * gaps in the line chart where a line is not drawn\n */\n gaps?: ILineChartGap[];\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * opacity for chart fill color\n */\n opacity?: number;\n\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\n\n /**\n * hide dots for points that are not active\n */\n hideNonActiveDots?: boolean;\n\n /**\n * Defines the function that is executed on clicking this legend\n */\n onLegendClick?: (selectedLegend: string | null | string[]) => void;\n\n /**\n * Defines the function that is executed on clicking line\n */\n onLineClick?: () => void;\n\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IChartProps {\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * Accessibility data for chart title\n */\n chartTitleAccessibilityData?: IAccessibilityProps;\n /**\n * data for the points in the chart\n */\n chartData?: IChartDataPoint[];\n\n /**\n * Accessibility data for chart data\n */\n chartDataAccessibilityData?: IAccessibilityProps;\n\n /**\n * data for the points in the line chart\n */\n lineChartData?: ILineChartPoints[];\n\n /**\n * data for the points in the scatter chart\n */\n scatterChartData?: IScatterChartPoints[];\n\n /**\n * data for the points in the line chart\n */\n SankeyChartData?: ISankeyChartData;\n\n /**\n * data for the points in the line chart\n */\n pointOptions?: React.SVGProps<SVGCircleElement>;\n\n /**\n * data for the dotted line on hovering the point\n */\n pointLineOptions?: React.SVGProps<SVGLineElement>;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ISankeyChartData {\n nodes: SNode[];\n links: SLink[];\n}\n\ninterface ISNodeExtra {\n /**\n * A unique identifier for this node.\n */\n nodeId: number | string;\n /**\n * The display name for this node in the UX.\n */\n name: string;\n color?: string;\n borderColor?: string;\n actualValue?: number;\n layer?: number;\n}\n\ninterface ISLinkExtra {\n /**\n * The index within `ISankeyChartData.nodes` of the source node.\n */\n source: number;\n /**\n * The index within `ISankeyChartData.nodes` of the target node.\n */\n target: number;\n /**\n * The weight of this link between the two nodes.\n */\n value: number;\n unnormalizedValue?: number;\n}\n\nexport type SNode = SankeyNode<ISNodeExtra, ISLinkExtra>;\nexport type SLink = SankeyLink<ISNodeExtra, ISLinkExtra>;\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IAccessibilityProps {\n /**\n * Accessibility aria-label\n */\n ariaLabel?: string;\n\n /**\n * Accessibility aria-labelledBy\n */\n ariaLabelledBy?: string;\n\n /**\n * Accessibility aria-describedBy\n */\n ariaDescribedBy?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVSChartDataPoint {\n /**\n * data the datapoint in the chart\n */\n data: number | string;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IVerticalStackedChartProps {\n /**\n * data for the points in the chart\n */\n chartData: IVSChartDataPoint[];\n\n /**\n * Data for x axis label for multistacked Vertical bar chart\n */\n xAxisPoint: number | string | Date;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven't given, legend will take\n */\n xAxisCalloutData?: string;\n /**\n * line data to render lines on stacked bar chart\n */\n lineData?: ILineDataInVerticalStackedBarChart[];\n /**\n * Accessibility data for Whole stack callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalStackedBarChart {\n y: number | string;\n color: string;\n legend: string;\n /**\n * The shape for the legend\n * default: show the rect legend\n */\n legendShape?: LegendShape;\n /**\n * Data to show in callout\n */\n data?: number | string;\n yAxisCalloutData?: string;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGVBarChartSeriesPoint {\n /**\n * Text for // need to check use of this\n */\n key: string;\n\n /**\n * Data for bar height of Grouped vertical bar chart\n */\n data: number;\n\n /**\n * Color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Legend text in the chart\n */\n legend: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGroupedVerticalBarChartData {\n /**\n * Data for X axis label\n */\n name: string;\n\n /**\n * Data points for Grouped vertical bar chart\n */\n series: IGVBarChartSeriesPoint[];\n\n /**\n * Accessibility data for Group Bars Stack Callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\nexport interface IGVDataPoint {\n /**\n * This interface used for - While forming datapoints from given prop \"data\" in code\n * datapoints are used for to draw graph\n */\n [key: string]: number | string;\n}\n\nexport interface IGVSingleDataPoint {\n /**\n * While forming datapoints from given prop \"data\" in code.\n * These datapoints are used for to draw graph easily.\n */\n [key: string]: IGVDataPoint;\n}\n\nexport interface IGVForBarChart {\n /**\n * While forming datapoints from given prop \"data\"\n * These datapoints are used for to draw graph.\n */\n [key: string]: IGVBarChartSeriesPoint;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartDataPoint {\n x: string | Date | number;\n y: string | Date | number;\n value: number;\n /**\n * The value/ text to be rendered in the rectange\n */\n rectText?: string | number;\n /**\n * denomination to show in the callout\n */\n ratio?: [number, number];\n /**\n * description message to the callout\n */\n descriptionMessage?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartData {\n /**\n * name of the legend\n */\n legend: string;\n data: IHeatMapChartDataPoint[];\n /**\n * This number will be used to get the color for the legend\n */\n value: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutDataPoint {\n legend: string;\n y: number;\n color: string;\n xAxisCalloutData?: string;\n yAxisCalloutData?: string | { [id: string]: number };\n}\n\n/**\n * Used for custom callout data interface. As Area chart callout data will be prepared from given props.data,\n * Those required data passing to onRenderCalloutPerDataPoint and onRenderCalloutPerStack.\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutData {\n x: number | string | Date;\n values: ICustomizedCalloutDataPoint[];\n}\n\n/**\n * {@docCategory Chart}\n */\nexport interface IChart {\n chartContainer: HTMLElement | null;\n toImage?: (opts?: IImageExportOptions) => Promise<string>;\n}\n\n/**\n * {@docCategory Chart}\n */\nexport interface IImageExportOptions {\n width?: number;\n height?: number;\n scale?: number;\n background?: string;\n}\n\n/**\n * {@docCategory IChartData}\n * ScatterChartDataPoint interface.\n */\nexport interface IScatterChartDataPoint extends IBaseDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n */\n x: number | Date | string;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IScatterChartPoints {\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * The shape for the legend\n * default: show the rect legend\n */\n legendShape?: LegendShape;\n\n /**\n * dataPoints for the line chart\n */\n data: IScatterChartDataPoint[];\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * opacity for chart fill color\n */\n opacity?: number;\n\n /**\n * hide dots for points that are not active\n */\n hideNonActiveDots?: boolean;\n\n /**\n * Defines the function that is executed on clicking this legend\n */\n onLegendClick?: (selectedLegend: string | null | string[]) => void;\n\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * Specifies the ordering options for axis categories in Cartesian charts.\n *\n * - `'default'`: Uses the original order before custom ordering was supported.\n * In some charts, this behaves the same as `'data'`.\n * - `'data'`: Preserves the order of categories as provided in the input data.\n * - `string[]`: Explicitly defines the custom order of categories as an array of category names.\n * - `'category ascending' | 'category descending'`: Orders categories alphanumerically.\n * - `'total ascending' | 'total descending'`: Orders categories by the total of their associated values.\n * - `'min ascending' | 'min descending'`: Orders by the minimum value within each category.\n * - `'max ascending' | 'max descending'`: Orders by the maximum value within each category.\n * - `'sum ascending' | 'sum descending'`: Orders by the sum of values for each category (same as 'total').\n * - `'mean ascending' | 'mean descending'`: Orders by the average of values in each category.\n * - `'median ascending' | 'median descending'`: Orders by the median value of each category.\n *\n * {@docCategory CartesianChart}\n */\nexport type AxisCategoryOrder =\n | 'default'\n | 'data'\n | string[]\n | 'category ascending'\n | 'category descending'\n | 'total ascending'\n | 'total descending'\n | 'min ascending'\n | 'min descending'\n | 'max ascending'\n | 'max descending'\n | 'sum ascending'\n | 'sum descending'\n | 'mean ascending'\n | 'mean descending'\n | 'median ascending'\n | 'median descending';\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGanttChartDataPoint {\n /**\n * Dependent value of the data point, rendered along the x-axis.\n * `start` and `end` represent the beginning and end of the data point.\n */\n x: {\n start: Date | number;\n end: Date | number;\n };\n\n /**\n * Independent value of the data point, rendered along the y-axis.\n * If y is a number, then each y-coordinate is plotted at its y-coordinate.\n * If y is a string, then the data is evenly spaced along the y-axis.\n */\n y: number | string;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Optional label shown in place of `x` in the callout.\n */\n xAxisCalloutData?: string;\n\n /**\n * Optional label shown in place of `y` in the callout.\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * Available scale types for axes.\n *\n * - `'default'`: Uses an automatic scale (linear, band, or time) based on axis data type.\n * - `'log'`: Uses a logarithmic scale. Only supported for numeric axes in LineChart and ScatterChart.\n *\n * {@docCategory CartesianChart}\n */\nexport type AxisScaleType = 'default' | 'log';\n\n/**\n * Configuration options for an axis.\n *\n * {@docCategory CartesianChart}\n */\nexport type AxisProps = {\n /**\n * Defines the step between tick marks on the axis.\n * Works in combination with `tick0`.\n * Must be a positive number.\n *\n * - **Log scale**:\n * - Ticks are placed at `10^(n * tickStep)` where `n` is the tick index.\n * - Example: `tickStep = 2` → ticks at 1, 100, 10,000...\n * - Example: `tickStep = log10(5)` → ticks at 1, 5, 25, 125...\n * - Special format `\"L<f>\"`: Creates ticks that are linearly spaced in value (not position).\n * - Example: `tick0 = 0.1`, `tickStep = \"L0.5\"` → ticks at 0.1, 0.6, 1.1, 1.6...\n *\n * - **Date axis**:\n * - Must be in milliseconds.\n * - Example: one day = `tickStep = 86400000`.\n * - Special format `\"M<n>\"`: Places ticks every `n` months.\n * - Example: `tick0 = \"2000-01-15\"`, `tickStep = \"M3\"` → ticks on the 15th every third month.\n * - Example: `tickStep = \"M48\"` → ticks every 4 years.\n */\n tickStep?: number | string;\n\n /**\n * Sets the reference value for axis ticks.\n * Works in combination with `tickStep`.\n *\n * - **Log scale**:\n * - `tick0` must be given as the logarithm of the reference tick.\n * - Example: to align ticks with 100, use `tick0 = 2`.\n * - Exception: when `tickStep` uses `\"L<f>\"`, you can specify the raw value directly.\n */\n tick0?: number | Date;\n\n /**\n * Sets the text displayed at each tick position specified by `tickValues`. Used with `tickValues`.\n */\n tickText?: string[];\n};\n\n/**\n * Represents a single data point in a series.\n */\nexport interface IDataPointV2<X extends string | number | Date, Y extends string | number | Date> {\n /**\n * X-axis value of the data point.\n */\n x: X;\n\n /**\n * Y-axis value of the data point.\n */\n y: Y;\n\n /**\n * Optional click handler for the data point.\n */\n onClick?: () => void;\n\n /**\n * Custom text to show in the callout in place of the x-axis value.\n */\n xAxisCalloutData?: string;\n\n /**\n * Custom text to show in the callout in place of the y-axis value.\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility properties for the data point.\n */\n callOutAccessibilityData?: IAccessibilityProps;\n\n /**\n * Custom marker size for the data point.\n */\n markerSize?: number;\n\n /**\n * Optional text to annotate or label the data point.\n */\n text?: string;\n\n /**\n * Color of the data point. If not provided, it will inherit the series color.\n */\n color?: string;\n}\n\n/**\n * Base interface for a series.\n */\nexport interface IDataSeries {\n /**\n * Name of the series to be displayed in the legend.\n */\n legend: string;\n\n /**\n * Shape used in the legend (e.g., circle, square).\n */\n legendShape?: LegendShape;\n\n /**\n * Color of the series.\n */\n color?: string;\n\n /**\n * Opacity of the series.\n */\n opacity?: number;\n\n /**\n * Gradient fill for the series (start and end colors).\n */\n gradient?: [string, string];\n\n /**\n * Whether this series should be plotted against a secondary Y-axis.\n */\n useSecondaryYScale?: boolean;\n\n /**\n * Callback invoked when the legend item is clicked.\n */\n onLegendClick?: (selectedLegend: string | null | string[]) => void;\n}\n\n/**\n * Represents a bar series.\n */\nexport interface IBarSeries<X extends string | number | Date, Y extends string | number | Date> extends IDataSeries {\n /**\n * Type discriminator: always 'bar' for this series.\n */\n type: 'bar';\n\n /**\n * Array of data points for the series.\n */\n data: IDataPointV2<X, Y>[];\n\n /**\n * Optional group identifier for the series.\n */\n key?: string;\n}\n\n/**\n * Represents a line series.\n */\nexport interface ILineSeries<X extends string | number | Date, Y extends string | number | Date> extends IDataSeries {\n /**\n * Type discriminator: always 'line' for this series.\n */\n type: 'line';\n\n /**\n * Array of data points for the series.\n */\n data: IDataPointV2<X, Y>[];\n\n /**\n * Optional gaps to render in the line.\n */\n gaps?: ILineChartGap[];\n\n /**\n * Additional line rendering options (e.g., stroke width, curve type).\n */\n lineOptions?: ILineChartLineOptions;\n\n /**\n * If true, hides dots for inactive (unfocused/unhovered) data points.\n */\n hideInactiveDots?: boolean;\n\n /**\n * Callback invoked when the line itself is clicked.\n */\n onLineClick?: () => void;\n}\n"]}
1
+ {"version":3,"file":"IDataPoint.js","sourceRoot":"../src/","sources":["types/IDataPoint.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { SankeyLink, SankeyNode } from 'd3-sankey';\nimport { LegendShape } from '../components/Legends/Legends.types';\nimport { CurveFactory } from 'd3-shape';\n\nexport interface IBasestate {\n _width?: number;\n _height?: number;\n activeLegend?: string;\n color?: string;\n dataForHoverCard?: number | string;\n isCalloutVisible: boolean;\n isLegendSelected?: boolean;\n isLegendHovered?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n refSelected?: any;\n YValueHover?: { legend?: string; y?: number | string; color?: string }[];\n hoverYValue?: string | number | null;\n hoverXValue?: string | number | null;\n xCalloutValue?: string;\n yCalloutValue?: string;\n lineColor?: string;\n hoveredLineColor?: string;\n selectedLegend?: string;\n containerWidth?: number;\n containerHeight?: number;\n}\n\nexport interface IRefArrayData {\n index?: string;\n refElement?: SVGGElement;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IMargins {\n /**\n * left margin for the chart.\n */\n left?: number;\n /**\n * Right margin for the chart.\n */\n right?: number;\n /**\n * Top margin for the chart.\n */\n top?: number;\n /**\n * Bottom margin for the chart.\n */\n bottom?: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n // NOTE: VerticalStackedBarChart, PieChart\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVerticalStackedBarDataPoint extends Omit<IDataPoint, 'x'> {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n * If data type on x is Date, then the data is spaced evenly by d3-scale.\n */\n x: number | string | Date;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IChartDataPoint {\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * data the datapoint in the chart\n */\n data?: number;\n\n /**\n * data the datapoint in the chart\n */\n horizontalBarChartdata?: IHorizontalDataPoint;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Color for the legend in the chart. If not provided, it will fallback on the default color palette.\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * placeholder data point\n */\n placeHolder?: boolean;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVerticalBarChartDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string | Date;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * data to render the line along with bars\n */\n lineData?: ILineDataInVerticalBarChart;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n\n /**\n * Label to display on the bar\n * This is an optional prop that can be used to show custom text on bars\n */\n barLabel?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalBarChartWithAxisDataPoint {\n /**\n * Dependent value of the data point, rendered along the x-axis.\n */\n x: number;\n\n /**\n * Independent value of the data point, rendered along the y-axis.\n * If y is a number, then each y-coordinate is plotted at its y-coordinate.\n * If y is a string, then the data is evenly spaced along the y-axis.\n */\n y: number | string;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Label to display on the bar\n */\n barLabel?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalBarChart {\n y: IVerticalBarChartDataPoint['y'];\n yAxisCalloutData?: string | undefined;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IBaseDataPoint {\n /**\n * Defines the function that is executed on clicking line\n */\n onDataPointClick?: () => void;\n\n /**\n * Callout data for x axis\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n */\n yAxisCalloutData?: string | { [id: string]: number };\n\n /**\n * Whether to hide callout data for the point.\n */\n hideCallout?: boolean;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n\n /**\n * X axis Accessibility data for callout\n */\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n\n /**\n * Marker size of the points\n */\n markerSize?: number;\n\n /**\n * text labels of marker points\n */\n text?: string;\n\n /**\n * Per-point marker color (overrides series color when present)\n */\n markerColor?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartDataPoint extends IBaseDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If data type on x is Date, then the data is spaced evenly by d3-scale\n */\n x: number | Date;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartGap {\n /**\n * Starting index of the gap.\n */\n startIndex: number;\n\n /**\n * Ending index of the gap.\n */\n endIndex: number;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface ILineChartLineOptions extends React.SVGProps<SVGPathElement> {\n /**\n * Width of the line/stroke.\n * Overrides the strokeWidth set on ICartesianChartProps level.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-width\n */\n strokeWidth?: number | string;\n\n /**\n * Pattern of dashes and gaps.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray\n */\n strokeDasharray?: string | number;\n\n /**\n * Offset on rendering of stroke dash array.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dashoffset\n */\n strokeDashoffset?: string | number;\n\n /**\n * Shape at the end of a subpath.\n * Default round.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linecap\n */\n strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit';\n\n /**\n * Width of border around the line. Default no border.\n */\n lineBorderWidth?: string | number;\n\n /**\n * Color of border around the line. Default white.\n */\n lineBorderColor?: string;\n\n /**\n * Defines the type of interpolation used to render the line.\n * @default 'linear'\n */\n curve?: 'linear' | 'natural' | 'step' | 'stepAfter' | 'stepBefore' | CurveFactory;\n\n /**\n * Defines the mode of points to be rendered.\n */\n mode?:\n | 'lines'\n | 'markers'\n | 'text'\n | 'lines+markers'\n | 'text+markers'\n | 'text+lines'\n | 'text+lines+markers'\n | 'none'\n | 'gauge'\n | 'number'\n | 'delta'\n | 'number+delta'\n | 'gauge+number'\n | 'gauge+number+delta'\n | 'gauge+delta'\n | 'markers+text'\n | 'lines+text'\n | 'lines+markers+text';\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartPoints {\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * The shape for the legend\n * default: show the rect legend\n */\n legendShape?: LegendShape;\n\n /**\n * dataPoints for the line chart\n */\n data: ILineChartDataPoint[];\n\n /**\n * gaps in the line chart where a line is not drawn\n */\n gaps?: ILineChartGap[];\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * opacity for chart fill color\n */\n opacity?: number;\n\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\n\n /**\n * hide dots for points that are not active\n */\n hideNonActiveDots?: boolean;\n\n /**\n * Defines the function that is executed on clicking this legend\n */\n onLegendClick?: (selectedLegend: string | null | string[]) => void;\n\n /**\n * Defines the function that is executed on clicking line\n */\n onLineClick?: () => void;\n\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IChartProps {\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * Accessibility data for chart title\n */\n chartTitleAccessibilityData?: IAccessibilityProps;\n /**\n * data for the points in the chart\n */\n chartData?: IChartDataPoint[];\n\n /**\n * Accessibility data for chart data\n */\n chartDataAccessibilityData?: IAccessibilityProps;\n\n /**\n * data for the points in the line chart\n */\n lineChartData?: ILineChartPoints[];\n\n /**\n * data for the points in the scatter chart\n */\n scatterChartData?: IScatterChartPoints[];\n\n /**\n * data for the points in the line chart\n */\n SankeyChartData?: ISankeyChartData;\n\n /**\n * data for the points in the line chart\n */\n pointOptions?: React.SVGProps<SVGCircleElement>;\n\n /**\n * data for the dotted line on hovering the point\n */\n pointLineOptions?: React.SVGProps<SVGLineElement>;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ISankeyChartData {\n nodes: SNode[];\n links: SLink[];\n}\n\ninterface ISNodeExtra {\n /**\n * A unique identifier for this node.\n */\n nodeId: number | string;\n /**\n * The display name for this node in the UX.\n */\n name: string;\n color?: string;\n borderColor?: string;\n actualValue?: number;\n layer?: number;\n}\n\ninterface ISLinkExtra {\n /**\n * The index within `ISankeyChartData.nodes` of the source node.\n */\n source: number;\n /**\n * The index within `ISankeyChartData.nodes` of the target node.\n */\n target: number;\n /**\n * The weight of this link between the two nodes.\n */\n value: number;\n unnormalizedValue?: number;\n color?: string;\n}\n\nexport type SNode = SankeyNode<ISNodeExtra, ISLinkExtra>;\nexport type SLink = SankeyLink<ISNodeExtra, ISLinkExtra>;\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IAccessibilityProps {\n /**\n * Accessibility aria-label\n */\n ariaLabel?: string;\n\n /**\n * Accessibility aria-labelledBy\n */\n ariaLabelledBy?: string;\n\n /**\n * Accessibility aria-describedBy\n */\n ariaDescribedBy?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVSChartDataPoint {\n /**\n * data the datapoint in the chart\n */\n data: number | string;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n\n /**\n * Label to display on the bar\n * This is an optional prop that can be used to show custom text on bars\n */\n barLabel?: string;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IVerticalStackedChartProps {\n /**\n * data for the points in the chart\n */\n chartData: IVSChartDataPoint[];\n\n /**\n * Data for x axis label for multistacked Vertical bar chart\n */\n xAxisPoint: number | string | Date;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven't given, legend will take\n */\n xAxisCalloutData?: string;\n /**\n * line data to render lines on stacked bar chart\n */\n lineData?: ILineDataInVerticalStackedBarChart[];\n /**\n * Accessibility data for Whole stack callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalStackedBarChart {\n y: number | string;\n color: string;\n legend: string;\n /**\n * The shape for the legend\n * default: show the rect legend\n */\n legendShape?: LegendShape;\n /**\n * Data to show in callout\n */\n data?: number | string;\n yAxisCalloutData?: string;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGVBarChartSeriesPoint {\n /**\n * Text for // need to check use of this\n */\n key: string;\n\n /**\n * Data for bar height of Grouped vertical bar chart\n */\n data: number;\n\n /**\n * Color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Legend text in the chart\n */\n legend: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n\n /**\n * Label to display on the bar\n */\n barLabel?: string;\n\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGroupedVerticalBarChartData {\n /**\n * Data for X axis label\n */\n name: string;\n\n /**\n * Data points for Grouped vertical bar chart\n */\n series: IGVBarChartSeriesPoint[];\n\n /**\n * Accessibility data for Group Bars Stack Callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\nexport interface IGVDataPoint {\n /**\n * This interface used for - While forming datapoints from given prop \"data\" in code\n * datapoints are used for to draw graph\n */\n [key: string]: number | string;\n}\n\nexport interface IGVSingleDataPoint {\n /**\n * While forming datapoints from given prop \"data\" in code.\n * These datapoints are used for to draw graph easily.\n */\n [key: string]: IGVDataPoint;\n}\n\nexport interface IGVForBarChart {\n /**\n * While forming datapoints from given prop \"data\"\n * These datapoints are used for to draw graph.\n */\n [key: string]: IGVBarChartSeriesPoint;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartDataPoint {\n x: string | Date | number;\n y: string | Date | number;\n value: number;\n /**\n * The value/ text to be rendered in the rectange\n */\n rectText?: string | number;\n /**\n * denomination to show in the callout\n */\n ratio?: [number, number];\n /**\n * description message to the callout\n */\n descriptionMessage?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartData {\n /**\n * name of the legend\n */\n legend: string;\n data: IHeatMapChartDataPoint[];\n /**\n * This number will be used to get the color for the legend\n */\n value: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutDataPoint {\n legend: string;\n y: number;\n color: string;\n xAxisCalloutData?: string;\n yAxisCalloutData?: string | { [id: string]: number };\n}\n\n/**\n * Used for custom callout data interface. As Area chart callout data will be prepared from given props.data,\n * Those required data passing to onRenderCalloutPerDataPoint and onRenderCalloutPerStack.\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutData {\n x: number | string | Date;\n values: ICustomizedCalloutDataPoint[];\n}\n\n/**\n * {@docCategory Chart}\n */\nexport interface IChart {\n chartContainer: HTMLElement | null;\n toImage?: (opts?: IImageExportOptions) => Promise<string>;\n}\n\n/**\n * {@docCategory Chart}\n */\nexport interface IImageExportOptions {\n width?: number;\n height?: number;\n scale?: number;\n background?: string;\n}\n\n/**\n * {@docCategory IChartData}\n * ScatterChartDataPoint interface.\n */\nexport interface IScatterChartDataPoint extends IBaseDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n */\n x: number | Date | string;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IScatterChartPoints {\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * The shape for the legend\n * default: show the rect legend\n */\n legendShape?: LegendShape;\n\n /**\n * dataPoints for the line chart\n */\n data: IScatterChartDataPoint[];\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * opacity for chart fill color\n */\n opacity?: number;\n\n /**\n * hide dots for points that are not active\n */\n hideNonActiveDots?: boolean;\n\n /**\n * Defines the function that is executed on clicking this legend\n */\n onLegendClick?: (selectedLegend: string | null | string[]) => void;\n\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * Specifies the ordering options for axis categories in Cartesian charts.\n *\n * - `'default'`: Uses the original order before custom ordering was supported.\n * In some charts, this behaves the same as `'data'`.\n * - `'data'`: Preserves the order of categories as provided in the input data.\n * - `string[]`: Explicitly defines the custom order of categories as an array of category names.\n * - `'category ascending' | 'category descending'`: Orders categories alphanumerically.\n * - `'total ascending' | 'total descending'`: Orders categories by the total of their associated values.\n * - `'min ascending' | 'min descending'`: Orders by the minimum value within each category.\n * - `'max ascending' | 'max descending'`: Orders by the maximum value within each category.\n * - `'sum ascending' | 'sum descending'`: Orders by the sum of values for each category (same as 'total').\n * - `'mean ascending' | 'mean descending'`: Orders by the average of values in each category.\n * - `'median ascending' | 'median descending'`: Orders by the median value of each category.\n *\n * {@docCategory CartesianChart}\n */\nexport type AxisCategoryOrder =\n | 'default'\n | 'data'\n | string[]\n | 'category ascending'\n | 'category descending'\n | 'total ascending'\n | 'total descending'\n | 'min ascending'\n | 'min descending'\n | 'max ascending'\n | 'max descending'\n | 'sum ascending'\n | 'sum descending'\n | 'mean ascending'\n | 'mean descending'\n | 'median ascending'\n | 'median descending';\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGanttChartDataPoint {\n /**\n * Dependent value of the data point, rendered along the x-axis.\n * `start` and `end` represent the beginning and end of the data point.\n */\n x: {\n start: Date | number;\n end: Date | number;\n };\n\n /**\n * Independent value of the data point, rendered along the y-axis.\n * If y is a number, then each y-coordinate is plotted at its y-coordinate.\n * If y is a string, then the data is evenly spaced along the y-axis.\n */\n y: number | string;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Optional label shown in place of `x` in the callout.\n */\n xAxisCalloutData?: string;\n\n /**\n * Optional label shown in place of `y` in the callout.\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * Available scale types for axes.\n *\n * - `'default'`: Uses an automatic scale (linear, band, or time) based on axis data type.\n * - `'log'`: Uses a logarithmic scale. Only supported for numeric axes in LineChart and ScatterChart.\n *\n * {@docCategory CartesianChart}\n */\nexport type AxisScaleType = 'default' | 'log';\n\n/**\n * Configuration options for an axis.\n *\n * {@docCategory CartesianChart}\n */\nexport type AxisProps = {\n /**\n * Defines the step between tick marks on the axis.\n * Works in combination with `tick0`.\n * Must be a positive number.\n *\n * - **Log scale**:\n * - Ticks are placed at `10^(n * tickStep)` where `n` is the tick index.\n * - Example: `tickStep = 2` → ticks at 1, 100, 10,000...\n * - Example: `tickStep = log10(5)` → ticks at 1, 5, 25, 125...\n * - Special format `\"L<f>\"`: Creates ticks that are linearly spaced in value (not position).\n * - Example: `tick0 = 0.1`, `tickStep = \"L0.5\"` → ticks at 0.1, 0.6, 1.1, 1.6...\n *\n * - **Date axis**:\n * - Must be in milliseconds.\n * - Example: one day = `tickStep = 86400000`.\n * - Special format `\"M<n>\"`: Places ticks every `n` months.\n * - Example: `tick0 = \"2000-01-15\"`, `tickStep = \"M3\"` → ticks on the 15th every third month.\n * - Example: `tickStep = \"M48\"` → ticks every 4 years.\n */\n tickStep?: number | string;\n\n /**\n * Sets the reference value for axis ticks.\n * Works in combination with `tickStep`.\n *\n * - **Log scale**:\n * - `tick0` must be given as the logarithm of the reference tick.\n * - Example: to align ticks with 100, use `tick0 = 2`.\n * - Exception: when `tickStep` uses `\"L<f>\"`, you can specify the raw value directly.\n */\n tick0?: number | Date;\n\n /**\n * Sets the text displayed at each tick position specified by `tickValues`. Used with `tickValues`.\n */\n tickText?: string[];\n};\n\n/**\n * Represents a single data point in a series.\n */\nexport interface IDataPointV2<X extends string | number | Date, Y extends string | number | Date> {\n /**\n * X-axis value of the data point.\n */\n x: X;\n\n /**\n * Y-axis value of the data point.\n */\n y: Y;\n\n /**\n * Optional click handler for the data point.\n */\n onClick?: () => void;\n\n /**\n * Custom text to show in the callout in place of the x-axis value.\n */\n xAxisCalloutData?: string;\n\n /**\n * Custom text to show in the callout in place of the y-axis value.\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility properties for the data point.\n */\n callOutAccessibilityData?: IAccessibilityProps;\n\n /**\n * Custom marker size for the data point.\n */\n markerSize?: number;\n\n /**\n * Optional text to annotate or label the data point.\n */\n text?: string;\n\n /**\n * Color of the data point. If not provided, it will inherit the series color.\n */\n color?: string;\n}\n\n/**\n * Base interface for a series.\n */\nexport interface IDataSeries {\n /**\n * Name of the series to be displayed in the legend.\n */\n legend: string;\n\n /**\n * Shape used in the legend (e.g., circle, square).\n */\n legendShape?: LegendShape;\n\n /**\n * Color of the series.\n */\n color?: string;\n\n /**\n * Opacity of the series.\n */\n opacity?: number;\n\n /**\n * Gradient fill for the series (start and end colors).\n */\n gradient?: [string, string];\n\n /**\n * Whether this series should be plotted against a secondary Y-axis.\n */\n useSecondaryYScale?: boolean;\n\n /**\n * Callback invoked when the legend item is clicked.\n */\n onLegendClick?: (selectedLegend: string | null | string[]) => void;\n}\n\n/**\n * Represents a bar series.\n */\nexport interface IBarSeries<X extends string | number | Date, Y extends string | number | Date> extends IDataSeries {\n /**\n * Type discriminator: always 'bar' for this series.\n */\n type: 'bar';\n\n /**\n * Array of data points for the series.\n */\n data: IDataPointV2<X, Y>[];\n\n /**\n * Optional group identifier for the series.\n */\n key?: string;\n}\n\n/**\n * Represents a line series.\n */\nexport interface ILineSeries<X extends string | number | Date, Y extends string | number | Date> extends IDataSeries {\n /**\n * Type discriminator: always 'line' for this series.\n */\n type: 'line';\n\n /**\n * Array of data points for the series.\n */\n data: IDataPointV2<X, Y>[];\n\n /**\n * Optional gaps to render in the line.\n */\n gaps?: ILineChartGap[];\n\n /**\n * Additional line rendering options (e.g., stroke width, curve type).\n */\n lineOptions?: ILineChartLineOptions;\n\n /**\n * If true, hides dots for inactive (unfocused/unhovered) data points.\n */\n hideInactiveDots?: boolean;\n\n /**\n * Callback invoked when the line itself is clicked.\n */\n onLineClick?: () => void;\n}\n\n/**\n * Represents a single data point in a polar series.\n */\nexport interface IPolarDataPoint {\n /**\n * Radial value of the data point.\n */\n r: string | number | Date;\n\n /**\n * Angular value of the data point, specified as a category or in degrees.\n */\n theta: string | number;\n\n /**\n * Optional click handler for the data point.\n */\n onClick?: () => void;\n\n /**\n * Custom text to show in the callout in place of the radial axis value.\n */\n radialAxisCalloutData?: string;\n\n /**\n * Custom text to show in the callout in place of the angular axis value.\n */\n angularAxisCalloutData?: string;\n\n /**\n * Accessibility properties for the data point.\n */\n callOutAccessibilityData?: IAccessibilityProps;\n\n /**\n * Custom marker size for the data point.\n */\n markerSize?: number;\n\n /**\n * Optional text to annotate or label the data point.\n */\n text?: string;\n\n /**\n * Color of the data point. If not provided, it will inherit the series color.\n */\n color?: string;\n}\n\n/**\n * Represents a scatterpolar series.\n */\nexport interface IScatterPolarSeries extends IDataSeries {\n /**\n * Type discriminator: always 'scatterpolar' for this series.\n */\n type: 'scatterpolar';\n\n /**\n * Array of data points for the series.\n */\n data: IPolarDataPoint[];\n}\n\n/**\n * Represents a linepolar series.\n */\nexport interface ILinePolarSeries extends IDataSeries {\n /**\n * Type discriminator: always 'linepolar' for this series.\n */\n type: 'linepolar';\n\n /**\n * Array of data points for the series.\n */\n data: IPolarDataPoint[];\n\n /**\n * Additional line rendering options (e.g., stroke width, curve type).\n */\n lineOptions?: ILineChartLineOptions;\n}\n\n/**\n * Represents a areapolar series.\n */\nexport interface IAreaPolarSeries extends IDataSeries {\n /**\n * Type discriminator: always 'areapolar' for this series.\n */\n type: 'areapolar';\n\n /**\n * Array of data points for the series.\n */\n data: IPolarDataPoint[];\n\n /**\n * Additional line rendering options (e.g., stroke width, curve type).\n */\n lineOptions?: ILineChartLineOptions;\n}\n"]}
@@ -0,0 +1,55 @@
1
+ import * as React from 'react';
2
+ import { ISVGTooltipTextProps } from './SVGTooltipText';
3
+ import { ITitleStyles } from './Common.styles';
4
+ import { ITheme } from '@fluentui/react/lib/Styling';
5
+ /**
6
+ * Props for the ChartTitle component
7
+ */
8
+ export interface IChartTitleProps {
9
+ /**
10
+ * The title text to display
11
+ */
12
+ title: string;
13
+ /**
14
+ * The x position for the title (typically center of chart)
15
+ */
16
+ x: number;
17
+ /**
18
+ * Optional custom y position. If not provided, calculated based on font size.
19
+ */
20
+ y?: number;
21
+ /**
22
+ * Maximum width for the title text before wrapping/truncation
23
+ */
24
+ maxWidth?: number;
25
+ /**
26
+ * CSS class name for the title text element
27
+ */
28
+ className?: string;
29
+ /**
30
+ * Title styles configuration (font, anchors, padding)
31
+ */
32
+ titleStyles?: ITitleStyles;
33
+ /**
34
+ * Text anchor for SVG text element
35
+ * @default 'middle'
36
+ */
37
+ textAnchor?: 'start' | 'middle' | 'end';
38
+ /**
39
+ * Additional SVGTooltipText props to pass through
40
+ */
41
+ tooltipProps?: Partial<ISVGTooltipTextProps>;
42
+ /**
43
+ * CSS class for the tooltip
44
+ */
45
+ tooltipClassName?: string;
46
+ /**
47
+ * Theme provided by High Order Component
48
+ */
49
+ theme?: ITheme;
50
+ }
51
+ /**
52
+ * A reusable chart title component that renders an SVG text element with tooltip support.
53
+ * This component encapsulates the common pattern for rendering chart titles across all chart types.
54
+ */
55
+ export declare const ChartTitle: React.FunctionComponent<IChartTitleProps>;
@@ -0,0 +1,45 @@
1
+ import { __assign } from "tslib";
2
+ import * as React from 'react';
3
+ import { SVGTooltipText } from './SVGTooltipText';
4
+ import { CHART_TITLE_PADDING, getChartTitleInlineStyles } from './Common.styles';
5
+ import { wrapContent } from './utilities';
6
+ var AXIS_TITLE_PADDING = 8;
7
+ /**
8
+ * A reusable chart title component that renders an SVG text element with tooltip support.
9
+ * This component encapsulates the common pattern for rendering chart titles across all chart types.
10
+ */
11
+ export var ChartTitle = function (props) {
12
+ var _a, _b, _c, _d;
13
+ var title = props.title, x = props.x, y = props.y, maxWidth = props.maxWidth, className = props.className, titleStyles = props.titleStyles, tooltipProps = props.tooltipProps, tooltipClassName = props.tooltipClassName, theme = props.theme;
14
+ var _e = titleStyles !== null && titleStyles !== void 0 ? titleStyles : {}, titleFont = _e.titleFont, titleXAnchor = _e.titleXAnchor, titleYAnchor = _e.titleYAnchor, titlePad = _e.titlePad;
15
+ var computedTextAnchor = titleXAnchor === 'left' ? 'start' : titleXAnchor === 'right' ? 'end' : 'middle';
16
+ // Calculate dominantBaseline from titleYAnchor for vertical alignment
17
+ // 'top' means text hangs below the y position (text-before-edge/hanging)
18
+ // 'bottom' means text sits above the y position (text-after-edge/alphabetic)
19
+ // 'middle' means text is centered on the y position (central)
20
+ var computedDominantBaseline = titleYAnchor === 'top'
21
+ ? 'hanging'
22
+ : titleYAnchor === 'bottom'
23
+ ? 'alphabetic'
24
+ : titleYAnchor === 'middle'
25
+ ? 'central'
26
+ : 'auto';
27
+ // Calculate x position with padding adjustments
28
+ var computedX = x + ((_a = titlePad === null || titlePad === void 0 ? void 0 : titlePad.l) !== null && _a !== void 0 ? _a : 0) - ((_b = titlePad === null || titlePad === void 0 ? void 0 : titlePad.r) !== null && _b !== void 0 ? _b : 0);
29
+ // Calculate y position with padding adjustments
30
+ var calculatedY = (y !== null && y !== void 0 ? y : Math.max((typeof (titleFont === null || titleFont === void 0 ? void 0 : titleFont.size) === 'number' ? titleFont.size : 13) + AXIS_TITLE_PADDING, CHART_TITLE_PADDING - AXIS_TITLE_PADDING)) +
31
+ ((_c = titlePad === null || titlePad === void 0 ? void 0 : titlePad.t) !== null && _c !== void 0 ? _c : 0) -
32
+ ((_d = titlePad === null || titlePad === void 0 ? void 0 : titlePad.b) !== null && _d !== void 0 ? _d : 0);
33
+ var commonSvgToolTipProps = __assign({ wrapContent: wrapContent, showBackground: true, className: tooltipClassName, theme: theme }, tooltipProps);
34
+ return (React.createElement(SVGTooltipText, __assign({}, commonSvgToolTipProps, { content: title, textProps: {
35
+ x: computedX,
36
+ y: calculatedY,
37
+ textAnchor: computedTextAnchor,
38
+ dominantBaseline: computedDominantBaseline,
39
+ className: className,
40
+ 'aria-hidden': true,
41
+ style: getChartTitleInlineStyles(titleFont),
42
+ }, maxWidth: maxWidth })));
43
+ };
44
+ ChartTitle.displayName = 'ChartTitle';
45
+ //# sourceMappingURL=ChartTitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartTitle.js","sourceRoot":"../src/","sources":["utilities/ChartTitle.tsx"],"names":[],"mappings":"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","sourcesContent":["import * as React from 'react';\nimport { SVGTooltipText, ISVGTooltipTextProps } from './SVGTooltipText';\nimport { CHART_TITLE_PADDING, getChartTitleInlineStyles, ITitleStyles } from './Common.styles';\nimport { wrapContent } from './utilities';\nimport { ITheme } from '@fluentui/react/lib/Styling';\n\nconst AXIS_TITLE_PADDING = 8;\n\n/**\n * Props for the ChartTitle component\n */\nexport interface IChartTitleProps {\n /**\n * The title text to display\n */\n title: string;\n /**\n * The x position for the title (typically center of chart)\n */\n x: number;\n /**\n * Optional custom y position. If not provided, calculated based on font size.\n */\n y?: number;\n /**\n * Maximum width for the title text before wrapping/truncation\n */\n maxWidth?: number;\n /**\n * CSS class name for the title text element\n */\n className?: string;\n /**\n * Title styles configuration (font, anchors, padding)\n */\n titleStyles?: ITitleStyles;\n /**\n * Text anchor for SVG text element\n * @default 'middle'\n */\n textAnchor?: 'start' | 'middle' | 'end';\n /**\n * Additional SVGTooltipText props to pass through\n */\n tooltipProps?: Partial<ISVGTooltipTextProps>;\n /**\n * CSS class for the tooltip\n */\n tooltipClassName?: string;\n /**\n * Theme provided by High Order Component\n */\n theme?: ITheme;\n}\n\n/**\n * A reusable chart title component that renders an SVG text element with tooltip support.\n * This component encapsulates the common pattern for rendering chart titles across all chart types.\n */\nexport const ChartTitle: React.FunctionComponent<IChartTitleProps> = props => {\n const { title, x, y, maxWidth, className, titleStyles, tooltipProps, tooltipClassName, theme } = props;\n\n const { titleFont, titleXAnchor, titleYAnchor, titlePad } = titleStyles ?? {};\n const computedTextAnchor = titleXAnchor === 'left' ? 'start' : titleXAnchor === 'right' ? 'end' : 'middle';\n\n // Calculate dominantBaseline from titleYAnchor for vertical alignment\n // 'top' means text hangs below the y position (text-before-edge/hanging)\n // 'bottom' means text sits above the y position (text-after-edge/alphabetic)\n // 'middle' means text is centered on the y position (central)\n const computedDominantBaseline =\n titleYAnchor === 'top'\n ? 'hanging'\n : titleYAnchor === 'bottom'\n ? 'alphabetic'\n : titleYAnchor === 'middle'\n ? 'central'\n : 'auto';\n\n // Calculate x position with padding adjustments\n const computedX = x + (titlePad?.l ?? 0) - (titlePad?.r ?? 0);\n\n // Calculate y position with padding adjustments\n const calculatedY =\n (y ??\n Math.max(\n (typeof titleFont?.size === 'number' ? titleFont.size : 13) + AXIS_TITLE_PADDING,\n CHART_TITLE_PADDING - AXIS_TITLE_PADDING,\n )) +\n (titlePad?.t ?? 0) -\n (titlePad?.b ?? 0);\n\n const commonSvgToolTipProps: Partial<ISVGTooltipTextProps> = {\n wrapContent,\n showBackground: true,\n className: tooltipClassName,\n theme,\n ...tooltipProps,\n };\n return (\n <SVGTooltipText\n {...commonSvgToolTipProps}\n content={title}\n textProps={{\n x: computedX,\n y: calculatedY,\n textAnchor: computedTextAnchor,\n dominantBaseline: computedDominantBaseline,\n className,\n 'aria-hidden': true,\n style: getChartTitleInlineStyles(titleFont),\n }}\n maxWidth={maxWidth}\n />\n );\n};\n\nChartTitle.displayName = 'ChartTitle';\n"]}
@@ -1,6 +1,57 @@
1
+ import * as React from 'react';
1
2
  import { IStyle, ITheme } from '@fluentui/react/lib/Styling';
2
3
  import type { IRawStyle } from '@fluentui/merge-styles';
4
+ import type { Font } from '@fluentui/chart-utilities';
5
+ /**
6
+ * Default padding below chart title (in pixels).
7
+ * Used consistently across all chart types for spacing between title and chart content.
8
+ */
9
+ export declare const CHART_TITLE_PADDING = 20;
10
+ /**
11
+ * Shared interface for chart title styling properties.
12
+ * Used by components that display a chart title with customizable font, alignment, and padding.
13
+ * {@docCategory TitleStyles}
14
+ */
15
+ export interface ITitleStyles {
16
+ /**
17
+ * Font configuration for the title
18
+ */
19
+ titleFont?: Partial<Font>;
20
+ /**
21
+ * Horizontal anchor/alignment for the chart title
22
+ */
23
+ titleXAnchor?: 'auto' | 'left' | 'center' | 'right';
24
+ /**
25
+ * Vertical anchor/alignment for the chart title
26
+ */
27
+ titleYAnchor?: 'auto' | 'top' | 'middle' | 'bottom';
28
+ /**
29
+ * Padding for the chart title
30
+ */
31
+ titlePad?: {
32
+ t?: number;
33
+ r?: number;
34
+ b?: number;
35
+ l?: number;
36
+ };
37
+ }
3
38
  export declare const getTooltipStyle: (theme: ITheme) => IStyle;
4
39
  export declare const getAxisTitleStyle: (theme: ITheme, font: IRawStyle) => IStyle;
5
40
  export declare const getBarLabelStyle: (theme: ITheme) => IStyle;
6
41
  export declare const getMarkerLabelStyle: (theme: ITheme) => IStyle;
42
+ export declare const getChartTitleStyle: (theme: ITheme) => IStyle;
43
+ export declare const getSvgTooltipStyle: (theme: ITheme) => IStyle;
44
+ /**
45
+ * Creates dynamic chart title styles using CSS properties.
46
+ * @param titleFont - Optional font configuration from Plotly layout
47
+ * @param xanchor - Optional horizontal anchor/alignment ('auto' | 'left' | 'center' | 'right')
48
+ * @param yanchor - Optional vertical anchor/alignment ('auto' | 'top' | 'middle' | 'bottom')
49
+ * @param pad - Optional padding configuration
50
+ * @returns Style object with CSS properties for dynamic styling
51
+ */
52
+ export declare function getChartTitleInlineStyles(titleFont: Partial<Font> | undefined, xanchor?: string, yanchor?: string, pad?: {
53
+ t?: number;
54
+ r?: number;
55
+ b?: number;
56
+ l?: number;
57
+ }): React.CSSProperties;
@@ -1,8 +1,13 @@
1
1
  import { __assign } from "tslib";
2
2
  import { FontSizes, FontWeights, HighContrastSelector } from '@fluentui/react/lib/Styling';
3
3
  import { NeutralColors } from '@fluentui/react';
4
+ /**
5
+ * Default padding below chart title (in pixels).
6
+ * Used consistently across all chart types for spacing between title and chart content.
7
+ */
8
+ export var CHART_TITLE_PADDING = 20;
4
9
  export var getTooltipStyle = function (theme) {
5
- return __assign(__assign({}, theme.fonts.medium), { display: 'flex', flexDirection: 'column', padding: '8px', position: 'absolute', textAlign: 'center', top: '0px', background: theme.semanticColors.bodyBackground, borderRadius: '2px', pointerEvents: 'none', color: theme.semanticColors.bodyText });
10
+ return __assign(__assign({}, theme.fonts.medium), { display: 'flex', flexDirection: 'column', padding: '8px', position: 'absolute', textAlign: 'center', background: theme.semanticColors.bodyBackground, borderRadius: '2px', pointerEvents: 'none', color: theme.semanticColors.bodyText });
6
11
  };
7
12
  export var getAxisTitleStyle = function (theme, font) {
8
13
  var _a;
@@ -48,4 +53,68 @@ export var getMarkerLabelStyle = function (theme) {
48
53
  _a),
49
54
  };
50
55
  };
56
+ export var getChartTitleStyle = function (theme) {
57
+ var _a;
58
+ return __assign(__assign({}, theme.fonts.small), { fontWeight: FontWeights.semibold, fontStyle: 'normal', fill: theme.semanticColors.bodyText, textAnchor: 'middle', selectors: (_a = {},
59
+ _a[HighContrastSelector] = {
60
+ fill: 'CanvasText',
61
+ },
62
+ _a) });
63
+ };
64
+ export var getSvgTooltipStyle = function (theme) {
65
+ var _a;
66
+ return {
67
+ fill: theme.semanticColors.bodyBackground,
68
+ selectors: (_a = {},
69
+ _a[HighContrastSelector] = {
70
+ fill: 'Canvas',
71
+ },
72
+ _a),
73
+ };
74
+ };
75
+ /**
76
+ * Creates dynamic chart title styles using CSS properties.
77
+ * @param titleFont - Optional font configuration from Plotly layout
78
+ * @param xanchor - Optional horizontal anchor/alignment ('auto' | 'left' | 'center' | 'right')
79
+ * @param yanchor - Optional vertical anchor/alignment ('auto' | 'top' | 'middle' | 'bottom')
80
+ * @param pad - Optional padding configuration
81
+ * @returns Style object with CSS properties for dynamic styling
82
+ */
83
+ export function getChartTitleInlineStyles(titleFont, xanchor, yanchor, pad) {
84
+ var _a, _b, _c, _d;
85
+ var styles = {};
86
+ if (titleFont) {
87
+ Object.assign(styles, titleFont.family && { fontFamily: titleFont.family }, titleFont.size && { fontSize: "".concat(titleFont.size, "px") }, titleFont.weight && { fontWeight: titleFont.weight }, titleFont.color && { fill: titleFont.color }, titleFont.shadow && titleFont.shadow !== 'none' && { filter: "drop-shadow(".concat(titleFont.shadow, ")") });
88
+ }
89
+ if (xanchor) {
90
+ var anchorMap = {
91
+ left: 'left',
92
+ center: 'center',
93
+ right: 'right',
94
+ };
95
+ var alignmentKey = xanchor.toLowerCase();
96
+ if (anchorMap[alignmentKey]) {
97
+ styles.textAlign = anchorMap[alignmentKey];
98
+ }
99
+ }
100
+ if (yanchor) {
101
+ var anchorMap = {
102
+ top: 'flex-start',
103
+ middle: 'center',
104
+ bottom: 'flex-end',
105
+ };
106
+ var alignmentKey = yanchor.toLowerCase();
107
+ if (anchorMap[alignmentKey]) {
108
+ styles.alignSelf = anchorMap[alignmentKey];
109
+ }
110
+ }
111
+ if (pad) {
112
+ var t = (_a = pad.t) !== null && _a !== void 0 ? _a : 0;
113
+ var r = (_b = pad.r) !== null && _b !== void 0 ? _b : 0;
114
+ var b = (_c = pad.b) !== null && _c !== void 0 ? _c : 0;
115
+ var l = (_d = pad.l) !== null && _d !== void 0 ? _d : 0;
116
+ styles.padding = "".concat(t, "px ").concat(r, "px ").concat(b, "px ").concat(l, "px");
117
+ }
118
+ return styles;
119
+ }
51
120
  //# sourceMappingURL=Common.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Common.styles.js","sourceRoot":"../src/","sources":["utilities/Common.styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,IAAM,eAAe,GAAG,UAAC,KAAa;IAC3C,6BACK,KAAK,CAAC,KAAK,CAAC,MAAM,KACrB,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,QAAQ,EACvB,OAAO,EAAE,KAAK,EACd,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,QAAQ,EACnB,GAAG,EAAE,KAAK,EACV,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,EAC/C,YAAY,EAAE,KAAK,EACnB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,IACpC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,iBAAiB,GAAG,UAAC,KAAa,EAAE,IAAe;;IAC9D,OAAO;QACL,IAAI;;gBAEF,SAAS,EAAE,QAAQ;gBACnB,UAAU,EAAE,WAAW,CAAC,QAAQ;gBAChC,SAAS,EAAE,QAAQ;gBACnB,UAAU,EAAE,SAAS,CAAC,MAAM;gBAC5B,KAAK,EAAE,aAAa,CAAC,OAAO;gBAC5B,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ;;YACnC,GAAC,oBAAoB,IAAG;gBACtB,IAAI,EAAE,YAAY;aACnB;;KAEJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAC,KAAa;;IAC5C,OAAO;QACL,QAAQ,EAAE,SAAS,CAAC,KAAK;QACzB,UAAU,EAAE,WAAW,CAAC,QAAQ;QAChC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;QAClC,SAAS;YACP,GAAC,oBAAoB,IAAG;gBACtB,IAAI,EAAE,YAAY;aACnB;eACF;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,mBAAmB,GAAG,UAAC,KAAa;;IAC/C,OAAO;QACL,QAAQ,EAAE,SAAS,CAAC,MAAM;QAC1B,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ;QACnC,UAAU,EAAE,QAAQ;QACpB,SAAS;YACP,GAAC,oBAAoB,IAAG;gBACtB,IAAI,EAAE,YAAY;aACnB;eACF;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { IStyle, ITheme } from '@fluentui/react/lib/Styling';\nimport type { IRawStyle } from '@fluentui/merge-styles';\nimport { FontSizes, FontWeights, HighContrastSelector } from '@fluentui/react/lib/Styling';\nimport { NeutralColors } from '@fluentui/react';\n\nexport const getTooltipStyle = (theme: ITheme): IStyle => {\n return {\n ...theme.fonts.medium,\n display: 'flex',\n flexDirection: 'column',\n padding: '8px',\n position: 'absolute',\n textAlign: 'center',\n top: '0px',\n background: theme.semanticColors.bodyBackground,\n borderRadius: '2px',\n pointerEvents: 'none',\n color: theme.semanticColors.bodyText,\n };\n};\n\nexport const getAxisTitleStyle = (theme: ITheme, font: IRawStyle): IStyle => {\n return [\n font,\n {\n textAlign: 'center',\n fontWeight: FontWeights.semibold,\n fontStyle: 'normal',\n lineHeight: FontSizes.medium,\n color: NeutralColors.gray160,\n fill: theme.semanticColors.bodyText,\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n ];\n};\n\nexport const getBarLabelStyle = (theme: ITheme): IStyle => {\n return {\n fontSize: FontSizes.small,\n fontWeight: FontWeights.semibold,\n fill: theme.palette.neutralPrimary,\n selectors: {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n };\n};\n\nexport const getMarkerLabelStyle = (theme: ITheme): IStyle => {\n return {\n fontSize: FontSizes.medium,\n fill: theme.semanticColors.bodyText,\n textAnchor: 'middle',\n selectors: {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n };\n};\n"]}
1
+ {"version":3,"file":"Common.styles.js","sourceRoot":"../src/","sources":["utilities/Common.styles.ts"],"names":[],"mappings":"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","sourcesContent":["import * as React from 'react';\nimport { IStyle, ITheme } from '@fluentui/react/lib/Styling';\nimport type { IRawStyle } from '@fluentui/merge-styles';\nimport { FontSizes, FontWeights, HighContrastSelector } from '@fluentui/react/lib/Styling';\nimport { NeutralColors } from '@fluentui/react';\nimport type { Font } from '@fluentui/chart-utilities';\n\n/**\n * Default padding below chart title (in pixels).\n * Used consistently across all chart types for spacing between title and chart content.\n */\nexport const CHART_TITLE_PADDING = 20;\n\n/**\n * Shared interface for chart title styling properties.\n * Used by components that display a chart title with customizable font, alignment, and padding.\n * {@docCategory TitleStyles}\n */\nexport interface ITitleStyles {\n /**\n * Font configuration for the title\n */\n titleFont?: Partial<Font>;\n /**\n * Horizontal anchor/alignment for the chart title\n */\n titleXAnchor?: 'auto' | 'left' | 'center' | 'right';\n /**\n * Vertical anchor/alignment for the chart title\n */\n titleYAnchor?: 'auto' | 'top' | 'middle' | 'bottom';\n /**\n * Padding for the chart title\n */\n titlePad?: { t?: number; r?: number; b?: number; l?: number };\n}\n\nexport const getTooltipStyle = (theme: ITheme): IStyle => {\n return {\n ...theme.fonts.medium,\n display: 'flex',\n flexDirection: 'column',\n padding: '8px',\n position: 'absolute',\n textAlign: 'center',\n background: theme.semanticColors.bodyBackground,\n borderRadius: '2px',\n pointerEvents: 'none',\n color: theme.semanticColors.bodyText,\n };\n};\n\nexport const getAxisTitleStyle = (theme: ITheme, font: IRawStyle): IStyle => {\n return [\n font,\n {\n textAlign: 'center',\n fontWeight: FontWeights.semibold,\n fontStyle: 'normal',\n lineHeight: FontSizes.medium,\n color: NeutralColors.gray160,\n fill: theme.semanticColors.bodyText,\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n ];\n};\n\nexport const getBarLabelStyle = (theme: ITheme): IStyle => {\n return {\n fontSize: FontSizes.small,\n fontWeight: FontWeights.semibold,\n fill: theme.palette.neutralPrimary,\n selectors: {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n };\n};\n\nexport const getMarkerLabelStyle = (theme: ITheme): IStyle => {\n return {\n fontSize: FontSizes.medium,\n fill: theme.semanticColors.bodyText,\n textAnchor: 'middle',\n selectors: {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n };\n};\n\nexport const getChartTitleStyle = (theme: ITheme): IStyle => {\n return {\n ...theme.fonts.small,\n fontWeight: FontWeights.semibold,\n fontStyle: 'normal',\n fill: theme.semanticColors.bodyText,\n textAnchor: 'middle',\n selectors: {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n };\n};\n\nexport const getSvgTooltipStyle = (theme: ITheme): IStyle => {\n return {\n fill: theme.semanticColors.bodyBackground,\n selectors: {\n [HighContrastSelector]: {\n fill: 'Canvas',\n },\n },\n };\n};\n\n/**\n * Creates dynamic chart title styles using CSS properties.\n * @param titleFont - Optional font configuration from Plotly layout\n * @param xanchor - Optional horizontal anchor/alignment ('auto' | 'left' | 'center' | 'right')\n * @param yanchor - Optional vertical anchor/alignment ('auto' | 'top' | 'middle' | 'bottom')\n * @param pad - Optional padding configuration\n * @returns Style object with CSS properties for dynamic styling\n */\nexport function getChartTitleInlineStyles(\n titleFont: Partial<Font> | undefined,\n xanchor?: string,\n yanchor?: string,\n pad?: { t?: number; r?: number; b?: number; l?: number },\n): React.CSSProperties {\n const styles: React.CSSProperties = {};\n\n if (titleFont) {\n Object.assign(\n styles,\n titleFont.family && { fontFamily: titleFont.family },\n titleFont.size && { fontSize: `${titleFont.size}px` },\n titleFont.weight && { fontWeight: titleFont.weight },\n titleFont.color && { fill: titleFont.color as string },\n titleFont.shadow && titleFont.shadow !== 'none' && { filter: `drop-shadow(${titleFont.shadow})` },\n );\n }\n\n if (xanchor) {\n const anchorMap: Record<string, React.CSSProperties['textAlign']> = {\n left: 'left',\n center: 'center',\n right: 'right',\n };\n const alignmentKey = xanchor.toLowerCase();\n if (anchorMap[alignmentKey]) {\n styles.textAlign = anchorMap[alignmentKey];\n }\n }\n\n if (yanchor) {\n const anchorMap: Record<string, React.CSSProperties['alignSelf']> = {\n top: 'flex-start',\n middle: 'center',\n bottom: 'flex-end',\n };\n const alignmentKey = yanchor.toLowerCase();\n if (anchorMap[alignmentKey]) {\n styles.alignSelf = anchorMap[alignmentKey];\n }\n }\n\n if (pad) {\n const t = pad.t ?? 0;\n const r = pad.r ?? 0;\n const b = pad.b ?? 0;\n const l = pad.l ?? 0;\n styles.padding = `${t}px ${r}px ${b}px ${l}px`;\n }\n\n return styles;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator, __spreadArray } from "tslib";
2
2
  import { create as d3Create, select as d3Select } from 'd3-selection';
3
- import { copyStyle, createMeasurementSpan } from './index';
3
+ import { copyStyle, measureTextWithDOM } from './index';
4
4
  import { LEGEND_CONTAINER_MARGIN_TOP, LEGEND_CONTAINER_MARGIN_START, LEGEND_PADDING, LEGEND_HEIGHT, LEGEND_SHAPE_BORDER, LEGEND_SHAPE_SIZE, LEGEND_SHAPE_MARGIN_END, INACTIVE_LEGEND_TEXT_OPACITY, } from '../components/Legends/Legends.styles';
5
5
  export function exportChartsAsImage(charts_1, legendsToSvg_1) {
6
6
  return __awaiter(this, arguments, void 0, function (charts, legendsToSvg, isRTL, opts) {
@@ -242,8 +242,8 @@ export function cloneLegendsToSVG(legends, svgWidth, config, legendContainer) {
242
242
  var noLegendsSelected = Object.keys(selectedLegends).length === 0;
243
243
  var _loop_1 = function (i) {
244
244
  var textOffset = LEGEND_PADDING + LEGEND_SHAPE_SIZE + LEGEND_SHAPE_MARGIN_END;
245
- var legendText = createMeasurementSpan(legends[i].title, textClassName, legendContainer);
246
- var legendWidth = textOffset + legendText.getBoundingClientRect().width + LEGEND_PADDING;
245
+ var legendText = measureTextWithDOM(legends[i].title, ".".concat(textClassName), legendContainer);
246
+ var legendWidth = textOffset + legendText.width + LEGEND_PADDING;
247
247
  var legendItem = legendGroup.append('g');
248
248
  legendLine.push({ elem: legendItem, width: legendWidth });
249
249
  if (legendX + legendWidth > svgWidth && legendLine.length > 1) {
@@ -271,7 +271,7 @@ export function cloneLegendsToSVG(legends, svgWidth, config, legendContainer) {
271
271
  .attr('dominant-baseline', 'hanging')
272
272
  .style('opacity', isLegendActive ? 1 : INACTIVE_LEGEND_TEXT_OPACITY)
273
273
  .text(legends[i].title)
274
- .call(function (selection) { return copyStyle(LEGEND_TEXT_STYLE_PROPERTIES_MAP, legendText, selection.node()); });
274
+ .call(function (selection) { return copyStyle(LEGEND_TEXT_STYLE_PROPERTIES_MAP, legendText.node, selection.node()); });
275
275
  legendX += legendWidth;
276
276
  };
277
277
  for (var i = 0; i < legends.length; i++) {