@fluentui/react-charting 5.25.0 → 5.25.2

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 (285) hide show
  1. package/CHANGELOG.json +87 -1
  2. package/CHANGELOG.md +28 -2
  3. package/dist/react-charting.d.ts +48 -45
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +24 -11
  7. package/lib/AnnotationOnlyChart.d.ts +1 -0
  8. package/lib/AnnotationOnlyChart.js +2 -0
  9. package/lib/AnnotationOnlyChart.js.map +1 -0
  10. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.d.ts +3 -0
  11. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +158 -0
  12. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
  13. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.d.ts +33 -0
  14. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +2 -0
  15. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
  16. package/lib/components/AnnotationOnlyChart/index.d.ts +2 -0
  17. package/lib/components/AnnotationOnlyChart/index.js +3 -0
  18. package/lib/components/AnnotationOnlyChart/index.js.map +1 -0
  19. package/lib/components/AreaChart/AreaChart.base.js +2 -2
  20. package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
  21. package/lib/components/ChartTable/ChartTable.base.js +5 -3
  22. package/lib/components/ChartTable/ChartTable.base.js.map +1 -1
  23. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.d.ts +1 -1
  24. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +199 -42
  25. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
  26. package/lib/components/CommonComponents/Annotations/index.d.ts +2 -0
  27. package/lib/components/CommonComponents/Annotations/index.js +3 -0
  28. package/lib/components/CommonComponents/Annotations/index.js.map +1 -0
  29. package/lib/components/CommonComponents/CartesianChart.base.d.ts +6 -1
  30. package/lib/components/CommonComponents/CartesianChart.base.js +131 -157
  31. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  32. package/lib/components/CommonComponents/CartesianChart.types.d.ts +11 -2
  33. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  34. package/lib/components/DeclarativeChart/DeclarativeChart.js +85 -51
  35. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  36. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +12 -4
  37. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  38. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
  39. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +169 -48
  40. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  41. package/lib/components/DonutChart/DonutChart.base.js +5 -3
  42. package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
  43. package/lib/components/FunnelChart/FunnelChart.base.js +15 -18
  44. package/lib/components/FunnelChart/FunnelChart.base.js.map +1 -1
  45. package/lib/components/GanttChart/GanttChart.base.js +6 -6
  46. package/lib/components/GanttChart/GanttChart.base.js.map +1 -1
  47. package/lib/components/GanttChart/GanttChart.types.d.ts +0 -11
  48. package/lib/components/GanttChart/GanttChart.types.js.map +1 -1
  49. package/lib/components/GaugeChart/GaugeChart.base.js +5 -3
  50. package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
  51. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +3 -3
  52. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  53. package/lib/components/HeatMapChart/HeatMapChart.base.js +3 -3
  54. package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  55. package/lib/components/HeatMapChart/HeatMapChart.types.d.ts +0 -9
  56. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  57. package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  58. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +4 -4
  59. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  60. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +0 -9
  61. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  62. package/lib/components/Legends/Legends.base.d.ts +1 -1
  63. package/lib/components/Legends/Legends.base.js +6 -2
  64. package/lib/components/Legends/Legends.base.js.map +1 -1
  65. package/lib/components/Legends/Legends.types.d.ts +1 -1
  66. package/lib/components/Legends/Legends.types.js.map +1 -1
  67. package/lib/components/LineChart/LineChart.base.js +3 -3
  68. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  69. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  70. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +1 -1
  71. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  72. package/lib/components/SankeyChart/SankeyChart.base.js +5 -3
  73. package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
  74. package/lib/components/ScatterChart/ScatterChart.base.js +4 -4
  75. package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -1
  76. package/lib/components/ScatterChart/ScatterChart.types.d.ts +0 -4
  77. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  78. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  79. package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  80. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +6 -4
  81. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  82. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +15 -7
  83. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  84. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +0 -9
  85. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  86. package/lib/index.d.ts +2 -0
  87. package/lib/index.js +1 -0
  88. package/lib/index.js.map +1 -1
  89. package/lib/types/IChartAnnotation.d.ts +2 -0
  90. package/lib/types/IChartAnnotation.js.map +1 -1
  91. package/lib/utilities/image-export-utils.d.ts +7 -2
  92. package/lib/utilities/image-export-utils.js +174 -86
  93. package/lib/utilities/image-export-utils.js.map +1 -1
  94. package/lib/utilities/utilities.d.ts +5 -4
  95. package/lib/utilities/utilities.js +18 -17
  96. package/lib/utilities/utilities.js.map +1 -1
  97. package/lib-amd/AnnotationOnlyChart.d.ts +1 -0
  98. package/lib-amd/AnnotationOnlyChart.js +6 -0
  99. package/lib-amd/AnnotationOnlyChart.js.map +1 -0
  100. package/lib-amd/components/AnnotationOnlyChart/AnnotationOnlyChart.d.ts +3 -0
  101. package/lib-amd/components/AnnotationOnlyChart/AnnotationOnlyChart.js +159 -0
  102. package/lib-amd/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
  103. package/lib-amd/components/AnnotationOnlyChart/AnnotationOnlyChart.types.d.ts +33 -0
  104. package/lib-amd/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +5 -0
  105. package/lib-amd/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
  106. package/lib-amd/components/AnnotationOnlyChart/index.d.ts +2 -0
  107. package/lib-amd/components/AnnotationOnlyChart/index.js +7 -0
  108. package/lib-amd/components/AnnotationOnlyChart/index.js.map +1 -0
  109. package/lib-amd/components/AreaChart/AreaChart.base.js +1 -1
  110. package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
  111. package/lib-amd/components/ChartTable/ChartTable.base.js +4 -2
  112. package/lib-amd/components/ChartTable/ChartTable.base.js.map +1 -1
  113. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.d.ts +1 -1
  114. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.js +198 -41
  115. package/lib-amd/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
  116. package/lib-amd/components/CommonComponents/Annotations/index.d.ts +2 -0
  117. package/lib-amd/components/CommonComponents/Annotations/index.js +7 -0
  118. package/lib-amd/components/CommonComponents/Annotations/index.js.map +1 -0
  119. package/lib-amd/components/CommonComponents/CartesianChart.base.d.ts +6 -1
  120. package/lib-amd/components/CommonComponents/CartesianChart.base.js +131 -157
  121. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  122. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +11 -2
  123. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  124. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +80 -50
  125. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  126. package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.js +12 -4
  127. package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  128. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
  129. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +171 -49
  130. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  131. package/lib-amd/components/DonutChart/DonutChart.base.js +4 -2
  132. package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
  133. package/lib-amd/components/FunnelChart/FunnelChart.base.js +13 -16
  134. package/lib-amd/components/FunnelChart/FunnelChart.base.js.map +1 -1
  135. package/lib-amd/components/GanttChart/GanttChart.base.js +5 -5
  136. package/lib-amd/components/GanttChart/GanttChart.base.js.map +1 -1
  137. package/lib-amd/components/GanttChart/GanttChart.types.d.ts +0 -11
  138. package/lib-amd/components/GanttChart/GanttChart.types.js.map +1 -1
  139. package/lib-amd/components/GaugeChart/GaugeChart.base.js +4 -2
  140. package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
  141. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +2 -2
  142. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  143. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +2 -2
  144. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  145. package/lib-amd/components/HeatMapChart/HeatMapChart.types.d.ts +0 -9
  146. package/lib-amd/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  147. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  148. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +3 -3
  149. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  150. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +0 -9
  151. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  152. package/lib-amd/components/Legends/Legends.base.d.ts +1 -1
  153. package/lib-amd/components/Legends/Legends.base.js +6 -2
  154. package/lib-amd/components/Legends/Legends.base.js.map +1 -1
  155. package/lib-amd/components/Legends/Legends.types.d.ts +1 -1
  156. package/lib-amd/components/Legends/Legends.types.js.map +1 -1
  157. package/lib-amd/components/LineChart/LineChart.base.js +2 -2
  158. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  159. package/lib-amd/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  160. package/lib-amd/components/ResponsiveContainer/ResponsiveContainer.js +1 -1
  161. package/lib-amd/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  162. package/lib-amd/components/SankeyChart/SankeyChart.base.js +4 -2
  163. package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
  164. package/lib-amd/components/ScatterChart/ScatterChart.base.js +3 -3
  165. package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -1
  166. package/lib-amd/components/ScatterChart/ScatterChart.types.d.ts +0 -4
  167. package/lib-amd/components/ScatterChart/ScatterChart.types.js.map +1 -1
  168. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  169. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  170. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +5 -3
  171. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  172. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +14 -6
  173. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  174. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +0 -9
  175. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  176. package/lib-amd/index.d.ts +2 -0
  177. package/lib-amd/index.js +3 -2
  178. package/lib-amd/index.js.map +1 -1
  179. package/lib-amd/types/IChartAnnotation.d.ts +2 -0
  180. package/lib-amd/types/IChartAnnotation.js.map +1 -1
  181. package/lib-amd/utilities/image-export-utils.d.ts +7 -2
  182. package/lib-amd/utilities/image-export-utils.js +173 -85
  183. package/lib-amd/utilities/image-export-utils.js.map +1 -1
  184. package/lib-amd/utilities/utilities.d.ts +5 -4
  185. package/lib-amd/utilities/utilities.js +18 -17
  186. package/lib-amd/utilities/utilities.js.map +1 -1
  187. package/lib-commonjs/AnnotationOnlyChart.d.ts +1 -0
  188. package/lib-commonjs/AnnotationOnlyChart.js +5 -0
  189. package/lib-commonjs/AnnotationOnlyChart.js.map +1 -0
  190. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.d.ts +3 -0
  191. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +162 -0
  192. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
  193. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.d.ts +33 -0
  194. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +3 -0
  195. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
  196. package/lib-commonjs/components/AnnotationOnlyChart/index.d.ts +2 -0
  197. package/lib-commonjs/components/AnnotationOnlyChart/index.js +6 -0
  198. package/lib-commonjs/components/AnnotationOnlyChart/index.js.map +1 -0
  199. package/lib-commonjs/components/AreaChart/AreaChart.base.js +1 -1
  200. package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
  201. package/lib-commonjs/components/ChartTable/ChartTable.base.js +4 -2
  202. package/lib-commonjs/components/ChartTable/ChartTable.base.js.map +1 -1
  203. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.d.ts +1 -1
  204. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +198 -41
  205. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
  206. package/lib-commonjs/components/CommonComponents/Annotations/index.d.ts +2 -0
  207. package/lib-commonjs/components/CommonComponents/Annotations/index.js +6 -0
  208. package/lib-commonjs/components/CommonComponents/Annotations/index.js.map +1 -0
  209. package/lib-commonjs/components/CommonComponents/CartesianChart.base.d.ts +6 -1
  210. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +131 -157
  211. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  212. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +11 -2
  213. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  214. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +83 -49
  215. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  216. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +12 -4
  217. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  218. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
  219. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +171 -49
  220. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  221. package/lib-commonjs/components/DonutChart/DonutChart.base.js +4 -2
  222. package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
  223. package/lib-commonjs/components/FunnelChart/FunnelChart.base.js +13 -16
  224. package/lib-commonjs/components/FunnelChart/FunnelChart.base.js.map +1 -1
  225. package/lib-commonjs/components/GanttChart/GanttChart.base.js +5 -5
  226. package/lib-commonjs/components/GanttChart/GanttChart.base.js.map +1 -1
  227. package/lib-commonjs/components/GanttChart/GanttChart.types.d.ts +0 -11
  228. package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -1
  229. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +4 -2
  230. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
  231. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +2 -2
  232. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  233. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +2 -2
  234. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  235. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.d.ts +0 -9
  236. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  237. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  238. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +3 -3
  239. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  240. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +0 -9
  241. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  242. package/lib-commonjs/components/Legends/Legends.base.d.ts +1 -1
  243. package/lib-commonjs/components/Legends/Legends.base.js +6 -2
  244. package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
  245. package/lib-commonjs/components/Legends/Legends.types.d.ts +1 -1
  246. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  247. package/lib-commonjs/components/LineChart/LineChart.base.js +2 -2
  248. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  249. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  250. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +1 -1
  251. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  252. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js +4 -2
  253. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
  254. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +3 -3
  255. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -1
  256. package/lib-commonjs/components/ScatterChart/ScatterChart.types.d.ts +0 -4
  257. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  258. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  259. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  260. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +5 -3
  261. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  262. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +14 -6
  263. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  264. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +0 -9
  265. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  266. package/lib-commonjs/index.d.ts +2 -0
  267. package/lib-commonjs/index.js +3 -1
  268. package/lib-commonjs/index.js.map +1 -1
  269. package/lib-commonjs/types/IChartAnnotation.d.ts +2 -0
  270. package/lib-commonjs/types/IChartAnnotation.js.map +1 -1
  271. package/lib-commonjs/utilities/image-export-utils.d.ts +7 -2
  272. package/lib-commonjs/utilities/image-export-utils.js +173 -85
  273. package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
  274. package/lib-commonjs/utilities/utilities.d.ts +5 -4
  275. package/lib-commonjs/utilities/utilities.js +18 -17
  276. package/lib-commonjs/utilities/utilities.js.map +1 -1
  277. package/package.json +5 -5
  278. package/src/components/AnnotationOnlyChart/AnnotationOnlyChart.types.ts +34 -0
  279. package/src/components/CommonComponents/CartesianChart.types.ts +12 -1
  280. package/src/components/GanttChart/GanttChart.types.ts +0 -13
  281. package/src/components/HeatMapChart/HeatMapChart.types.ts +0 -11
  282. package/src/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.ts +0 -11
  283. package/src/components/Legends/Legends.types.ts +1 -1
  284. package/src/components/ScatterChart/ScatterChart.types.ts +0 -5
  285. package/src/components/VerticalStackedBarChart/VerticalStackedBarChart.types.ts +0 -11
@@ -13,13 +13,11 @@ var getClassNames = classNamesFunction();
13
13
  var ChartHoverCard = React.lazy(function () {
14
14
  return import('../../utilities/ChartHoverCard/ChartHoverCard').then(function (module) { return ({ default: module.ChartHoverCard }); });
15
15
  });
16
- var chartTypesWithStringYAxis = [
17
- ChartTypes.HorizontalBarChartWithAxis,
18
- ChartTypes.HeatMapChart,
19
- ChartTypes.VerticalStackedBarChart,
20
- ChartTypes.GanttChart,
21
- ChartTypes.ScatterChart,
22
- ];
16
+ var HORIZONTAL_MARGIN_FOR_YAXIS_TITLE = 24;
17
+ var VERTICAL_MARGIN_FOR_XAXIS_TITLE = 20;
18
+ var AXIS_TITLE_PADDING = 8;
19
+ var DEFAULT_MARGIN_WITH_TICKS = 40;
20
+ var DEFAULT_MARGIN_NO_TICKS = 20;
23
21
  /**
24
22
  * Cartesian chart used for
25
23
  * 1.draw X and Y axis of the chart
@@ -29,7 +27,6 @@ var chartTypesWithStringYAxis = [
29
27
  var CartesianChartBase = /** @class */ (function (_super) {
30
28
  __extends(CartesianChartBase, _super);
31
29
  function CartesianChartBase(props) {
32
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
33
30
  var _this = _super.call(this, props) || this;
34
31
  _this.minLegendContainerHeight = 32;
35
32
  _this._isRtl = getRTL();
@@ -41,6 +38,7 @@ var CartesianChartBase = /** @class */ (function (_super) {
41
38
  * Defalut value is 0. And this values calculted when 'wrapXAxisLables' or 'showXAxisLablesTooltip' is true.
42
39
  */
43
40
  _this._removalValueForTextTuncate = 0;
41
+ _this._yAxisTickText = [];
44
42
  _this.isIntegralDataset = true;
45
43
  _this.calculateMaxYAxisLabelLength = function (className) {
46
44
  var formatTickLabel = function (str) {
@@ -49,7 +47,7 @@ var CartesianChartBase = /** @class */ (function (_super) {
49
47
  }
50
48
  return str;
51
49
  };
52
- return calculateLongestLabelWidth(_this.props.stringDatasetForYAxisDomain.map(function (label) { return formatTickLabel(label); }), ".".concat(className, " text"));
50
+ return calculateLongestLabelWidth(_this._yAxisTickText.map(function (label) { return formatTickLabel(label); }), ".".concat(className, " text"));
53
51
  };
54
52
  // TO DO: Write a common functional component for Multi value callout and divide sub count method
55
53
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -185,6 +183,55 @@ var CartesianChartBase = /** @class */ (function (_super) {
185
183
  _this._removalValueForTextTuncate = rotatedHeight + _this.margins.bottom;
186
184
  }
187
185
  };
186
+ _this._calcMargins = function () {
187
+ var margins = _this._getDefaultMargins();
188
+ margins = _this._applyTitleMargins(margins);
189
+ margins = _this._applyAnnotationMargins(margins);
190
+ if (_this._isRtl) {
191
+ margins = _this._swapRtlMargins(margins);
192
+ }
193
+ return __assign(__assign({}, margins), _this.props.margins);
194
+ };
195
+ _this._getDefaultMargins = function () {
196
+ return {
197
+ top: DEFAULT_MARGIN_NO_TICKS,
198
+ // Smaller than the default because it is based on the line height rather than
199
+ // the length of the tick labels.
200
+ bottom: DEFAULT_MARGIN_WITH_TICKS - 5,
201
+ // For the actual margin, add the tick size, tick padding, and some extra space to
202
+ // the width of the longest yaxis tick label (startFromX).
203
+ left: Math.max(DEFAULT_MARGIN_WITH_TICKS, _this.state.startFromX + 20),
204
+ right: _this.props.secondaryYScaleOptions ? DEFAULT_MARGIN_WITH_TICKS : DEFAULT_MARGIN_NO_TICKS,
205
+ };
206
+ };
207
+ _this._applyTitleMargins = function (margins) {
208
+ var updated = __assign({}, margins);
209
+ if (_this.props.xAxisTitle !== undefined && _this.props.xAxisTitle !== '') {
210
+ updated.bottom += VERTICAL_MARGIN_FOR_XAXIS_TITLE;
211
+ }
212
+ if (_this.props.yAxisTitle !== undefined && _this.props.yAxisTitle !== '') {
213
+ updated.left += HORIZONTAL_MARGIN_FOR_YAXIS_TITLE;
214
+ }
215
+ if (_this.props.secondaryYAxistitle !== undefined && _this.props.secondaryYAxistitle !== '') {
216
+ updated.right += HORIZONTAL_MARGIN_FOR_YAXIS_TITLE;
217
+ }
218
+ return updated;
219
+ };
220
+ _this._applyAnnotationMargins = function (margins) {
221
+ var updated = __assign({}, margins);
222
+ if (_this.props.xAxisAnnotation !== undefined && _this.props.xAxisAnnotation !== '') {
223
+ updated.top += VERTICAL_MARGIN_FOR_XAXIS_TITLE;
224
+ }
225
+ if (_this.props.yAxisAnnotation !== undefined &&
226
+ _this.props.yAxisAnnotation !== '' &&
227
+ (_this.props.secondaryYAxistitle === undefined || _this.props.secondaryYAxistitle === '')) {
228
+ updated.right += HORIZONTAL_MARGIN_FOR_YAXIS_TITLE;
229
+ }
230
+ return updated;
231
+ };
232
+ _this._swapRtlMargins = function (margins) {
233
+ return __assign(__assign({}, margins), { left: margins.right, right: margins.left });
234
+ };
188
235
  _this.state = {
189
236
  containerHeight: 0,
190
237
  containerWidth: 0,
@@ -193,67 +240,13 @@ var CartesianChartBase = /** @class */ (function (_super) {
193
240
  startFromX: 0,
194
241
  };
195
242
  _this.idForGraph = getId('chart_');
196
- _this.titleMargin = 8;
197
243
  _this.idForDefaultTabbableElement = getId('defaultTabbableElement_');
198
244
  _this._tooltipId = getId('tooltip_');
199
- /**
200
- * In RTL mode, Only graph will be rendered left/right. We need to provide left and right margins manually.
201
- * So that, in RTL, left margins becomes right margins and viceversa.
202
- * As graph needs to be drawn perfecty, these values consider as default values.
203
- * Same margins using for all other cartesian charts. Can be accessible through 'getMargins' call back method.
204
- */
205
- _this.margins = {
206
- top: (_b = (_a = _this.props.margins) === null || _a === void 0 ? void 0 : _a.top) !== null && _b !== void 0 ? _b : 20,
207
- bottom: (_d = (_c = _this.props.margins) === null || _c === void 0 ? void 0 : _c.bottom) !== null && _d !== void 0 ? _d : 35,
208
- right: _this._isRtl
209
- ? (_f = (_e = _this.props.margins) === null || _e === void 0 ? void 0 : _e.left) !== null && _f !== void 0 ? _f : 40
210
- : ((_h = (_g = _this.props.margins) === null || _g === void 0 ? void 0 : _g.right) !== null && _h !== void 0 ? _h : (_j = _this.props) === null || _j === void 0 ? void 0 : _j.secondaryYScaleOptions)
211
- ? 40
212
- : 20,
213
- left: _this._isRtl
214
- ? ((_l = (_k = _this.props.margins) === null || _k === void 0 ? void 0 : _k.right) !== null && _l !== void 0 ? _l : (_m = _this.props) === null || _m === void 0 ? void 0 : _m.secondaryYScaleOptions)
215
- ? 40
216
- : 20
217
- : (_p = (_o = _this.props.margins) === null || _o === void 0 ? void 0 : _o.left) !== null && _p !== void 0 ? _p : 40,
218
- };
219
- var TITLE_MARGIN_HORIZONTAL = 24;
220
- var TITLE_MARGIN_VERTICAL = 20;
221
- if (_this.props.xAxisTitle !== undefined && _this.props.xAxisTitle !== '') {
222
- _this.margins.bottom = (_r = (_q = _this.props.margins) === null || _q === void 0 ? void 0 : _q.bottom) !== null && _r !== void 0 ? _r : _this.margins.bottom + TITLE_MARGIN_VERTICAL;
223
- }
224
- if (_this.props.yAxisTitle !== undefined && _this.props.yAxisTitle !== '') {
225
- _this.margins.left = _this._isRtl
226
- ? ((_t = (_s = _this.props.margins) === null || _s === void 0 ? void 0 : _s.right) !== null && _t !== void 0 ? _t : (_u = _this.props) === null || _u === void 0 ? void 0 : _u.secondaryYAxistitle)
227
- ? _this.margins.right + 2 * TITLE_MARGIN_HORIZONTAL
228
- : _this.margins.right + TITLE_MARGIN_HORIZONTAL
229
- : (_w = (_v = _this.props.margins) === null || _v === void 0 ? void 0 : _v.left) !== null && _w !== void 0 ? _w : _this.margins.left + TITLE_MARGIN_HORIZONTAL;
230
- _this.margins.right = _this._isRtl
231
- ? (_y = (_x = _this.props.margins) === null || _x === void 0 ? void 0 : _x.left) !== null && _y !== void 0 ? _y : _this.margins.left + TITLE_MARGIN_HORIZONTAL
232
- : ((_0 = (_z = _this.props.margins) === null || _z === void 0 ? void 0 : _z.right) !== null && _0 !== void 0 ? _0 : (_1 = _this.props) === null || _1 === void 0 ? void 0 : _1.secondaryYAxistitle)
233
- ? _this.margins.right + 2 * TITLE_MARGIN_HORIZONTAL
234
- : _this.margins.right + TITLE_MARGIN_HORIZONTAL;
235
- }
236
- if (_this.props.xAxisAnnotation !== undefined && _this.props.xAxisAnnotation !== '') {
237
- _this.margins.top = (_3 = (_2 = _this.props.margins) === null || _2 === void 0 ? void 0 : _2.top) !== null && _3 !== void 0 ? _3 : _this.margins.top + TITLE_MARGIN_VERTICAL;
238
- }
239
- if (_this.props.yAxisAnnotation !== undefined &&
240
- _this.props.yAxisAnnotation !== '' &&
241
- (_this.props.secondaryYAxistitle === undefined || _this.props.secondaryYAxistitle === '')) {
242
- if (_this._isRtl) {
243
- _this.margins.left = (_5 = (_4 = _this.props.margins) === null || _4 === void 0 ? void 0 : _4.right) !== null && _5 !== void 0 ? _5 : _this.margins.right + TITLE_MARGIN_HORIZONTAL;
244
- }
245
- else {
246
- _this.margins.right = (_7 = (_6 = _this.props.margins) === null || _6 === void 0 ? void 0 : _6.right) !== null && _7 !== void 0 ? _7 : _this.margins.right + TITLE_MARGIN_HORIZONTAL;
247
- }
248
- }
249
245
  return _this;
250
246
  }
251
247
  CartesianChartBase.prototype.componentDidMount = function () {
252
248
  this._fitParentContainer();
253
- if (chartTypesWithStringYAxis.includes(this.props.chartType) &&
254
- this.props.showYAxisLables &&
255
- this.yAxisElement &&
256
- this.props.yAxisType === YAxisType.StringAxis) {
249
+ if (this.props.showYAxisLables) {
257
250
  var maxYAxisLabelLength = this.calculateMaxYAxisLabelLength(this._classNames.yAxis);
258
251
  if (this.state.startFromX !== maxYAxisLabelLength) {
259
252
  this.setState({
@@ -277,10 +270,7 @@ var CartesianChartBase = /** @class */ (function (_super) {
277
270
  if (prevProps.height !== this.props.height || prevProps.width !== this.props.width) {
278
271
  this._fitParentContainer();
279
272
  }
280
- if (chartTypesWithStringYAxis.includes(this.props.chartType) &&
281
- this.props.showYAxisLables &&
282
- this.yAxisElement &&
283
- this.props.yAxisType === YAxisType.StringAxis) {
273
+ if (this.props.showYAxisLables) {
284
274
  var maxYAxisLabelLength = this.calculateMaxYAxisLabelLength(this._classNames.yAxis);
285
275
  if (this.state.startFromX !== maxYAxisLabelLength) {
286
276
  this.setState({
@@ -308,18 +298,9 @@ var CartesianChartBase = /** @class */ (function (_super) {
308
298
  if (this.props.parentRef) {
309
299
  this._fitParentContainer();
310
300
  }
311
- var margin = __assign({}, this.margins);
312
- // Note: This check is unnecessary since startFromX is only set for charts with string y-axis.
313
- if (chartTypesWithStringYAxis.includes(this.props.chartType)) {
314
- if (!this._isRtl) {
315
- margin.left += this.state.startFromX;
316
- }
317
- else {
318
- margin.right += this.state.startFromX;
319
- }
320
- }
301
+ this.margins = this._calcMargins();
321
302
  // Callback for margins to the chart
322
- this.props.getmargins && this.props.getmargins(margin);
303
+ this.props.getmargins && this.props.getmargins(this.margins);
323
304
  this._classNames = getClassNames(this.props.styles, {
324
305
  theme: this.props.theme,
325
306
  width: this.state._width,
@@ -338,9 +319,7 @@ var CartesianChartBase = /** @class */ (function (_super) {
338
319
  if ((this.props.enableFirstRenderOptimization && this.chartContainer) ||
339
320
  !this.props.enableFirstRenderOptimization) {
340
321
  this._isFirstRender = false;
341
- var XAxisParams = __assign({ domainNRangeValues: this.props.getDomainNRangeValues(points, this.props.getDomainMargins ? this.props.getDomainMargins(this.state.containerWidth) : this.margins, this.state.containerWidth, chartType, this._isRtl, this.props.xAxisType, this.props.barwidth, this.props.tickValues,
342
- // This is only used for Horizontal Bar Chart with Axis for y as string axis
343
- this.state.startFromX),
322
+ var XAxisParams = __assign({ domainNRangeValues: this.props.getDomainNRangeValues(points, this.props.getDomainMargins ? this.props.getDomainMargins(this.state.containerWidth) : this.margins, this.state.containerWidth, chartType, this._isRtl, this.props.xAxisType, this.props.barwidth, this.props.tickValues),
344
323
  // FIXME: In XAxisParams, containerHeight is used by HBWA to generate vertical gridlines.
345
324
  // Since the x-axis in HBWA is numeric, it typically doesn't require transformation.
346
325
  // However, if transformation props are enabled, the updated _removalValueForTextTuncate
@@ -384,9 +363,9 @@ var CartesianChartBase = /** @class */ (function (_super) {
384
363
  * 2. To draw the graph.
385
364
  * For area/line chart using same scales. For other charts, creating their own scales to draw the graph.
386
365
  */
387
- var axisData = { yAxisDomainValues: [] };
366
+ var axisData = { yAxisDomainValues: [], yAxisTickText: [] };
388
367
  if (this.props.yAxisType && this.props.yAxisType === YAxisType.StringAxis) {
389
- yScalePrimary = this.props.createStringYAxis(YAxisParams, this.props.stringDatasetForYAxisDomain, this._isRtl, this.props.barwidth, this.props.chartType);
368
+ yScalePrimary = this.props.createStringYAxis(YAxisParams, this.props.stringDatasetForYAxisDomain, this._isRtl, axisData, this.props.barwidth, this.props.chartType);
390
369
  }
391
370
  else {
392
371
  // TODO: Since the scale domain values are now computed independently for both the primary and
@@ -412,40 +391,39 @@ var CartesianChartBase = /** @class */ (function (_super) {
412
391
  }
413
392
  yScalePrimary = this.props.createYAxis(YAxisParams, this._isRtl, axisData, this.isIntegralDataset, false, this.props.supportNegativeData, this.props.roundedTicks, this.props.yScaleType);
414
393
  }
415
- if (chartTypesWithStringYAxis.includes(this.props.chartType) && this.props.yAxisType === YAxisType.StringAxis) {
416
- // Removing un wanted tooltip div from DOM, when prop not provided, for proper cleanup
417
- // of unwanted DOM elements, to prevent flacky behaviour in tooltips , that might occur
418
- // in creating tooltips when tooltips are enabled( as we try to recreate a tspan with this._tooltipId)
419
- if (!this.props.showYAxisLablesTooltip) {
420
- try {
421
- document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId).remove();
422
- //eslint-disable-next-line no-empty
423
- }
424
- catch (e) { }
394
+ this._yAxisTickText = axisData.yAxisTickText;
395
+ this.props.getAxisData && this.props.getAxisData(axisData);
396
+ // Removing un wanted tooltip div from DOM, when prop not provided, for proper cleanup
397
+ // of unwanted DOM elements, to prevent flacky behaviour in tooltips , that might occur
398
+ // in creating tooltips when tooltips are enabled( as we try to recreate a tspan with this._tooltipId)
399
+ if (!this.props.showYAxisLablesTooltip) {
400
+ try {
401
+ document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId).remove();
402
+ //eslint-disable-next-line no-empty
425
403
  }
426
- // Used to display tooltip at y axis labels.
427
- if (this.props.showYAxisLablesTooltip) {
428
- // To create y axis tick values by if specified truncating the rest of the text
429
- // and showing elipsis or showing the whole string,
430
- yScalePrimary &&
431
- // Note: This function should be invoked within the showYAxisLablesTooltip check,
432
- // as its sole purpose is to truncate labels that exceed the noOfCharsToTruncate limit.
433
- createYAxisLabels(this.yAxisElement, yScalePrimary, this.props.noOfCharsToTruncate || 4, this.props.showYAxisLablesTooltip || false, this._isRtl);
434
- var yAxisElement = d3Select(this.yAxisElement).call(yScalePrimary);
435
- try {
436
- document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId).remove();
437
- //eslint-disable-next-line no-empty
438
- }
439
- catch (e) { }
440
- var ytooltipProps = {
441
- tooltipCls: this._classNames.tooltip,
442
- id: this._tooltipId,
443
- axis: yAxisElement,
444
- };
445
- yAxisElement && tooltipOfAxislabels(ytooltipProps);
404
+ catch (e) { }
405
+ }
406
+ // Used to display tooltip at y axis labels.
407
+ if (this.props.showYAxisLablesTooltip) {
408
+ // To create y axis tick values by if specified truncating the rest of the text
409
+ // and showing elipsis or showing the whole string,
410
+ yScalePrimary &&
411
+ // Note: This function should be invoked within the showYAxisLablesTooltip check,
412
+ // as its sole purpose is to truncate labels that exceed the noOfCharsToTruncate limit.
413
+ createYAxisLabels(this.yAxisElement, yScalePrimary, this.props.noOfCharsToTruncate || 4, this.props.showYAxisLablesTooltip || false, this._isRtl);
414
+ var yAxisElement = d3Select(this.yAxisElement).call(yScalePrimary);
415
+ try {
416
+ document.getElementById(this._tooltipId) && document.getElementById(this._tooltipId).remove();
417
+ //eslint-disable-next-line no-empty
446
418
  }
419
+ catch (e) { }
420
+ var ytooltipProps = {
421
+ tooltipCls: this._classNames.tooltip,
422
+ id: this._tooltipId,
423
+ axis: yAxisElement,
424
+ };
425
+ yAxisElement && tooltipOfAxislabels(ytooltipProps);
447
426
  }
448
- this.props.getAxisData && this.props.getAxisData(axisData);
449
427
  // Callback function for chart, returns axis
450
428
  this._getData(xScale, yScalePrimary, yScaleSecondary);
451
429
  children = this.props.children(__assign(__assign({}, this.state), { xScale: xScale, yScalePrimary: yScalePrimary, yScaleSecondary: yScaleSecondary }));
@@ -457,11 +435,10 @@ var CartesianChartBase = /** @class */ (function (_super) {
457
435
  width: this.state.containerWidth,
458
436
  height: this.state.containerHeight,
459
437
  };
460
- var startFromX = this.state.startFromX || 0;
461
- var plotWidth = Math.max(0, svgDimensions.width - this.margins.left - this.margins.right - startFromX);
438
+ var plotWidth = Math.max(0, svgDimensions.width - this.margins.left - this.margins.right);
462
439
  var plotHeight = Math.max(0, svgDimensions.height - this.margins.top - this.margins.bottom - this._removalValueForTextTuncate);
463
440
  var plotRect = {
464
- x: this._isRtl ? this.margins.left : this.margins.left + startFromX,
441
+ x: this.margins.left,
465
442
  y: this.margins.top,
466
443
  width: plotWidth,
467
444
  height: plotHeight,
@@ -488,12 +465,19 @@ var CartesianChartBase = /** @class */ (function (_super) {
488
465
  else {
489
466
  focusDirection = FocusZoneDirection.horizontal;
490
467
  }
491
- var xAxisTitleMaximumAllowedWidth = svgDimensions.width - this.margins.left - this.margins.right - this.state.startFromX;
492
- var yAxisTitleMaximumAllowedHeight = svgDimensions.height -
468
+ var xAxisTitleMaxWidth = svgDimensions.width - this.margins.left - this.margins.right - AXIS_TITLE_PADDING * 2;
469
+ var yAxisTitleMaxHeight = svgDimensions.height -
493
470
  this.margins.bottom -
494
471
  this.margins.top -
495
472
  this._removalValueForTextTuncate -
496
- this.titleMargin;
473
+ AXIS_TITLE_PADDING * 2;
474
+ var yAxisTitleCenterY = this.margins.top + AXIS_TITLE_PADDING + yAxisTitleMaxHeight / 2;
475
+ var yAxisTitleCenterX = this._isRtl
476
+ ? svgDimensions.width - AXIS_TITLE_PADDING
477
+ : HORIZONTAL_MARGIN_FOR_YAXIS_TITLE - AXIS_TITLE_PADDING;
478
+ var secondaryYAxisTitleCenterX = this._isRtl
479
+ ? HORIZONTAL_MARGIN_FOR_YAXIS_TITLE - AXIS_TITLE_PADDING
480
+ : svgDimensions.width - AXIS_TITLE_PADDING;
497
481
  var commonSvgToolTipProps = {
498
482
  wrapContent: wrapContent,
499
483
  theme: this.props.theme,
@@ -519,7 +503,9 @@ var CartesianChartBase = /** @class */ (function (_super) {
519
503
  * But this is a hacky solution and not a proper fix and also elementRef is deprecated.
520
504
  * 2. Using the default tabbable element to fix the issue.
521
505
  */
522
- return (React.createElement("div", { id: this.idForGraph, className: this._classNames.root, ref: function (rootElem) { return (_this.chartContainer = rootElem); }, onMouseLeave: this._onChartLeave },
506
+ return (React.createElement("div", { id: this.idForGraph, className: this._classNames.root, ref: function (rootElem) {
507
+ _this.chartContainer = rootElem;
508
+ }, onMouseLeave: this._onChartLeave },
523
509
  !this._isFirstRender && React.createElement("div", { id: this.idForDefaultTabbableElement }),
524
510
  React.createElement(FocusZone, __assign({ direction: focusDirection, className: this._classNames.chartWrapper, defaultTabbableElement: "#".concat(this.idForDefaultTabbableElement) }, svgFocusZoneProps),
525
511
  this._isFirstRender && React.createElement("div", { id: this.idForDefaultTabbableElement }),
@@ -530,69 +516,57 @@ var CartesianChartBase = /** @class */ (function (_super) {
530
516
  // To add wrap of x axis lables feature, need to remove word height from svg height.
531
517
  transform: "translate(0, ".concat(svgDimensions.height - this.margins.bottom - this._removalValueForTextTuncate, ")"), className: this._classNames.xAxis }),
532
518
  this.props.xAxisTitle !== undefined && this.props.xAxisTitle !== '' && (React.createElement(SVGTooltipText, __assign({ content: this.props.xAxisTitle, textProps: {
533
- x: this.margins.left + this.state.startFromX + xAxisTitleMaximumAllowedWidth / 2,
534
- y: svgDimensions.height - this.titleMargin,
519
+ x: this.margins.left + AXIS_TITLE_PADDING + xAxisTitleMaxWidth / 2,
520
+ y: svgDimensions.height - AXIS_TITLE_PADDING,
535
521
  className: this._classNames.axisTitle,
536
522
  textAnchor: 'middle',
537
523
  'aria-hidden': true,
538
- }, maxWidth: xAxisTitleMaximumAllowedWidth }, commonSvgToolTipProps))),
524
+ }, maxWidth: xAxisTitleMaxWidth }, commonSvgToolTipProps))),
539
525
  this.props.xAxisAnnotation !== undefined && this.props.xAxisAnnotation !== '' && (React.createElement(SVGTooltipText, __assign({ content: this.props.xAxisAnnotation, textProps: {
540
- x: this.margins.left + this.state.startFromX + xAxisTitleMaximumAllowedWidth / 2,
541
- y: this.titleMargin + 3,
526
+ x: this.margins.left + AXIS_TITLE_PADDING + xAxisTitleMaxWidth / 2,
527
+ y: VERTICAL_MARGIN_FOR_XAXIS_TITLE - AXIS_TITLE_PADDING,
542
528
  className: this._classNames.axisAnnotation,
543
529
  textAnchor: 'middle',
544
530
  'aria-hidden': true,
545
- }, maxWidth: xAxisTitleMaximumAllowedWidth }, commonSvgToolTipProps))),
531
+ }, maxWidth: xAxisTitleMaxWidth }, commonSvgToolTipProps))),
546
532
  React.createElement("g", { ref: function (e) {
547
533
  _this.yAxisElement = e;
548
- }, id: "yAxisGElement".concat(this.idForGraph), transform: "translate(".concat(this._isRtl
549
- ? svgDimensions.width - this.margins.right - this.state.startFromX
550
- : this.margins.left + this.state.startFromX, ", 0)"), className: this._classNames.yAxis }),
534
+ }, id: "yAxisGElement".concat(this.idForGraph), transform: "translate(".concat(this._isRtl ? svgDimensions.width - this.margins.right : this.margins.left, ", 0)"), className: this._classNames.yAxis }),
551
535
  this.props.secondaryYScaleOptions && (React.createElement("g", null,
552
536
  React.createElement("g", { ref: function (e) {
553
537
  _this.yAxisElementSecondary = e;
554
- }, id: "yAxisGElementSecondary".concat(this.idForGraph), transform: "translate(".concat(this._isRtl
555
- ? this.margins.left + this.state.startFromX
556
- : svgDimensions.width - this.margins.right - this.state.startFromX, ", 0)"), className: this._classNames.yAxis }),
538
+ }, id: "yAxisGElementSecondary".concat(this.idForGraph), transform: "translate(".concat(this._isRtl ? this.margins.left : svgDimensions.width - this.margins.right, ", 0)"), className: this._classNames.yAxis }),
557
539
  this.props.secondaryYAxistitle !== undefined && this.props.secondaryYAxistitle !== '' && (React.createElement(SVGTooltipText, __assign({ content: this.props.secondaryYAxistitle, textProps: {
558
- x: (yAxisTitleMaximumAllowedHeight - this.margins.bottom) / 2 + this._removalValueForTextTuncate,
559
- y: this._isRtl
560
- ? this.state.startFromX - this.titleMargin
561
- : svgDimensions.width - this.margins.right,
540
+ x: secondaryYAxisTitleCenterX,
541
+ y: yAxisTitleCenterY,
562
542
  textAnchor: 'middle',
563
- transform: "translate(".concat(this._isRtl
564
- ? this.margins.right / 2 - this.titleMargin
565
- : this.margins.right / 2 + this.titleMargin, ",\n ").concat(svgDimensions.height - this.margins.bottom - this.margins.top - this.titleMargin, ")rotate(-90)"),
543
+ transform: "rotate(-90, ".concat(secondaryYAxisTitleCenterX, ", ").concat(yAxisTitleCenterY, ")"),
566
544
  className: this._classNames.axisTitle,
567
545
  'aria-hidden': true,
568
- }, maxWidth: yAxisTitleMaximumAllowedHeight }, commonSvgToolTipProps))))),
546
+ }, maxWidth: yAxisTitleMaxHeight }, commonSvgToolTipProps))))),
569
547
  children,
570
548
  this.props.yAxisTitle !== undefined && this.props.yAxisTitle !== '' && (React.createElement(SVGTooltipText, __assign({ content: this.props.yAxisTitle, textProps: {
571
- x: (yAxisTitleMaximumAllowedHeight - this.margins.bottom) / 2 + this._removalValueForTextTuncate,
572
- y: this._isRtl
573
- ? svgDimensions.width - this.margins.right / 2 + this.titleMargin
574
- : this.margins.left / 2 - this.titleMargin,
549
+ x: yAxisTitleCenterX,
550
+ y: yAxisTitleCenterY,
575
551
  textAnchor: 'middle',
576
- transform: "translate(0,\n ".concat(svgDimensions.height - this.margins.bottom - this.margins.top - this.titleMargin, ")rotate(-90)"),
552
+ transform: "rotate(-90, ".concat(yAxisTitleCenterX, ", ").concat(yAxisTitleCenterY, ")"),
577
553
  className: this._classNames.axisTitle,
578
554
  'aria-hidden': true,
579
- }, maxWidth: yAxisTitleMaximumAllowedHeight }, commonSvgToolTipProps))),
555
+ }, maxWidth: yAxisTitleMaxHeight }, commonSvgToolTipProps))),
580
556
  this.props.yAxisAnnotation !== undefined &&
581
557
  this.props.yAxisAnnotation !== '' &&
582
558
  (this.props.secondaryYAxistitle === undefined || this.props.secondaryYAxistitle === '') && (React.createElement(SVGTooltipText, __assign({ content: this.props.yAxisAnnotation, textProps: {
583
- x: (yAxisTitleMaximumAllowedHeight - this.margins.bottom) / 2 + this._removalValueForTextTuncate,
584
- y: this._isRtl
585
- ? this.state.startFromX - this.titleMargin
586
- : svgDimensions.width - this.margins.right,
559
+ x: secondaryYAxisTitleCenterX,
560
+ y: yAxisTitleCenterY,
587
561
  textAnchor: 'middle',
588
- transform: "translate(".concat(this._isRtl
589
- ? this.margins.right / 2 - this.titleMargin
590
- : this.margins.right / 2 + this.titleMargin, ",\n ").concat(svgDimensions.height - this.margins.bottom - this.margins.top - this.titleMargin, ")rotate(-90)"),
562
+ transform: "rotate(-90, ".concat(secondaryYAxisTitleCenterX, ", ").concat(yAxisTitleCenterY, ")"),
591
563
  className: this._classNames.axisAnnotation,
592
564
  'aria-hidden': true,
593
- }, maxWidth: yAxisTitleMaximumAllowedHeight }, commonSvgToolTipProps)))),
565
+ }, maxWidth: yAxisTitleMaxHeight }, commonSvgToolTipProps)))),
594
566
  hasAnnotations && annotationContext && (React.createElement(ChartAnnotationLayer, { annotations: annotations, context: annotationContext, theme: this.props.theme, className: this._classNames.annotationLayer }))),
595
- !this.props.hideLegend && (React.createElement("div", { ref: function (e) { return (_this.legendContainer = e); }, className: this._classNames.legendContainer }, this.props.legendBars)),
567
+ !this.props.hideLegend && (React.createElement("div", { ref: function (e) {
568
+ _this.legendContainer = e;
569
+ }, className: this._classNames.legendContainer }, this.props.legendBars)),
596
570
  callout && React.createElement(React.Suspense, { fallback: React.createElement("div", null, "Loading...") }, callout)));
597
571
  };
598
572
  /**