@fluentui/react-charts 0.0.0-nightly-20251107-0407.1 → 0.0.0-nightly-20251111-0407.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/CHANGELOG.md +13 -13
  2. package/dist/index.d.ts +223 -44
  3. package/lib/AnnotationOnlyChart.js +1 -0
  4. package/lib/AnnotationOnlyChart.js.map +1 -0
  5. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +208 -0
  6. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
  7. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +1 -0
  8. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
  9. package/lib/components/AnnotationOnlyChart/index.js +2 -0
  10. package/lib/components/AnnotationOnlyChart/index.js.map +1 -0
  11. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +31 -0
  12. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -0
  13. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +23 -0
  14. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -0
  15. package/lib/components/AreaChart/useAreaChartStyles.styles.js +11 -6
  16. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  17. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -1
  18. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  19. package/lib/components/ChartTable/useChartTableStyles.styles.js +59 -39
  20. package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  21. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +5 -5
  22. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  23. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +617 -0
  24. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
  25. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +1 -0
  26. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
  27. package/lib/components/CommonComponents/Annotations/index.js +2 -0
  28. package/lib/components/CommonComponents/Annotations/index.js.map +1 -0
  29. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +173 -0
  30. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -0
  31. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +126 -0
  32. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -0
  33. package/lib/components/CommonComponents/CartesianChart.js +157 -132
  34. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  35. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  36. package/lib/components/CommonComponents/index.js +2 -0
  37. package/lib/components/CommonComponents/index.js.map +1 -1
  38. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +29 -13
  39. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  40. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +14 -1
  41. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  42. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +2 -6
  43. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  44. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +3 -2
  45. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  46. package/lib/components/DeclarativeChart/DeclarativeChart.js +39 -19
  47. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  48. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +4 -8
  49. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  50. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +591 -40
  51. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  52. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +23 -8
  53. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  54. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +2 -2
  55. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  56. package/lib/components/DonutChart/useDonutChartStyles.styles.js +2 -2
  57. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  58. package/lib/components/GanttChart/GanttChart.js +3 -3
  59. package/lib/components/GanttChart/GanttChart.js.map +1 -1
  60. package/lib/components/GanttChart/GanttChart.types.js.map +1 -1
  61. package/lib/components/GanttChart/useGanttChartStyles.styles.js +3 -1
  62. package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +1 -1
  63. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +3 -1
  64. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
  65. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +1 -1
  66. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  67. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +11 -6
  68. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  69. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +3 -1
  70. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  71. package/lib/components/HeatMapChart/HeatMapChart.js +1 -1
  72. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  73. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  74. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +3 -1
  75. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  76. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +3 -1
  77. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
  78. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +25 -12
  79. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  80. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +4 -4
  81. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  82. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -2
  83. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  84. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  85. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +3 -1
  86. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  87. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +3 -1
  88. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  89. package/lib/components/Legends/useLegendsStyles.styles.js +97 -37
  90. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
  91. package/lib/components/Legends/useLegendsStyles.styles.raw.js +10 -11
  92. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  93. package/lib/components/LineChart/LineChart.js +1 -1
  94. package/lib/components/LineChart/LineChart.js.map +1 -1
  95. package/lib/components/LineChart/useLineChartStyles.styles.js +15 -10
  96. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  97. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +3 -1
  98. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  99. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +13 -10
  100. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  101. package/lib/components/ScatterChart/ScatterChart.js +1 -1
  102. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  103. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  104. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +13 -8
  105. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  106. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -1
  107. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  108. package/lib/components/VerticalBarChart/VerticalBarChart.js +1 -1
  109. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  110. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +13 -8
  111. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  112. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +3 -1
  113. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  114. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +1 -1
  115. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  116. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  117. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +11 -6
  118. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  119. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -1
  120. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  121. package/lib/index.js +1 -0
  122. package/lib/index.js.map +1 -1
  123. package/lib/types/ChartAnnotation.js +1 -0
  124. package/lib/types/ChartAnnotation.js.map +1 -0
  125. package/lib/types/index.js +1 -0
  126. package/lib/types/index.js.map +1 -1
  127. package/lib/utilities/Common.styles.js +1 -2
  128. package/lib/utilities/Common.styles.js.map +1 -1
  129. package/lib/utilities/Common.styles.raw.js +1 -2
  130. package/lib/utilities/Common.styles.raw.js.map +1 -1
  131. package/lib/utilities/image-export-utils.js +108 -0
  132. package/lib/utilities/image-export-utils.js.map +1 -1
  133. package/lib/utilities/utilities.js +16 -13
  134. package/lib/utilities/utilities.js.map +1 -1
  135. package/lib-commonjs/AnnotationOnlyChart.js +6 -0
  136. package/lib-commonjs/AnnotationOnlyChart.js.map +1 -0
  137. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +219 -0
  138. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
  139. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +6 -0
  140. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
  141. package/lib-commonjs/components/AnnotationOnlyChart/index.js +7 -0
  142. package/lib-commonjs/components/AnnotationOnlyChart/index.js.map +1 -0
  143. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +56 -0
  144. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -0
  145. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +33 -0
  146. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -0
  147. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +14 -15
  148. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  149. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -1
  150. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  151. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +74 -102
  152. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  153. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +4 -4
  154. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  155. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +628 -0
  156. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
  157. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +4 -0
  158. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
  159. package/lib-commonjs/components/CommonComponents/Annotations/index.js +7 -0
  160. package/lib-commonjs/components/CommonComponents/Annotations/index.js.map +1 -0
  161. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +265 -0
  162. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -0
  163. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +161 -0
  164. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -0
  165. package/lib-commonjs/components/CommonComponents/CartesianChart.js +157 -131
  166. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  167. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  168. package/lib-commonjs/components/CommonComponents/index.js +2 -0
  169. package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
  170. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +32 -21
  171. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  172. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +14 -1
  173. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  174. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +0 -14
  175. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  176. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +2 -1
  177. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  178. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +38 -18
  179. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  180. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  181. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +577 -6
  182. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  183. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +25 -16
  184. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  185. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +1 -1
  186. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  187. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +2 -2
  188. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  189. package/lib-commonjs/components/GanttChart/GanttChart.js +3 -3
  190. package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
  191. package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -1
  192. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +3 -1
  193. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +1 -1
  194. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +3 -1
  195. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
  196. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +1 -1
  197. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  198. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +14 -15
  199. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  200. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +3 -1
  201. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  202. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +1 -1
  203. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  204. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  205. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +3 -1
  206. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  207. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +3 -1
  208. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
  209. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +47 -34
  210. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  211. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +3 -3
  212. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  213. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -2
  214. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  215. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  216. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +3 -1
  217. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  218. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +3 -1
  219. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  220. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +144 -86
  221. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
  222. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +9 -10
  223. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  224. package/lib-commonjs/components/LineChart/LineChart.js +1 -1
  225. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  226. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +18 -19
  227. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  228. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +3 -1
  229. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  230. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +16 -19
  231. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  232. package/lib-commonjs/components/ScatterChart/ScatterChart.js +1 -1
  233. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  234. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  235. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +16 -17
  236. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  237. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -1
  238. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  239. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +1 -1
  240. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  241. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +16 -17
  242. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  243. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +3 -1
  244. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  245. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +1 -1
  246. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  247. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  248. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +14 -15
  249. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  250. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -1
  251. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  252. package/lib-commonjs/index.js +1 -0
  253. package/lib-commonjs/index.js.map +1 -1
  254. package/lib-commonjs/types/ChartAnnotation.js +6 -0
  255. package/lib-commonjs/types/ChartAnnotation.js.map +1 -0
  256. package/lib-commonjs/types/index.js +1 -0
  257. package/lib-commonjs/types/index.js.map +1 -1
  258. package/lib-commonjs/utilities/Common.styles.js +1 -2
  259. package/lib-commonjs/utilities/Common.styles.js.map +1 -1
  260. package/lib-commonjs/utilities/Common.styles.raw.js +1 -2
  261. package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -1
  262. package/lib-commonjs/utilities/image-export-utils.js +108 -0
  263. package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
  264. package/lib-commonjs/utilities/utilities.js +16 -13
  265. package/lib-commonjs/utilities/utilities.js.map +1 -1
  266. package/package.json +13 -13
@@ -182,8 +182,7 @@ const getSecondaryYAxisValues = (data, layout)=>{
182
182
  }
183
183
  };
184
184
  };
185
- export const _getGaugeAxisColor = (colorway, colorwayType, color, // eslint-disable-next-line @typescript-eslint/no-deprecated
186
- colorMap, isDarkTheme)=>{
185
+ export const _getGaugeAxisColor = (colorway, colorwayType, color, colorMap, isDarkTheme)=>{
187
186
  const extractedColors = extractColor(colorway, colorwayType, color, colorMap, isDarkTheme);
188
187
  return resolveColor(extractedColors, 0, '', colorMap, colorway, isDarkTheme);
189
188
  };
@@ -244,6 +243,526 @@ export const resolveXAxisPoint = (x, isXYearCategory, isXString, isXDate, isXNum
244
243
  }
245
244
  return flattened;
246
245
  };
246
+ const encodeHtmlEntities = (value)=>value.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#39;');
247
+ const toFiniteNumber = (value)=>{
248
+ if (value === undefined || value === null) {
249
+ return undefined;
250
+ }
251
+ const numeric = typeof value === 'number' ? value : Number(value);
252
+ return Number.isFinite(numeric) ? numeric : undefined;
253
+ };
254
+ /**
255
+ * Normalizes Plotly axis reference strings so equivalent aliases (e.g. `xaxis1`, `x1`) collapse to the base axis id.
256
+ */ const normalizeAxisRef = (ref, axis)=>{
257
+ if (!ref) {
258
+ return axis;
259
+ }
260
+ const normalized = ref.toLowerCase();
261
+ if (normalized === axis || normalized === `${axis}axis` || normalized === `${axis}axis1` || normalized === `${axis}1`) {
262
+ return axis;
263
+ }
264
+ const match = normalized.match(/^([xy])(axis)?(\d+)$/);
265
+ if (match && match[1] === axis && match[3]) {
266
+ return match[3] === '1' ? axis : `${axis}${match[3]}`;
267
+ }
268
+ return normalized;
269
+ };
270
+ /**
271
+ * Scans the data traces bound to a given axis and returns the numeric min/max values plotted on that axis.
272
+ */ const getAxisNumericRangeFromData = (axis, ref, layout, data)=>{
273
+ if (!data || data.length === 0) {
274
+ return undefined;
275
+ }
276
+ const axisLayout = getAxisLayoutByRef(layout, ref, axis);
277
+ const targetRef = normalizeAxisRef(ref, axis);
278
+ const traceAxisKey = axis === 'x' ? 'xaxis' : 'yaxis';
279
+ let minValue;
280
+ let maxValue;
281
+ data.forEach((trace)=>{
282
+ const plotTrace = trace;
283
+ const traceAxisRef = normalizeAxisRef(plotTrace[traceAxisKey], axis);
284
+ if (traceAxisRef !== targetRef) {
285
+ return;
286
+ }
287
+ const values = axis === 'x' ? plotTrace.x : plotTrace.y;
288
+ if (!isArrayOrTypedArray(values)) {
289
+ return;
290
+ }
291
+ const arrayLike = values;
292
+ for(let index = 0; index < arrayLike.length; index++){
293
+ const value = arrayLike[index];
294
+ const numeric = toNumericValue(convertDataValue(value, axisLayout));
295
+ if (numeric === undefined || Number.isNaN(numeric)) {
296
+ continue;
297
+ }
298
+ minValue = minValue === undefined ? numeric : Math.min(minValue, numeric);
299
+ maxValue = maxValue === undefined ? numeric : Math.max(maxValue, numeric);
300
+ }
301
+ });
302
+ if (minValue === undefined || maxValue === undefined || minValue === maxValue) {
303
+ return undefined;
304
+ }
305
+ return [
306
+ minValue,
307
+ maxValue
308
+ ];
309
+ };
310
+ /**
311
+ * Converts Plotly's bottom-origin relative Y coordinate into the SVG top-origin space used by our overlay.
312
+ */ const transformRelativeYForChart = (value)=>{
313
+ if (value === undefined) {
314
+ return undefined;
315
+ }
316
+ if (!Number.isFinite(value)) {
317
+ return undefined;
318
+ }
319
+ return 1 - value;
320
+ };
321
+ const mapHorizontalAlign = (anchor)=>{
322
+ switch((anchor !== null && anchor !== void 0 ? anchor : '').toLowerCase()){
323
+ case 'left':
324
+ return 'start';
325
+ case 'center':
326
+ return 'center';
327
+ case 'right':
328
+ return 'end';
329
+ default:
330
+ return undefined;
331
+ }
332
+ };
333
+ const mapVerticalAlign = (anchor)=>{
334
+ switch((anchor !== null && anchor !== void 0 ? anchor : '').toLowerCase()){
335
+ case 'top':
336
+ return 'top';
337
+ case 'middle':
338
+ return 'middle';
339
+ case 'bottom':
340
+ return 'bottom';
341
+ default:
342
+ return undefined;
343
+ }
344
+ };
345
+ const appendPx = (value)=>{
346
+ if (value === undefined || value === null) {
347
+ return undefined;
348
+ }
349
+ if (typeof value === 'string') {
350
+ return value;
351
+ }
352
+ if (typeof value === 'number' && Number.isFinite(value)) {
353
+ return `${value}px`;
354
+ }
355
+ return undefined;
356
+ };
357
+ /**
358
+ * Maps Plotly's axis reference string to one of our coordinate interpretation modes (axis, relative, or pixel).
359
+ */ const resolveRefType = (ref, axis)=>{
360
+ if (!ref) {
361
+ return 'axis';
362
+ }
363
+ const normalized = ref.toLowerCase();
364
+ if (normalized === 'pixel') {
365
+ return 'pixel';
366
+ }
367
+ if (normalized === 'paper') {
368
+ return 'relative';
369
+ }
370
+ if (normalized.endsWith(' domain')) {
371
+ return normalized.startsWith(axis) ? 'relative' : undefined;
372
+ }
373
+ const match = normalized.match(/^([xy])(\d*)$/);
374
+ if (match && match[1] === axis) {
375
+ return 'axis';
376
+ }
377
+ return undefined;
378
+ };
379
+ /**
380
+ * Retrieves the appropriate axis layout section from Plotly's layout given an axis reference alias.
381
+ */ const getAxisLayoutByRef = (layout, ref, axis)=>{
382
+ if (!layout) {
383
+ return undefined;
384
+ }
385
+ const defaultAxisKey = `${axis}axis`;
386
+ if (!ref) {
387
+ return layout[defaultAxisKey];
388
+ }
389
+ const normalized = ref.toLowerCase();
390
+ if (normalized === 'paper' || normalized === 'pixel' || normalized.endsWith(' domain')) {
391
+ return layout[defaultAxisKey];
392
+ }
393
+ const match = normalized.match(/^([xy])(\d*)$/);
394
+ if (match && match[1] === axis) {
395
+ const index = match[2];
396
+ if (index && index !== '' && index !== '1') {
397
+ const axisKey = `${axis}axis${index}`;
398
+ return layout[axisKey];
399
+ }
400
+ return layout[defaultAxisKey];
401
+ }
402
+ return layout[defaultAxisKey];
403
+ };
404
+ /**
405
+ * Normalizes raw Plotly data values into canonical number/date/string types based on axis configuration.
406
+ */ const convertDataValue = (value, axisLayout)=>{
407
+ if (value === undefined || value === null) {
408
+ return undefined;
409
+ }
410
+ if ((axisLayout === null || axisLayout === void 0 ? void 0 : axisLayout.type) === 'date' || isDate(value)) {
411
+ const dateValue = value instanceof Date ? value : new Date(value);
412
+ return Number.isNaN(dateValue.getTime()) ? undefined : dateValue;
413
+ }
414
+ if (typeof value === 'number') {
415
+ return value;
416
+ }
417
+ if ((axisLayout === null || axisLayout === void 0 ? void 0 : axisLayout.type) === 'linear' || (axisLayout === null || axisLayout === void 0 ? void 0 : axisLayout.type) === 'log') {
418
+ const numeric = Number(value);
419
+ return Number.isFinite(numeric) ? numeric : undefined;
420
+ }
421
+ if (value instanceof Date) {
422
+ return value;
423
+ }
424
+ return value;
425
+ };
426
+ const toNumericValue = (value)=>{
427
+ if (value instanceof Date) {
428
+ const timestamp = value.getTime();
429
+ return Number.isFinite(timestamp) ? timestamp : undefined;
430
+ }
431
+ if (typeof value === 'number') {
432
+ return Number.isFinite(value) ? value : undefined;
433
+ }
434
+ if (typeof value === 'string') {
435
+ const numeric = Number(value);
436
+ return Number.isFinite(numeric) ? numeric : undefined;
437
+ }
438
+ return undefined;
439
+ };
440
+ const toRelativeCoordinate = (value, axisLayout, fallbackRange)=>{
441
+ const range = Array.isArray(axisLayout === null || axisLayout === void 0 ? void 0 : axisLayout.range) ? axisLayout.range : undefined;
442
+ let start = range && range.length >= 2 ? toNumericValue(convertDataValue(range[0], axisLayout)) : undefined;
443
+ let end = range && range.length >= 2 ? toNumericValue(convertDataValue(range[1], axisLayout)) : undefined;
444
+ if ((start === undefined || end === undefined || start === end) && fallbackRange) {
445
+ [start, end] = fallbackRange;
446
+ }
447
+ const current = toNumericValue(convertDataValue(value, axisLayout));
448
+ if (start === undefined || end === undefined || current === undefined || start === end) {
449
+ return undefined;
450
+ }
451
+ const relative = (current - start) / (end - start);
452
+ return Number.isFinite(relative) ? relative : undefined;
453
+ };
454
+ const createAnnotationId = (text, index)=>{
455
+ const normalized = text.replace(/\s+/g, ' ').trim();
456
+ if (normalized) {
457
+ const slug = normalized.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '').slice(0, 32);
458
+ if (slug) {
459
+ return `annotation-${index}-${slug}`;
460
+ }
461
+ }
462
+ return `annotation-${index}`;
463
+ };
464
+ const DEFAULT_ARROW_OFFSET = -40;
465
+ const mapArrowsideToArrow = (annotation)=>{
466
+ let includeStart = false;
467
+ let includeEnd = false;
468
+ const arrowSide = typeof (annotation === null || annotation === void 0 ? void 0 : annotation.arrowside) === 'string' ? annotation === null || annotation === void 0 ? void 0 : annotation.arrowside.toLowerCase() : undefined;
469
+ if (arrowSide) {
470
+ includeStart = arrowSide.includes('start');
471
+ includeEnd = arrowSide.includes('end');
472
+ }
473
+ const endHead = toFiniteNumber(annotation === null || annotation === void 0 ? void 0 : annotation.arrowhead);
474
+ const startHead = toFiniteNumber(annotation.startarrowhead);
475
+ if (endHead !== undefined && endHead > 0) {
476
+ includeEnd = true;
477
+ }
478
+ if (startHead !== undefined && startHead > 0) {
479
+ includeStart = true;
480
+ }
481
+ if (includeStart && includeEnd) {
482
+ return 'both';
483
+ }
484
+ if (includeStart) {
485
+ return 'start';
486
+ }
487
+ if (includeEnd) {
488
+ return 'end';
489
+ }
490
+ return 'none';
491
+ };
492
+ const mapArrowDashToPattern = (value)=>{
493
+ if (!value) {
494
+ return undefined;
495
+ }
496
+ const normalized = value.trim().toLowerCase();
497
+ switch(normalized){
498
+ case 'solid':
499
+ return undefined;
500
+ case 'dot':
501
+ return '1, 5';
502
+ case 'dash':
503
+ return '5, 5';
504
+ case 'longdash':
505
+ return '10, 5';
506
+ case 'dashdot':
507
+ return '5, 5, 1, 5';
508
+ case 'longdashdot':
509
+ return '10, 5, 1, 5';
510
+ default:
511
+ if (/^\d+(\s|,)*\d*$/.test(normalized.replace(/\s+/g, ' '))) {
512
+ return normalized.replace(/\s+/g, ' ');
513
+ }
514
+ return value;
515
+ }
516
+ };
517
+ /**
518
+ * Converts a Plotly annotation definition into the internal `ChartAnnotation` format, translating coordinates,
519
+ * layout alignment, styling, and connector metadata while skipping unsupported configurations.
520
+ */ const convertPlotlyAnnotation = (annotation, layout, data, index)=>{
521
+ if (!annotation || annotation.visible === false) {
522
+ return undefined;
523
+ }
524
+ const xRefType = resolveRefType(annotation.xref, 'x');
525
+ const yRefType = resolveRefType(annotation.yref, 'y');
526
+ if (!xRefType || !yRefType) {
527
+ return undefined;
528
+ }
529
+ let coordinates;
530
+ if (xRefType === 'axis' && yRefType === 'axis') {
531
+ const xAxisLayout = getAxisLayoutByRef(layout, annotation.xref, 'x');
532
+ const yAxisLayout = getAxisLayoutByRef(layout, annotation.yref, 'y');
533
+ const xValue = convertDataValue(annotation.x, xAxisLayout);
534
+ const yValue = convertDataValue(annotation.y, yAxisLayout);
535
+ if (xValue === undefined || yValue === undefined) {
536
+ return undefined;
537
+ }
538
+ const yRefNormalized = typeof annotation.yref === 'string' ? annotation.yref.toLowerCase() : undefined;
539
+ coordinates = {
540
+ type: 'data',
541
+ x: xValue,
542
+ y: yValue,
543
+ ...yRefNormalized === 'y2' ? {
544
+ yAxis: 'secondary'
545
+ } : {}
546
+ };
547
+ } else if (xRefType === 'relative' && yRefType === 'relative') {
548
+ const xValue = toFiniteNumber(annotation.x);
549
+ const yValue = toFiniteNumber(annotation.y);
550
+ const chartRelativeY = transformRelativeYForChart(yValue);
551
+ if (xValue === undefined || chartRelativeY === undefined) {
552
+ return undefined;
553
+ }
554
+ coordinates = {
555
+ type: 'relative',
556
+ x: xValue,
557
+ y: chartRelativeY
558
+ };
559
+ } else if (xRefType === 'relative' && yRefType === 'axis') {
560
+ const xValue = toFiniteNumber(annotation.x);
561
+ const yAxisLayout = getAxisLayoutByRef(layout, annotation.yref, 'y');
562
+ const yFallbackRange = getAxisNumericRangeFromData('y', annotation.yref, layout, data);
563
+ const yRelative = toRelativeCoordinate(annotation.y, yAxisLayout, yFallbackRange);
564
+ const chartRelativeY = transformRelativeYForChart(yRelative);
565
+ if (xValue === undefined || chartRelativeY === undefined) {
566
+ return undefined;
567
+ }
568
+ coordinates = {
569
+ type: 'relative',
570
+ x: xValue,
571
+ y: chartRelativeY
572
+ };
573
+ } else if (xRefType === 'axis' && yRefType === 'relative') {
574
+ const yValue = toFiniteNumber(annotation.y);
575
+ const xAxisLayout = getAxisLayoutByRef(layout, annotation.xref, 'x');
576
+ const xFallbackRange = getAxisNumericRangeFromData('x', annotation.xref, layout, data);
577
+ const xRelative = toRelativeCoordinate(annotation.x, xAxisLayout, xFallbackRange);
578
+ const chartRelativeY = transformRelativeYForChart(yValue);
579
+ if (xRelative === undefined || chartRelativeY === undefined) {
580
+ return undefined;
581
+ }
582
+ coordinates = {
583
+ type: 'relative',
584
+ x: xRelative,
585
+ y: chartRelativeY
586
+ };
587
+ } else if (xRefType === 'pixel' && yRefType === 'pixel') {
588
+ const xValue = toFiniteNumber(annotation.x);
589
+ const yValue = toFiniteNumber(annotation.y);
590
+ if (xValue === undefined || yValue === undefined) {
591
+ return undefined;
592
+ }
593
+ coordinates = {
594
+ type: 'pixel',
595
+ x: xValue,
596
+ y: yValue
597
+ };
598
+ } else {
599
+ return undefined;
600
+ }
601
+ const textValue = annotation.text;
602
+ const rawText = textValue === undefined || textValue === null ? '' : String(textValue);
603
+ const encodedText = encodeHtmlEntities(rawText);
604
+ const chartAnnotation = {
605
+ id: createAnnotationId(encodedText, index),
606
+ text: encodedText,
607
+ coordinates
608
+ };
609
+ const layoutProps = {};
610
+ const styleProps = {};
611
+ const showArrow = annotation.showarrow === undefined ? false : !!annotation.showarrow;
612
+ const clipOnAxis = annotation.cliponaxis;
613
+ if (clipOnAxis !== undefined) {
614
+ layoutProps.clipToBounds = !!clipOnAxis;
615
+ } else if (coordinates.type === 'data') {
616
+ layoutProps.clipToBounds = true;
617
+ }
618
+ const horizontalAlign = mapHorizontalAlign(annotation.xanchor);
619
+ if (horizontalAlign) {
620
+ layoutProps.align = horizontalAlign;
621
+ }
622
+ if (!layoutProps.align) {
623
+ const alignProp = mapHorizontalAlign(annotation.align);
624
+ if (alignProp) {
625
+ layoutProps.align = alignProp;
626
+ }
627
+ }
628
+ const verticalAlign = mapVerticalAlign(annotation.yanchor);
629
+ if (verticalAlign) {
630
+ layoutProps.verticalAlign = verticalAlign;
631
+ }
632
+ if (!layoutProps.verticalAlign) {
633
+ const valignProp = mapVerticalAlign(annotation.valign);
634
+ if (valignProp) {
635
+ layoutProps.verticalAlign = valignProp;
636
+ }
637
+ }
638
+ const offsetXComponents = [];
639
+ let hasExplicitOffset = false;
640
+ const ax = toFiniteNumber(annotation.ax);
641
+ const axRef = typeof annotation.axref === 'string' ? annotation.axref.toLowerCase() : undefined;
642
+ if (ax !== undefined && (axRef === undefined || axRef === 'pixel')) {
643
+ offsetXComponents.push(ax);
644
+ hasExplicitOffset = true;
645
+ }
646
+ const xShift = toFiniteNumber(annotation.xshift);
647
+ if (xShift !== undefined) {
648
+ offsetXComponents.push(xShift);
649
+ hasExplicitOffset = true;
650
+ }
651
+ if (offsetXComponents.length > 0) {
652
+ const offsetX = offsetXComponents.reduce((sum, value)=>sum + value, 0);
653
+ if (offsetX !== 0) {
654
+ layoutProps.offsetX = offsetX;
655
+ }
656
+ }
657
+ const offsetYComponents = [];
658
+ const ay = toFiniteNumber(annotation.ay);
659
+ const ayRef = typeof annotation.ayref === 'string' ? annotation.ayref.toLowerCase() : undefined;
660
+ if (ay !== undefined && (ayRef === undefined || ayRef === 'pixel')) {
661
+ offsetYComponents.push(ay);
662
+ hasExplicitOffset = true;
663
+ }
664
+ const yShift = toFiniteNumber(annotation.yshift);
665
+ if (yShift !== undefined) {
666
+ offsetYComponents.push(yShift);
667
+ hasExplicitOffset = true;
668
+ }
669
+ if (offsetYComponents.length > 0) {
670
+ const offsetY = offsetYComponents.reduce((sum, value)=>sum + value, 0);
671
+ if (offsetY !== 0) {
672
+ layoutProps.offsetY = offsetY;
673
+ }
674
+ }
675
+ if (showArrow && !hasExplicitOffset && layoutProps.offsetY === undefined) {
676
+ layoutProps.offsetY = DEFAULT_ARROW_OFFSET;
677
+ }
678
+ const maxWidth = toFiniteNumber(annotation.width);
679
+ if (maxWidth !== undefined) {
680
+ layoutProps.maxWidth = maxWidth;
681
+ }
682
+ if (annotation.bgcolor) {
683
+ styleProps.backgroundColor = annotation.bgcolor;
684
+ }
685
+ if (annotation.bordercolor) {
686
+ styleProps.borderColor = annotation.bordercolor;
687
+ }
688
+ const borderWidth = toFiniteNumber(annotation.borderwidth);
689
+ if (borderWidth !== undefined) {
690
+ styleProps.borderWidth = borderWidth;
691
+ }
692
+ const borderPad = appendPx(annotation.borderpad);
693
+ if (borderPad) {
694
+ styleProps.padding = borderPad;
695
+ }
696
+ const opacity = toFiniteNumber(annotation.opacity);
697
+ if (opacity !== undefined) {
698
+ styleProps.opacity = opacity;
699
+ }
700
+ if (annotation.font) {
701
+ const font = annotation.font;
702
+ if (font === null || font === void 0 ? void 0 : font.color) {
703
+ styleProps.textColor = font.color;
704
+ }
705
+ const fontSize = appendPx(font === null || font === void 0 ? void 0 : font.size);
706
+ if (fontSize) {
707
+ styleProps.fontSize = fontSize;
708
+ }
709
+ if (font === null || font === void 0 ? void 0 : font.weight) {
710
+ styleProps.fontWeight = font.weight;
711
+ }
712
+ }
713
+ const textAngle = annotation === null || annotation === void 0 ? void 0 : annotation.textangle;
714
+ if (typeof textAngle === 'number' && !Number.isNaN(textAngle)) {
715
+ styleProps.rotation = textAngle;
716
+ } else if (typeof textAngle === 'string' && textAngle.toLowerCase() !== 'auto') {
717
+ const parsedAngle = Number(textAngle);
718
+ if (!Number.isNaN(parsedAngle)) {
719
+ styleProps.rotation = parsedAngle;
720
+ }
721
+ }
722
+ if (Object.keys(layoutProps).length > 0) {
723
+ chartAnnotation.layout = layoutProps;
724
+ }
725
+ if (Object.keys(styleProps).length > 0) {
726
+ chartAnnotation.style = styleProps;
727
+ }
728
+ if (showArrow) {
729
+ var _annotation_arrowcolor;
730
+ const arrowColor = (_annotation_arrowcolor = annotation.arrowcolor) !== null && _annotation_arrowcolor !== void 0 ? _annotation_arrowcolor : styleProps.textColor;
731
+ const arrowWidth = toFiniteNumber(annotation.arrowwidth);
732
+ const endPadding = toFiniteNumber(annotation.standoff);
733
+ const startPadding = toFiniteNumber(annotation.startstandoff);
734
+ const dashPattern = mapArrowDashToPattern(annotation.arrowdash);
735
+ chartAnnotation.connector = {
736
+ ...arrowColor ? {
737
+ strokeColor: arrowColor
738
+ } : {},
739
+ ...arrowWidth !== undefined ? {
740
+ strokeWidth: arrowWidth
741
+ } : {},
742
+ ...endPadding !== undefined ? {
743
+ endPadding: Math.max(endPadding, 0)
744
+ } : {},
745
+ ...startPadding !== undefined ? {
746
+ startPadding: Math.max(startPadding, 0)
747
+ } : {},
748
+ ...dashPattern ? {
749
+ dashArray: dashPattern
750
+ } : {},
751
+ arrow: mapArrowsideToArrow(annotation)
752
+ };
753
+ }
754
+ return chartAnnotation;
755
+ };
756
+ const getChartAnnotationsFromLayout = (layout, data, isMultiPlot)=>{
757
+ if (isMultiPlot || !(layout === null || layout === void 0 ? void 0 : layout.annotations)) {
758
+ return undefined;
759
+ }
760
+ const annotationsArray = Array.isArray(layout.annotations) ? layout.annotations : [
761
+ layout.annotations
762
+ ];
763
+ const converted = annotationsArray.map((annotation, index)=>convertPlotlyAnnotation(annotation, layout, data, index)).filter((annotation)=>annotation !== undefined);
764
+ return converted.length > 0 ? converted : undefined;
765
+ };
247
766
  /**
248
767
  * Normalizes an array of objects by flattening nested structures and creating grouped data
249
768
  * Uses json_normalize approach with D3 color detection and filtering
@@ -320,8 +839,35 @@ export const resolveXAxisPoint = (x, isXYearCategory, isXString, isXDate, isXNum
320
839
  x
321
840
  };
322
841
  };
323
- export const transformPlotlyJsonToDonutProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
324
- colorMap, colorwayType, isDarkTheme)=>{
842
+ export const transformPlotlyJsonToAnnotationChartProps = (input, isMultiPlot, _colorMap, _colorwayType, _isDarkTheme)=>{
843
+ var _layoutWithMeta_meta, _input_layout, _input_layout1, _input_layout2, _input_layout3, _input_layout_font, _input_layout4, _input_layout_font1, _input_layout5, _input_layout6;
844
+ var _getChartAnnotationsFromLayout;
845
+ const annotations = (_getChartAnnotationsFromLayout = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot)) !== null && _getChartAnnotationsFromLayout !== void 0 ? _getChartAnnotationsFromLayout : [];
846
+ const titles = getTitles(input.layout);
847
+ const layoutTitle = titles.chartTitle || undefined;
848
+ const layoutWithMeta = input.layout;
849
+ const description = typeof (layoutWithMeta === null || layoutWithMeta === void 0 ? void 0 : (_layoutWithMeta_meta = layoutWithMeta.meta) === null || _layoutWithMeta_meta === void 0 ? void 0 : _layoutWithMeta_meta.description) === 'string' ? layoutWithMeta.meta.description : undefined;
850
+ const width = typeof ((_input_layout = input.layout) === null || _input_layout === void 0 ? void 0 : _input_layout.width) === 'number' ? input.layout.width : undefined;
851
+ const height = typeof ((_input_layout1 = input.layout) === null || _input_layout1 === void 0 ? void 0 : _input_layout1.height) === 'number' ? input.layout.height : undefined;
852
+ const paperBackgroundColor = typeof ((_input_layout2 = input.layout) === null || _input_layout2 === void 0 ? void 0 : _input_layout2.paper_bgcolor) === 'string' ? input.layout.paper_bgcolor : undefined;
853
+ const plotBackgroundColor = typeof ((_input_layout3 = input.layout) === null || _input_layout3 === void 0 ? void 0 : _input_layout3.plot_bgcolor) === 'string' ? input.layout.plot_bgcolor : undefined;
854
+ const fontColor = typeof ((_input_layout4 = input.layout) === null || _input_layout4 === void 0 ? void 0 : (_input_layout_font = _input_layout4.font) === null || _input_layout_font === void 0 ? void 0 : _input_layout_font.color) === 'string' ? input.layout.font.color : undefined;
855
+ const fontFamily = typeof ((_input_layout5 = input.layout) === null || _input_layout5 === void 0 ? void 0 : (_input_layout_font1 = _input_layout5.font) === null || _input_layout_font1 === void 0 ? void 0 : _input_layout_font1.family) === 'string' ? input.layout.font.family : undefined;
856
+ const margin = (_input_layout6 = input.layout) === null || _input_layout6 === void 0 ? void 0 : _input_layout6.margin;
857
+ return {
858
+ annotations,
859
+ chartTitle: layoutTitle,
860
+ description,
861
+ width,
862
+ height,
863
+ paperBackgroundColor,
864
+ plotBackgroundColor,
865
+ fontColor,
866
+ fontFamily,
867
+ margin
868
+ };
869
+ };
870
+ export const transformPlotlyJsonToDonutProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
325
871
  var _input_layout, _input_layout_template_layout, _input_layout_template, _input_layout1, _input_layout2, _firstData_marker, _input_layout3, _input_layout4, _input_layout5, _input_layout6;
326
872
  const firstData = input.data[0];
327
873
  var _input_layout_piecolorway, _input_layout_piecolorway1;
@@ -410,8 +956,7 @@ colorMap, colorwayType, isDarkTheme)=>{
410
956
  order: 'sorted'
411
957
  };
412
958
  };
413
- export const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
414
- colorMap, colorwayType, isDarkTheme, fallbackVSBC)=>{
959
+ export const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme, fallbackVSBC)=>{
415
960
  var _input_layout, _input_layout1, _input_layout2, _vsbcData_;
416
961
  const mapXToDataPoints = {};
417
962
  let yMaxValue = 0;
@@ -561,6 +1106,7 @@ colorMap, colorwayType, isDarkTheme, fallbackVSBC)=>{
561
1106
  });
562
1107
  });
563
1108
  const vsbcData = Object.values(mapXToDataPoints);
1109
+ const annotations = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot);
564
1110
  var _input_layout_height;
565
1111
  return {
566
1112
  data: vsbcData,
@@ -585,11 +1131,13 @@ colorMap, colorwayType, isDarkTheme, fallbackVSBC)=>{
585
1131
  ...getAxisCategoryOrderProps(input.data, input.layout),
586
1132
  ...getBarProps(input.data, input.layout),
587
1133
  ...getYMinMaxValues(input.data[0], input.layout),
588
- ...getAxisTickProps(input.data, input.layout)
1134
+ ...getAxisTickProps(input.data, input.layout),
1135
+ ...annotations ? {
1136
+ annotations
1137
+ } : {}
589
1138
  };
590
1139
  };
591
- export const transformPlotlyJsonToGVBCProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
592
- colorMap, colorwayType, isDarkTheme)=>{
1140
+ export const transformPlotlyJsonToGVBCProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
593
1141
  var _processedInput_layout, _processedInput_layout1;
594
1142
  // Handle object arrays in y values by normalizing the data first
595
1143
  let processedInput = {
@@ -693,6 +1241,7 @@ colorMap, colorwayType, isDarkTheme)=>{
693
1241
  });
694
1242
  }
695
1243
  });
1244
+ const annotations = getChartAnnotationsFromLayout(processedInput.layout, processedInput.data, isMultiPlot);
696
1245
  var _processedInput_layout_height;
697
1246
  return {
698
1247
  dataV2: gvbcDataV2,
@@ -705,17 +1254,20 @@ colorMap, colorwayType, isDarkTheme)=>{
705
1254
  wrapXAxisLables: true,
706
1255
  hideLegend,
707
1256
  roundCorners: true,
1257
+ showYAxisLables: true,
708
1258
  ...getTitles(processedInput.layout),
709
1259
  ...getAxisCategoryOrderProps(processedInput.data, processedInput.layout),
710
1260
  ...getYMinMaxValues(processedInput.data[0], processedInput.layout),
711
1261
  ...getXAxisTickFormat(processedInput.data[0], processedInput.layout),
712
1262
  ...yAxisTickFormat,
713
1263
  ...getBarProps(processedInput.data, processedInput.layout),
714
- ...getAxisTickProps(processedInput.data, processedInput.layout)
1264
+ ...getAxisTickProps(processedInput.data, processedInput.layout),
1265
+ ...annotations ? {
1266
+ annotations
1267
+ } : {}
715
1268
  };
716
1269
  };
717
- export const transformPlotlyJsonToVBCProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
718
- colorMap, colorwayType, isDarkTheme)=>{
1270
+ export const transformPlotlyJsonToVBCProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
719
1271
  var _input_layout, _input_layout1, _vbcData_;
720
1272
  const vbcData = [];
721
1273
  const { legends, hideLegend } = getLegendProps(input.data, input.layout, isMultiPlot);
@@ -777,6 +1329,7 @@ colorMap, colorwayType, isDarkTheme)=>{
777
1329
  });
778
1330
  });
779
1331
  });
1332
+ const annotations = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot);
780
1333
  var _input_layout_height;
781
1334
  return {
782
1335
  data: vbcData,
@@ -788,21 +1341,22 @@ colorMap, colorwayType, isDarkTheme)=>{
788
1341
  maxBarWidth: 50,
789
1342
  hideLegend,
790
1343
  roundCorners: true,
1344
+ showYAxisLables: true,
791
1345
  ...getTitles(input.layout),
792
1346
  ...getYMinMaxValues(input.data[0], input.layout),
793
- ...getAxisCategoryOrderProps(input.data, input.layout)
1347
+ ...getAxisCategoryOrderProps(input.data, input.layout),
1348
+ ...annotations ? {
1349
+ annotations
1350
+ } : {}
794
1351
  };
795
1352
  };
796
- export const transformPlotlyJsonToAreaChartProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
797
- colorMap, colorwayType, isDarkTheme)=>{
1353
+ export const transformPlotlyJsonToAreaChartProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
798
1354
  return transformPlotlyJsonToScatterTraceProps(input, isMultiPlot, 'area', colorMap, colorwayType, isDarkTheme);
799
1355
  };
800
- export const transformPlotlyJsonToLineChartProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
801
- colorMap, colorwayType, isDarkTheme)=>{
1356
+ export const transformPlotlyJsonToLineChartProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
802
1357
  return transformPlotlyJsonToScatterTraceProps(input, isMultiPlot, 'line', colorMap, colorwayType, isDarkTheme);
803
1358
  };
804
- export const transformPlotlyJsonToScatterChartProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
805
- colorMap, colorwayType, isDarkTheme)=>{
1359
+ export const transformPlotlyJsonToScatterChartProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
806
1360
  return transformPlotlyJsonToScatterTraceProps(input, isMultiPlot, 'scatter', colorMap, colorwayType, isDarkTheme);
807
1361
  };
808
1362
  const mapColorFillBars = (layout)=>{
@@ -826,8 +1380,7 @@ const mapColorFillBars = (layout)=>{
826
1380
  };
827
1381
  });
828
1382
  };
829
- const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, // eslint-disable-next-line @typescript-eslint/no-deprecated
830
- colorMap, colorwayType, isDarkTheme)=>{
1383
+ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, colorMap, colorwayType, isDarkTheme)=>{
831
1384
  var _input_data_, _chartData__data_, _chartData_, _chartData__data_1, _chartData_1, _chartData__data_2, _chartData_2, _chartData__data_3, _chartData_3, _input_layout, _input_layout1, _input_layout2;
832
1385
  const isScatterMarkers = [
833
1386
  'text',
@@ -985,6 +1538,7 @@ colorMap, colorwayType, isDarkTheme)=>{
985
1538
  const scatterChartProps = {
986
1539
  scatterChartData: chartData
987
1540
  };
1541
+ const annotations = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot);
988
1542
  var _input_layout_height;
989
1543
  const commonProps = {
990
1544
  supportNegativeData: true,
@@ -994,13 +1548,17 @@ colorMap, colorwayType, isDarkTheme)=>{
994
1548
  hideTickOverlap: true,
995
1549
  hideLegend,
996
1550
  useUTC: false,
997
- wrapXAxisLables: shouldWrapLabels,
1551
+ wrapXAxisLabels: shouldWrapLabels,
998
1552
  optimizeLargeData: numDataPoints > 1000,
1553
+ showYAxisLables: true,
999
1554
  ...getTitles(input.layout),
1000
1555
  ...getXAxisTickFormat(input.data[0], input.layout),
1001
1556
  ...yAxisTickFormat,
1002
1557
  ...getAxisScaleTypeProps(input.data, input.layout),
1003
- ...getAxisTickProps(input.data, input.layout)
1558
+ ...getAxisTickProps(input.data, input.layout),
1559
+ ...annotations ? {
1560
+ annotations
1561
+ } : {}
1004
1562
  };
1005
1563
  if (isAreaChart) {
1006
1564
  return {
@@ -1027,8 +1585,7 @@ colorMap, colorwayType, isDarkTheme)=>{
1027
1585
  };
1028
1586
  }
1029
1587
  };
1030
- export const transformPlotlyJsonToHorizontalBarWithAxisProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
1031
- colorMap, colorwayType, isDarkTheme)=>{
1588
+ export const transformPlotlyJsonToHorizontalBarWithAxisProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
1032
1589
  var _input_layout, _input_layout_margin, _input_layout1, _input_layout_margin1, _input_layout2, _input_layout_yaxis2, _input_layout3, _input_layout_yaxis21, _input_layout4, _input_layout_yaxis2_title, _input_layout_yaxis22, _input_layout5, _input_layout6;
1033
1590
  const { legends, hideLegend } = getLegendProps(input.data, input.layout, isMultiPlot);
1034
1591
  let colorScale = undefined;
@@ -1086,8 +1643,7 @@ colorMap, colorwayType, isDarkTheme)=>{
1086
1643
  ...getAxisTickProps(input.data, input.layout)
1087
1644
  };
1088
1645
  };
1089
- export const transformPlotlyJsonToGanttChartProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
1090
- colorMap, colorwayType, isDarkTheme)=>{
1646
+ export const transformPlotlyJsonToGanttChartProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
1091
1647
  var _input_layout, _input_layout1;
1092
1648
  const data = input.data.filter((series)=>series.type !== 'scatter' || series.mode !== 'markers');
1093
1649
  const { legends, hideLegend } = getLegendProps(data, input.layout, isMultiPlot);
@@ -1169,8 +1725,7 @@ colorMap, colorwayType, isDarkTheme)=>{
1169
1725
  ...getAxisTickProps(data, input.layout)
1170
1726
  };
1171
1727
  };
1172
- export const transformPlotlyJsonToHeatmapProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
1173
- colorMap, colorwayType, isDarkTheme)=>{
1728
+ export const transformPlotlyJsonToHeatmapProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
1174
1729
  var _input_layout, _input_layout_coloraxis, _input_layout1, _input_layout_template_layout, _input_layout_template, _input_layout2, _input_layout_template_data_histogram2d_, _input_layout_template_data_histogram2d, _input_layout_template_data, _input_layout_template1, _input_layout3, _input_layout_template_data_heatmap_, _input_layout_template_data_heatmap, _input_layout_template_data1, _input_layout_template2, _input_layout4, _input_layout5, _input_layout6;
1175
1730
  const firstData = input.data[0];
1176
1731
  const heatmapDataPoints = [];
@@ -1305,8 +1860,7 @@ colorMap, colorwayType, isDarkTheme)=>{
1305
1860
  ...getAxisTickProps(input.data, input.layout)
1306
1861
  };
1307
1862
  };
1308
- export const transformPlotlyJsonToSankeyProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
1309
- colorMap, colorwayType, isDarkTheme)=>{
1863
+ export const transformPlotlyJsonToSankeyProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
1310
1864
  var _input_layout_template_layout, _input_layout_template, _input_layout, _node_label, _input_layout1, _input_layout2;
1311
1865
  const { link, node } = input.data[0];
1312
1866
  var _link_value;
@@ -1356,8 +1910,7 @@ colorMap, colorwayType, isDarkTheme)=>{
1356
1910
  height: (_input_layout_height = (_input_layout2 = input.layout) === null || _input_layout2 === void 0 ? void 0 : _input_layout2.height) !== null && _input_layout_height !== void 0 ? _input_layout_height : 468
1357
1911
  };
1358
1912
  };
1359
- export const transformPlotlyJsonToGaugeProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
1360
- colorMap, colorwayType, isDarkTheme)=>{
1913
+ export const transformPlotlyJsonToGaugeProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
1361
1914
  var _firstData_gauge, _input_layout_template_layout, _input_layout_template, _input_layout, _firstData_gauge_steps, _firstData_gauge1, _firstData_gauge_axis_range, _firstData_gauge_axis, _firstData_gauge2, _input_layout_template_layout1, _input_layout_template1, _input_layout1, _firstData_gauge_axis1, _firstData_gauge3, _firstData_gauge_axis_range1, _firstData_gauge_axis2, _firstData_gauge4, _firstData_delta, _firstData_gauge_axis_range2, _firstData_gauge_axis3, _firstData_gauge5, _firstData_gauge_axis_range3, _firstData_gauge_axis4, _firstData_gauge6, _firstData_gauge_axis_range4, _firstData_gauge_axis5, _firstData_gauge7, _firstData_gauge_axis_range5, _firstData_gauge_axis6, _firstData_gauge8, _input_layout2, _input_layout3, _firstData_gauge_steps1, _firstData_gauge9;
1362
1915
  const firstData = input.data[0];
1363
1916
  const stepsColors = ((_firstData_gauge = firstData.gauge) === null || _firstData_gauge === void 0 ? void 0 : _firstData_gauge.steps) ? firstData.gauge.steps.map((step)=>step.color) : undefined;
@@ -1483,8 +2036,7 @@ function mergeCells(tableCells, templateCells) {
1483
2036
  suffix: (_tableCells_suffix = tableCells === null || tableCells === void 0 ? void 0 : tableCells.suffix) !== null && _tableCells_suffix !== void 0 ? _tableCells_suffix : templateCells === null || templateCells === void 0 ? void 0 : templateCells.suffix
1484
2037
  };
1485
2038
  }
1486
- export const transformPlotlyJsonToChartTableProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
1487
- colorMap, colorwayType, isDarkTheme)=>{
2039
+ export const transformPlotlyJsonToChartTableProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
1488
2040
  var _tableData_cells, _input_layout_template_data_table_, _input_layout_template_data_table, _input_layout_template_data, _input_layout_template, _input_layout, _input_layout_font, _input_layout1, _input_layout_template_data_table_1, _input_layout_template_data_table1, _input_layout_template_data1, _input_layout_template1, _input_layout2, _tableData_header, _input_layout3, _input_layout4;
1489
2041
  const tableData = input.data[0];
1490
2042
  const normalizeHeaders = (values, header)=>{
@@ -1637,8 +2189,7 @@ function getCategoriesAndValues(series) {
1637
2189
  }
1638
2190
  }
1639
2191
  }
1640
- export const transformPlotlyJsonToFunnelChartProps = (input, isMultiPlot, // eslint-disable-next-line @typescript-eslint/no-deprecated
1641
- colorMap, colorwayType, isDarkTheme)=>{
2192
+ export const transformPlotlyJsonToFunnelChartProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
1642
2193
  var _input_layout, _input_layout1, _input_data_, _input_layout2;
1643
2194
  const funnelData = [];
1644
2195
  // Determine if data is stacked based on multiple series with multiple values per series
@@ -2035,8 +2586,7 @@ const getLegendShape = (series)=>{
2035
2586
  }
2036
2587
  return 'default';
2037
2588
  };
2038
- export const getAllupLegendsProps = (input, // eslint-disable-next-line @typescript-eslint/no-deprecated
2039
- colorMap, colorwayType, traceInfo, isDarkTheme)=>{
2589
+ export const getAllupLegendsProps = (input, colorMap, colorwayType, traceInfo, isDarkTheme)=>{
2040
2590
  const allupLegends = [];
2041
2591
  // reduce on showlegend boolean propperty. reduce should return true if at least one series has showlegend true
2042
2592
  const toShowLegend = input.data.reduce((acc, series)=>{
@@ -2145,7 +2695,8 @@ export const isNonPlotType = (chartType)=>{
2145
2695
  return [
2146
2696
  'donut',
2147
2697
  'sankey',
2148
- 'pie'
2698
+ 'pie',
2699
+ 'annotation'
2149
2700
  ].includes(chartType);
2150
2701
  };
2151
2702
  export const getGridProperties = (schema, isMultiPlot, validTracesInfo)=>{