@fluentui/react-charting 5.25.5 → 5.25.7

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 +87 -1
  2. package/CHANGELOG.md +28 -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
@@ -1,7 +1,7 @@
1
1
  define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../../utilities/colors", "../GaugeChart/index", "../../utilities/utilities", "@fluentui/chart-utilities", "d3-shape", "./PlotlyColorAdapter", "d3-color", "@fluentui/react"], function (require, exports, tslib_1, d3_array_1, d3_scale_1, d3_format_1, colors_1, index_1, utilities_1, chart_utilities_1, d3_shape_1, PlotlyColorAdapter_1, d3_color_1, react_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.getGridProperties = exports.isNonPlotType = exports.getValidXYRanges = exports.getNumberAtIndexOrDefault = exports.getAllupLegendsProps = exports.projectPolarToCartesian = exports.transformPlotlyJsonToFunnelChartProps = exports.transformPlotlyJsonToChartTableProps = exports.transformPlotlyJsonToGaugeProps = exports.transformPlotlyJsonToSankeyProps = exports.transformPlotlyJsonToHeatmapProps = exports.transformPlotlyJsonToGanttChartProps = exports.transformPlotlyJsonToHorizontalBarWithAxisProps = exports.transformPlotlyJsonToScatterChartProps = exports.transformPlotlyJsonToLineChartProps = exports.transformPlotlyJsonToAreaChartProps = exports.transformPlotlyJsonToVBCProps = exports.transformPlotlyJsonToGVBCProps = exports.transformPlotlyJsonToVSBCProps = exports.transformPlotlyJsonToDonutProps = exports.transformPlotlyJsonToAnnotationChartProps = exports.normalizeObjectArrayForGVBC = exports.resolveXAxisPoint = exports._getGaugeAxisColor = exports.correctYearMonth = exports.SINGLE_REPEAT = exports.NON_PLOT_KEY_PREFIX = void 0;
4
+ exports.DEFAULT_POLAR_SUBPLOT = exports.getGridProperties = exports.isNonPlotType = exports.getValidXYRanges = exports.getNumberAtIndexOrDefault = exports.getAllupLegendsProps = exports.transformPlotlyJsonToPolarChartProps = exports.transformPlotlyJsonToFunnelChartProps = exports.transformPlotlyJsonToChartTableProps = exports.transformPlotlyJsonToGaugeProps = exports.transformPlotlyJsonToSankeyProps = exports.transformPlotlyJsonToHeatmapProps = exports.transformPlotlyJsonToGanttChartProps = exports.transformPlotlyJsonToHorizontalBarWithAxisProps = exports.transformPlotlyJsonToScatterChartProps = exports.transformPlotlyJsonToLineChartProps = exports.transformPlotlyJsonToAreaChartProps = exports.transformPlotlyJsonToVBCProps = exports.transformPlotlyJsonToGVBCProps = exports.transformPlotlyJsonToVSBCProps = exports.transformPlotlyJsonToDonutProps = exports.transformPlotlyJsonToAnnotationChartProps = exports.normalizeObjectArrayForGVBC = exports.resolveXAxisPoint = exports._getGaugeAxisColor = exports.correctYearMonth = exports.SINGLE_REPEAT = exports.NON_PLOT_KEY_PREFIX = void 0;
5
5
  exports.findArrayAttributes = findArrayAttributes;
6
6
  exports.NON_PLOT_KEY_PREFIX = 'nonplot_';
7
7
  exports.SINGLE_REPEAT = 'repeat(1, 1fr)';
@@ -44,12 +44,15 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
44
44
  },
45
45
  };
46
46
  function getTitles(layout) {
47
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
48
- var titles = {
49
- 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 : '',
50
- 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 : '',
51
- 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 : '',
52
- };
47
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
48
+ var titleObj = layout === null || layout === void 0 ? void 0 : layout.title;
49
+ var chartTitle = typeof titleObj === 'string' ? titleObj : (_a = titleObj === null || titleObj === void 0 ? void 0 : titleObj.text) !== null && _a !== void 0 ? _a : '';
50
+ var titleFont = typeof titleObj === 'object' ? titleObj === null || titleObj === void 0 ? void 0 : titleObj.font : undefined;
51
+ var titleXAnchor = typeof titleObj === 'object' ? titleObj === null || titleObj === void 0 ? void 0 : titleObj.xanchor : undefined;
52
+ var titleYAnchor = typeof titleObj === 'object' ? titleObj === null || titleObj === void 0 ? void 0 : titleObj.yanchor : undefined;
53
+ var titlePad = typeof titleObj === 'object' ? titleObj === null || titleObj === void 0 ? void 0 : titleObj.pad : undefined;
54
+ var titleStyles = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, (titleFont ? { titleFont: titleFont } : {})), (titleXAnchor ? { titleXAnchor: titleXAnchor } : {})), (titleYAnchor ? { titleYAnchor: titleYAnchor } : {})), (titlePad ? { titlePad: titlePad } : {}));
55
+ var titles = tslib_1.__assign(tslib_1.__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 });
53
56
  return titles;
54
57
  }
55
58
  var getXAxisTickFormat = function (series, layout) {
@@ -1022,7 +1025,7 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
1022
1025
  var innerRadius = firstData.hole
1023
1026
  ? firstData.hole * (Math.min(width - donutMarginHorizontal, height - donutMarginVertical) / 2)
1024
1027
  : utilities_1.MIN_DONUT_RADIUS;
1025
- var chartTitle = getTitles(input.layout).chartTitle;
1028
+ var _r = getTitles(input.layout), chartTitle = _r.chartTitle, titleStyles = _r.titleStyles;
1026
1029
  // Build anticlockwise order by keeping the first item, reversing the rest
1027
1030
  var legends = Object.keys(mapLegendToDataPoint);
1028
1031
  var reorderedEntries = legends.length > 1
@@ -1033,36 +1036,26 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
1033
1036
  .reverse()
1034
1037
  .map(function (key) { return [key, mapLegendToDataPoint[key]]; }), true)
1035
1038
  : legends.map(function (key) { return [key, mapLegendToDataPoint[key]]; });
1036
- return {
1037
- data: {
1039
+ return tslib_1.__assign({ data: {
1038
1040
  chartTitle: chartTitle,
1039
1041
  chartData: reorderedEntries.map(function (_a) {
1040
1042
  var v = _a[1];
1041
1043
  return v;
1042
1044
  }),
1043
- },
1044
- hideLegend: isMultiPlot || ((_p = input.layout) === null || _p === void 0 ? void 0 : _p.showlegend) === false,
1045
- width: (_q = input.layout) === null || _q === void 0 ? void 0 : _q.width,
1046
- height: height,
1047
- innerRadius: innerRadius,
1048
- hideLabels: hideLabels,
1049
- showLabelsInPercent: firstData.textinfo
1045
+ }, 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
1050
1046
  ? ['percent', 'label+percent', 'percent+label'].includes(firstData.textinfo)
1051
- : true,
1052
- roundCorners: true,
1053
- order: 'sorted',
1054
- };
1047
+ : true, roundCorners: true, order: 'sorted' }, (titleStyles ? { titleStyles: titleStyles } : {}));
1055
1048
  };
1056
1049
  exports.transformPlotlyJsonToDonutProps = transformPlotlyJsonToDonutProps;
1057
1050
  var transformPlotlyJsonToVSBCProps = function (input, isMultiPlot,
1058
1051
  // eslint-disable-next-line @typescript-eslint/no-deprecated
1059
1052
  colorMap, colorwayType, isDarkTheme, fallbackVSBC) {
1060
- var _a, _b, _c, _d, _e, _f;
1053
+ var _a, _b, _c, _d, _e;
1061
1054
  var mapXToDataPoints = {};
1062
1055
  var yMaxValue = 0;
1063
1056
  var yMinValue = 0;
1064
1057
  var secondaryYAxisValues = getSecondaryYAxisValues(input.data, input.layout);
1065
- var _g = getLegendProps(input.data, input.layout, isMultiPlot), legends = _g.legends, hideLegend = _g.hideLegend;
1058
+ var _f = getLegendProps(input.data, input.layout, isMultiPlot), legends = _f.legends, hideLegend = _f.hideLegend;
1066
1059
  var colorScale = undefined;
1067
1060
  var yAxisTickFormat = getYAxisTickFormat(input.data[0], input.layout);
1068
1061
  var resolveXValue = getAxisValueResolver(getAxisType(input.data, getAxisObjects(input.data, input.layout).x));
@@ -1199,7 +1192,7 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
1199
1192
  });
1200
1193
  var vsbcData = Object.values(mapXToDataPoints);
1201
1194
  var annotations = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot);
1202
- return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__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 } : {}));
1195
+ return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__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 } : {}));
1203
1196
  };
1204
1197
  exports.transformPlotlyJsonToVSBCProps = transformPlotlyJsonToVSBCProps;
1205
1198
  var transformPlotlyJsonToGVBCProps = function (input, isMultiPlot,
@@ -1302,15 +1295,15 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
1302
1295
  }
1303
1296
  });
1304
1297
  var annotations = getChartAnnotationsFromLayout(processedInput.layout, processedInput.data, isMultiPlot);
1305
- return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__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 tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__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
  exports.transformPlotlyJsonToGVBCProps = transformPlotlyJsonToGVBCProps;
1308
1301
  var transformPlotlyJsonToVBCProps = function (input, isMultiPlot,
1309
1302
  // eslint-disable-next-line @typescript-eslint/no-deprecated
1310
1303
  colorMap, colorwayType, isDarkTheme) {
1311
- var _a, _b, _c, _d;
1304
+ var _a, _b, _c;
1312
1305
  var vbcData = [];
1313
- var _e = getLegendProps(input.data, input.layout, isMultiPlot), legends = _e.legends, hideLegend = _e.hideLegend;
1306
+ var _d = getLegendProps(input.data, input.layout, isMultiPlot), legends = _d.legends, hideLegend = _d.hideLegend;
1314
1307
  var colorScale = undefined;
1315
1308
  input.data.forEach(function (series, seriesIdx) {
1316
1309
  var _a, _b, _c, _d, _e, _f, _g;
@@ -1370,7 +1363,7 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
1370
1363
  });
1371
1364
  });
1372
1365
  var annotations = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot);
1373
- return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__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 } : {}));
1366
+ return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__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 } : {}));
1374
1367
  };
1375
1368
  exports.transformPlotlyJsonToVBCProps = transformPlotlyJsonToVBCProps;
1376
1369
  var transformPlotlyJsonToAreaChartProps = function (input, isMultiPlot,
@@ -1429,9 +1422,7 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
1429
1422
  var mode = 'tonexty';
1430
1423
  var _q = getLegendProps(input.data, input.layout, isMultiPlot), legends = _q.legends, hideLegend = _q.hideLegend;
1431
1424
  var yAxisTickFormat = getYAxisTickFormat(input.data[0], input.layout);
1432
- var xAxisType = getAxisType(input.data, getAxisObjects(input.data, input.layout).x);
1433
- var resolveXValue = getAxisValueResolver(xAxisType);
1434
- var shouldWrapLabels = xAxisType === 'category';
1425
+ var resolveXValue = getAxisValueResolver(getAxisType(input.data, getAxisObjects(input.data, input.layout).x));
1435
1426
  var chartData = input.data
1436
1427
  .map(function (series, index) {
1437
1428
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
@@ -1566,7 +1557,7 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
1566
1557
  scatterChartData: tslib_1.__spreadArray(tslib_1.__spreadArray([], chartData, true), lineShape, true),
1567
1558
  };
1568
1559
  var annotations = getChartAnnotationsFromLayout(input.layout, input.data, isMultiPlot);
1569
- var commonProps = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__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 } : {}));
1560
+ var commonProps = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__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 } : {}));
1570
1561
  if (isAreaChart) {
1571
1562
  return tslib_1.__assign({ data: chartProps, mode: mode }, commonProps);
1572
1563
  }
@@ -1857,14 +1848,14 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
1857
1848
  var rangeValuesForColorScale = Array.isArray(colorscale)
1858
1849
  ? colorscale.map(function (arr) { return arr[1]; })
1859
1850
  : defaultRange;
1860
- return tslib_1.__assign(tslib_1.__assign(tslib_1.__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));
1851
+ return tslib_1.__assign(tslib_1.__assign(tslib_1.__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));
1861
1852
  };
1862
1853
  exports.transformPlotlyJsonToHeatmapProps = transformPlotlyJsonToHeatmapProps;
1863
1854
  var transformPlotlyJsonToSankeyProps = function (input, isMultiPlot,
1864
1855
  // eslint-disable-next-line @typescript-eslint/no-deprecated
1865
1856
  colorMap, colorwayType, isDarkTheme) {
1866
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1867
- var _q = input.data[0], link = _q.link, node = _q.node;
1857
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
1858
+ var _r = input.data[0], link = _r.link, node = _r.node;
1868
1859
  var validLinks = ((_a = link === null || link === void 0 ? void 0 : link.value) !== null && _a !== void 0 ? _a : [])
1869
1860
  .map(function (val, index) {
1870
1861
  var _a, _b;
@@ -1901,17 +1892,11 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
1901
1892
  var styles = {
1902
1893
  root: tslib_1.__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 } : {})),
1903
1894
  };
1904
- var chartTitle = getTitles(input.layout).chartTitle;
1905
- return {
1906
- data: {
1895
+ var _s = getTitles(input.layout), chartTitle = _s.chartTitle, titleStyles = _s.titleStyles;
1896
+ return tslib_1.__assign({ data: {
1907
1897
  chartTitle: chartTitle,
1908
1898
  SankeyChartData: sankeyChartData,
1909
- },
1910
- width: (_m = input.layout) === null || _m === void 0 ? void 0 : _m.width,
1911
- height: (_p = (_o = input.layout) === null || _o === void 0 ? void 0 : _o.height) !== null && _p !== void 0 ? _p : 468,
1912
- styles: styles,
1913
- enableReflow: false,
1914
- };
1899
+ }, 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 } : {}));
1915
1900
  };
1916
1901
  exports.transformPlotlyJsonToSankeyProps = transformPlotlyJsonToSankeyProps;
1917
1902
  var transformPlotlyJsonToGaugeProps = function (input, isMultiPlot,
@@ -1967,22 +1952,10 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
1967
1952
  fill: sublabelColor,
1968
1953
  },
1969
1954
  };
1970
- var chartTitle = getTitles(input.layout).chartTitle;
1971
- return {
1972
- segments: segments,
1973
- chartValue: (_14 = firstData.value) !== null && _14 !== void 0 ? _14 : 0,
1974
- chartTitle: chartTitle,
1975
- sublabel: sublabel,
1955
+ var _32 = getTitles(input.layout), chartTitle = _32.chartTitle, titleStyles = _32.titleStyles;
1956
+ return tslib_1.__assign({ segments: segments, chartValue: (_14 = firstData.value) !== null && _14 !== void 0 ? _14 : 0, chartTitle: chartTitle, sublabel: sublabel,
1976
1957
  // range values can be null
1977
- 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,
1978
- 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,
1979
- chartValueFormat: function () { var _a, _b; return (_b = (_a = firstData.value) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ''; },
1980
- width: (_27 = input.layout) === null || _27 === void 0 ? void 0 : _27.width,
1981
- height: (_29 = (_28 = input.layout) === null || _28 === void 0 ? void 0 : _28.height) !== null && _29 !== void 0 ? _29 : 220,
1982
- styles: styles,
1983
- variant: ((_31 = (_30 = firstData.gauge) === null || _30 === void 0 ? void 0 : _30.steps) === null || _31 === void 0 ? void 0 : _31.length) ? index_1.GaugeChartVariant.MultipleSegments : index_1.GaugeChartVariant.SingleSegment,
1984
- roundCorners: true,
1985
- };
1958
+ 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) ? index_1.GaugeChartVariant.MultipleSegments : index_1.GaugeChartVariant.SingleSegment, roundCorners: true }, (titleStyles ? { titleStyles: titleStyles } : {}));
1986
1959
  };
1987
1960
  exports.transformPlotlyJsonToGaugeProps = transformPlotlyJsonToGaugeProps;
1988
1961
  var cleanText = function (text) {
@@ -2097,13 +2070,8 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
2097
2070
  font: tslib_1.__assign(tslib_1.__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 : {})),
2098
2071
  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 : [],
2099
2072
  };
2100
- return {
2101
- headers: normalizeHeaders((_y = (_x = tableData.header) === null || _x === void 0 ? void 0 : _x.values) !== null && _y !== void 0 ? _y : [], header),
2102
- rows: rows,
2103
- width: (_z = input.layout) === null || _z === void 0 ? void 0 : _z.width,
2104
- height: (_0 = input.layout) === null || _0 === void 0 ? void 0 : _0.height,
2105
- styles: styles,
2106
- };
2073
+ var _1 = getTitles(input.layout), chartTitle = _1.chartTitle, titleStyles = _1.titleStyles;
2074
+ return tslib_1.__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 } : {}));
2107
2075
  };
2108
2076
  exports.transformPlotlyJsonToChartTableProps = transformPlotlyJsonToChartTableProps;
2109
2077
  function getCategoriesAndValues(series) {
@@ -2221,144 +2189,62 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
2221
2189
  });
2222
2190
  });
2223
2191
  }
2224
- return {
2225
- data: funnelData,
2226
- width: (_a = input.layout) === null || _a === void 0 ? void 0 : _a.width,
2227
- height: (_b = input.layout) === null || _b === void 0 ? void 0 : _b.height,
2228
- orientation: ((_c = input.data[0]) === null || _c === void 0 ? void 0 : _c.orientation) === 'v' ? 'horizontal' : 'vertical',
2229
- hideLegend: isMultiPlot || ((_d = input.layout) === null || _d === void 0 ? void 0 : _d.showlegend) === false,
2230
- };
2192
+ var _e = getTitles(input.layout), chartTitle = _e.chartTitle, titleStyles = _e.titleStyles;
2193
+ return tslib_1.__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 } : {}));
2231
2194
  };
2232
2195
  exports.transformPlotlyJsonToFunnelChartProps = transformPlotlyJsonToFunnelChartProps;
2233
- var projectPolarToCartesian = function (input) {
2234
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
2235
- var projection = tslib_1.__assign({}, input);
2236
- // Find the global min and max radius across all series
2237
- var minRadius = 0;
2238
- var maxRadius = 0;
2239
- for (var sindex = 0; sindex < input.data.length; sindex++) {
2240
- var rVals = input.data[sindex].r;
2241
- if (rVals && (0, chart_utilities_1.isArrayOrTypedArray)(rVals)) {
2242
- for (var ptindex = 0; ptindex < rVals.length; ptindex++) {
2243
- if (!(0, chart_utilities_1.isInvalidValue)(rVals[ptindex])) {
2244
- minRadius = Math.min(minRadius, rVals[ptindex]);
2245
- maxRadius = Math.max(maxRadius, rVals[ptindex]);
2246
- }
2247
- }
2248
- }
2249
- }
2250
- // If there are negative radii, compute the shift
2251
- var radiusShift = minRadius < 0 ? -minRadius : 0;
2252
- // Collect all unique theta values from all scatterpolar series for equal spacing
2253
- var allThetaValues = new Set();
2254
- for (var sindex = 0; sindex < input.data.length; sindex++) {
2255
- var series = input.data[sindex];
2256
- if (series.theta && (0, chart_utilities_1.isArrayOrTypedArray)(series.theta)) {
2257
- series.theta.forEach(function (theta) { return allThetaValues.add(String(theta)); });
2258
- }
2259
- }
2260
- // Project all points and create a perfect square domain
2261
- var allX = [];
2262
- var allY = [];
2263
- var originX = null;
2264
- var _loop_1 = function (sindex) {
2265
- var series = input.data[sindex];
2266
- // If scatterpolar, set __axisLabel to all unique theta values for equal spacing
2267
- if ((0, chart_utilities_1.isArrayOrTypedArray)(series.theta)) {
2268
- series.__axisLabel = Array.from(allThetaValues);
2269
- }
2270
- series.x = [];
2271
- series.y = [];
2272
- var thetas = series.theta;
2273
- var rVals = series.r;
2274
- // Skip if rVals or thetas are not arrays
2275
- if (!(0, chart_utilities_1.isArrayOrTypedArray)(rVals) || !(0, chart_utilities_1.isArrayOrTypedArray)(thetas)) {
2276
- projection.data[sindex] = series;
2277
- return "continue";
2278
- }
2279
- // retrieve polar axis settings
2280
- 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;
2281
- 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;
2282
- // Compute tick positions if categorical
2283
- var uniqueTheta = [];
2284
- var categorical = false;
2285
- if (!(0, chart_utilities_1.isNumberArray)(thetas)) {
2286
- uniqueTheta = Array.from(new Set(thetas));
2287
- categorical = true;
2288
- }
2289
- for (var ptindex = 0; ptindex < rVals.length; ptindex++) {
2290
- if ((0, chart_utilities_1.isInvalidValue)(thetas === null || thetas === void 0 ? void 0 : thetas[ptindex]) || (0, chart_utilities_1.isInvalidValue)(rVals === null || rVals === void 0 ? void 0 : rVals[ptindex])) {
2291
- continue;
2292
- }
2293
- // Map theta to angle in radians
2294
- var thetaRad = void 0;
2295
- if (categorical) {
2296
- var idx = uniqueTheta.indexOf(thetas[ptindex]);
2297
- var step = (2 * Math.PI) / uniqueTheta.length;
2298
- thetaRad = startAngleInRad + dirMultiplier * idx * step;
2196
+ var transformPlotlyJsonToPolarChartProps = function (input, isMultiPlot, colorMap, colorwayType, isDarkTheme) {
2197
+ var _a, _b, _c;
2198
+ var polarData = [];
2199
+ var _d = getLegendProps(input.data, input.layout, isMultiPlot), legends = _d.legends, hideLegend = _d.hideLegend;
2200
+ var resolveRValue = getAxisValueResolver(getPolarAxis(input.data, 'r', input.layout)._type);
2201
+ input.data.forEach(function (series, index) {
2202
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
2203
+ var legend = legends[index];
2204
+ if (series.type === 'scatterpolar') {
2205
+ var isAreaTrace = series.fill === 'toself' || series.fill === 'tonext';
2206
+ var isLineTrace = typeof series.mode === 'undefined' ? true : series.mode.includes('lines');
2207
+ 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;
2208
+ var extractedColors_2 = (0, PlotlyColorAdapter_1.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);
2209
+ var seriesColor = (0, PlotlyColorAdapter_1.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);
2210
+ var seriesOpacity = (0, PlotlyColorAdapter_1.getOpacity)(series, index);
2211
+ var finalSeriesColor_1 = (0, d3_color_1.rgb)(seriesColor).copy({ opacity: seriesOpacity }).formatHex8();
2212
+ var lineOptions = getLineOptions(series.line);
2213
+ var thetaUnit_1 = series.thetaunit;
2214
+ var commonProps = {
2215
+ legend: legend,
2216
+ legendShape: getLegendShape(series),
2217
+ color: finalSeriesColor_1,
2218
+ data: ((_j = series.r) === null || _j === void 0 ? void 0 : _j.map(function (r, rIndex) {
2219
+ var _a, _b, _c, _d, _e, _f;
2220
+ var theta = (_a = series.theta) === null || _a === void 0 ? void 0 : _a[rIndex];
2221
+ 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;
2222
+ var text = Array.isArray(series.text) ? series.text[rIndex] : series.text;
2223
+ var markerColor = (0, PlotlyColorAdapter_1.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);
2224
+ var markerOpacity = (0, PlotlyColorAdapter_1.getOpacity)(series, rIndex);
2225
+ if ((0, chart_utilities_1.isInvalidValue)(resolveRValue(r)) || (0, chart_utilities_1.isInvalidValue)(theta)) {
2226
+ return;
2227
+ }
2228
+ return tslib_1.__assign(tslib_1.__assign({ r: resolveRValue(r), theta: typeof theta === 'number'
2229
+ ? thetaUnit_1 === 'radians'
2230
+ ? (theta * 180) / Math.PI
2231
+ : thetaUnit_1 === 'gradians'
2232
+ ? theta * 0.9
2233
+ : theta
2234
+ : theta, color: markerColor ? (0, d3_color_1.rgb)(markerColor).copy({ opacity: markerOpacity }).formatHex8() : finalSeriesColor_1 }, (typeof markerSize !== 'undefined' ? { markerSize: markerSize } : {})), (typeof text !== 'undefined' ? { text: text } : {}));
2235
+ }).filter(function (item) { return typeof item !== 'undefined'; })) || [],
2236
+ };
2237
+ if (isAreaTrace || isLineTrace) {
2238
+ polarData.push(tslib_1.__assign(tslib_1.__assign({ type: isAreaTrace ? 'areapolar' : 'linepolar' }, commonProps), { lineOptions: lineOptions }));
2299
2239
  }
2300
2240
  else {
2301
- thetaRad = startAngleInRad + dirMultiplier * ((thetas[ptindex] * Math.PI) / 180);
2241
+ polarData.push(tslib_1.__assign({ type: 'scatterpolar' }, commonProps));
2302
2242
  }
2303
- // Shift only the polar origin (not the cartesian)
2304
- var rawRadius = rVals[ptindex];
2305
- var polarRadius = rawRadius + radiusShift; // Only for projection
2306
- // Calculate cartesian coordinates (with shifted polar origin)
2307
- var x = polarRadius * Math.cos(thetaRad);
2308
- var y = polarRadius * Math.sin(thetaRad);
2309
- // Calculate the cartesian coordinates of the original polar origin (0,0)
2310
- // This is the point that should be mapped to (0,0) in cartesian coordinates
2311
- if (sindex === 0 && ptindex === 0) {
2312
- // For polar origin (r=0, θ=0), cartesian coordinates are (0,0)
2313
- // But since we shifted the radius by radiusShift, the cartesian origin is at (radiusShift, 0)
2314
- originX = radiusShift;
2315
- }
2316
- series.x.push(x);
2317
- series.y.push(y);
2318
- allX.push(x);
2319
- allY.push(y);
2320
- }
2321
- // Map text to each data point for downstream chart rendering
2322
- if (series.x && series.y) {
2323
- series.data = series.x.map(function (xVal, idx) { return (tslib_1.__assign({ x: xVal, y: series.y[idx] }, (series.text ? { text: series.text[idx] } : {}))); });
2324
2243
  }
2325
- projection.data[sindex] = series;
2326
- };
2327
- for (var sindex = 0; sindex < input.data.length; sindex++) {
2328
- _loop_1(sindex);
2329
- }
2330
- // 7. Recenter all cartesian coordinates
2331
- if (originX !== null) {
2332
- for (var sindex = 0; sindex < projection.data.length; sindex++) {
2333
- var series = projection.data[sindex];
2334
- if (series.x && series.y) {
2335
- series.x = series.x.map(function (v) { return v - originX; });
2336
- }
2337
- }
2338
- // Also recenter allX for normalization
2339
- for (var i = 0; i < allX.length; i++) {
2340
- allX[i] = allX[i] - originX;
2341
- }
2342
- }
2343
- // 8. Find the maximum absolute value among all x and y
2344
- var maxAbs = Math.max.apply(Math, tslib_1.__spreadArray(tslib_1.__spreadArray([], allX.map(Math.abs), false), allY.map(Math.abs), false));
2345
- maxAbs = maxAbs === 0 ? 1 : maxAbs;
2346
- // 9. Rescale all points so that the largest |x| or |y| is 0.5
2347
- for (var sindex = 0; sindex < projection.data.length; sindex++) {
2348
- var series = projection.data[sindex];
2349
- if (series.x && series.y) {
2350
- series.x = series.x.map(function (v) { return v / (2 * maxAbs); });
2351
- series.y = series.y.map(function (v) { return v / (2 * maxAbs); });
2352
- }
2353
- }
2354
- // 10. Customize layout for perfect square with absolute positioning
2355
- 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;
2356
- projection.layout = tslib_1.__assign(tslib_1.__assign({}, projection.layout), { width: size, height: size });
2357
- // Attach originX as custom properties
2358
- projection.layout.__polarOriginX = originX !== null && originX !== void 0 ? originX : undefined;
2359
- return projection;
2244
+ });
2245
+ return tslib_1.__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));
2360
2246
  };
2361
- exports.projectPolarToCartesian = projectPolarToCartesian;
2247
+ exports.transformPlotlyJsonToPolarChartProps = transformPlotlyJsonToPolarChartProps;
2362
2248
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2363
2249
  function isPlainObject(obj) {
2364
2250
  if (window && window.process && window.process.versions) {
@@ -2672,6 +2558,7 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
2672
2558
  var domainXInfo = {
2673
2559
  start: (xAxisLayout === null || xAxisLayout === void 0 ? void 0 : xAxisLayout.domain) ? xAxisLayout.domain[0] : 0,
2674
2560
  end: (xAxisLayout === null || xAxisLayout === void 0 ? void 0 : xAxisLayout.domain) ? xAxisLayout.domain[1] : 1,
2561
+ cellName: "x".concat(domainX.length === 0 ? '' : domainX.length + 1),
2675
2562
  };
2676
2563
  domainX.push(domainXInfo);
2677
2564
  }
@@ -2690,6 +2577,7 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
2690
2577
  var domainYInfo = {
2691
2578
  start: (yAxisLayout === null || yAxisLayout === void 0 ? void 0 : yAxisLayout.domain) ? yAxisLayout.domain[0] : 0,
2692
2579
  end: (yAxisLayout === null || yAxisLayout === void 0 ? void 0 : yAxisLayout.domain) ? yAxisLayout.domain[1] : 1,
2580
+ cellName: "x".concat(domainY.length === 0 ? '' : domainY.length + 1),
2693
2581
  };
2694
2582
  domainY.push(domainYInfo);
2695
2583
  }
@@ -2703,16 +2591,36 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
2703
2591
  var domainXInfo = {
2704
2592
  start: ((_b = series.domain) === null || _b === void 0 ? void 0 : _b.x) ? series.domain.x[0] : 0,
2705
2593
  end: ((_c = series.domain) === null || _c === void 0 ? void 0 : _c.x) ? series.domain.x[1] : 1,
2594
+ cellName: "".concat(exports.NON_PLOT_KEY_PREFIX).concat(domainX.length - cartesianDomains + 1),
2706
2595
  };
2707
2596
  var domainYInfo = {
2708
2597
  start: ((_d = series.domain) === null || _d === void 0 ? void 0 : _d.y) ? series.domain.y[0] : 0,
2709
2598
  end: ((_e = series.domain) === null || _e === void 0 ? void 0 : _e.y) ? series.domain.y[1] : 1,
2599
+ cellName: "".concat(exports.NON_PLOT_KEY_PREFIX).concat(domainY.length - cartesianDomains + 1),
2710
2600
  };
2711
2601
  domainX.push(domainXInfo);
2712
2602
  domainY.push(domainYInfo);
2713
2603
  }
2714
2604
  });
2715
2605
  if (layout !== undefined && layout !== null && Object.keys(layout).length > 0) {
2606
+ Object.keys(layout !== null && layout !== void 0 ? layout : {}).forEach(function (key) {
2607
+ var _a, _b, _c, _d;
2608
+ if (key.startsWith('polar')) {
2609
+ var polarLayout = layout[key];
2610
+ var domainXInfo = {
2611
+ start: ((_a = polarLayout.domain) === null || _a === void 0 ? void 0 : _a.x) ? polarLayout.domain.x[0] : 0,
2612
+ end: ((_b = polarLayout.domain) === null || _b === void 0 ? void 0 : _b.x) ? polarLayout.domain.x[1] : 1,
2613
+ cellName: key,
2614
+ };
2615
+ var domainYInfo = {
2616
+ start: ((_c = polarLayout.domain) === null || _c === void 0 ? void 0 : _c.y) ? polarLayout.domain.y[0] : 0,
2617
+ end: ((_d = polarLayout.domain) === null || _d === void 0 ? void 0 : _d.y) ? polarLayout.domain.y[1] : 1,
2618
+ cellName: key,
2619
+ };
2620
+ domainX.push(domainXInfo);
2621
+ domainY.push(domainYInfo);
2622
+ }
2623
+ });
2716
2624
  (_a = layout.annotations) === null || _a === void 0 ? void 0 : _a.forEach(function (annotation) {
2717
2625
  var xMatches = domainX.flatMap(function (interval, idx) {
2718
2626
  return (annotation === null || annotation === void 0 ? void 0 : annotation.x) >= interval.start && (annotation === null || annotation === void 0 ? void 0 : annotation.x) <= interval.end ? [idx] : [];
@@ -2748,9 +2656,6 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
2748
2656
  .sort();
2749
2657
  templateColumns = "repeat(".concat(sortedXStart_1.length, ", 1fr)");
2750
2658
  domainX.forEach(function (interval, index) {
2751
- var cellName = index >= cartesianDomains
2752
- ? "".concat(exports.NON_PLOT_KEY_PREFIX).concat(index - cartesianDomains + 1)
2753
- : "x".concat(index === 0 ? '' : index + 1);
2754
2659
  var columnIndex = sortedXStart_1.findIndex(function (start) { return start === interval.start; });
2755
2660
  var columnNumber = columnIndex + 1; // Column numbers are 1-based
2756
2661
  var annotationProps = annotations[index];
@@ -2762,7 +2667,7 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
2762
2667
  xDomain: interval,
2763
2668
  yDomain: { start: 0, end: 1 }, // Default yDomain for x-axis
2764
2669
  };
2765
- gridLayout[cellName] = row;
2670
+ gridLayout[interval.cellName] = row;
2766
2671
  });
2767
2672
  }
2768
2673
  if (domainY.length > 0) {
@@ -2779,14 +2684,11 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
2779
2684
  var numberOfRows_1 = sortedYStart_1.length;
2780
2685
  templateRows = "repeat(".concat(numberOfRows_1, ", 1fr)");
2781
2686
  domainY.forEach(function (interval, index) {
2782
- var cellName = index >= cartesianDomains
2783
- ? "".concat(exports.NON_PLOT_KEY_PREFIX).concat(index - cartesianDomains + 1)
2784
- : "x".concat(index === 0 ? '' : index + 1);
2785
2687
  var rowIndex = sortedYStart_1.findIndex(function (start) { return start === interval.start; });
2786
2688
  var rowNumber = numberOfRows_1 - rowIndex; // Rows are 1-based and we need to reverse the order for CSS grid
2787
2689
  var annotationProps = annotations[index];
2788
2690
  var yAnnotation = annotationProps === null || annotationProps === void 0 ? void 0 : annotationProps.yAnnotation;
2789
- var cell = gridLayout[cellName];
2691
+ var cell = gridLayout[interval.cellName];
2790
2692
  if (cell !== undefined) {
2791
2693
  cell.row = rowNumber;
2792
2694
  cell.yAnnotation = yAnnotation;
@@ -2938,19 +2840,20 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
2938
2840
  return;
2939
2841
  }
2940
2842
  var axType = getAxisType(data, ax);
2843
+ if (axId === 'x' && axType === 'category') {
2844
+ props.xAxis = {
2845
+ tickLayout: 'auto',
2846
+ };
2847
+ }
2941
2848
  if ((!ax.tickmode || ax.tickmode === 'array') && (0, chart_utilities_1.isArrayOrTypedArray)(ax.tickvals)) {
2942
2849
  var tickValues = axType === 'date' ? ax.tickvals.map(function (v) { return new Date(v); }) : ax.tickvals;
2943
2850
  if (axId === 'x') {
2944
2851
  props.tickValues = tickValues;
2945
- props.xAxis = {
2946
- tickText: ax.ticktext,
2947
- };
2852
+ props.xAxis = tslib_1.__assign(tslib_1.__assign({}, props.xAxis), { tickText: ax.ticktext });
2948
2853
  }
2949
2854
  else if (axId === 'y') {
2950
2855
  props.yAxisTickValues = tickValues;
2951
- props.yAxis = {
2952
- tickText: ax.ticktext,
2953
- };
2856
+ props.yAxis = tslib_1.__assign(tslib_1.__assign({}, props.yAxis), { tickText: ax.ticktext });
2954
2857
  }
2955
2858
  return;
2956
2859
  }
@@ -2958,16 +2861,10 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
2958
2861
  var dtick = plotlyDtick(ax.dtick, axType);
2959
2862
  var tick0 = plotlyTick0(ax.tick0, axType, dtick);
2960
2863
  if (axId === 'x') {
2961
- props.xAxis = {
2962
- tickStep: dtick,
2963
- tick0: tick0,
2964
- };
2864
+ props.xAxis = tslib_1.__assign(tslib_1.__assign({}, props.xAxis), { tickStep: dtick, tick0: tick0 });
2965
2865
  }
2966
2866
  else if (axId === 'y') {
2967
- props.yAxis = {
2968
- tickStep: dtick,
2969
- tick0: tick0,
2970
- };
2867
+ props.yAxis = tslib_1.__assign(tslib_1.__assign({}, props.yAxis), { tickStep: dtick, tick0: tick0 });
2971
2868
  }
2972
2869
  return;
2973
2870
  }
@@ -3120,5 +3017,93 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
3120
3017
  }
3121
3018
  };
3122
3019
  };
3020
+ var POLAR_AXIS_BY_DATA_KEY = {
3021
+ r: 'radialAxis',
3022
+ theta: 'angularAxis',
3023
+ };
3024
+ exports.DEFAULT_POLAR_SUBPLOT = 'polar';
3025
+ var getPolarLayout = function (trace, layout) {
3026
+ var subplotId = ((trace === null || trace === void 0 ? void 0 : trace.subplot) || exports.DEFAULT_POLAR_SUBPLOT);
3027
+ return layout === null || layout === void 0 ? void 0 : layout[subplotId];
3028
+ };
3029
+ var getValidAxisValues = function (data, dataKey) {
3030
+ var values = [];
3031
+ data.forEach(function (series) {
3032
+ if ((0, chart_utilities_1.isArrayOrTypedArray)(series[dataKey])) {
3033
+ series[dataKey].forEach(function (val) {
3034
+ if (!(0, chart_utilities_1.isInvalidValue)(val)) {
3035
+ values.push(val);
3036
+ }
3037
+ });
3038
+ }
3039
+ });
3040
+ return values;
3041
+ };
3042
+ var getPolarAxisType = function (data, dataKey, declaredType) {
3043
+ if (['linear', 'log', 'date', 'category'].includes(declaredType !== null && declaredType !== void 0 ? declaredType : '')) {
3044
+ return declaredType;
3045
+ }
3046
+ var values = getValidAxisValues(data, dataKey);
3047
+ if ((0, chart_utilities_1.isNumberArray)(values) && !(0, chart_utilities_1.isYearArray)(values)) {
3048
+ return 'linear';
3049
+ }
3050
+ if ((0, chart_utilities_1.isDateArray)(values)) {
3051
+ return 'date';
3052
+ }
3053
+ return 'category';
3054
+ };
3055
+ var getPolarAxis = function (data, dataKey, layout) {
3056
+ var polarLayout = getPolarLayout(data[0], layout);
3057
+ var ax = polarLayout === null || polarLayout === void 0 ? void 0 : polarLayout[POLAR_AXIS_BY_DATA_KEY[dataKey].toLowerCase()];
3058
+ return tslib_1.__assign(tslib_1.__assign({}, ax), { _dataKey: dataKey, _type: getPolarAxisType(data, dataKey, ax === null || ax === void 0 ? void 0 : ax.type) });
3059
+ };
3060
+ var getPolarAxisTickProps = function (data, ax) {
3061
+ var props = {};
3062
+ if ((!ax.tickmode || ax.tickmode === 'array') && (0, chart_utilities_1.isArrayOrTypedArray)(ax.tickvals)) {
3063
+ var tickValues = ax._type === 'date' ? ax.tickvals.map(function (v) { return new Date(v); }) : ax.tickvals;
3064
+ props.tickValues = tickValues;
3065
+ props.tickText = ax.ticktext;
3066
+ return props;
3067
+ }
3068
+ if ((!ax.tickmode || ax.tickmode === 'linear') && ax.dtick) {
3069
+ var dtick = plotlyDtick(ax.dtick, ax._type);
3070
+ var tick0 = plotlyTick0(ax.tick0, ax._type, dtick);
3071
+ props.tickStep = dtick;
3072
+ props.tick0 = tick0;
3073
+ return props;
3074
+ }
3075
+ if ((!ax.tickmode || ax.tickmode === 'auto') && typeof ax.nticks === 'number' && ax.nticks >= 0) {
3076
+ props.tickCount = ax.nticks;
3077
+ }
3078
+ return props;
3079
+ };
3080
+ var getPolarAxisCategoryOrder = function (data, ax) {
3081
+ if (ax._type !== 'category') {
3082
+ return 'data';
3083
+ }
3084
+ var isValidArray = (0, chart_utilities_1.isArrayOrTypedArray)(ax.categoryarray) && ax.categoryarray.length > 0;
3085
+ if (isValidArray && (!ax.categoryorder || ax.categoryorder === 'array')) {
3086
+ return ax.categoryarray;
3087
+ }
3088
+ if (!ax.categoryorder || ax.categoryorder === 'trace' || ax.categoryorder === 'array') {
3089
+ var values = getValidAxisValues(data, ax._dataKey);
3090
+ var categoriesInTraceOrder = Array.from(new Set(values));
3091
+ return ax.autorange === 'reversed' ? categoriesInTraceOrder.reverse() : categoriesInTraceOrder;
3092
+ }
3093
+ return ax.categoryorder;
3094
+ };
3095
+ var getPolarAxisProps = function (data, layout) {
3096
+ var props = {};
3097
+ Object.keys(POLAR_AXIS_BY_DATA_KEY).forEach(function (dataKey) {
3098
+ var propName = POLAR_AXIS_BY_DATA_KEY[dataKey];
3099
+ var ax = getPolarAxis(data, dataKey, layout);
3100
+ props[propName] = tslib_1.__assign(tslib_1.__assign({ scaleType: ax._type === 'log' ? 'log' : 'default', categoryOrder: getPolarAxisCategoryOrder(data, ax), tickFormat: ax.tickformat }, getPolarAxisTickProps(data, ax)), ((0, chart_utilities_1.isArrayOrTypedArray)(ax.range) ? { rangeStart: ax.range[0], rangeEnd: ax.range[1] } : {}));
3101
+ if (propName === 'angularAxis') {
3102
+ props[propName].unit = ax.thetaunit;
3103
+ props.direction = ax.direction;
3104
+ }
3105
+ });
3106
+ return props;
3107
+ };
3123
3108
  });
3124
3109
  //# sourceMappingURL=PlotlySchemaAdapter.js.map