@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
@@ -49,6 +49,9 @@ _export(exports, {
49
49
  resolveXAxisPoint: function() {
50
50
  return resolveXAxisPoint;
51
51
  },
52
+ transformPlotlyJsonToAnnotationChartProps: function() {
53
+ return transformPlotlyJsonToAnnotationChartProps;
54
+ },
52
55
  transformPlotlyJsonToAreaChartProps: function() {
53
56
  return transformPlotlyJsonToAreaChartProps;
54
57
  },
@@ -336,6 +339,526 @@ const resolveXAxisPoint = (x, isXYearCategory, isXString, isXDate, isXNumber)=>{
336
339
  }
337
340
  return flattened;
338
341
  };
342
+ const encodeHtmlEntities = (value)=>value.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#39;');
343
+ const toFiniteNumber = (value)=>{
344
+ if (value === undefined || value === null) {
345
+ return undefined;
346
+ }
347
+ const numeric = typeof value === 'number' ? value : Number(value);
348
+ return Number.isFinite(numeric) ? numeric : undefined;
349
+ };
350
+ /**
351
+ * Normalizes Plotly axis reference strings so equivalent aliases (e.g. `xaxis1`, `x1`) collapse to the base axis id.
352
+ */ const normalizeAxisRef = (ref, axis)=>{
353
+ if (!ref) {
354
+ return axis;
355
+ }
356
+ const normalized = ref.toLowerCase();
357
+ if (normalized === axis || normalized === `${axis}axis` || normalized === `${axis}axis1` || normalized === `${axis}1`) {
358
+ return axis;
359
+ }
360
+ const match = normalized.match(/^([xy])(axis)?(\d+)$/);
361
+ if (match && match[1] === axis && match[3]) {
362
+ return match[3] === '1' ? axis : `${axis}${match[3]}`;
363
+ }
364
+ return normalized;
365
+ };
366
+ /**
367
+ * Scans the data traces bound to a given axis and returns the numeric min/max values plotted on that axis.
368
+ */ const getAxisNumericRangeFromData = (axis, ref, layout, data)=>{
369
+ if (!data || data.length === 0) {
370
+ return undefined;
371
+ }
372
+ const axisLayout = getAxisLayoutByRef(layout, ref, axis);
373
+ const targetRef = normalizeAxisRef(ref, axis);
374
+ const traceAxisKey = axis === 'x' ? 'xaxis' : 'yaxis';
375
+ let minValue;
376
+ let maxValue;
377
+ data.forEach((trace)=>{
378
+ const plotTrace = trace;
379
+ const traceAxisRef = normalizeAxisRef(plotTrace[traceAxisKey], axis);
380
+ if (traceAxisRef !== targetRef) {
381
+ return;
382
+ }
383
+ const values = axis === 'x' ? plotTrace.x : plotTrace.y;
384
+ if (!(0, _chartutilities.isArrayOrTypedArray)(values)) {
385
+ return;
386
+ }
387
+ const arrayLike = values;
388
+ for(let index = 0; index < arrayLike.length; index++){
389
+ const value = arrayLike[index];
390
+ const numeric = toNumericValue(convertDataValue(value, axisLayout));
391
+ if (numeric === undefined || Number.isNaN(numeric)) {
392
+ continue;
393
+ }
394
+ minValue = minValue === undefined ? numeric : Math.min(minValue, numeric);
395
+ maxValue = maxValue === undefined ? numeric : Math.max(maxValue, numeric);
396
+ }
397
+ });
398
+ if (minValue === undefined || maxValue === undefined || minValue === maxValue) {
399
+ return undefined;
400
+ }
401
+ return [
402
+ minValue,
403
+ maxValue
404
+ ];
405
+ };
406
+ /**
407
+ * Converts Plotly's bottom-origin relative Y coordinate into the SVG top-origin space used by our overlay.
408
+ */ const transformRelativeYForChart = (value)=>{
409
+ if (value === undefined) {
410
+ return undefined;
411
+ }
412
+ if (!Number.isFinite(value)) {
413
+ return undefined;
414
+ }
415
+ return 1 - value;
416
+ };
417
+ const mapHorizontalAlign = (anchor)=>{
418
+ switch((anchor !== null && anchor !== void 0 ? anchor : '').toLowerCase()){
419
+ case 'left':
420
+ return 'start';
421
+ case 'center':
422
+ return 'center';
423
+ case 'right':
424
+ return 'end';
425
+ default:
426
+ return undefined;
427
+ }
428
+ };
429
+ const mapVerticalAlign = (anchor)=>{
430
+ switch((anchor !== null && anchor !== void 0 ? anchor : '').toLowerCase()){
431
+ case 'top':
432
+ return 'top';
433
+ case 'middle':
434
+ return 'middle';
435
+ case 'bottom':
436
+ return 'bottom';
437
+ default:
438
+ return undefined;
439
+ }
440
+ };
441
+ const appendPx = (value)=>{
442
+ if (value === undefined || value === null) {
443
+ return undefined;
444
+ }
445
+ if (typeof value === 'string') {
446
+ return value;
447
+ }
448
+ if (typeof value === 'number' && Number.isFinite(value)) {
449
+ return `${value}px`;
450
+ }
451
+ return undefined;
452
+ };
453
+ /**
454
+ * Maps Plotly's axis reference string to one of our coordinate interpretation modes (axis, relative, or pixel).
455
+ */ const resolveRefType = (ref, axis)=>{
456
+ if (!ref) {
457
+ return 'axis';
458
+ }
459
+ const normalized = ref.toLowerCase();
460
+ if (normalized === 'pixel') {
461
+ return 'pixel';
462
+ }
463
+ if (normalized === 'paper') {
464
+ return 'relative';
465
+ }
466
+ if (normalized.endsWith(' domain')) {
467
+ return normalized.startsWith(axis) ? 'relative' : undefined;
468
+ }
469
+ const match = normalized.match(/^([xy])(\d*)$/);
470
+ if (match && match[1] === axis) {
471
+ return 'axis';
472
+ }
473
+ return undefined;
474
+ };
475
+ /**
476
+ * Retrieves the appropriate axis layout section from Plotly's layout given an axis reference alias.
477
+ */ const getAxisLayoutByRef = (layout, ref, axis)=>{
478
+ if (!layout) {
479
+ return undefined;
480
+ }
481
+ const defaultAxisKey = `${axis}axis`;
482
+ if (!ref) {
483
+ return layout[defaultAxisKey];
484
+ }
485
+ const normalized = ref.toLowerCase();
486
+ if (normalized === 'paper' || normalized === 'pixel' || normalized.endsWith(' domain')) {
487
+ return layout[defaultAxisKey];
488
+ }
489
+ const match = normalized.match(/^([xy])(\d*)$/);
490
+ if (match && match[1] === axis) {
491
+ const index = match[2];
492
+ if (index && index !== '' && index !== '1') {
493
+ const axisKey = `${axis}axis${index}`;
494
+ return layout[axisKey];
495
+ }
496
+ return layout[defaultAxisKey];
497
+ }
498
+ return layout[defaultAxisKey];
499
+ };
500
+ /**
501
+ * Normalizes raw Plotly data values into canonical number/date/string types based on axis configuration.
502
+ */ const convertDataValue = (value, axisLayout)=>{
503
+ if (value === undefined || value === null) {
504
+ return undefined;
505
+ }
506
+ if ((axisLayout === null || axisLayout === void 0 ? void 0 : axisLayout.type) === 'date' || (0, _chartutilities.isDate)(value)) {
507
+ const dateValue = value instanceof Date ? value : new Date(value);
508
+ return Number.isNaN(dateValue.getTime()) ? undefined : dateValue;
509
+ }
510
+ if (typeof value === 'number') {
511
+ return value;
512
+ }
513
+ if ((axisLayout === null || axisLayout === void 0 ? void 0 : axisLayout.type) === 'linear' || (axisLayout === null || axisLayout === void 0 ? void 0 : axisLayout.type) === 'log') {
514
+ const numeric = Number(value);
515
+ return Number.isFinite(numeric) ? numeric : undefined;
516
+ }
517
+ if (value instanceof Date) {
518
+ return value;
519
+ }
520
+ return value;
521
+ };
522
+ const toNumericValue = (value)=>{
523
+ if (value instanceof Date) {
524
+ const timestamp = value.getTime();
525
+ return Number.isFinite(timestamp) ? timestamp : undefined;
526
+ }
527
+ if (typeof value === 'number') {
528
+ return Number.isFinite(value) ? value : undefined;
529
+ }
530
+ if (typeof value === 'string') {
531
+ const numeric = Number(value);
532
+ return Number.isFinite(numeric) ? numeric : undefined;
533
+ }
534
+ return undefined;
535
+ };
536
+ const toRelativeCoordinate = (value, axisLayout, fallbackRange)=>{
537
+ const range = Array.isArray(axisLayout === null || axisLayout === void 0 ? void 0 : axisLayout.range) ? axisLayout.range : undefined;
538
+ let start = range && range.length >= 2 ? toNumericValue(convertDataValue(range[0], axisLayout)) : undefined;
539
+ let end = range && range.length >= 2 ? toNumericValue(convertDataValue(range[1], axisLayout)) : undefined;
540
+ if ((start === undefined || end === undefined || start === end) && fallbackRange) {
541
+ [start, end] = fallbackRange;
542
+ }
543
+ const current = toNumericValue(convertDataValue(value, axisLayout));
544
+ if (start === undefined || end === undefined || current === undefined || start === end) {
545
+ return undefined;
546
+ }
547
+ const relative = (current - start) / (end - start);
548
+ return Number.isFinite(relative) ? relative : undefined;
549
+ };
550
+ const createAnnotationId = (text, index)=>{
551
+ const normalized = text.replace(/\s+/g, ' ').trim();
552
+ if (normalized) {
553
+ const slug = normalized.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '').slice(0, 32);
554
+ if (slug) {
555
+ return `annotation-${index}-${slug}`;
556
+ }
557
+ }
558
+ return `annotation-${index}`;
559
+ };
560
+ const DEFAULT_ARROW_OFFSET = -40;
561
+ const mapArrowsideToArrow = (annotation)=>{
562
+ let includeStart = false;
563
+ let includeEnd = false;
564
+ const arrowSide = typeof (annotation === null || annotation === void 0 ? void 0 : annotation.arrowside) === 'string' ? annotation === null || annotation === void 0 ? void 0 : annotation.arrowside.toLowerCase() : undefined;
565
+ if (arrowSide) {
566
+ includeStart = arrowSide.includes('start');
567
+ includeEnd = arrowSide.includes('end');
568
+ }
569
+ const endHead = toFiniteNumber(annotation === null || annotation === void 0 ? void 0 : annotation.arrowhead);
570
+ const startHead = toFiniteNumber(annotation.startarrowhead);
571
+ if (endHead !== undefined && endHead > 0) {
572
+ includeEnd = true;
573
+ }
574
+ if (startHead !== undefined && startHead > 0) {
575
+ includeStart = true;
576
+ }
577
+ if (includeStart && includeEnd) {
578
+ return 'both';
579
+ }
580
+ if (includeStart) {
581
+ return 'start';
582
+ }
583
+ if (includeEnd) {
584
+ return 'end';
585
+ }
586
+ return 'none';
587
+ };
588
+ const mapArrowDashToPattern = (value)=>{
589
+ if (!value) {
590
+ return undefined;
591
+ }
592
+ const normalized = value.trim().toLowerCase();
593
+ switch(normalized){
594
+ case 'solid':
595
+ return undefined;
596
+ case 'dot':
597
+ return '1, 5';
598
+ case 'dash':
599
+ return '5, 5';
600
+ case 'longdash':
601
+ return '10, 5';
602
+ case 'dashdot':
603
+ return '5, 5, 1, 5';
604
+ case 'longdashdot':
605
+ return '10, 5, 1, 5';
606
+ default:
607
+ if (/^\d+(\s|,)*\d*$/.test(normalized.replace(/\s+/g, ' '))) {
608
+ return normalized.replace(/\s+/g, ' ');
609
+ }
610
+ return value;
611
+ }
612
+ };
613
+ /**
614
+ * Converts a Plotly annotation definition into the internal `ChartAnnotation` format, translating coordinates,
615
+ * layout alignment, styling, and connector metadata while skipping unsupported configurations.
616
+ */ const convertPlotlyAnnotation = (annotation, layout, data, index)=>{
617
+ if (!annotation || annotation.visible === false) {
618
+ return undefined;
619
+ }
620
+ const xRefType = resolveRefType(annotation.xref, 'x');
621
+ const yRefType = resolveRefType(annotation.yref, 'y');
622
+ if (!xRefType || !yRefType) {
623
+ return undefined;
624
+ }
625
+ let coordinates;
626
+ if (xRefType === 'axis' && yRefType === 'axis') {
627
+ const xAxisLayout = getAxisLayoutByRef(layout, annotation.xref, 'x');
628
+ const yAxisLayout = getAxisLayoutByRef(layout, annotation.yref, 'y');
629
+ const xValue = convertDataValue(annotation.x, xAxisLayout);
630
+ const yValue = convertDataValue(annotation.y, yAxisLayout);
631
+ if (xValue === undefined || yValue === undefined) {
632
+ return undefined;
633
+ }
634
+ const yRefNormalized = typeof annotation.yref === 'string' ? annotation.yref.toLowerCase() : undefined;
635
+ coordinates = {
636
+ type: 'data',
637
+ x: xValue,
638
+ y: yValue,
639
+ ...yRefNormalized === 'y2' ? {
640
+ yAxis: 'secondary'
641
+ } : {}
642
+ };
643
+ } else if (xRefType === 'relative' && yRefType === 'relative') {
644
+ const xValue = toFiniteNumber(annotation.x);
645
+ const yValue = toFiniteNumber(annotation.y);
646
+ const chartRelativeY = transformRelativeYForChart(yValue);
647
+ if (xValue === undefined || chartRelativeY === undefined) {
648
+ return undefined;
649
+ }
650
+ coordinates = {
651
+ type: 'relative',
652
+ x: xValue,
653
+ y: chartRelativeY
654
+ };
655
+ } else if (xRefType === 'relative' && yRefType === 'axis') {
656
+ const xValue = toFiniteNumber(annotation.x);
657
+ const yAxisLayout = getAxisLayoutByRef(layout, annotation.yref, 'y');
658
+ const yFallbackRange = getAxisNumericRangeFromData('y', annotation.yref, layout, data);
659
+ const yRelative = toRelativeCoordinate(annotation.y, yAxisLayout, yFallbackRange);
660
+ const chartRelativeY = transformRelativeYForChart(yRelative);
661
+ if (xValue === undefined || chartRelativeY === undefined) {
662
+ return undefined;
663
+ }
664
+ coordinates = {
665
+ type: 'relative',
666
+ x: xValue,
667
+ y: chartRelativeY
668
+ };
669
+ } else if (xRefType === 'axis' && yRefType === 'relative') {
670
+ const yValue = toFiniteNumber(annotation.y);
671
+ const xAxisLayout = getAxisLayoutByRef(layout, annotation.xref, 'x');
672
+ const xFallbackRange = getAxisNumericRangeFromData('x', annotation.xref, layout, data);
673
+ const xRelative = toRelativeCoordinate(annotation.x, xAxisLayout, xFallbackRange);
674
+ const chartRelativeY = transformRelativeYForChart(yValue);
675
+ if (xRelative === undefined || chartRelativeY === undefined) {
676
+ return undefined;
677
+ }
678
+ coordinates = {
679
+ type: 'relative',
680
+ x: xRelative,
681
+ y: chartRelativeY
682
+ };
683
+ } else if (xRefType === 'pixel' && yRefType === 'pixel') {
684
+ const xValue = toFiniteNumber(annotation.x);
685
+ const yValue = toFiniteNumber(annotation.y);
686
+ if (xValue === undefined || yValue === undefined) {
687
+ return undefined;
688
+ }
689
+ coordinates = {
690
+ type: 'pixel',
691
+ x: xValue,
692
+ y: yValue
693
+ };
694
+ } else {
695
+ return undefined;
696
+ }
697
+ const textValue = annotation.text;
698
+ const rawText = textValue === undefined || textValue === null ? '' : String(textValue);
699
+ const encodedText = encodeHtmlEntities(rawText);
700
+ const chartAnnotation = {
701
+ id: createAnnotationId(encodedText, index),
702
+ text: encodedText,
703
+ coordinates
704
+ };
705
+ const layoutProps = {};
706
+ const styleProps = {};
707
+ const showArrow = annotation.showarrow === undefined ? false : !!annotation.showarrow;
708
+ const clipOnAxis = annotation.cliponaxis;
709
+ if (clipOnAxis !== undefined) {
710
+ layoutProps.clipToBounds = !!clipOnAxis;
711
+ } else if (coordinates.type === 'data') {
712
+ layoutProps.clipToBounds = true;
713
+ }
714
+ const horizontalAlign = mapHorizontalAlign(annotation.xanchor);
715
+ if (horizontalAlign) {
716
+ layoutProps.align = horizontalAlign;
717
+ }
718
+ if (!layoutProps.align) {
719
+ const alignProp = mapHorizontalAlign(annotation.align);
720
+ if (alignProp) {
721
+ layoutProps.align = alignProp;
722
+ }
723
+ }
724
+ const verticalAlign = mapVerticalAlign(annotation.yanchor);
725
+ if (verticalAlign) {
726
+ layoutProps.verticalAlign = verticalAlign;
727
+ }
728
+ if (!layoutProps.verticalAlign) {
729
+ const valignProp = mapVerticalAlign(annotation.valign);
730
+ if (valignProp) {
731
+ layoutProps.verticalAlign = valignProp;
732
+ }
733
+ }
734
+ const offsetXComponents = [];
735
+ let hasExplicitOffset = false;
736
+ const ax = toFiniteNumber(annotation.ax);
737
+ const axRef = typeof annotation.axref === 'string' ? annotation.axref.toLowerCase() : undefined;
738
+ if (ax !== undefined && (axRef === undefined || axRef === 'pixel')) {
739
+ offsetXComponents.push(ax);
740
+ hasExplicitOffset = true;
741
+ }
742
+ const xShift = toFiniteNumber(annotation.xshift);
743
+ if (xShift !== undefined) {
744
+ offsetXComponents.push(xShift);
745
+ hasExplicitOffset = true;
746
+ }
747
+ if (offsetXComponents.length > 0) {
748
+ const offsetX = offsetXComponents.reduce((sum, value)=>sum + value, 0);
749
+ if (offsetX !== 0) {
750
+ layoutProps.offsetX = offsetX;
751
+ }
752
+ }
753
+ const offsetYComponents = [];
754
+ const ay = toFiniteNumber(annotation.ay);
755
+ const ayRef = typeof annotation.ayref === 'string' ? annotation.ayref.toLowerCase() : undefined;
756
+ if (ay !== undefined && (ayRef === undefined || ayRef === 'pixel')) {
757
+ offsetYComponents.push(ay);
758
+ hasExplicitOffset = true;
759
+ }
760
+ const yShift = toFiniteNumber(annotation.yshift);
761
+ if (yShift !== undefined) {
762
+ offsetYComponents.push(yShift);
763
+ hasExplicitOffset = true;
764
+ }
765
+ if (offsetYComponents.length > 0) {
766
+ const offsetY = offsetYComponents.reduce((sum, value)=>sum + value, 0);
767
+ if (offsetY !== 0) {
768
+ layoutProps.offsetY = offsetY;
769
+ }
770
+ }
771
+ if (showArrow && !hasExplicitOffset && layoutProps.offsetY === undefined) {
772
+ layoutProps.offsetY = DEFAULT_ARROW_OFFSET;
773
+ }
774
+ const maxWidth = toFiniteNumber(annotation.width);
775
+ if (maxWidth !== undefined) {
776
+ layoutProps.maxWidth = maxWidth;
777
+ }
778
+ if (annotation.bgcolor) {
779
+ styleProps.backgroundColor = annotation.bgcolor;
780
+ }
781
+ if (annotation.bordercolor) {
782
+ styleProps.borderColor = annotation.bordercolor;
783
+ }
784
+ const borderWidth = toFiniteNumber(annotation.borderwidth);
785
+ if (borderWidth !== undefined) {
786
+ styleProps.borderWidth = borderWidth;
787
+ }
788
+ const borderPad = appendPx(annotation.borderpad);
789
+ if (borderPad) {
790
+ styleProps.padding = borderPad;
791
+ }
792
+ const opacity = toFiniteNumber(annotation.opacity);
793
+ if (opacity !== undefined) {
794
+ styleProps.opacity = opacity;
795
+ }
796
+ if (annotation.font) {
797
+ const font = annotation.font;
798
+ if (font === null || font === void 0 ? void 0 : font.color) {
799
+ styleProps.textColor = font.color;
800
+ }
801
+ const fontSize = appendPx(font === null || font === void 0 ? void 0 : font.size);
802
+ if (fontSize) {
803
+ styleProps.fontSize = fontSize;
804
+ }
805
+ if (font === null || font === void 0 ? void 0 : font.weight) {
806
+ styleProps.fontWeight = font.weight;
807
+ }
808
+ }
809
+ const textAngle = annotation === null || annotation === void 0 ? void 0 : annotation.textangle;
810
+ if (typeof textAngle === 'number' && !Number.isNaN(textAngle)) {
811
+ styleProps.rotation = textAngle;
812
+ } else if (typeof textAngle === 'string' && textAngle.toLowerCase() !== 'auto') {
813
+ const parsedAngle = Number(textAngle);
814
+ if (!Number.isNaN(parsedAngle)) {
815
+ styleProps.rotation = parsedAngle;
816
+ }
817
+ }
818
+ if (Object.keys(layoutProps).length > 0) {
819
+ chartAnnotation.layout = layoutProps;
820
+ }
821
+ if (Object.keys(styleProps).length > 0) {
822
+ chartAnnotation.style = styleProps;
823
+ }
824
+ if (showArrow) {
825
+ var _annotation_arrowcolor;
826
+ const arrowColor = (_annotation_arrowcolor = annotation.arrowcolor) !== null && _annotation_arrowcolor !== void 0 ? _annotation_arrowcolor : styleProps.textColor;
827
+ const arrowWidth = toFiniteNumber(annotation.arrowwidth);
828
+ const endPadding = toFiniteNumber(annotation.standoff);
829
+ const startPadding = toFiniteNumber(annotation.startstandoff);
830
+ const dashPattern = mapArrowDashToPattern(annotation.arrowdash);
831
+ chartAnnotation.connector = {
832
+ ...arrowColor ? {
833
+ strokeColor: arrowColor
834
+ } : {},
835
+ ...arrowWidth !== undefined ? {
836
+ strokeWidth: arrowWidth
837
+ } : {},
838
+ ...endPadding !== undefined ? {
839
+ endPadding: Math.max(endPadding, 0)
840
+ } : {},
841
+ ...startPadding !== undefined ? {
842
+ startPadding: Math.max(startPadding, 0)
843
+ } : {},
844
+ ...dashPattern ? {
845
+ dashArray: dashPattern
846
+ } : {},
847
+ arrow: mapArrowsideToArrow(annotation)
848
+ };
849
+ }
850
+ return chartAnnotation;
851
+ };
852
+ const getChartAnnotationsFromLayout = (layout, data, isMultiPlot)=>{
853
+ if (isMultiPlot || !(layout === null || layout === void 0 ? void 0 : layout.annotations)) {
854
+ return undefined;
855
+ }
856
+ const annotationsArray = Array.isArray(layout.annotations) ? layout.annotations : [
857
+ layout.annotations
858
+ ];
859
+ const converted = annotationsArray.map((annotation, index)=>convertPlotlyAnnotation(annotation, layout, data, index)).filter((annotation)=>annotation !== undefined);
860
+ return converted.length > 0 ? converted : undefined;
861
+ };
339
862
  const normalizeObjectArrayForGVBC = (data, xLabels)=>{
340
863
  if (!data || data.length === 0) {
341
864
  return {
@@ -407,6 +930,34 @@ const normalizeObjectArrayForGVBC = (data, xLabels)=>{
407
930
  x
408
931
  };
409
932
  };
933
+ const transformPlotlyJsonToAnnotationChartProps = (input, isMultiPlot, _colorMap, _colorwayType, _isDarkTheme)=>{
934
+ var _layoutWithMeta_meta, _input_layout, _input_layout1, _input_layout2, _input_layout3, _input_layout_font, _input_layout4, _input_layout_font1, _input_layout5, _input_layout6;
935
+ var _getChartAnnotationsFromLayout;
936
+ const annotations = (_getChartAnnotationsFromLayout = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot)) !== null && _getChartAnnotationsFromLayout !== void 0 ? _getChartAnnotationsFromLayout : [];
937
+ const titles = getTitles(input.layout);
938
+ const layoutTitle = titles.chartTitle || undefined;
939
+ const layoutWithMeta = input.layout;
940
+ 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;
941
+ const width = typeof ((_input_layout = input.layout) === null || _input_layout === void 0 ? void 0 : _input_layout.width) === 'number' ? input.layout.width : undefined;
942
+ const height = typeof ((_input_layout1 = input.layout) === null || _input_layout1 === void 0 ? void 0 : _input_layout1.height) === 'number' ? input.layout.height : undefined;
943
+ const paperBackgroundColor = typeof ((_input_layout2 = input.layout) === null || _input_layout2 === void 0 ? void 0 : _input_layout2.paper_bgcolor) === 'string' ? input.layout.paper_bgcolor : undefined;
944
+ const plotBackgroundColor = typeof ((_input_layout3 = input.layout) === null || _input_layout3 === void 0 ? void 0 : _input_layout3.plot_bgcolor) === 'string' ? input.layout.plot_bgcolor : undefined;
945
+ 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;
946
+ 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;
947
+ const margin = (_input_layout6 = input.layout) === null || _input_layout6 === void 0 ? void 0 : _input_layout6.margin;
948
+ return {
949
+ annotations,
950
+ chartTitle: layoutTitle,
951
+ description,
952
+ width,
953
+ height,
954
+ paperBackgroundColor,
955
+ plotBackgroundColor,
956
+ fontColor,
957
+ fontFamily,
958
+ margin
959
+ };
960
+ };
410
961
  const transformPlotlyJsonToDonutProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
411
962
  var _input_layout, _input_layout_template_layout, _input_layout_template, _input_layout1, _input_layout2, _firstData_marker, _input_layout3, _input_layout4, _input_layout5, _input_layout6;
412
963
  const firstData = input.data[0];
@@ -646,6 +1197,7 @@ const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, colorwayTy
646
1197
  });
647
1198
  });
648
1199
  const vsbcData = Object.values(mapXToDataPoints);
1200
+ const annotations = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot);
649
1201
  var _input_layout_height;
650
1202
  return {
651
1203
  data: vsbcData,
@@ -670,7 +1222,10 @@ const transformPlotlyJsonToVSBCProps = (input, isMultiPlot, colorMap, colorwayTy
670
1222
  ...getAxisCategoryOrderProps(input.data, input.layout),
671
1223
  ...getBarProps(input.data, input.layout),
672
1224
  ...getYMinMaxValues(input.data[0], input.layout),
673
- ...getAxisTickProps(input.data, input.layout)
1225
+ ...getAxisTickProps(input.data, input.layout),
1226
+ ...annotations ? {
1227
+ annotations
1228
+ } : {}
674
1229
  };
675
1230
  };
676
1231
  const transformPlotlyJsonToGVBCProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
@@ -777,6 +1332,7 @@ const transformPlotlyJsonToGVBCProps = (input, isMultiPlot, colorMap, colorwayTy
777
1332
  });
778
1333
  }
779
1334
  });
1335
+ const annotations = getChartAnnotationsFromLayout(processedInput.layout, processedInput.data, isMultiPlot);
780
1336
  var _processedInput_layout_height;
781
1337
  return {
782
1338
  dataV2: gvbcDataV2,
@@ -789,13 +1345,17 @@ const transformPlotlyJsonToGVBCProps = (input, isMultiPlot, colorMap, colorwayTy
789
1345
  wrapXAxisLables: true,
790
1346
  hideLegend,
791
1347
  roundCorners: true,
1348
+ showYAxisLables: true,
792
1349
  ...getTitles(processedInput.layout),
793
1350
  ...getAxisCategoryOrderProps(processedInput.data, processedInput.layout),
794
1351
  ...getYMinMaxValues(processedInput.data[0], processedInput.layout),
795
1352
  ...getXAxisTickFormat(processedInput.data[0], processedInput.layout),
796
1353
  ...yAxisTickFormat,
797
1354
  ...getBarProps(processedInput.data, processedInput.layout),
798
- ...getAxisTickProps(processedInput.data, processedInput.layout)
1355
+ ...getAxisTickProps(processedInput.data, processedInput.layout),
1356
+ ...annotations ? {
1357
+ annotations
1358
+ } : {}
799
1359
  };
800
1360
  };
801
1361
  const transformPlotlyJsonToVBCProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
@@ -860,6 +1420,7 @@ const transformPlotlyJsonToVBCProps = (input, isMultiPlot, colorMap, colorwayTyp
860
1420
  });
861
1421
  });
862
1422
  });
1423
+ const annotations = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot);
863
1424
  var _input_layout_height;
864
1425
  return {
865
1426
  data: vbcData,
@@ -871,9 +1432,13 @@ const transformPlotlyJsonToVBCProps = (input, isMultiPlot, colorMap, colorwayTyp
871
1432
  maxBarWidth: 50,
872
1433
  hideLegend,
873
1434
  roundCorners: true,
1435
+ showYAxisLables: true,
874
1436
  ...getTitles(input.layout),
875
1437
  ...getYMinMaxValues(input.data[0], input.layout),
876
- ...getAxisCategoryOrderProps(input.data, input.layout)
1438
+ ...getAxisCategoryOrderProps(input.data, input.layout),
1439
+ ...annotations ? {
1440
+ annotations
1441
+ } : {}
877
1442
  };
878
1443
  };
879
1444
  const transformPlotlyJsonToAreaChartProps = (input, isMultiPlot, colorMap, colorwayType, isDarkTheme)=>{
@@ -1064,6 +1629,7 @@ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, c
1064
1629
  const scatterChartProps = {
1065
1630
  scatterChartData: chartData
1066
1631
  };
1632
+ const annotations = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot);
1067
1633
  var _input_layout_height;
1068
1634
  const commonProps = {
1069
1635
  supportNegativeData: true,
@@ -1073,13 +1639,17 @@ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, c
1073
1639
  hideTickOverlap: true,
1074
1640
  hideLegend,
1075
1641
  useUTC: false,
1076
- wrapXAxisLables: shouldWrapLabels,
1642
+ wrapXAxisLabels: shouldWrapLabels,
1077
1643
  optimizeLargeData: numDataPoints > 1000,
1644
+ showYAxisLables: true,
1078
1645
  ...getTitles(input.layout),
1079
1646
  ...getXAxisTickFormat(input.data[0], input.layout),
1080
1647
  ...yAxisTickFormat,
1081
1648
  ...getAxisScaleTypeProps(input.data, input.layout),
1082
- ...getAxisTickProps(input.data, input.layout)
1649
+ ...getAxisTickProps(input.data, input.layout),
1650
+ ...annotations ? {
1651
+ annotations
1652
+ } : {}
1083
1653
  };
1084
1654
  if (isAreaChart) {
1085
1655
  return {
@@ -2210,7 +2780,8 @@ const isNonPlotType = (chartType)=>{
2210
2780
  return [
2211
2781
  'donut',
2212
2782
  'sankey',
2213
- 'pie'
2783
+ 'pie',
2784
+ 'annotation'
2214
2785
  ].includes(chartType);
2215
2786
  };
2216
2787
  const getGridProperties = (schema, isMultiPlot, validTracesInfo)=>{