@fluentui/react-charting 5.25.5 → 5.25.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (344) hide show
  1. package/CHANGELOG.json +60 -1
  2. package/CHANGELOG.md +17 -2
  3. package/bundle-size/PolarChart.fixture.js +7 -0
  4. package/dist/react-charting.d.ts +388 -1
  5. package/dist/react-charting.js +1 -1
  6. package/dist/react-charting.min.js +1 -1
  7. package/etc/react-charting.api.md +85 -1
  8. package/lib/PolarChart.d.ts +1 -0
  9. package/lib/PolarChart.js +2 -0
  10. package/lib/PolarChart.js.map +1 -0
  11. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +1 -1
  12. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
  13. package/lib/components/AreaChart/AreaChart.base.d.ts +0 -1
  14. package/lib/components/AreaChart/AreaChart.base.js +2 -31
  15. package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
  16. package/lib/components/ChartTable/ChartTable.base.js +12 -4
  17. package/lib/components/ChartTable/ChartTable.base.js.map +1 -1
  18. package/lib/components/ChartTable/ChartTable.styles.js +3 -0
  19. package/lib/components/ChartTable/ChartTable.styles.js.map +1 -1
  20. package/lib/components/ChartTable/ChartTable.types.d.ts +11 -0
  21. package/lib/components/ChartTable/ChartTable.types.js.map +1 -1
  22. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +11 -6
  23. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
  24. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.d.ts +1 -0
  25. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js +17 -1
  26. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js.map +1 -1
  27. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.d.ts +5 -0
  28. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -1
  29. package/lib/components/CommonComponents/CartesianChart.base.d.ts +1 -1
  30. package/lib/components/CommonComponents/CartesianChart.base.js +82 -42
  31. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  32. package/lib/components/CommonComponents/CartesianChart.styles.js +31 -27
  33. package/lib/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  34. package/lib/components/CommonComponents/CartesianChart.types.d.ts +16 -1
  35. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  36. package/lib/components/DeclarativeChart/DeclarativeChart.js +24 -28
  37. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  38. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +3 -1
  39. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +202 -217
  40. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  41. package/lib/components/DonutChart/DonutChart.base.d.ts +1 -0
  42. package/lib/components/DonutChart/DonutChart.base.js +16 -4
  43. package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
  44. package/lib/components/DonutChart/DonutChart.styles.js +3 -1
  45. package/lib/components/DonutChart/DonutChart.styles.js.map +1 -1
  46. package/lib/components/DonutChart/DonutChart.types.d.ts +13 -0
  47. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  48. package/lib/components/FunnelChart/FunnelChart.base.js +14 -8
  49. package/lib/components/FunnelChart/FunnelChart.base.js.map +1 -1
  50. package/lib/components/FunnelChart/FunnelChart.styles.js +3 -0
  51. package/lib/components/FunnelChart/FunnelChart.styles.js.map +1 -1
  52. package/lib/components/FunnelChart/FunnelChart.types.d.ts +13 -0
  53. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -1
  54. package/lib/components/GaugeChart/GaugeChart.base.js +2 -2
  55. package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
  56. package/lib/components/GaugeChart/GaugeChart.styles.js +16 -22
  57. package/lib/components/GaugeChart/GaugeChart.styles.js.map +1 -1
  58. package/lib/components/GaugeChart/GaugeChart.types.d.ts +9 -0
  59. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  60. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +0 -1
  61. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +2 -18
  62. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  63. package/lib/components/LineChart/LineChart.base.d.ts +0 -1
  64. package/lib/components/LineChart/LineChart.base.js +1 -25
  65. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  66. package/lib/components/PolarChart/PolarChart.base.d.ts +3 -0
  67. package/lib/components/PolarChart/PolarChart.base.js +426 -0
  68. package/lib/components/PolarChart/PolarChart.base.js.map +1 -0
  69. package/lib/components/PolarChart/PolarChart.d.ts +7 -0
  70. package/lib/components/PolarChart/PolarChart.js +9 -0
  71. package/lib/components/PolarChart/PolarChart.js.map +1 -0
  72. package/lib/components/PolarChart/PolarChart.styles.d.ts +2 -0
  73. package/lib/components/PolarChart/PolarChart.styles.js +39 -0
  74. package/lib/components/PolarChart/PolarChart.styles.js.map +1 -0
  75. package/lib/components/PolarChart/PolarChart.types.d.ts +185 -0
  76. package/lib/components/PolarChart/PolarChart.types.js +2 -0
  77. package/lib/components/PolarChart/PolarChart.types.js.map +1 -0
  78. package/lib/components/PolarChart/PolarChart.utils.d.ts +43 -0
  79. package/lib/components/PolarChart/PolarChart.utils.js +180 -0
  80. package/lib/components/PolarChart/PolarChart.utils.js.map +1 -0
  81. package/lib/components/PolarChart/index.d.ts +2 -0
  82. package/lib/components/PolarChart/index.js +3 -0
  83. package/lib/components/PolarChart/index.js.map +1 -0
  84. package/lib/components/SankeyChart/SankeyChart.base.js +9 -2
  85. package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
  86. package/lib/components/SankeyChart/SankeyChart.styles.js +3 -0
  87. package/lib/components/SankeyChart/SankeyChart.styles.js.map +1 -1
  88. package/lib/components/SankeyChart/SankeyChart.types.d.ts +18 -0
  89. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  90. package/lib/components/ScatterChart/ScatterChart.base.js +1 -28
  91. package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -1
  92. package/lib/components/VerticalBarChart/VerticalBarChart.base.d.ts +0 -1
  93. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +1 -73
  94. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  95. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +0 -1
  96. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +1 -26
  97. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  98. package/lib/index.d.ts +2 -0
  99. package/lib/index.js +1 -0
  100. package/lib/index.js.map +1 -1
  101. package/lib/types/IDataPoint.d.ts +88 -0
  102. package/lib/types/IDataPoint.js.map +1 -1
  103. package/lib/utilities/ChartTitle.d.ts +55 -0
  104. package/lib/utilities/ChartTitle.js +45 -0
  105. package/lib/utilities/ChartTitle.js.map +1 -0
  106. package/lib/utilities/Common.styles.d.ts +51 -0
  107. package/lib/utilities/Common.styles.js +70 -1
  108. package/lib/utilities/Common.styles.js.map +1 -1
  109. package/lib/utilities/image-export-utils.js +4 -4
  110. package/lib/utilities/image-export-utils.js.map +1 -1
  111. package/lib/utilities/index.d.ts +1 -0
  112. package/lib/utilities/index.js +1 -0
  113. package/lib/utilities/index.js.map +1 -1
  114. package/lib/utilities/utilities.d.ts +28 -6
  115. package/lib/utilities/utilities.js +210 -104
  116. package/lib/utilities/utilities.js.map +1 -1
  117. package/lib-amd/PolarChart.d.ts +1 -0
  118. package/lib-amd/PolarChart.js +6 -0
  119. package/lib-amd/PolarChart.js.map +1 -0
  120. package/lib-amd/components/AnnotationOnlyChart/AnnotationOnlyChart.js +1 -1
  121. package/lib-amd/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
  122. package/lib-amd/components/AreaChart/AreaChart.base.d.ts +0 -1
  123. package/lib-amd/components/AreaChart/AreaChart.base.js +1 -29
  124. package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
  125. package/lib-amd/components/ChartTable/ChartTable.base.js +12 -5
  126. package/lib-amd/components/ChartTable/ChartTable.base.js.map +1 -1
  127. package/lib-amd/components/ChartTable/ChartTable.styles.js +3 -1
  128. package/lib-amd/components/ChartTable/ChartTable.styles.js.map +1 -1
  129. package/lib-amd/components/ChartTable/ChartTable.types.d.ts +11 -0
  130. package/lib-amd/components/ChartTable/ChartTable.types.js.map +1 -1
  131. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.js +11 -6
  132. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
  133. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.d.ts +1 -0
  134. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js +17 -1
  135. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js.map +1 -1
  136. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.types.d.ts +5 -0
  137. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -1
  138. package/lib-amd/components/CommonComponents/CartesianChart.base.d.ts +1 -1
  139. package/lib-amd/components/CommonComponents/CartesianChart.base.js +81 -41
  140. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  141. package/lib-amd/components/CommonComponents/CartesianChart.styles.js +30 -26
  142. package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  143. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +16 -1
  144. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  145. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +22 -28
  146. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  147. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +3 -1
  148. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +204 -219
  149. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  150. package/lib-amd/components/DonutChart/DonutChart.base.d.ts +1 -0
  151. package/lib-amd/components/DonutChart/DonutChart.base.js +15 -3
  152. package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
  153. package/lib-amd/components/DonutChart/DonutChart.styles.js +2 -0
  154. package/lib-amd/components/DonutChart/DonutChart.styles.js.map +1 -1
  155. package/lib-amd/components/DonutChart/DonutChart.types.d.ts +13 -0
  156. package/lib-amd/components/DonutChart/DonutChart.types.js.map +1 -1
  157. package/lib-amd/components/FunnelChart/FunnelChart.base.js +14 -9
  158. package/lib-amd/components/FunnelChart/FunnelChart.base.js.map +1 -1
  159. package/lib-amd/components/FunnelChart/FunnelChart.styles.js +3 -1
  160. package/lib-amd/components/FunnelChart/FunnelChart.styles.js.map +1 -1
  161. package/lib-amd/components/FunnelChart/FunnelChart.types.d.ts +13 -0
  162. package/lib-amd/components/FunnelChart/FunnelChart.types.js.map +1 -1
  163. package/lib-amd/components/GaugeChart/GaugeChart.base.js +1 -1
  164. package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
  165. package/lib-amd/components/GaugeChart/GaugeChart.styles.js +16 -23
  166. package/lib-amd/components/GaugeChart/GaugeChart.styles.js.map +1 -1
  167. package/lib-amd/components/GaugeChart/GaugeChart.types.d.ts +9 -0
  168. package/lib-amd/components/GaugeChart/GaugeChart.types.js.map +1 -1
  169. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +0 -1
  170. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +0 -16
  171. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  172. package/lib-amd/components/LineChart/LineChart.base.d.ts +0 -1
  173. package/lib-amd/components/LineChart/LineChart.base.js +0 -24
  174. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  175. package/lib-amd/components/PolarChart/PolarChart.base.d.ts +3 -0
  176. package/lib-amd/components/PolarChart/PolarChart.base.js +421 -0
  177. package/lib-amd/components/PolarChart/PolarChart.base.js.map +1 -0
  178. package/lib-amd/components/PolarChart/PolarChart.d.ts +7 -0
  179. package/lib-amd/components/PolarChart/PolarChart.js +11 -0
  180. package/lib-amd/components/PolarChart/PolarChart.js.map +1 -0
  181. package/lib-amd/components/PolarChart/PolarChart.styles.d.ts +2 -0
  182. package/lib-amd/components/PolarChart/PolarChart.styles.js +43 -0
  183. package/lib-amd/components/PolarChart/PolarChart.styles.js.map +1 -0
  184. package/lib-amd/components/PolarChart/PolarChart.types.d.ts +185 -0
  185. package/lib-amd/components/PolarChart/PolarChart.types.js +5 -0
  186. package/lib-amd/components/PolarChart/PolarChart.types.js.map +1 -0
  187. package/lib-amd/components/PolarChart/PolarChart.utils.d.ts +43 -0
  188. package/lib-amd/components/PolarChart/PolarChart.utils.js +183 -0
  189. package/lib-amd/components/PolarChart/PolarChart.utils.js.map +1 -0
  190. package/lib-amd/components/PolarChart/index.d.ts +2 -0
  191. package/lib-amd/components/PolarChart/index.js +7 -0
  192. package/lib-amd/components/PolarChart/index.js.map +1 -0
  193. package/lib-amd/components/SankeyChart/SankeyChart.base.js +9 -3
  194. package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
  195. package/lib-amd/components/SankeyChart/SankeyChart.styles.js +3 -1
  196. package/lib-amd/components/SankeyChart/SankeyChart.styles.js.map +1 -1
  197. package/lib-amd/components/SankeyChart/SankeyChart.types.d.ts +18 -0
  198. package/lib-amd/components/SankeyChart/SankeyChart.types.js.map +1 -1
  199. package/lib-amd/components/ScatterChart/ScatterChart.base.js +0 -27
  200. package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -1
  201. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.d.ts +0 -1
  202. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +1 -72
  203. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  204. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +0 -1
  205. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +1 -25
  206. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  207. package/lib-amd/index.d.ts +2 -0
  208. package/lib-amd/index.js +3 -2
  209. package/lib-amd/index.js.map +1 -1
  210. package/lib-amd/types/IDataPoint.d.ts +88 -0
  211. package/lib-amd/types/IDataPoint.js.map +1 -1
  212. package/lib-amd/utilities/ChartTitle.d.ts +55 -0
  213. package/lib-amd/utilities/ChartTitle.js +46 -0
  214. package/lib-amd/utilities/ChartTitle.js.map +1 -0
  215. package/lib-amd/utilities/Common.styles.d.ts +51 -0
  216. package/lib-amd/utilities/Common.styles.js +74 -2
  217. package/lib-amd/utilities/Common.styles.js.map +1 -1
  218. package/lib-amd/utilities/image-export-utils.js +3 -3
  219. package/lib-amd/utilities/image-export-utils.js.map +1 -1
  220. package/lib-amd/utilities/index.d.ts +1 -0
  221. package/lib-amd/utilities/index.js +2 -1
  222. package/lib-amd/utilities/index.js.map +1 -1
  223. package/lib-amd/utilities/utilities.d.ts +28 -6
  224. package/lib-amd/utilities/utilities.js +217 -107
  225. package/lib-amd/utilities/utilities.js.map +1 -1
  226. package/lib-commonjs/PolarChart.d.ts +1 -0
  227. package/lib-commonjs/PolarChart.js +5 -0
  228. package/lib-commonjs/PolarChart.js.map +1 -0
  229. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +1 -1
  230. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
  231. package/lib-commonjs/components/AreaChart/AreaChart.base.d.ts +0 -1
  232. package/lib-commonjs/components/AreaChart/AreaChart.base.js +0 -29
  233. package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
  234. package/lib-commonjs/components/ChartTable/ChartTable.base.js +12 -4
  235. package/lib-commonjs/components/ChartTable/ChartTable.base.js.map +1 -1
  236. package/lib-commonjs/components/ChartTable/ChartTable.styles.js +3 -0
  237. package/lib-commonjs/components/ChartTable/ChartTable.styles.js.map +1 -1
  238. package/lib-commonjs/components/ChartTable/ChartTable.types.d.ts +11 -0
  239. package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +1 -1
  240. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +11 -6
  241. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
  242. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.d.ts +1 -0
  243. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js +17 -1
  244. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.styles.js.map +1 -1
  245. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.d.ts +5 -0
  246. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -1
  247. package/lib-commonjs/components/CommonComponents/CartesianChart.base.d.ts +1 -1
  248. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +81 -41
  249. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  250. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js +30 -26
  251. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  252. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +16 -1
  253. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  254. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +23 -27
  255. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  256. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +3 -1
  257. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +204 -219
  258. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  259. package/lib-commonjs/components/DonutChart/DonutChart.base.d.ts +1 -0
  260. package/lib-commonjs/components/DonutChart/DonutChart.base.js +15 -3
  261. package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
  262. package/lib-commonjs/components/DonutChart/DonutChart.styles.js +2 -0
  263. package/lib-commonjs/components/DonutChart/DonutChart.styles.js.map +1 -1
  264. package/lib-commonjs/components/DonutChart/DonutChart.types.d.ts +13 -0
  265. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  266. package/lib-commonjs/components/FunnelChart/FunnelChart.base.js +14 -8
  267. package/lib-commonjs/components/FunnelChart/FunnelChart.base.js.map +1 -1
  268. package/lib-commonjs/components/FunnelChart/FunnelChart.styles.js +3 -0
  269. package/lib-commonjs/components/FunnelChart/FunnelChart.styles.js.map +1 -1
  270. package/lib-commonjs/components/FunnelChart/FunnelChart.types.d.ts +13 -0
  271. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -1
  272. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +1 -1
  273. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
  274. package/lib-commonjs/components/GaugeChart/GaugeChart.styles.js +16 -22
  275. package/lib-commonjs/components/GaugeChart/GaugeChart.styles.js.map +1 -1
  276. package/lib-commonjs/components/GaugeChart/GaugeChart.types.d.ts +9 -0
  277. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  278. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +0 -1
  279. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +0 -16
  280. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  281. package/lib-commonjs/components/LineChart/LineChart.base.d.ts +0 -1
  282. package/lib-commonjs/components/LineChart/LineChart.base.js +0 -24
  283. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  284. package/lib-commonjs/components/PolarChart/PolarChart.base.d.ts +3 -0
  285. package/lib-commonjs/components/PolarChart/PolarChart.base.js +429 -0
  286. package/lib-commonjs/components/PolarChart/PolarChart.base.js.map +1 -0
  287. package/lib-commonjs/components/PolarChart/PolarChart.d.ts +7 -0
  288. package/lib-commonjs/components/PolarChart/PolarChart.js +12 -0
  289. package/lib-commonjs/components/PolarChart/PolarChart.js.map +1 -0
  290. package/lib-commonjs/components/PolarChart/PolarChart.styles.d.ts +2 -0
  291. package/lib-commonjs/components/PolarChart/PolarChart.styles.js +43 -0
  292. package/lib-commonjs/components/PolarChart/PolarChart.styles.js.map +1 -0
  293. package/lib-commonjs/components/PolarChart/PolarChart.types.d.ts +185 -0
  294. package/lib-commonjs/components/PolarChart/PolarChart.types.js +3 -0
  295. package/lib-commonjs/components/PolarChart/PolarChart.types.js.map +1 -0
  296. package/lib-commonjs/components/PolarChart/PolarChart.utils.d.ts +43 -0
  297. package/lib-commonjs/components/PolarChart/PolarChart.utils.js +188 -0
  298. package/lib-commonjs/components/PolarChart/PolarChart.utils.js.map +1 -0
  299. package/lib-commonjs/components/PolarChart/index.d.ts +2 -0
  300. package/lib-commonjs/components/PolarChart/index.js +6 -0
  301. package/lib-commonjs/components/PolarChart/index.js.map +1 -0
  302. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js +9 -2
  303. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
  304. package/lib-commonjs/components/SankeyChart/SankeyChart.styles.js +3 -0
  305. package/lib-commonjs/components/SankeyChart/SankeyChart.styles.js.map +1 -1
  306. package/lib-commonjs/components/SankeyChart/SankeyChart.types.d.ts +18 -0
  307. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  308. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +0 -27
  309. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -1
  310. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.d.ts +0 -1
  311. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +0 -72
  312. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  313. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +0 -1
  314. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +0 -25
  315. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  316. package/lib-commonjs/index.d.ts +2 -0
  317. package/lib-commonjs/index.js +3 -1
  318. package/lib-commonjs/index.js.map +1 -1
  319. package/lib-commonjs/types/IDataPoint.d.ts +88 -0
  320. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  321. package/lib-commonjs/utilities/ChartTitle.d.ts +55 -0
  322. package/lib-commonjs/utilities/ChartTitle.js +49 -0
  323. package/lib-commonjs/utilities/ChartTitle.js.map +1 -0
  324. package/lib-commonjs/utilities/Common.styles.d.ts +51 -0
  325. package/lib-commonjs/utilities/Common.styles.js +74 -2
  326. package/lib-commonjs/utilities/Common.styles.js.map +1 -1
  327. package/lib-commonjs/utilities/image-export-utils.js +3 -3
  328. package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
  329. package/lib-commonjs/utilities/index.d.ts +1 -0
  330. package/lib-commonjs/utilities/index.js +1 -0
  331. package/lib-commonjs/utilities/index.js.map +1 -1
  332. package/lib-commonjs/utilities/utilities.d.ts +28 -6
  333. package/lib-commonjs/utilities/utilities.js +217 -107
  334. package/lib-commonjs/utilities/utilities.js.map +1 -1
  335. package/package.json +4 -12
  336. package/project.json +0 -1
  337. package/src/components/ChartTable/ChartTable.types.ts +13 -0
  338. package/src/components/CommonComponents/Annotations/ChartAnnotationLayer.types.ts +5 -0
  339. package/src/components/CommonComponents/CartesianChart.types.ts +17 -1
  340. package/src/components/DonutChart/DonutChart.types.ts +16 -0
  341. package/src/components/FunnelChart/FunnelChart.types.ts +16 -0
  342. package/src/components/GaugeChart/GaugeChart.types.ts +11 -0
  343. package/src/components/PolarChart/PolarChart.types.ts +232 -0
  344. package/src/components/SankeyChart/SankeyChart.types.ts +22 -0
@@ -51,12 +51,15 @@ var dashOptions = {
51
51
  },
52
52
  };
53
53
  function getTitles(layout) {
54
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
55
- var titles = {
56
- chartTitle: typeof (layout === null || layout === void 0 ? void 0 : layout.title) === 'string' ? layout.title : (_b = (_a = layout === null || layout === void 0 ? void 0 : layout.title) === null || _a === void 0 ? void 0 : _a.text) !== null && _b !== void 0 ? _b : '',
57
- xAxisTitle: typeof ((_c = layout === null || layout === void 0 ? void 0 : layout.xaxis) === null || _c === void 0 ? void 0 : _c.title) === 'string' ? (_d = layout === null || layout === void 0 ? void 0 : layout.xaxis) === null || _d === void 0 ? void 0 : _d.title : (_g = (_f = (_e = layout === null || layout === void 0 ? void 0 : layout.xaxis) === null || _e === void 0 ? void 0 : _e.title) === null || _f === void 0 ? void 0 : _f.text) !== null && _g !== void 0 ? _g : '',
58
- yAxisTitle: typeof ((_h = layout === null || layout === void 0 ? void 0 : layout.yaxis) === null || _h === void 0 ? void 0 : _h.title) === 'string' ? (_j = layout === null || layout === void 0 ? void 0 : layout.yaxis) === null || _j === void 0 ? void 0 : _j.title : (_m = (_l = (_k = layout === null || layout === void 0 ? void 0 : layout.yaxis) === null || _k === void 0 ? void 0 : _k.title) === null || _l === void 0 ? void 0 : _l.text) !== null && _m !== void 0 ? _m : '',
59
- };
54
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
55
+ var titleObj = layout === null || layout === void 0 ? void 0 : layout.title;
56
+ var chartTitle = typeof titleObj === 'string' ? titleObj : (_a = titleObj === null || titleObj === void 0 ? void 0 : titleObj.text) !== null && _a !== void 0 ? _a : '';
57
+ var titleFont = typeof titleObj === 'object' ? titleObj === null || titleObj === void 0 ? void 0 : titleObj.font : undefined;
58
+ var titleXAnchor = typeof titleObj === 'object' ? titleObj === null || titleObj === void 0 ? void 0 : titleObj.xanchor : undefined;
59
+ var titleYAnchor = typeof titleObj === 'object' ? titleObj === null || titleObj === void 0 ? void 0 : titleObj.yanchor : undefined;
60
+ var titlePad = typeof titleObj === 'object' ? titleObj === null || titleObj === void 0 ? void 0 : titleObj.pad : undefined;
61
+ var titleStyles = __assign(__assign(__assign(__assign({}, (titleFont ? { titleFont: titleFont } : {})), (titleXAnchor ? { titleXAnchor: titleXAnchor } : {})), (titleYAnchor ? { titleYAnchor: titleYAnchor } : {})), (titlePad ? { titlePad: titlePad } : {}));
62
+ var titles = __assign(__assign({ chartTitle: chartTitle }, (Object.keys(titleStyles).length > 0 ? { titleStyles: titleStyles } : {})), { xAxisTitle: typeof ((_b = layout === null || layout === void 0 ? void 0 : layout.xaxis) === null || _b === void 0 ? void 0 : _b.title) === 'string' ? (_c = layout === null || layout === void 0 ? void 0 : layout.xaxis) === null || _c === void 0 ? void 0 : _c.title : (_f = (_e = (_d = layout === null || layout === void 0 ? void 0 : layout.xaxis) === null || _d === void 0 ? void 0 : _d.title) === null || _e === void 0 ? void 0 : _e.text) !== null && _f !== void 0 ? _f : '', yAxisTitle: typeof ((_g = layout === null || layout === void 0 ? void 0 : layout.yaxis) === null || _g === void 0 ? void 0 : _g.title) === 'string' ? (_h = layout === null || layout === void 0 ? void 0 : layout.yaxis) === null || _h === void 0 ? void 0 : _h.title : (_l = (_k = (_j = layout === null || layout === void 0 ? void 0 : layout.yaxis) === null || _j === void 0 ? void 0 : _j.title) === null || _k === void 0 ? void 0 : _k.text) !== null && _l !== void 0 ? _l : '', xAxisAnnotation: chartTitle });
60
63
  return titles;
61
64
  }
62
65
  var getXAxisTickFormat = function (series, layout) {
@@ -1024,7 +1027,7 @@ colorMap, colorwayType, isDarkTheme) {
1024
1027
  var innerRadius = firstData.hole
1025
1028
  ? firstData.hole * (Math.min(width - donutMarginHorizontal, height - donutMarginVertical) / 2)
1026
1029
  : MIN_DONUT_RADIUS;
1027
- var chartTitle = getTitles(input.layout).chartTitle;
1030
+ var _r = getTitles(input.layout), chartTitle = _r.chartTitle, titleStyles = _r.titleStyles;
1028
1031
  // Build anticlockwise order by keeping the first item, reversing the rest
1029
1032
  var legends = Object.keys(mapLegendToDataPoint);
1030
1033
  var reorderedEntries = legends.length > 1
@@ -1035,35 +1038,25 @@ colorMap, colorwayType, isDarkTheme) {
1035
1038
  .reverse()
1036
1039
  .map(function (key) { return [key, mapLegendToDataPoint[key]]; }), true)
1037
1040
  : legends.map(function (key) { return [key, mapLegendToDataPoint[key]]; });
1038
- return {
1039
- data: {
1041
+ return __assign({ data: {
1040
1042
  chartTitle: chartTitle,
1041
1043
  chartData: reorderedEntries.map(function (_a) {
1042
1044
  var v = _a[1];
1043
1045
  return v;
1044
1046
  }),
1045
- },
1046
- hideLegend: isMultiPlot || ((_p = input.layout) === null || _p === void 0 ? void 0 : _p.showlegend) === false,
1047
- width: (_q = input.layout) === null || _q === void 0 ? void 0 : _q.width,
1048
- height: height,
1049
- innerRadius: innerRadius,
1050
- hideLabels: hideLabels,
1051
- showLabelsInPercent: firstData.textinfo
1047
+ }, hideLegend: isMultiPlot || ((_p = input.layout) === null || _p === void 0 ? void 0 : _p.showlegend) === false, width: (_q = input.layout) === null || _q === void 0 ? void 0 : _q.width, height: height, innerRadius: innerRadius, hideLabels: hideLabels, showLabelsInPercent: firstData.textinfo
1052
1048
  ? ['percent', 'label+percent', 'percent+label'].includes(firstData.textinfo)
1053
- : true,
1054
- roundCorners: true,
1055
- order: 'sorted',
1056
- };
1049
+ : true, roundCorners: true, order: 'sorted' }, (titleStyles ? { titleStyles: titleStyles } : {}));
1057
1050
  };
1058
1051
  export var transformPlotlyJsonToVSBCProps = function (input, isMultiPlot,
1059
1052
  // eslint-disable-next-line @typescript-eslint/no-deprecated
1060
1053
  colorMap, colorwayType, isDarkTheme, fallbackVSBC) {
1061
- var _a, _b, _c, _d, _e, _f;
1054
+ var _a, _b, _c, _d, _e;
1062
1055
  var mapXToDataPoints = {};
1063
1056
  var yMaxValue = 0;
1064
1057
  var yMinValue = 0;
1065
1058
  var secondaryYAxisValues = getSecondaryYAxisValues(input.data, input.layout);
1066
- var _g = getLegendProps(input.data, input.layout, isMultiPlot), legends = _g.legends, hideLegend = _g.hideLegend;
1059
+ var _f = getLegendProps(input.data, input.layout, isMultiPlot), legends = _f.legends, hideLegend = _f.hideLegend;
1067
1060
  var colorScale = undefined;
1068
1061
  var yAxisTickFormat = getYAxisTickFormat(input.data[0], input.layout);
1069
1062
  var resolveXValue = getAxisValueResolver(getAxisType(input.data, getAxisObjects(input.data, input.layout).x));
@@ -1200,7 +1193,7 @@ colorMap, colorwayType, isDarkTheme, fallbackVSBC) {
1200
1193
  });
1201
1194
  var vsbcData = Object.values(mapXToDataPoints);
1202
1195
  var annotations = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot);
1203
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ data: vsbcData, width: (_c = input.layout) === null || _c === void 0 ? void 0 : _c.width, height: (_e = (_d = input.layout) === null || _d === void 0 ? void 0 : _d.height) !== null && _e !== void 0 ? _e : 350, barWidth: 'auto', yMaxValue: yMaxValue, yMinValue: yMinValue, mode: 'plotly' }, secondaryYAxisValues), { hideTickOverlap: true, hideLegend: hideLegend, roundCorners: true, supportNegativeData: true, barGapMax: 2, showYAxisLables: true, noOfCharsToTruncate: 20, showYAxisLablesTooltip: true, roundedTicks: true, wrapXAxisLables: typeof ((_f = vsbcData[0]) === null || _f === void 0 ? void 0 : _f.xAxisPoint) === 'string' }), getXMinMaxValues(input.data[0], input.layout)), getTitles(input.layout)), getAxisCategoryOrderProps(input.data, input.layout)), getYMinMaxValues(input.data[0], input.layout)), getXAxisTickFormat(input.data[0], input.layout)), yAxisTickFormat), getBarProps(input.data, input.layout)), getAxisTickProps(input.data, input.layout)), (annotations ? { annotations: annotations } : {}));
1196
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ data: vsbcData, width: (_c = input.layout) === null || _c === void 0 ? void 0 : _c.width, height: (_e = (_d = input.layout) === null || _d === void 0 ? void 0 : _d.height) !== null && _e !== void 0 ? _e : 350, barWidth: 'auto', yMaxValue: yMaxValue, yMinValue: yMinValue, mode: 'plotly' }, secondaryYAxisValues), { hideTickOverlap: true, hideLegend: hideLegend, roundCorners: true, supportNegativeData: true, barGapMax: 2, showYAxisLables: true, noOfCharsToTruncate: 20, showYAxisLablesTooltip: true, roundedTicks: true }), getXMinMaxValues(input.data[0], input.layout)), getTitles(input.layout)), getAxisCategoryOrderProps(input.data, input.layout)), getYMinMaxValues(input.data[0], input.layout)), getXAxisTickFormat(input.data[0], input.layout)), yAxisTickFormat), getBarProps(input.data, input.layout)), getAxisTickProps(input.data, input.layout)), (annotations ? { annotations: annotations } : {}));
1204
1197
  };
1205
1198
  export var transformPlotlyJsonToGVBCProps = function (input, isMultiPlot,
1206
1199
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -1302,14 +1295,14 @@ colorMap, colorwayType, isDarkTheme) {
1302
1295
  }
1303
1296
  });
1304
1297
  var annotations = getChartAnnotationsFromLayout(processedInput.layout, processedInput.data, isMultiPlot);
1305
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ dataV2: gvbcDataV2, width: (_a = processedInput.layout) === null || _a === void 0 ? void 0 : _a.width, height: (_c = (_b = processedInput.layout) === null || _b === void 0 ? void 0 : _b.height) !== null && _c !== void 0 ? _c : 350, barwidth: 'auto', mode: 'plotly' }, secondaryYAxisValues), { hideTickOverlap: true, hideLegend: hideLegend, roundCorners: true, roundedTicks: true, wrapXAxisLables: true, showYAxisLables: true }), getXMinMaxValues(processedInput.data[0], processedInput.layout)), getTitles(processedInput.layout)), getAxisCategoryOrderProps(processedInput.data, processedInput.layout)), getYMinMaxValues(processedInput.data[0], processedInput.layout)), getXAxisTickFormat(processedInput.data[0], processedInput.layout)), yAxisTickFormat), getBarProps(processedInput.data, processedInput.layout)), getAxisTickProps(processedInput.data, processedInput.layout)), (annotations ? { annotations: annotations } : {}));
1298
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ dataV2: gvbcDataV2, width: (_a = processedInput.layout) === null || _a === void 0 ? void 0 : _a.width, height: (_c = (_b = processedInput.layout) === null || _b === void 0 ? void 0 : _b.height) !== null && _c !== void 0 ? _c : 350, barwidth: 'auto', mode: 'plotly' }, secondaryYAxisValues), { hideTickOverlap: true, hideLegend: hideLegend, roundCorners: true, roundedTicks: true, showYAxisLables: true }), getXMinMaxValues(processedInput.data[0], processedInput.layout)), getTitles(processedInput.layout)), getAxisCategoryOrderProps(processedInput.data, processedInput.layout)), getYMinMaxValues(processedInput.data[0], processedInput.layout)), getXAxisTickFormat(processedInput.data[0], processedInput.layout)), yAxisTickFormat), getBarProps(processedInput.data, processedInput.layout)), getAxisTickProps(processedInput.data, processedInput.layout)), (annotations ? { annotations: annotations } : {}));
1306
1299
  };
1307
1300
  export var transformPlotlyJsonToVBCProps = function (input, isMultiPlot,
1308
1301
  // eslint-disable-next-line @typescript-eslint/no-deprecated
1309
1302
  colorMap, colorwayType, isDarkTheme) {
1310
- var _a, _b, _c, _d;
1303
+ var _a, _b, _c;
1311
1304
  var vbcData = [];
1312
- var _e = getLegendProps(input.data, input.layout, isMultiPlot), legends = _e.legends, hideLegend = _e.hideLegend;
1305
+ var _d = getLegendProps(input.data, input.layout, isMultiPlot), legends = _d.legends, hideLegend = _d.hideLegend;
1313
1306
  var colorScale = undefined;
1314
1307
  input.data.forEach(function (series, seriesIdx) {
1315
1308
  var _a, _b, _c, _d, _e, _f, _g;
@@ -1369,7 +1362,7 @@ colorMap, colorwayType, isDarkTheme) {
1369
1362
  });
1370
1363
  });
1371
1364
  var annotations = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot);
1372
- return __assign(__assign(__assign(__assign(__assign({ data: vbcData, width: (_a = input.layout) === null || _a === void 0 ? void 0 : _a.width, height: (_c = (_b = input.layout) === null || _b === void 0 ? void 0 : _b.height) !== null && _c !== void 0 ? _c : 350, supportNegativeData: true, mode: 'histogram', hideTickOverlap: true, maxBarWidth: 50, hideLegend: hideLegend, roundCorners: true, roundedTicks: true, wrapXAxisLables: typeof ((_d = vbcData[0]) === null || _d === void 0 ? void 0 : _d.x) === 'string', showYAxisLables: true }, getXMinMaxValues(input.data[0], input.layout)), getTitles(input.layout)), getAxisCategoryOrderProps(input.data, input.layout)), getYMinMaxValues(input.data[0], input.layout)), (annotations ? { annotations: annotations } : {}));
1365
+ return __assign(__assign(__assign(__assign(__assign({ data: vbcData, width: (_a = input.layout) === null || _a === void 0 ? void 0 : _a.width, height: (_c = (_b = input.layout) === null || _b === void 0 ? void 0 : _b.height) !== null && _c !== void 0 ? _c : 350, supportNegativeData: true, mode: 'histogram', hideTickOverlap: true, maxBarWidth: 50, hideLegend: hideLegend, roundCorners: true, roundedTicks: true, showYAxisLables: true }, getXMinMaxValues(input.data[0], input.layout)), getTitles(input.layout)), getAxisCategoryOrderProps(input.data, input.layout)), getYMinMaxValues(input.data[0], input.layout)), (annotations ? { annotations: annotations } : {}));
1373
1366
  };
1374
1367
  export var transformPlotlyJsonToAreaChartProps = function (input, isMultiPlot,
1375
1368
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -1424,9 +1417,7 @@ colorMap, colorwayType, isDarkTheme) {
1424
1417
  var mode = 'tonexty';
1425
1418
  var _q = getLegendProps(input.data, input.layout, isMultiPlot), legends = _q.legends, hideLegend = _q.hideLegend;
1426
1419
  var yAxisTickFormat = getYAxisTickFormat(input.data[0], input.layout);
1427
- var xAxisType = getAxisType(input.data, getAxisObjects(input.data, input.layout).x);
1428
- var resolveXValue = getAxisValueResolver(xAxisType);
1429
- var shouldWrapLabels = xAxisType === 'category';
1420
+ var resolveXValue = getAxisValueResolver(getAxisType(input.data, getAxisObjects(input.data, input.layout).x));
1430
1421
  var chartData = input.data
1431
1422
  .map(function (series, index) {
1432
1423
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
@@ -1561,7 +1552,7 @@ colorMap, colorwayType, isDarkTheme) {
1561
1552
  scatterChartData: __spreadArray(__spreadArray([], chartData, true), lineShape, true),
1562
1553
  };
1563
1554
  var annotations = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot);
1564
- var commonProps = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ supportNegativeData: true }, secondaryYAxisValues), { width: (_m = input.layout) === null || _m === void 0 ? void 0 : _m.width, height: (_p = (_o = input.layout) === null || _o === void 0 ? void 0 : _o.height) !== null && _p !== void 0 ? _p : 350, hideTickOverlap: true, hideLegend: hideLegend, useUTC: false, optimizeLargeData: numDataPoints > 1000, wrapXAxisLables: shouldWrapLabels, showYAxisLables: true, roundedTicks: true }), getXMinMaxValues(input.data[0], input.layout)), getTitles(input.layout)), getXAxisTickFormat(input.data[0], input.layout)), yAxisTickFormat), getAxisScaleTypeProps(input.data, input.layout)), getAxisTickProps(input.data, input.layout)), (annotations ? { annotations: annotations } : {}));
1555
+ var commonProps = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ supportNegativeData: true }, secondaryYAxisValues), { width: (_m = input.layout) === null || _m === void 0 ? void 0 : _m.width, height: (_p = (_o = input.layout) === null || _o === void 0 ? void 0 : _o.height) !== null && _p !== void 0 ? _p : 350, hideTickOverlap: true, hideLegend: hideLegend, useUTC: false, optimizeLargeData: numDataPoints > 1000, showYAxisLables: true, roundedTicks: true }), getXMinMaxValues(input.data[0], input.layout)), getTitles(input.layout)), getXAxisTickFormat(input.data[0], input.layout)), yAxisTickFormat), getAxisScaleTypeProps(input.data, input.layout)), getAxisTickProps(input.data, input.layout)), (annotations ? { annotations: annotations } : {}));
1565
1556
  if (isAreaChart) {
1566
1557
  return __assign({ data: chartProps, mode: mode }, commonProps);
1567
1558
  }
@@ -1850,13 +1841,13 @@ colorMap, colorwayType, isDarkTheme) {
1850
1841
  var rangeValuesForColorScale = Array.isArray(colorscale)
1851
1842
  ? colorscale.map(function (arr) { return arr[1]; })
1852
1843
  : defaultRange;
1853
- return __assign(__assign(__assign({ data: [heatmapData], domainValuesForColorScale: domainValuesForColorScale, rangeValuesForColorScale: rangeValuesForColorScale, hideLegend: true, showYAxisLables: true, sortOrder: 'none', width: (_9 = input.layout) === null || _9 === void 0 ? void 0 : _9.width, height: (_11 = (_10 = input.layout) === null || _10 === void 0 ? void 0 : _10.height) !== null && _11 !== void 0 ? _11 : 350, hideTickOverlap: true, noOfCharsToTruncate: 20, showYAxisLablesTooltip: true, wrapXAxisLables: true }, getTitles(input.layout)), getAxisCategoryOrderProps([firstData], input.layout)), getAxisTickProps(input.data, input.layout));
1844
+ return __assign(__assign(__assign({ data: [heatmapData], domainValuesForColorScale: domainValuesForColorScale, rangeValuesForColorScale: rangeValuesForColorScale, hideLegend: true, showYAxisLables: true, sortOrder: 'none', width: (_9 = input.layout) === null || _9 === void 0 ? void 0 : _9.width, height: (_11 = (_10 = input.layout) === null || _10 === void 0 ? void 0 : _10.height) !== null && _11 !== void 0 ? _11 : 350, hideTickOverlap: true, noOfCharsToTruncate: 20, showYAxisLablesTooltip: true }, getTitles(input.layout)), getAxisCategoryOrderProps([firstData], input.layout)), getAxisTickProps(input.data, input.layout));
1854
1845
  };
1855
1846
  export var transformPlotlyJsonToSankeyProps = function (input, isMultiPlot,
1856
1847
  // eslint-disable-next-line @typescript-eslint/no-deprecated
1857
1848
  colorMap, colorwayType, isDarkTheme) {
1858
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1859
- var _q = input.data[0], link = _q.link, node = _q.node;
1849
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
1850
+ var _r = input.data[0], link = _r.link, node = _r.node;
1860
1851
  var validLinks = ((_a = link === null || link === void 0 ? void 0 : link.value) !== null && _a !== void 0 ? _a : [])
1861
1852
  .map(function (val, index) {
1862
1853
  var _a, _b;
@@ -1893,17 +1884,11 @@ colorMap, colorwayType, isDarkTheme) {
1893
1884
  var styles = {
1894
1885
  root: __assign({}, (((_k = (_j = input.layout) === null || _j === void 0 ? void 0 : _j.font) === null || _k === void 0 ? void 0 : _k.size) ? { fontSize: (_l = input.layout.font) === null || _l === void 0 ? void 0 : _l.size } : {})),
1895
1886
  };
1896
- var chartTitle = getTitles(input.layout).chartTitle;
1897
- return {
1898
- data: {
1887
+ var _s = getTitles(input.layout), chartTitle = _s.chartTitle, titleStyles = _s.titleStyles;
1888
+ return __assign({ data: {
1899
1889
  chartTitle: chartTitle,
1900
1890
  SankeyChartData: sankeyChartData,
1901
- },
1902
- width: (_m = input.layout) === null || _m === void 0 ? void 0 : _m.width,
1903
- height: (_p = (_o = input.layout) === null || _o === void 0 ? void 0 : _o.height) !== null && _p !== void 0 ? _p : 468,
1904
- styles: styles,
1905
- enableReflow: false,
1906
- };
1891
+ }, width: (_m = input.layout) === null || _m === void 0 ? void 0 : _m.width, height: (_p = (_o = input.layout) === null || _o === void 0 ? void 0 : _o.height) !== null && _p !== void 0 ? _p : 468, styles: styles, enableReflow: false, hideLegend: isMultiPlot || ((_q = input.layout) === null || _q === void 0 ? void 0 : _q.showlegend) === false }, (titleStyles ? { titleStyles: titleStyles } : {}));
1907
1892
  };
1908
1893
  export var transformPlotlyJsonToGaugeProps = function (input, isMultiPlot,
1909
1894
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -1958,22 +1943,10 @@ colorMap, colorwayType, isDarkTheme) {
1958
1943
  fill: sublabelColor,
1959
1944
  },
1960
1945
  };
1961
- var chartTitle = getTitles(input.layout).chartTitle;
1962
- return {
1963
- segments: segments,
1964
- chartValue: (_14 = firstData.value) !== null && _14 !== void 0 ? _14 : 0,
1965
- chartTitle: chartTitle,
1966
- sublabel: sublabel,
1946
+ var _32 = getTitles(input.layout), chartTitle = _32.chartTitle, titleStyles = _32.titleStyles;
1947
+ return __assign({ segments: segments, chartValue: (_14 = firstData.value) !== null && _14 !== void 0 ? _14 : 0, chartTitle: chartTitle, sublabel: sublabel,
1967
1948
  // range values can be null
1968
- minValue: typeof ((_17 = (_16 = (_15 = firstData.gauge) === null || _15 === void 0 ? void 0 : _15.axis) === null || _16 === void 0 ? void 0 : _16.range) === null || _17 === void 0 ? void 0 : _17[0]) === 'number' ? (_20 = (_19 = (_18 = firstData.gauge) === null || _18 === void 0 ? void 0 : _18.axis) === null || _19 === void 0 ? void 0 : _19.range) === null || _20 === void 0 ? void 0 : _20[0] : undefined,
1969
- maxValue: typeof ((_23 = (_22 = (_21 = firstData.gauge) === null || _21 === void 0 ? void 0 : _21.axis) === null || _22 === void 0 ? void 0 : _22.range) === null || _23 === void 0 ? void 0 : _23[1]) === 'number' ? (_26 = (_25 = (_24 = firstData.gauge) === null || _24 === void 0 ? void 0 : _24.axis) === null || _25 === void 0 ? void 0 : _25.range) === null || _26 === void 0 ? void 0 : _26[1] : undefined,
1970
- chartValueFormat: function () { var _a, _b; return (_b = (_a = firstData.value) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ''; },
1971
- width: (_27 = input.layout) === null || _27 === void 0 ? void 0 : _27.width,
1972
- height: (_29 = (_28 = input.layout) === null || _28 === void 0 ? void 0 : _28.height) !== null && _29 !== void 0 ? _29 : 220,
1973
- styles: styles,
1974
- variant: ((_31 = (_30 = firstData.gauge) === null || _30 === void 0 ? void 0 : _30.steps) === null || _31 === void 0 ? void 0 : _31.length) ? GaugeChartVariant.MultipleSegments : GaugeChartVariant.SingleSegment,
1975
- roundCorners: true,
1976
- };
1949
+ minValue: typeof ((_17 = (_16 = (_15 = firstData.gauge) === null || _15 === void 0 ? void 0 : _15.axis) === null || _16 === void 0 ? void 0 : _16.range) === null || _17 === void 0 ? void 0 : _17[0]) === 'number' ? (_20 = (_19 = (_18 = firstData.gauge) === null || _18 === void 0 ? void 0 : _18.axis) === null || _19 === void 0 ? void 0 : _19.range) === null || _20 === void 0 ? void 0 : _20[0] : undefined, maxValue: typeof ((_23 = (_22 = (_21 = firstData.gauge) === null || _21 === void 0 ? void 0 : _21.axis) === null || _22 === void 0 ? void 0 : _22.range) === null || _23 === void 0 ? void 0 : _23[1]) === 'number' ? (_26 = (_25 = (_24 = firstData.gauge) === null || _24 === void 0 ? void 0 : _24.axis) === null || _25 === void 0 ? void 0 : _25.range) === null || _26 === void 0 ? void 0 : _26[1] : undefined, chartValueFormat: function () { var _a, _b; return (_b = (_a = firstData.value) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ''; }, width: (_27 = input.layout) === null || _27 === void 0 ? void 0 : _27.width, height: (_29 = (_28 = input.layout) === null || _28 === void 0 ? void 0 : _28.height) !== null && _29 !== void 0 ? _29 : 220, styles: styles, variant: ((_31 = (_30 = firstData.gauge) === null || _30 === void 0 ? void 0 : _30.steps) === null || _31 === void 0 ? void 0 : _31.length) ? GaugeChartVariant.MultipleSegments : GaugeChartVariant.SingleSegment, roundCorners: true }, (titleStyles ? { titleStyles: titleStyles } : {}));
1977
1950
  };
1978
1951
  var cleanText = function (text) {
1979
1952
  return text
@@ -2087,13 +2060,8 @@ colorMap, colorwayType, isDarkTheme) {
2087
2060
  font: __assign(__assign({}, ((_t = templateHeader === null || templateHeader === void 0 ? void 0 : templateHeader.font) !== null && _t !== void 0 ? _t : {})), ((_u = tableHeader === null || tableHeader === void 0 ? void 0 : tableHeader.font) !== null && _u !== void 0 ? _u : {})),
2088
2061
  values: (_w = (_v = tableHeader === null || tableHeader === void 0 ? void 0 : tableHeader.values) !== null && _v !== void 0 ? _v : templateHeader === null || templateHeader === void 0 ? void 0 : templateHeader.values) !== null && _w !== void 0 ? _w : [],
2089
2062
  };
2090
- return {
2091
- headers: normalizeHeaders((_y = (_x = tableData.header) === null || _x === void 0 ? void 0 : _x.values) !== null && _y !== void 0 ? _y : [], header),
2092
- rows: rows,
2093
- width: (_z = input.layout) === null || _z === void 0 ? void 0 : _z.width,
2094
- height: (_0 = input.layout) === null || _0 === void 0 ? void 0 : _0.height,
2095
- styles: styles,
2096
- };
2063
+ var _1 = getTitles(input.layout), chartTitle = _1.chartTitle, titleStyles = _1.titleStyles;
2064
+ return __assign({ headers: normalizeHeaders((_y = (_x = tableData.header) === null || _x === void 0 ? void 0 : _x.values) !== null && _y !== void 0 ? _y : [], header), rows: rows, width: (_z = input.layout) === null || _z === void 0 ? void 0 : _z.width, height: (_0 = input.layout) === null || _0 === void 0 ? void 0 : _0.height, styles: styles, chartTitle: chartTitle }, (titleStyles ? { titleStyles: titleStyles } : {}));
2097
2065
  };
2098
2066
  function getCategoriesAndValues(series) {
2099
2067
  var _a, _b, _c, _d;
@@ -2210,141 +2178,59 @@ colorMap, colorwayType, isDarkTheme) {
2210
2178
  });
2211
2179
  });
2212
2180
  }
2213
- return {
2214
- data: funnelData,
2215
- width: (_a = input.layout) === null || _a === void 0 ? void 0 : _a.width,
2216
- height: (_b = input.layout) === null || _b === void 0 ? void 0 : _b.height,
2217
- orientation: ((_c = input.data[0]) === null || _c === void 0 ? void 0 : _c.orientation) === 'v' ? 'horizontal' : 'vertical',
2218
- hideLegend: isMultiPlot || ((_d = input.layout) === null || _d === void 0 ? void 0 : _d.showlegend) === false,
2219
- };
2181
+ var _e = getTitles(input.layout), chartTitle = _e.chartTitle, titleStyles = _e.titleStyles;
2182
+ return __assign({ data: funnelData, chartTitle: chartTitle, width: (_a = input.layout) === null || _a === void 0 ? void 0 : _a.width, height: (_b = input.layout) === null || _b === void 0 ? void 0 : _b.height, orientation: ((_c = input.data[0]) === null || _c === void 0 ? void 0 : _c.orientation) === 'v' ? 'horizontal' : 'vertical', hideLegend: isMultiPlot || ((_d = input.layout) === null || _d === void 0 ? void 0 : _d.showlegend) === false }, (titleStyles ? { titleStyles: titleStyles } : {}));
2220
2183
  };
2221
- export var projectPolarToCartesian = function (input) {
2222
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
2223
- var projection = __assign({}, input);
2224
- // Find the global min and max radius across all series
2225
- var minRadius = 0;
2226
- var maxRadius = 0;
2227
- for (var sindex = 0; sindex < input.data.length; sindex++) {
2228
- var rVals = input.data[sindex].r;
2229
- if (rVals && isArrayOrTypedArray(rVals)) {
2230
- for (var ptindex = 0; ptindex < rVals.length; ptindex++) {
2231
- if (!isInvalidValue(rVals[ptindex])) {
2232
- minRadius = Math.min(minRadius, rVals[ptindex]);
2233
- maxRadius = Math.max(maxRadius, rVals[ptindex]);
2234
- }
2235
- }
2236
- }
2237
- }
2238
- // If there are negative radii, compute the shift
2239
- var radiusShift = minRadius < 0 ? -minRadius : 0;
2240
- // Collect all unique theta values from all scatterpolar series for equal spacing
2241
- var allThetaValues = new Set();
2242
- for (var sindex = 0; sindex < input.data.length; sindex++) {
2243
- var series = input.data[sindex];
2244
- if (series.theta && isArrayOrTypedArray(series.theta)) {
2245
- series.theta.forEach(function (theta) { return allThetaValues.add(String(theta)); });
2246
- }
2247
- }
2248
- // Project all points and create a perfect square domain
2249
- var allX = [];
2250
- var allY = [];
2251
- var originX = null;
2252
- var _loop_1 = function (sindex) {
2253
- var series = input.data[sindex];
2254
- // If scatterpolar, set __axisLabel to all unique theta values for equal spacing
2255
- if (isArrayOrTypedArray(series.theta)) {
2256
- series.__axisLabel = Array.from(allThetaValues);
2257
- }
2258
- series.x = [];
2259
- series.y = [];
2260
- var thetas = series.theta;
2261
- var rVals = series.r;
2262
- // Skip if rVals or thetas are not arrays
2263
- if (!isArrayOrTypedArray(rVals) || !isArrayOrTypedArray(thetas)) {
2264
- projection.data[sindex] = series;
2265
- return "continue";
2266
- }
2267
- // retrieve polar axis settings
2268
- var dirMultiplier = ((_c = (_b = (_a = input.layout) === null || _a === void 0 ? void 0 : _a.polar) === null || _b === void 0 ? void 0 : _b.angularaxis) === null || _c === void 0 ? void 0 : _c.direction) === 'clockwise' ? -1 : 1;
2269
- var startAngleInRad = (((_g = (_f = (_e = (_d = input.layout) === null || _d === void 0 ? void 0 : _d.polar) === null || _e === void 0 ? void 0 : _e.angularaxis) === null || _f === void 0 ? void 0 : _f.rotation) !== null && _g !== void 0 ? _g : 0) * Math.PI) / 180;
2270
- // Compute tick positions if categorical
2271
- var uniqueTheta = [];
2272
- var categorical = false;
2273
- if (!isNumberArray(thetas)) {
2274
- uniqueTheta = Array.from(new Set(thetas));
2275
- categorical = true;
2276
- }
2277
- for (var ptindex = 0; ptindex < rVals.length; ptindex++) {
2278
- if (isInvalidValue(thetas === null || thetas === void 0 ? void 0 : thetas[ptindex]) || isInvalidValue(rVals === null || rVals === void 0 ? void 0 : rVals[ptindex])) {
2279
- continue;
2280
- }
2281
- // Map theta to angle in radians
2282
- var thetaRad = void 0;
2283
- if (categorical) {
2284
- var idx = uniqueTheta.indexOf(thetas[ptindex]);
2285
- var step = (2 * Math.PI) / uniqueTheta.length;
2286
- thetaRad = startAngleInRad + dirMultiplier * idx * step;
2184
+ export var transformPlotlyJsonToPolarChartProps = function (input, isMultiPlot, colorMap, colorwayType, isDarkTheme) {
2185
+ var _a, _b, _c;
2186
+ var polarData = [];
2187
+ var _d = getLegendProps(input.data, input.layout, isMultiPlot), legends = _d.legends, hideLegend = _d.hideLegend;
2188
+ var resolveRValue = getAxisValueResolver(getPolarAxis(input.data, 'r', input.layout)._type);
2189
+ input.data.forEach(function (series, index) {
2190
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
2191
+ var legend = legends[index];
2192
+ if (series.type === 'scatterpolar') {
2193
+ var isAreaTrace = series.fill === 'toself' || series.fill === 'tonext';
2194
+ var isLineTrace = typeof series.mode === 'undefined' ? true : series.mode.includes('lines');
2195
+ var colors = isAreaTrace ? series.fillcolor : isLineTrace ? (_a = series.line) === null || _a === void 0 ? void 0 : _a.color : (_b = series.marker) === null || _b === void 0 ? void 0 : _b.color;
2196
+ var extractedColors_2 = extractColor((_e = (_d = (_c = input.layout) === null || _c === void 0 ? void 0 : _c.template) === null || _d === void 0 ? void 0 : _d.layout) === null || _e === void 0 ? void 0 : _e.colorway, colorwayType, colors, colorMap, isDarkTheme);
2197
+ var seriesColor = resolveColor(extractedColors_2, index, legend, colorMap, (_h = (_g = (_f = input.layout) === null || _f === void 0 ? void 0 : _f.template) === null || _g === void 0 ? void 0 : _g.layout) === null || _h === void 0 ? void 0 : _h.colorway, isDarkTheme);
2198
+ var seriesOpacity = getOpacity(series, index);
2199
+ var finalSeriesColor_1 = rgb(seriesColor).copy({ opacity: seriesOpacity }).formatHex8();
2200
+ var lineOptions = getLineOptions(series.line);
2201
+ var thetaUnit_1 = series.thetaunit;
2202
+ var commonProps = {
2203
+ legend: legend,
2204
+ legendShape: getLegendShape(series),
2205
+ color: finalSeriesColor_1,
2206
+ data: ((_j = series.r) === null || _j === void 0 ? void 0 : _j.map(function (r, rIndex) {
2207
+ var _a, _b, _c, _d, _e, _f;
2208
+ var theta = (_a = series.theta) === null || _a === void 0 ? void 0 : _a[rIndex];
2209
+ var markerSize = Array.isArray((_b = series.marker) === null || _b === void 0 ? void 0 : _b.size) ? series.marker.size[rIndex] : (_c = series.marker) === null || _c === void 0 ? void 0 : _c.size;
2210
+ var text = Array.isArray(series.text) ? series.text[rIndex] : series.text;
2211
+ var markerColor = resolveColor(extractedColors_2, rIndex, legend, colorMap, (_f = (_e = (_d = input.layout) === null || _d === void 0 ? void 0 : _d.template) === null || _e === void 0 ? void 0 : _e.layout) === null || _f === void 0 ? void 0 : _f.colorway, isDarkTheme);
2212
+ var markerOpacity = getOpacity(series, rIndex);
2213
+ if (isInvalidValue(resolveRValue(r)) || isInvalidValue(theta)) {
2214
+ return;
2215
+ }
2216
+ return __assign(__assign({ r: resolveRValue(r), theta: typeof theta === 'number'
2217
+ ? thetaUnit_1 === 'radians'
2218
+ ? (theta * 180) / Math.PI
2219
+ : thetaUnit_1 === 'gradians'
2220
+ ? theta * 0.9
2221
+ : theta
2222
+ : theta, color: markerColor ? rgb(markerColor).copy({ opacity: markerOpacity }).formatHex8() : finalSeriesColor_1 }, (typeof markerSize !== 'undefined' ? { markerSize: markerSize } : {})), (typeof text !== 'undefined' ? { text: text } : {}));
2223
+ }).filter(function (item) { return typeof item !== 'undefined'; })) || [],
2224
+ };
2225
+ if (isAreaTrace || isLineTrace) {
2226
+ polarData.push(__assign(__assign({ type: isAreaTrace ? 'areapolar' : 'linepolar' }, commonProps), { lineOptions: lineOptions }));
2287
2227
  }
2288
2228
  else {
2289
- thetaRad = startAngleInRad + dirMultiplier * ((thetas[ptindex] * Math.PI) / 180);
2229
+ polarData.push(__assign({ type: 'scatterpolar' }, commonProps));
2290
2230
  }
2291
- // Shift only the polar origin (not the cartesian)
2292
- var rawRadius = rVals[ptindex];
2293
- var polarRadius = rawRadius + radiusShift; // Only for projection
2294
- // Calculate cartesian coordinates (with shifted polar origin)
2295
- var x = polarRadius * Math.cos(thetaRad);
2296
- var y = polarRadius * Math.sin(thetaRad);
2297
- // Calculate the cartesian coordinates of the original polar origin (0,0)
2298
- // This is the point that should be mapped to (0,0) in cartesian coordinates
2299
- if (sindex === 0 && ptindex === 0) {
2300
- // For polar origin (r=0, θ=0), cartesian coordinates are (0,0)
2301
- // But since we shifted the radius by radiusShift, the cartesian origin is at (radiusShift, 0)
2302
- originX = radiusShift;
2303
- }
2304
- series.x.push(x);
2305
- series.y.push(y);
2306
- allX.push(x);
2307
- allY.push(y);
2308
- }
2309
- // Map text to each data point for downstream chart rendering
2310
- if (series.x && series.y) {
2311
- series.data = series.x.map(function (xVal, idx) { return (__assign({ x: xVal, y: series.y[idx] }, (series.text ? { text: series.text[idx] } : {}))); });
2312
2231
  }
2313
- projection.data[sindex] = series;
2314
- };
2315
- for (var sindex = 0; sindex < input.data.length; sindex++) {
2316
- _loop_1(sindex);
2317
- }
2318
- // 7. Recenter all cartesian coordinates
2319
- if (originX !== null) {
2320
- for (var sindex = 0; sindex < projection.data.length; sindex++) {
2321
- var series = projection.data[sindex];
2322
- if (series.x && series.y) {
2323
- series.x = series.x.map(function (v) { return v - originX; });
2324
- }
2325
- }
2326
- // Also recenter allX for normalization
2327
- for (var i = 0; i < allX.length; i++) {
2328
- allX[i] = allX[i] - originX;
2329
- }
2330
- }
2331
- // 8. Find the maximum absolute value among all x and y
2332
- var maxAbs = Math.max.apply(Math, __spreadArray(__spreadArray([], allX.map(Math.abs), false), allY.map(Math.abs), false));
2333
- maxAbs = maxAbs === 0 ? 1 : maxAbs;
2334
- // 9. Rescale all points so that the largest |x| or |y| is 0.5
2335
- for (var sindex = 0; sindex < projection.data.length; sindex++) {
2336
- var series = projection.data[sindex];
2337
- if (series.x && series.y) {
2338
- series.x = series.x.map(function (v) { return v / (2 * maxAbs); });
2339
- series.y = series.y.map(function (v) { return v / (2 * maxAbs); });
2340
- }
2341
- }
2342
- // 10. Customize layout for perfect square with absolute positioning
2343
- var size = ((_h = input.layout) === null || _h === void 0 ? void 0 : _h.width) || ((_j = input.layout) === null || _j === void 0 ? void 0 : _j.height) || 500;
2344
- projection.layout = __assign(__assign({}, projection.layout), { width: size, height: size });
2345
- // Attach originX as custom properties
2346
- projection.layout.__polarOriginX = originX !== null && originX !== void 0 ? originX : undefined;
2347
- return projection;
2232
+ });
2233
+ return __assign({ data: polarData, width: (_a = input.layout) === null || _a === void 0 ? void 0 : _a.width, height: (_c = (_b = input.layout) === null || _b === void 0 ? void 0 : _b.height) !== null && _c !== void 0 ? _c : 400, hideLegend: hideLegend }, getPolarAxisProps(input.data, input.layout));
2348
2234
  };
2349
2235
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2350
2236
  function isPlainObject(obj) {
@@ -2655,6 +2541,7 @@ export var getGridProperties = function (schema, isMultiPlot, validTracesInfo) {
2655
2541
  var domainXInfo = {
2656
2542
  start: (xAxisLayout === null || xAxisLayout === void 0 ? void 0 : xAxisLayout.domain) ? xAxisLayout.domain[0] : 0,
2657
2543
  end: (xAxisLayout === null || xAxisLayout === void 0 ? void 0 : xAxisLayout.domain) ? xAxisLayout.domain[1] : 1,
2544
+ cellName: "x".concat(domainX.length === 0 ? '' : domainX.length + 1),
2658
2545
  };
2659
2546
  domainX.push(domainXInfo);
2660
2547
  }
@@ -2673,6 +2560,7 @@ export var getGridProperties = function (schema, isMultiPlot, validTracesInfo) {
2673
2560
  var domainYInfo = {
2674
2561
  start: (yAxisLayout === null || yAxisLayout === void 0 ? void 0 : yAxisLayout.domain) ? yAxisLayout.domain[0] : 0,
2675
2562
  end: (yAxisLayout === null || yAxisLayout === void 0 ? void 0 : yAxisLayout.domain) ? yAxisLayout.domain[1] : 1,
2563
+ cellName: "x".concat(domainY.length === 0 ? '' : domainY.length + 1),
2676
2564
  };
2677
2565
  domainY.push(domainYInfo);
2678
2566
  }
@@ -2686,16 +2574,36 @@ export var getGridProperties = function (schema, isMultiPlot, validTracesInfo) {
2686
2574
  var domainXInfo = {
2687
2575
  start: ((_b = series.domain) === null || _b === void 0 ? void 0 : _b.x) ? series.domain.x[0] : 0,
2688
2576
  end: ((_c = series.domain) === null || _c === void 0 ? void 0 : _c.x) ? series.domain.x[1] : 1,
2577
+ cellName: "".concat(NON_PLOT_KEY_PREFIX).concat(domainX.length - cartesianDomains + 1),
2689
2578
  };
2690
2579
  var domainYInfo = {
2691
2580
  start: ((_d = series.domain) === null || _d === void 0 ? void 0 : _d.y) ? series.domain.y[0] : 0,
2692
2581
  end: ((_e = series.domain) === null || _e === void 0 ? void 0 : _e.y) ? series.domain.y[1] : 1,
2582
+ cellName: "".concat(NON_PLOT_KEY_PREFIX).concat(domainY.length - cartesianDomains + 1),
2693
2583
  };
2694
2584
  domainX.push(domainXInfo);
2695
2585
  domainY.push(domainYInfo);
2696
2586
  }
2697
2587
  });
2698
2588
  if (layout !== undefined && layout !== null && Object.keys(layout).length > 0) {
2589
+ Object.keys(layout !== null && layout !== void 0 ? layout : {}).forEach(function (key) {
2590
+ var _a, _b, _c, _d;
2591
+ if (key.startsWith('polar')) {
2592
+ var polarLayout = layout[key];
2593
+ var domainXInfo = {
2594
+ start: ((_a = polarLayout.domain) === null || _a === void 0 ? void 0 : _a.x) ? polarLayout.domain.x[0] : 0,
2595
+ end: ((_b = polarLayout.domain) === null || _b === void 0 ? void 0 : _b.x) ? polarLayout.domain.x[1] : 1,
2596
+ cellName: key,
2597
+ };
2598
+ var domainYInfo = {
2599
+ start: ((_c = polarLayout.domain) === null || _c === void 0 ? void 0 : _c.y) ? polarLayout.domain.y[0] : 0,
2600
+ end: ((_d = polarLayout.domain) === null || _d === void 0 ? void 0 : _d.y) ? polarLayout.domain.y[1] : 1,
2601
+ cellName: key,
2602
+ };
2603
+ domainX.push(domainXInfo);
2604
+ domainY.push(domainYInfo);
2605
+ }
2606
+ });
2699
2607
  (_a = layout.annotations) === null || _a === void 0 ? void 0 : _a.forEach(function (annotation) {
2700
2608
  var xMatches = domainX.flatMap(function (interval, idx) {
2701
2609
  return (annotation === null || annotation === void 0 ? void 0 : annotation.x) >= interval.start && (annotation === null || annotation === void 0 ? void 0 : annotation.x) <= interval.end ? [idx] : [];
@@ -2731,9 +2639,6 @@ export var getGridProperties = function (schema, isMultiPlot, validTracesInfo) {
2731
2639
  .sort();
2732
2640
  templateColumns = "repeat(".concat(sortedXStart_1.length, ", 1fr)");
2733
2641
  domainX.forEach(function (interval, index) {
2734
- var cellName = index >= cartesianDomains
2735
- ? "".concat(NON_PLOT_KEY_PREFIX).concat(index - cartesianDomains + 1)
2736
- : "x".concat(index === 0 ? '' : index + 1);
2737
2642
  var columnIndex = sortedXStart_1.findIndex(function (start) { return start === interval.start; });
2738
2643
  var columnNumber = columnIndex + 1; // Column numbers are 1-based
2739
2644
  var annotationProps = annotations[index];
@@ -2745,7 +2650,7 @@ export var getGridProperties = function (schema, isMultiPlot, validTracesInfo) {
2745
2650
  xDomain: interval,
2746
2651
  yDomain: { start: 0, end: 1 }, // Default yDomain for x-axis
2747
2652
  };
2748
- gridLayout[cellName] = row;
2653
+ gridLayout[interval.cellName] = row;
2749
2654
  });
2750
2655
  }
2751
2656
  if (domainY.length > 0) {
@@ -2762,14 +2667,11 @@ export var getGridProperties = function (schema, isMultiPlot, validTracesInfo) {
2762
2667
  var numberOfRows_1 = sortedYStart_1.length;
2763
2668
  templateRows = "repeat(".concat(numberOfRows_1, ", 1fr)");
2764
2669
  domainY.forEach(function (interval, index) {
2765
- var cellName = index >= cartesianDomains
2766
- ? "".concat(NON_PLOT_KEY_PREFIX).concat(index - cartesianDomains + 1)
2767
- : "x".concat(index === 0 ? '' : index + 1);
2768
2670
  var rowIndex = sortedYStart_1.findIndex(function (start) { return start === interval.start; });
2769
2671
  var rowNumber = numberOfRows_1 - rowIndex; // Rows are 1-based and we need to reverse the order for CSS grid
2770
2672
  var annotationProps = annotations[index];
2771
2673
  var yAnnotation = annotationProps === null || annotationProps === void 0 ? void 0 : annotationProps.yAnnotation;
2772
- var cell = gridLayout[cellName];
2674
+ var cell = gridLayout[interval.cellName];
2773
2675
  if (cell !== undefined) {
2774
2676
  cell.row = rowNumber;
2775
2677
  cell.yAnnotation = yAnnotation;
@@ -2920,19 +2822,20 @@ var getAxisTickProps = function (data, layout) {
2920
2822
  return;
2921
2823
  }
2922
2824
  var axType = getAxisType(data, ax);
2825
+ if (axId === 'x' && axType === 'category') {
2826
+ props.xAxis = {
2827
+ tickLayout: 'auto',
2828
+ };
2829
+ }
2923
2830
  if ((!ax.tickmode || ax.tickmode === 'array') && isArrayOrTypedArray(ax.tickvals)) {
2924
2831
  var tickValues = axType === 'date' ? ax.tickvals.map(function (v) { return new Date(v); }) : ax.tickvals;
2925
2832
  if (axId === 'x') {
2926
2833
  props.tickValues = tickValues;
2927
- props.xAxis = {
2928
- tickText: ax.ticktext,
2929
- };
2834
+ props.xAxis = __assign(__assign({}, props.xAxis), { tickText: ax.ticktext });
2930
2835
  }
2931
2836
  else if (axId === 'y') {
2932
2837
  props.yAxisTickValues = tickValues;
2933
- props.yAxis = {
2934
- tickText: ax.ticktext,
2935
- };
2838
+ props.yAxis = __assign(__assign({}, props.yAxis), { tickText: ax.ticktext });
2936
2839
  }
2937
2840
  return;
2938
2841
  }
@@ -2940,16 +2843,10 @@ var getAxisTickProps = function (data, layout) {
2940
2843
  var dtick = plotlyDtick(ax.dtick, axType);
2941
2844
  var tick0 = plotlyTick0(ax.tick0, axType, dtick);
2942
2845
  if (axId === 'x') {
2943
- props.xAxis = {
2944
- tickStep: dtick,
2945
- tick0: tick0,
2946
- };
2846
+ props.xAxis = __assign(__assign({}, props.xAxis), { tickStep: dtick, tick0: tick0 });
2947
2847
  }
2948
2848
  else if (axId === 'y') {
2949
- props.yAxis = {
2950
- tickStep: dtick,
2951
- tick0: tick0,
2952
- };
2849
+ props.yAxis = __assign(__assign({}, props.yAxis), { tickStep: dtick, tick0: tick0 });
2953
2850
  }
2954
2851
  return;
2955
2852
  }
@@ -3102,4 +2999,92 @@ var getAxisValueResolver = function (axType, dateParser) {
3102
2999
  }
3103
3000
  };
3104
3001
  };
3002
+ var POLAR_AXIS_BY_DATA_KEY = {
3003
+ r: 'radialAxis',
3004
+ theta: 'angularAxis',
3005
+ };
3006
+ export var DEFAULT_POLAR_SUBPLOT = 'polar';
3007
+ var getPolarLayout = function (trace, layout) {
3008
+ var subplotId = ((trace === null || trace === void 0 ? void 0 : trace.subplot) || DEFAULT_POLAR_SUBPLOT);
3009
+ return layout === null || layout === void 0 ? void 0 : layout[subplotId];
3010
+ };
3011
+ var getValidAxisValues = function (data, dataKey) {
3012
+ var values = [];
3013
+ data.forEach(function (series) {
3014
+ if (isArrayOrTypedArray(series[dataKey])) {
3015
+ series[dataKey].forEach(function (val) {
3016
+ if (!isInvalidValue(val)) {
3017
+ values.push(val);
3018
+ }
3019
+ });
3020
+ }
3021
+ });
3022
+ return values;
3023
+ };
3024
+ var getPolarAxisType = function (data, dataKey, declaredType) {
3025
+ if (['linear', 'log', 'date', 'category'].includes(declaredType !== null && declaredType !== void 0 ? declaredType : '')) {
3026
+ return declaredType;
3027
+ }
3028
+ var values = getValidAxisValues(data, dataKey);
3029
+ if (isNumberArray(values) && !isYearArray(values)) {
3030
+ return 'linear';
3031
+ }
3032
+ if (isDateArray(values)) {
3033
+ return 'date';
3034
+ }
3035
+ return 'category';
3036
+ };
3037
+ var getPolarAxis = function (data, dataKey, layout) {
3038
+ var polarLayout = getPolarLayout(data[0], layout);
3039
+ var ax = polarLayout === null || polarLayout === void 0 ? void 0 : polarLayout[POLAR_AXIS_BY_DATA_KEY[dataKey].toLowerCase()];
3040
+ return __assign(__assign({}, ax), { _dataKey: dataKey, _type: getPolarAxisType(data, dataKey, ax === null || ax === void 0 ? void 0 : ax.type) });
3041
+ };
3042
+ var getPolarAxisTickProps = function (data, ax) {
3043
+ var props = {};
3044
+ if ((!ax.tickmode || ax.tickmode === 'array') && isArrayOrTypedArray(ax.tickvals)) {
3045
+ var tickValues = ax._type === 'date' ? ax.tickvals.map(function (v) { return new Date(v); }) : ax.tickvals;
3046
+ props.tickValues = tickValues;
3047
+ props.tickText = ax.ticktext;
3048
+ return props;
3049
+ }
3050
+ if ((!ax.tickmode || ax.tickmode === 'linear') && ax.dtick) {
3051
+ var dtick = plotlyDtick(ax.dtick, ax._type);
3052
+ var tick0 = plotlyTick0(ax.tick0, ax._type, dtick);
3053
+ props.tickStep = dtick;
3054
+ props.tick0 = tick0;
3055
+ return props;
3056
+ }
3057
+ if ((!ax.tickmode || ax.tickmode === 'auto') && typeof ax.nticks === 'number' && ax.nticks >= 0) {
3058
+ props.tickCount = ax.nticks;
3059
+ }
3060
+ return props;
3061
+ };
3062
+ var getPolarAxisCategoryOrder = function (data, ax) {
3063
+ if (ax._type !== 'category') {
3064
+ return 'data';
3065
+ }
3066
+ var isValidArray = isArrayOrTypedArray(ax.categoryarray) && ax.categoryarray.length > 0;
3067
+ if (isValidArray && (!ax.categoryorder || ax.categoryorder === 'array')) {
3068
+ return ax.categoryarray;
3069
+ }
3070
+ if (!ax.categoryorder || ax.categoryorder === 'trace' || ax.categoryorder === 'array') {
3071
+ var values = getValidAxisValues(data, ax._dataKey);
3072
+ var categoriesInTraceOrder = Array.from(new Set(values));
3073
+ return ax.autorange === 'reversed' ? categoriesInTraceOrder.reverse() : categoriesInTraceOrder;
3074
+ }
3075
+ return ax.categoryorder;
3076
+ };
3077
+ var getPolarAxisProps = function (data, layout) {
3078
+ var props = {};
3079
+ Object.keys(POLAR_AXIS_BY_DATA_KEY).forEach(function (dataKey) {
3080
+ var propName = POLAR_AXIS_BY_DATA_KEY[dataKey];
3081
+ var ax = getPolarAxis(data, dataKey, layout);
3082
+ props[propName] = __assign(__assign({ scaleType: ax._type === 'log' ? 'log' : 'default', categoryOrder: getPolarAxisCategoryOrder(data, ax), tickFormat: ax.tickformat }, getPolarAxisTickProps(data, ax)), (isArrayOrTypedArray(ax.range) ? { rangeStart: ax.range[0], rangeEnd: ax.range[1] } : {}));
3083
+ if (propName === 'angularAxis') {
3084
+ props[propName].unit = ax.thetaunit;
3085
+ props.direction = ax.direction;
3086
+ }
3087
+ });
3088
+ return props;
3089
+ };
3105
3090
  //# sourceMappingURL=PlotlySchemaAdapter.js.map