@fluentui/react-charting 5.23.27 → 5.23.29

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 (257) hide show
  1. package/CHANGELOG.json +49 -1
  2. package/CHANGELOG.md +23 -2
  3. package/dist/react-charting.d.ts +54 -0
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +31 -0
  7. package/lib/DeclarativeChart.d.ts +1 -1
  8. package/lib/DeclarativeChart.js +1 -1
  9. package/lib/DeclarativeChart.js.map +1 -1
  10. package/lib/components/AreaChart/AreaChart.base.d.ts +4 -1
  11. package/lib/components/AreaChart/AreaChart.base.js +12 -2
  12. package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
  13. package/lib/components/CommonComponents/CartesianChart.base.d.ts +3 -2
  14. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  15. package/lib/components/CommonComponents/CartesianChart.types.d.ts +11 -2
  16. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  17. package/lib/components/DeclarativeChart/DeclarativeChart.d.ts +13 -1
  18. package/lib/components/DeclarativeChart/DeclarativeChart.js +31 -22
  19. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  20. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +25 -29
  21. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  22. package/lib/components/DeclarativeChart/imageExporter.d.ts +10 -0
  23. package/lib/components/DeclarativeChart/imageExporter.js +222 -0
  24. package/lib/components/DeclarativeChart/imageExporter.js.map +1 -0
  25. package/lib/components/DeclarativeChart/index.d.ts +2 -0
  26. package/lib/components/DeclarativeChart/index.js +2 -0
  27. package/lib/components/DeclarativeChart/index.js.map +1 -0
  28. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  29. package/lib/components/DonutChart/DonutChart.base.d.ts +3 -1
  30. package/lib/components/DonutChart/DonutChart.base.js +9 -1
  31. package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
  32. package/lib/components/DonutChart/DonutChart.types.d.ts +7 -2
  33. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  34. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  35. package/lib/components/GaugeChart/GaugeChart.base.d.ts +3 -1
  36. package/lib/components/GaugeChart/GaugeChart.base.js +9 -1
  37. package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
  38. package/lib/components/GaugeChart/GaugeChart.types.d.ts +7 -2
  39. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  40. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +4 -1
  41. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +12 -2
  42. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  43. package/lib/components/HeatMapChart/HeatMapChart.base.d.ts +4 -2
  44. package/lib/components/HeatMapChart/HeatMapChart.base.js +12 -2
  45. package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  46. package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  47. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +4 -2
  48. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +12 -2
  49. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  50. package/lib/components/Legends/Legends.base.js.map +1 -1
  51. package/lib/components/Legends/shape.js.map +1 -1
  52. package/lib/components/LineChart/LineChart.base.d.ts +4 -1
  53. package/lib/components/LineChart/LineChart.base.js +12 -2
  54. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  55. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  56. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  57. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  58. package/lib/components/PieChart/Arc/Arc.js.map +1 -1
  59. package/lib/components/PieChart/Pie/Pie.js.map +1 -1
  60. package/lib/components/PieChart/PieChart.base.js.map +1 -1
  61. package/lib/components/SankeyChart/SankeyChart.base.d.ts +3 -3
  62. package/lib/components/SankeyChart/SankeyChart.base.js +3 -2
  63. package/lib/components/SankeyChart/SankeyChart.base.js.map +1 -1
  64. package/lib/components/SankeyChart/SankeyChart.types.d.ts +7 -2
  65. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  66. package/lib/components/Sparkline/Sparkline.base.js.map +1 -1
  67. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  68. package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  69. package/lib/components/TreeChart/TreeChart.base.js.map +1 -1
  70. package/lib/components/VerticalBarChart/VerticalBarChart.base.d.ts +4 -1
  71. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +12 -2
  72. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  73. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +4 -1
  74. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +12 -2
  75. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  76. package/lib/index.d.ts +2 -2
  77. package/lib/index.js.map +1 -1
  78. package/lib/types/IDataPoint.d.ts +6 -0
  79. package/lib/types/IDataPoint.js.map +1 -1
  80. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  81. package/lib/utilities/SVGTooltipText.js.map +1 -1
  82. package/lib/utilities/colors.js +44 -44
  83. package/lib/utilities/colors.js.map +1 -1
  84. package/lib/utilities/gradients.js +27 -27
  85. package/lib/utilities/gradients.js.map +1 -1
  86. package/lib/utilities/locale-util.js.map +1 -1
  87. package/lib/utilities/utilities.js.map +1 -1
  88. package/lib/utilities/vbc-utils.js.map +1 -1
  89. package/lib-amd/DeclarativeChart.d.ts +1 -1
  90. package/lib-amd/DeclarativeChart.js +2 -2
  91. package/lib-amd/DeclarativeChart.js.map +1 -1
  92. package/lib-amd/components/AreaChart/AreaChart.base.d.ts +4 -1
  93. package/lib-amd/components/AreaChart/AreaChart.base.js +11 -1
  94. package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
  95. package/lib-amd/components/CommonComponents/CartesianChart.base.d.ts +3 -2
  96. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  97. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +11 -2
  98. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  99. package/lib-amd/components/DeclarativeChart/DeclarativeChart.d.ts +13 -1
  100. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +31 -24
  101. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  102. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +25 -29
  103. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  104. package/lib-amd/components/DeclarativeChart/imageExporter.d.ts +10 -0
  105. package/lib-amd/components/DeclarativeChart/imageExporter.js +227 -0
  106. package/lib-amd/components/DeclarativeChart/imageExporter.js.map +1 -0
  107. package/lib-amd/components/DeclarativeChart/index.d.ts +2 -0
  108. package/lib-amd/components/DeclarativeChart/index.js +6 -0
  109. package/lib-amd/components/DeclarativeChart/index.js.map +1 -0
  110. package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
  111. package/lib-amd/components/DonutChart/DonutChart.base.d.ts +3 -1
  112. package/lib-amd/components/DonutChart/DonutChart.base.js +8 -0
  113. package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
  114. package/lib-amd/components/DonutChart/DonutChart.types.d.ts +7 -2
  115. package/lib-amd/components/DonutChart/DonutChart.types.js.map +1 -1
  116. package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -1
  117. package/lib-amd/components/GaugeChart/GaugeChart.base.d.ts +3 -1
  118. package/lib-amd/components/GaugeChart/GaugeChart.base.js +8 -0
  119. package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
  120. package/lib-amd/components/GaugeChart/GaugeChart.types.d.ts +7 -2
  121. package/lib-amd/components/GaugeChart/GaugeChart.types.js.map +1 -1
  122. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +4 -1
  123. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +11 -1
  124. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  125. package/lib-amd/components/HeatMapChart/HeatMapChart.base.d.ts +4 -2
  126. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +11 -1
  127. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  128. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  129. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +4 -2
  130. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +11 -1
  131. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  132. package/lib-amd/components/Legends/Legends.base.js.map +1 -1
  133. package/lib-amd/components/Legends/shape.js.map +1 -1
  134. package/lib-amd/components/LineChart/LineChart.base.d.ts +4 -1
  135. package/lib-amd/components/LineChart/LineChart.base.js +11 -1
  136. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  137. package/lib-amd/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  138. package/lib-amd/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  139. package/lib-amd/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  140. package/lib-amd/components/PieChart/Arc/Arc.js.map +1 -1
  141. package/lib-amd/components/PieChart/Pie/Pie.js.map +1 -1
  142. package/lib-amd/components/PieChart/PieChart.base.js.map +1 -1
  143. package/lib-amd/components/SankeyChart/SankeyChart.base.d.ts +3 -3
  144. package/lib-amd/components/SankeyChart/SankeyChart.base.js +2 -1
  145. package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
  146. package/lib-amd/components/SankeyChart/SankeyChart.types.d.ts +7 -2
  147. package/lib-amd/components/SankeyChart/SankeyChart.types.js.map +1 -1
  148. package/lib-amd/components/Sparkline/Sparkline.base.js.map +1 -1
  149. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  150. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  151. package/lib-amd/components/TreeChart/TreeChart.base.js.map +1 -1
  152. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.d.ts +4 -1
  153. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +11 -1
  154. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  155. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +4 -1
  156. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +11 -1
  157. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  158. package/lib-amd/index.d.ts +2 -2
  159. package/lib-amd/index.js.map +1 -1
  160. package/lib-amd/types/IDataPoint.d.ts +6 -0
  161. package/lib-amd/types/IDataPoint.js.map +1 -1
  162. package/lib-amd/utilities/FocusableTooltipText.js.map +1 -1
  163. package/lib-amd/utilities/SVGTooltipText.js.map +1 -1
  164. package/lib-amd/utilities/colors.js +44 -44
  165. package/lib-amd/utilities/colors.js.map +1 -1
  166. package/lib-amd/utilities/gradients.js +27 -27
  167. package/lib-amd/utilities/gradients.js.map +1 -1
  168. package/lib-amd/utilities/locale-util.js.map +1 -1
  169. package/lib-amd/utilities/utilities.js.map +1 -1
  170. package/lib-amd/utilities/vbc-utils.js.map +1 -1
  171. package/lib-commonjs/DeclarativeChart.d.ts +1 -1
  172. package/lib-commonjs/DeclarativeChart.js +1 -1
  173. package/lib-commonjs/DeclarativeChart.js.map +1 -1
  174. package/lib-commonjs/components/AreaChart/AreaChart.base.d.ts +4 -1
  175. package/lib-commonjs/components/AreaChart/AreaChart.base.js +11 -1
  176. package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
  177. package/lib-commonjs/components/CommonComponents/CartesianChart.base.d.ts +3 -2
  178. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  179. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +11 -2
  180. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  181. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.d.ts +13 -1
  182. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +32 -24
  183. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  184. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +25 -29
  185. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  186. package/lib-commonjs/components/DeclarativeChart/imageExporter.d.ts +10 -0
  187. package/lib-commonjs/components/DeclarativeChart/imageExporter.js +226 -0
  188. package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -0
  189. package/lib-commonjs/components/DeclarativeChart/index.d.ts +2 -0
  190. package/lib-commonjs/components/DeclarativeChart/index.js +5 -0
  191. package/lib-commonjs/components/DeclarativeChart/index.js.map +1 -0
  192. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  193. package/lib-commonjs/components/DonutChart/DonutChart.base.d.ts +3 -1
  194. package/lib-commonjs/components/DonutChart/DonutChart.base.js +8 -0
  195. package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
  196. package/lib-commonjs/components/DonutChart/DonutChart.types.d.ts +7 -2
  197. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  198. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  199. package/lib-commonjs/components/GaugeChart/GaugeChart.base.d.ts +3 -1
  200. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +8 -0
  201. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
  202. package/lib-commonjs/components/GaugeChart/GaugeChart.types.d.ts +7 -2
  203. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  204. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +4 -1
  205. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +11 -1
  206. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  207. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.d.ts +4 -2
  208. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +11 -1
  209. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  210. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  211. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +4 -2
  212. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +11 -1
  213. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  214. package/lib-commonjs/components/Legends/Legends.base.js.map +1 -1
  215. package/lib-commonjs/components/Legends/shape.js.map +1 -1
  216. package/lib-commonjs/components/LineChart/LineChart.base.d.ts +4 -1
  217. package/lib-commonjs/components/LineChart/LineChart.base.js +11 -1
  218. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  219. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  220. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  221. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  222. package/lib-commonjs/components/PieChart/Arc/Arc.js.map +1 -1
  223. package/lib-commonjs/components/PieChart/Pie/Pie.js.map +1 -1
  224. package/lib-commonjs/components/PieChart/PieChart.base.js.map +1 -1
  225. package/lib-commonjs/components/SankeyChart/SankeyChart.base.d.ts +3 -3
  226. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js +2 -1
  227. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
  228. package/lib-commonjs/components/SankeyChart/SankeyChart.types.d.ts +7 -2
  229. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  230. package/lib-commonjs/components/Sparkline/Sparkline.base.js.map +1 -1
  231. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  232. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  233. package/lib-commonjs/components/TreeChart/TreeChart.base.js.map +1 -1
  234. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.d.ts +4 -1
  235. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +11 -1
  236. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  237. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +4 -1
  238. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +11 -1
  239. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  240. package/lib-commonjs/index.d.ts +2 -2
  241. package/lib-commonjs/index.js.map +1 -1
  242. package/lib-commonjs/types/IDataPoint.d.ts +6 -0
  243. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  244. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
  245. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  246. package/lib-commonjs/utilities/colors.js +44 -44
  247. package/lib-commonjs/utilities/colors.js.map +1 -1
  248. package/lib-commonjs/utilities/gradients.js +27 -27
  249. package/lib-commonjs/utilities/gradients.js.map +1 -1
  250. package/lib-commonjs/utilities/locale-util.js.map +1 -1
  251. package/lib-commonjs/utilities/utilities.js.map +1 -1
  252. package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
  253. package/package.json +4 -4
  254. package/src/components/CommonComponents/CartesianChart.types.ts +13 -1
  255. package/src/components/DonutChart/DonutChart.types.ts +8 -2
  256. package/src/components/GaugeChart/GaugeChart.types.ts +8 -2
  257. package/src/components/SankeyChart/SankeyChart.types.ts +8 -2
@@ -1 +1 @@
1
- {"version":3,"file":"Legends.base.js","sourceRoot":"../src/","sources":["components/Legends/Legends.base.tsx"],"names":[],"mappings":";;;;IAmBA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAqC,CAAC;IAuB9E;QAAiC,uCAA4C;QA8B3E,qBAAmB,KAAoB;;;YAAvC,YACE,kBAAM,KAAK,CAAC,SAsBb;YAlDD,oEAAoE;YAC5D,uBAAiB,GAAG,KAAK,CAAC;YAyG1B,mBAAa,GAAG,UAAC,IAAiD;gBAClE,IAAA,KAAkF,KAAI,CAAC,KAAK,EAA1F,aAAa,mBAAA,EAAE,2BAA0B,EAA1B,mBAAmB,mBAAG,IAAI,KAAA,EAAE,gCAAgC,EAAhC,wBAAwB,mBAAG,KAAK,KAAe,CAAC;gBACnG,IAAM,UAAU,GAAG;oBACjB,IAAI,EAAE;wBACJ,cAAc,EAAE,KAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO;wBAC7D,QAAQ,EAAE,MAAM;qBACjB;iBACF,CAAC;gBACF,OAAO,CACL,oBAAC,uBAAS,uBACJ,CAAC,mBAAmB,IAAI;oBAC1B,IAAI,EAAE,SAAS;oBACf,YAAY,EAAE,SAAS;oBACvB,sBAAsB,EAAE,wBAAwB;iBACjD,CAAC;oBAEF,oBAAC,yBAAW,qBACV,KAAK,EAAE,IAAI,CAAC,OAAO,EACnB,aAAa,EAAE,IAAI,CAAC,QAAQ,EAC5B,YAAY,EAAE,KAAI,CAAC,aAAa,EAChC,sBAAsB,EAAE,K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;YACD,2BAA2B;iBACtB;gBACH,iCAAiC;gBACjC,oCAAoC;gBACpC,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,KAAK,EAAE,EAAE;oBACvE,WAAW,GAAG,KAAK,CAAC;iBACrB;gBACD,mEAAmE;qBAC9D;oBACH,WAAW,GAAG,KAAM,CAAC,cAAc,CAAC,gBAAgB,CAAC;iBACtD;aACF;YACD,OAAO,WAAW,CAAC;QACrB,CAAC;QACH,kBAAC;IAAD,CAAC,AApaD,CAAiC,KAAK,CAAC,SAAS,GAoa/C;IApaY,kCAAW","sourcesContent":["import * as React from 'react';\n\nimport { IContextualMenuItem } from '@fluentui/react/lib/ContextualMenu';\nimport { HoverCard, HoverCardType, IExpandingCardProps } from '@fluentui/react/lib/HoverCard';\nimport { classNamesFunction, find, getNativeProps, buttonProperties } from '@fluentui/react/lib/Utilities';\nimport { ResizeGroup } from '@fluentui/react/lib/ResizeGroup';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { OverflowSet, IOverflowSetItemProps } from '@fluentui/react/lib/OverflowSet';\nimport { FocusZone, FocusZoneDirection, FocusZoneTabbableElements } from '@fluentui/react-focus';\nimport {\n ILegend,\n ILegendsProps,\n LegendShape,\n ILegendsStyles,\n ILegendStyleProps,\n ILegendOverflowData,\n} from './Legends.types';\nimport { Shape } from './shape';\n\nconst getClassNames = classNamesFunction<ILegendStyleProps, ILegendsStyles>();\n\n// This is an internal interface used for rendering the legends with unique key\ninterface ILegendItem extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n name?: string;\n title: string;\n action: VoidFunction;\n hoverAction: VoidFunction;\n onMouseOutAction: VoidFunction;\n color: string;\n shape?: LegendShape;\n key: number;\n opacity?: number;\n stripePattern?: boolean;\n isLineLegendInBarChart?: boolean;\n}\n\nexport interface ILegendState {\n activeLegend: string;\n isHoverCardVisible: boolean;\n /** Set of legends selected, both for multiple selection and single selection */\n selectedLegends: { [key: string]: boolean };\n}\nexport class LegendsBase extends React.Component<ILegendsProps, ILegendState> {\n private _hoverCardRef: HTMLDivElement;\n private _classNames: IProcessedStyleSet<ILegendsStyles>;\n /** Boolean variable to check if one or more legends are selected */\n private _isLegendSelected = false;\n\n public static getDerivedStateFromProps(newProps: ILegendsProps, prevState: ILegendState): ILegendState {\n const { selectedLegend, selectedLegends } = newProps;\n\n if (newProps.canSelectMultipleLegends && selectedLegends !== undefined) {\n return {\n ...prevState,\n selectedLegends: selectedLegends.reduce(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (combinedDict: any, key: any) => ({ [key]: true, ...combinedDict }),\n {},\n ),\n };\n }\n\n if (!newProps.canSelectMultipleLegends && selectedLegend !== undefined) {\n return {\n ...prevState,\n selectedLegends: { [selectedLegend]: true },\n };\n }\n\n return prevState;\n }\n\n public constructor(props: ILegendsProps) {\n super(props);\n //let defaultSelectedLegends = {};\n const initialSelectedLegends = props.selectedLegends ?? props.defaultSelectedLegends;\n const initialSelectedLegend = props.selectedLegend ?? props.defaultSelectedLegend;\n let selectedLegendsState = {};\n\n if (props.canSelectMultipleLegends) {\n selectedLegendsState =\n (initialSelectedLegends ?? [])?.reduce(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (combineDict: any, key: any) => ({ [key]: true, ...combineDict }),\n {},\n ) || {};\n } else if (initialSelectedLegend) {\n selectedLegendsState = { [initialSelectedLegend]: true };\n }\n\n this.state = {\n activeLegend: '',\n isHoverCardVisible: false,\n selectedLegends: selectedLegendsState,\n };\n }\n\n public render(): JSX.Element {\n const { theme, className, styles } = this.props;\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n this._isLegendSelected = Object.keys(this.state.selectedLegends).length > 0;\n const dataToRender = this._generateData();\n return (\n <div className={this._classNames.root}>\n {this.props.enabledWrapLines ? (\n this._onRenderData(dataToRender)\n ) : (\n <ResizeGroup\n data={dataToRender}\n onReduceData={this._onReduceData}\n onRenderData={this._onRenderData}\n onGrowData={this._onGrowData}\n />\n )}\n </div>\n );\n }\n\n private _generateData(): ILegendOverflowData {\n const { allowFocusOnLegends = true, shape } = this.props;\n const dataItems: ILegendItem[] = this.props.legends.map((legend: ILegend, index: number) => {\n return {\n ...(allowFocusOnLegends && {\n nativeButtonProps: getNativeProps<React.HTMLAttributes<HTMLButtonElement>>(legend, buttonProperties, [\n 'title',\n ]),\n 'aria-setsize': this.props.legends.length,\n 'aria-posinset': index + 1,\n }),\n title: legend.title,\n action: legend.action!,\n hoverAction: legend.hoverAction!,\n onMouseOutAction: legend.onMouseOutAction!,\n color: legend.color,\n shape: shape ? shape : legend.shape,\n stripePattern: legend.stripePattern,\n isLineLegendInBarChart: legend.isLineLegendInBarChart,\n opacity: legend.opacity,\n key: index,\n };\n });\n const result: ILegendOverflowData = {\n primary: dataItems,\n overflow: [],\n };\n return result;\n }\n\n private _onRenderData = (data: IOverflowSetItemProps | ILegendOverflowData): JSX.Element => {\n const { overflowProps, allowFocusOnLegends = true, canSelectMultipleLegends = false } = this.props;\n const rootStyles = {\n root: {\n justifyContent: this.props.centerLegends ? 'center' : 'unset',\n flexWrap: 'wrap',\n },\n };\n return (\n <FocusZone\n {...(allowFocusOnLegends && {\n role: 'listbox',\n 'aria-label': 'Legends',\n 'aria-multiselectable': canSelectMultipleLegends,\n })}\n >\n <OverflowSet\n items={data.primary}\n overflowItems={data.overflow}\n onRenderItem={this._renderButton}\n onRenderOverflowButton={this._renderOverflowItems}\n {...overflowProps}\n styles={{ ...rootStyles, ...overflowProps?.styles }}\n />\n </FocusZone>\n );\n };\n\n private _onReduceData = (currentdata: IOverflowSetItemProps): {} | void => {\n if (currentdata.primary.length === 0) {\n return;\n }\n const overflow = [...currentdata.primary.slice(-1), ...currentdata.overflow];\n const primary = currentdata.primary.slice(0, -1);\n return { primary, overflow };\n };\n\n private _onGrowData = (currentdata: IOverflowSetItemProps): {} | void => {\n if (currentdata.overflow.length === 0) {\n return;\n }\n const overflow = currentdata.overflow.slice(1);\n const primary = [...currentdata.primary, ...currentdata.overflow.slice(0, 1)];\n return { primary, overflow };\n };\n\n /**\n * Get the new selected legends based on the legend that was clicked when multi-select is enabled.\n * @param legend The legend that was clicked\n * @returns An object with the new selected legend(s) state data.\n */\n private _getNewSelectedLegendsForMultiselect = (legend: ILegend): { [key: string]: boolean } => {\n let selectedLegends = { ...this.state.selectedLegends };\n if (selectedLegends[legend.title]) {\n // Delete entry for the deselected legend to make\n // the number of keys equal to the number of selected legends\n delete selectedLegends[legend.title];\n } else {\n selectedLegends[legend.title] = true;\n // Clear set if all legends are selected\n if (Object.keys(selectedLegends).length === this.props.legends.length) {\n selectedLegends = {};\n }\n }\n return selectedLegends;\n };\n\n /**\n * Get the new selected legends based on the legend that was clicked when single-select is enabled.\n * @param legend The legend that was clicked\n * @returns An object with the new selected legend state data.\n */\n\n private _getNewSelectedLegendsForSingleSelect = (legend: ILegend): { [key: string]: boolean } => {\n return this.state.selectedLegends[legend.title] ? {} : { [legend.title]: true };\n };\n\n private _onClick = (legend: ILegend, event: React.MouseEvent<HTMLButtonElement>): void => {\n const { canSelectMultipleLegends = false } = this.props;\n const nextSelectedLegends = canSelectMultipleLegends\n ? this._getNewSelectedLegendsForMultiselect(legend)\n : this._getNewSelectedLegendsForSingleSelect(legend);\n\n this.setState({ selectedLegends: nextSelectedLegends });\n this.props.onChange?.(Object.keys(nextSelectedLegends), event, legend);\n legend.action?.();\n };\n\n private _onRenderCompactCard = (expandingCard: IExpandingCardProps): JSX.Element => {\n const { allowFocusOnLegends = true, className, styles, theme, canSelectMultipleLegends = false } = this.props;\n const overflowHoverCardLegends: JSX.Element[] = [];\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n expandingCard.renderData.forEach((legend: IOverflowSetItemProps, index: number) => {\n const hoverCardElement = this._renderButton(legend, index, true);\n overflowHoverCardLegends.push(hoverCardElement);\n });\n const hoverCardData = (\n <FocusZone\n {...(allowFocusOnLegends && {\n role: 'listbox',\n 'aria-label': 'Legends',\n 'aria-multiselectable': canSelectMultipleLegends,\n })}\n direction={FocusZoneDirection.vertical}\n handleTabKey={FocusZoneTabbableElements.all}\n isCircularNavigation={true}\n {...this.props.focusZonePropsInHoverCard}\n className={classNames.hoverCardRoot}\n >\n {overflowHoverCardLegends}\n </FocusZone>\n );\n return hoverCardData;\n };\n\n private _renderOverflowItems = (legends: ILegend[]) => {\n const { allowFocusOnLegends = true } = this.props;\n const items: IContextualMenuItem[] = [];\n legends.forEach((legend: ILegend, i: number) => {\n items.push({ key: i.toString(), name: legend.title, onClick: legend.action });\n });\n const renderOverflowData: IExpandingCardProps = { renderData: legends };\n const { theme, className, styles, overflowText } = this.props;\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n const plainCardProps = {\n onRenderPlainCard: this._onRenderCompactCard,\n renderData: renderOverflowData,\n };\n\n const overflowString = overflowText ? overflowText : 'more';\n // execute similar to \"_onClick\" and \"_onLeave\" logic at HoverCard onCardHide event\n const onHoverCardHideHandler = () => {\n this.setState({ isHoverCardVisible: false });\n // Unhighlight the focused legend in the hover card\n const activeOverflowItem = find(legends, (legend: ILegend) => legend.title === this.state.activeLegend);\n if (activeOverflowItem) {\n this.setState({ activeLegend: '' });\n if (activeOverflowItem.onMouseOutAction) {\n activeOverflowItem.onMouseOutAction();\n }\n }\n };\n return (\n <HoverCard\n type={HoverCardType.plain}\n plainCardProps={plainCardProps}\n instantOpenOnClick={true}\n // eslint-disable-next-line react/jsx-no-bind\n onCardHide={onHoverCardHideHandler}\n setInitialFocus={true}\n trapFocus={true}\n onCardVisible={this._hoverCardVisible}\n styles={classNames.subComponentStyles.hoverCardStyles}\n cardDismissDelay={300}\n target={this._hoverCardRef}\n >\n {/* \"button\" role is not allowed as a child of parent role \"listbox\" */}\n <div role=\"option\">\n <div\n className={classNames.overflowIndicationTextStyle}\n ref={(rootElem: HTMLDivElement) => (this._hoverCardRef = rootElem)}\n {...(allowFocusOnLegends && {\n role: 'button',\n 'aria-expanded': this.state.isHoverCardVisible,\n 'aria-label': `${items.length} ${overflowString}`,\n })}\n data-is-focusable={allowFocusOnLegends}\n >\n {items.length} {overflowString}\n </div>\n </div>\n </HoverCard>\n );\n };\n\n private _hoverCardVisible = () => {\n this.setState({ isHoverCardVisible: true });\n };\n\n private _onHoverOverLegend = (legend: ILegend) => {\n if (legend.hoverAction) {\n this.setState({ activeLegend: legend.title });\n legend.hoverAction();\n }\n };\n\n private _onLeave = (legend: ILegend) => {\n if (legend.onMouseOutAction) {\n this.setState({ activeLegend: '' });\n legend.onMouseOutAction();\n }\n };\n\n private _renderButton = (data: IOverflowSetItemProps, index?: number, overflow?: boolean) => {\n const { allowFocusOnLegends = true } = this.props;\n const legend: ILegend = {\n title: data.title,\n color: data.color,\n shape: data.shape,\n action: data.action,\n hoverAction: data.hoverAction,\n onMouseOutAction: data.onMouseOutAction,\n stripePattern: data.stripePattern,\n isLineLegendInBarChart: data.isLineLegendInBarChart,\n opacity: data.opacity,\n };\n const color = this._getColor(legend.title, legend.color);\n const { theme, className, styles } = this.props;\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n colorOnSelectedState: color,\n borderColor: legend.color,\n overflow,\n stripePattern: legend.stripePattern,\n isLineLegendInBarChart: legend.isLineLegendInBarChart,\n opacity: legend.opacity,\n });\n const onClickHandler = (event: React.MouseEvent<HTMLButtonElement>) => {\n this._onClick(legend, event);\n };\n const onHoverHandler = () => {\n this._onHoverOverLegend(legend);\n };\n const onMouseOut = () => {\n this._onLeave(legend);\n };\n const shape = this._getShape(classNames, legend, color);\n return (\n <button\n {...(allowFocusOnLegends && {\n 'aria-selected': !!this.state.selectedLegends[legend.title],\n role: 'option',\n 'aria-label': `${legend.title}`,\n 'aria-setsize': data['aria-setsize'],\n 'aria-posinset': data['aria-posinset'],\n })}\n {...(data.nativeButtonProps && { ...data.nativeButtonProps })}\n key={index}\n className={classNames.legend}\n onClick={onClickHandler}\n onMouseOver={onHoverHandler}\n onMouseOut={onMouseOut}\n onFocus={onHoverHandler}\n onBlur={onMouseOut}\n data-is-focusable={allowFocusOnLegends}\n /* eslint-enable react/jsx-no-bind */\n >\n {shape}\n <div className={classNames.text}>{legend.title}</div>\n </button>\n );\n };\n\n private _getShape(\n classNames: IProcessedStyleSet<ILegendsStyles>,\n legend: ILegend,\n color: string,\n ): React.ReactNode | string {\n const svgParentProps: React.SVGAttributes<SVGElement> = {\n className: classNames.shape,\n };\n const svgChildProps: React.SVGAttributes<SVGElement> = {\n fill: color,\n strokeWidth: 2,\n stroke: legend.color,\n };\n return (\n <Shape\n svgProps={svgParentProps}\n pathProps={svgChildProps}\n shape={legend.shape as LegendShape}\n classNameForNonSvg={classNames.rect}\n />\n );\n }\n\n private _getColor(title: string, color: string): string {\n const { theme } = this.props;\n let legendColor = color;\n // if one or more legends are selected\n if (this._isLegendSelected) {\n // if the given legend (title) is one of the selected legends\n if (this.state.selectedLegends[title]) {\n legendColor = color;\n }\n // if the given legend is unselected\n else {\n legendColor = theme!.semanticColors.buttonBackground;\n }\n }\n // if no legend is selected\n else {\n // if the given legend is hovered\n // or none of the legends is hovered\n if (this.state.activeLegend === title || this.state.activeLegend === '') {\n legendColor = color;\n }\n // if there is a hovered legend but the given legend is not the one\n else {\n legendColor = theme!.semanticColors.buttonBackground;\n }\n }\n return legendColor;\n }\n}\n"]}
1
+ {"version":3,"file":"Legends.base.js","sourceRoot":"../src/","sources":["components/Legends/Legends.base.tsx"],"names":[],"mappings":";;;;IAmBA,IAAM,aAAa,GAAG,IAAA,8BAAkB,GAAqC,CAAC;IAuB9E;QAAiC,uCAA4C;QA8B3E,qBAAmB,KAAoB;;;YACrC,YAAA,MAAK,YAAC,KAAK,CAAC,SAAC;YA5Bf,oEAAoE;YAC5D,uBAAiB,GAAG,KAAK,CAAC;YAyG1B,mBAAa,GAAG,UAAC,IAAiD;gBAClE,IAAA,KAAkF,KAAI,CAAC,KAAK,EAA1F,aAAa,mBAAA,EAAE,2BAA0B,EAA1B,mBAAmB,mBA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import { IContextualMenuItem } from '@fluentui/react/lib/ContextualMenu';\nimport { HoverCard, HoverCardType, IExpandingCardProps } from '@fluentui/react/lib/HoverCard';\nimport { classNamesFunction, find, getNativeProps, buttonProperties } from '@fluentui/react/lib/Utilities';\nimport { ResizeGroup } from '@fluentui/react/lib/ResizeGroup';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { OverflowSet, IOverflowSetItemProps } from '@fluentui/react/lib/OverflowSet';\nimport { FocusZone, FocusZoneDirection, FocusZoneTabbableElements } from '@fluentui/react-focus';\nimport {\n ILegend,\n ILegendsProps,\n LegendShape,\n ILegendsStyles,\n ILegendStyleProps,\n ILegendOverflowData,\n} from './Legends.types';\nimport { Shape } from './shape';\n\nconst getClassNames = classNamesFunction<ILegendStyleProps, ILegendsStyles>();\n\n// This is an internal interface used for rendering the legends with unique key\ninterface ILegendItem extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n name?: string;\n title: string;\n action: VoidFunction;\n hoverAction: VoidFunction;\n onMouseOutAction: VoidFunction;\n color: string;\n shape?: LegendShape;\n key: number;\n opacity?: number;\n stripePattern?: boolean;\n isLineLegendInBarChart?: boolean;\n}\n\nexport interface ILegendState {\n activeLegend: string;\n isHoverCardVisible: boolean;\n /** Set of legends selected, both for multiple selection and single selection */\n selectedLegends: { [key: string]: boolean };\n}\nexport class LegendsBase extends React.Component<ILegendsProps, ILegendState> {\n private _hoverCardRef: HTMLDivElement;\n private _classNames: IProcessedStyleSet<ILegendsStyles>;\n /** Boolean variable to check if one or more legends are selected */\n private _isLegendSelected = false;\n\n public static getDerivedStateFromProps(newProps: ILegendsProps, prevState: ILegendState): ILegendState {\n const { selectedLegend, selectedLegends } = newProps;\n\n if (newProps.canSelectMultipleLegends && selectedLegends !== undefined) {\n return {\n ...prevState,\n selectedLegends: selectedLegends.reduce(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (combinedDict: any, key: any) => ({ [key]: true, ...combinedDict }),\n {},\n ),\n };\n }\n\n if (!newProps.canSelectMultipleLegends && selectedLegend !== undefined) {\n return {\n ...prevState,\n selectedLegends: { [selectedLegend]: true },\n };\n }\n\n return prevState;\n }\n\n public constructor(props: ILegendsProps) {\n super(props);\n //let defaultSelectedLegends = {};\n const initialSelectedLegends = props.selectedLegends ?? props.defaultSelectedLegends;\n const initialSelectedLegend = props.selectedLegend ?? props.defaultSelectedLegend;\n let selectedLegendsState = {};\n\n if (props.canSelectMultipleLegends) {\n selectedLegendsState =\n (initialSelectedLegends ?? [])?.reduce(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (combineDict: any, key: any) => ({ [key]: true, ...combineDict }),\n {},\n ) || {};\n } else if (initialSelectedLegend) {\n selectedLegendsState = { [initialSelectedLegend]: true };\n }\n\n this.state = {\n activeLegend: '',\n isHoverCardVisible: false,\n selectedLegends: selectedLegendsState,\n };\n }\n\n public render(): JSX.Element {\n const { theme, className, styles } = this.props;\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n this._isLegendSelected = Object.keys(this.state.selectedLegends).length > 0;\n const dataToRender = this._generateData();\n return (\n <div className={this._classNames.root}>\n {this.props.enabledWrapLines ? (\n this._onRenderData(dataToRender)\n ) : (\n <ResizeGroup\n data={dataToRender}\n onReduceData={this._onReduceData}\n onRenderData={this._onRenderData}\n onGrowData={this._onGrowData}\n />\n )}\n </div>\n );\n }\n\n private _generateData(): ILegendOverflowData {\n const { allowFocusOnLegends = true, shape } = this.props;\n const dataItems: ILegendItem[] = this.props.legends.map((legend: ILegend, index: number) => {\n return {\n ...(allowFocusOnLegends && {\n nativeButtonProps: getNativeProps<React.HTMLAttributes<HTMLButtonElement>>(legend, buttonProperties, [\n 'title',\n ]),\n 'aria-setsize': this.props.legends.length,\n 'aria-posinset': index + 1,\n }),\n title: legend.title,\n action: legend.action!,\n hoverAction: legend.hoverAction!,\n onMouseOutAction: legend.onMouseOutAction!,\n color: legend.color,\n shape: shape ? shape : legend.shape,\n stripePattern: legend.stripePattern,\n isLineLegendInBarChart: legend.isLineLegendInBarChart,\n opacity: legend.opacity,\n key: index,\n };\n });\n const result: ILegendOverflowData = {\n primary: dataItems,\n overflow: [],\n };\n return result;\n }\n\n private _onRenderData = (data: IOverflowSetItemProps | ILegendOverflowData): JSX.Element => {\n const { overflowProps, allowFocusOnLegends = true, canSelectMultipleLegends = false } = this.props;\n const rootStyles = {\n root: {\n justifyContent: this.props.centerLegends ? 'center' : 'unset',\n flexWrap: 'wrap',\n },\n };\n return (\n <FocusZone\n {...(allowFocusOnLegends && {\n role: 'listbox',\n 'aria-label': 'Legends',\n 'aria-multiselectable': canSelectMultipleLegends,\n })}\n >\n <OverflowSet\n items={data.primary}\n overflowItems={data.overflow}\n onRenderItem={this._renderButton}\n onRenderOverflowButton={this._renderOverflowItems}\n {...overflowProps}\n styles={{ ...rootStyles, ...overflowProps?.styles }}\n />\n </FocusZone>\n );\n };\n\n private _onReduceData = (currentdata: IOverflowSetItemProps): {} | void => {\n if (currentdata.primary.length === 0) {\n return;\n }\n const overflow = [...currentdata.primary.slice(-1), ...currentdata.overflow];\n const primary = currentdata.primary.slice(0, -1);\n return { primary, overflow };\n };\n\n private _onGrowData = (currentdata: IOverflowSetItemProps): {} | void => {\n if (currentdata.overflow.length === 0) {\n return;\n }\n const overflow = currentdata.overflow.slice(1);\n const primary = [...currentdata.primary, ...currentdata.overflow.slice(0, 1)];\n return { primary, overflow };\n };\n\n /**\n * Get the new selected legends based on the legend that was clicked when multi-select is enabled.\n * @param legend The legend that was clicked\n * @returns An object with the new selected legend(s) state data.\n */\n private _getNewSelectedLegendsForMultiselect = (legend: ILegend): { [key: string]: boolean } => {\n let selectedLegends = { ...this.state.selectedLegends };\n if (selectedLegends[legend.title]) {\n // Delete entry for the deselected legend to make\n // the number of keys equal to the number of selected legends\n delete selectedLegends[legend.title];\n } else {\n selectedLegends[legend.title] = true;\n // Clear set if all legends are selected\n if (Object.keys(selectedLegends).length === this.props.legends.length) {\n selectedLegends = {};\n }\n }\n return selectedLegends;\n };\n\n /**\n * Get the new selected legends based on the legend that was clicked when single-select is enabled.\n * @param legend The legend that was clicked\n * @returns An object with the new selected legend state data.\n */\n\n private _getNewSelectedLegendsForSingleSelect = (legend: ILegend): { [key: string]: boolean } => {\n return this.state.selectedLegends[legend.title] ? {} : { [legend.title]: true };\n };\n\n private _onClick = (legend: ILegend, event: React.MouseEvent<HTMLButtonElement>): void => {\n const { canSelectMultipleLegends = false } = this.props;\n const nextSelectedLegends = canSelectMultipleLegends\n ? this._getNewSelectedLegendsForMultiselect(legend)\n : this._getNewSelectedLegendsForSingleSelect(legend);\n\n this.setState({ selectedLegends: nextSelectedLegends });\n this.props.onChange?.(Object.keys(nextSelectedLegends), event, legend);\n legend.action?.();\n };\n\n private _onRenderCompactCard = (expandingCard: IExpandingCardProps): JSX.Element => {\n const { allowFocusOnLegends = true, className, styles, theme, canSelectMultipleLegends = false } = this.props;\n const overflowHoverCardLegends: JSX.Element[] = [];\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n expandingCard.renderData.forEach((legend: IOverflowSetItemProps, index: number) => {\n const hoverCardElement = this._renderButton(legend, index, true);\n overflowHoverCardLegends.push(hoverCardElement);\n });\n const hoverCardData = (\n <FocusZone\n {...(allowFocusOnLegends && {\n role: 'listbox',\n 'aria-label': 'Legends',\n 'aria-multiselectable': canSelectMultipleLegends,\n })}\n direction={FocusZoneDirection.vertical}\n handleTabKey={FocusZoneTabbableElements.all}\n isCircularNavigation={true}\n {...this.props.focusZonePropsInHoverCard}\n className={classNames.hoverCardRoot}\n >\n {overflowHoverCardLegends}\n </FocusZone>\n );\n return hoverCardData;\n };\n\n private _renderOverflowItems = (legends: ILegend[]) => {\n const { allowFocusOnLegends = true } = this.props;\n const items: IContextualMenuItem[] = [];\n legends.forEach((legend: ILegend, i: number) => {\n items.push({ key: i.toString(), name: legend.title, onClick: legend.action });\n });\n const renderOverflowData: IExpandingCardProps = { renderData: legends };\n const { theme, className, styles, overflowText } = this.props;\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n const plainCardProps = {\n onRenderPlainCard: this._onRenderCompactCard,\n renderData: renderOverflowData,\n };\n\n const overflowString = overflowText ? overflowText : 'more';\n // execute similar to \"_onClick\" and \"_onLeave\" logic at HoverCard onCardHide event\n const onHoverCardHideHandler = () => {\n this.setState({ isHoverCardVisible: false });\n // Unhighlight the focused legend in the hover card\n const activeOverflowItem = find(legends, (legend: ILegend) => legend.title === this.state.activeLegend);\n if (activeOverflowItem) {\n this.setState({ activeLegend: '' });\n if (activeOverflowItem.onMouseOutAction) {\n activeOverflowItem.onMouseOutAction();\n }\n }\n };\n return (\n <HoverCard\n type={HoverCardType.plain}\n plainCardProps={plainCardProps}\n instantOpenOnClick={true}\n // eslint-disable-next-line react/jsx-no-bind\n onCardHide={onHoverCardHideHandler}\n setInitialFocus={true}\n trapFocus={true}\n onCardVisible={this._hoverCardVisible}\n styles={classNames.subComponentStyles.hoverCardStyles}\n cardDismissDelay={300}\n target={this._hoverCardRef}\n >\n {/* \"button\" role is not allowed as a child of parent role \"listbox\" */}\n <div role=\"option\">\n <div\n className={classNames.overflowIndicationTextStyle}\n ref={(rootElem: HTMLDivElement) => (this._hoverCardRef = rootElem)}\n {...(allowFocusOnLegends && {\n role: 'button',\n 'aria-expanded': this.state.isHoverCardVisible,\n 'aria-label': `${items.length} ${overflowString}`,\n })}\n data-is-focusable={allowFocusOnLegends}\n >\n {items.length} {overflowString}\n </div>\n </div>\n </HoverCard>\n );\n };\n\n private _hoverCardVisible = () => {\n this.setState({ isHoverCardVisible: true });\n };\n\n private _onHoverOverLegend = (legend: ILegend) => {\n if (legend.hoverAction) {\n this.setState({ activeLegend: legend.title });\n legend.hoverAction();\n }\n };\n\n private _onLeave = (legend: ILegend) => {\n if (legend.onMouseOutAction) {\n this.setState({ activeLegend: '' });\n legend.onMouseOutAction();\n }\n };\n\n private _renderButton = (data: IOverflowSetItemProps, index?: number, overflow?: boolean) => {\n const { allowFocusOnLegends = true } = this.props;\n const legend: ILegend = {\n title: data.title,\n color: data.color,\n shape: data.shape,\n action: data.action,\n hoverAction: data.hoverAction,\n onMouseOutAction: data.onMouseOutAction,\n stripePattern: data.stripePattern,\n isLineLegendInBarChart: data.isLineLegendInBarChart,\n opacity: data.opacity,\n };\n const color = this._getColor(legend.title, legend.color);\n const { theme, className, styles } = this.props;\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n colorOnSelectedState: color,\n borderColor: legend.color,\n overflow,\n stripePattern: legend.stripePattern,\n isLineLegendInBarChart: legend.isLineLegendInBarChart,\n opacity: legend.opacity,\n });\n const onClickHandler = (event: React.MouseEvent<HTMLButtonElement>) => {\n this._onClick(legend, event);\n };\n const onHoverHandler = () => {\n this._onHoverOverLegend(legend);\n };\n const onMouseOut = () => {\n this._onLeave(legend);\n };\n const shape = this._getShape(classNames, legend, color);\n return (\n <button\n {...(allowFocusOnLegends && {\n 'aria-selected': !!this.state.selectedLegends[legend.title],\n role: 'option',\n 'aria-label': `${legend.title}`,\n 'aria-setsize': data['aria-setsize'],\n 'aria-posinset': data['aria-posinset'],\n })}\n {...(data.nativeButtonProps && { ...data.nativeButtonProps })}\n key={index}\n className={classNames.legend}\n onClick={onClickHandler}\n onMouseOver={onHoverHandler}\n onMouseOut={onMouseOut}\n onFocus={onHoverHandler}\n onBlur={onMouseOut}\n data-is-focusable={allowFocusOnLegends}\n /* eslint-enable react/jsx-no-bind */\n >\n {shape}\n <div className={classNames.text}>{legend.title}</div>\n </button>\n );\n };\n\n private _getShape(\n classNames: IProcessedStyleSet<ILegendsStyles>,\n legend: ILegend,\n color: string,\n ): React.ReactNode | string {\n const svgParentProps: React.SVGAttributes<SVGElement> = {\n className: classNames.shape,\n };\n const svgChildProps: React.SVGAttributes<SVGElement> = {\n fill: color,\n strokeWidth: 2,\n stroke: legend.color,\n };\n return (\n <Shape\n svgProps={svgParentProps}\n pathProps={svgChildProps}\n shape={legend.shape as LegendShape}\n classNameForNonSvg={classNames.rect}\n />\n );\n }\n\n private _getColor(title: string, color: string): string {\n const { theme } = this.props;\n let legendColor = color;\n // if one or more legends are selected\n if (this._isLegendSelected) {\n // if the given legend (title) is one of the selected legends\n if (this.state.selectedLegends[title]) {\n legendColor = color;\n }\n // if the given legend is unselected\n else {\n legendColor = theme!.semanticColors.buttonBackground;\n }\n }\n // if no legend is selected\n else {\n // if the given legend is hovered\n // or none of the legends is hovered\n if (this.state.activeLegend === title || this.state.activeLegend === '') {\n legendColor = color;\n }\n // if there is a hovered legend but the given legend is not the one\n else {\n legendColor = theme!.semanticColors.buttonBackground;\n }\n }\n return legendColor;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"shape.js","sourceRoot":"../src/","sources":["components/Legends/shape.tsx"],"names":[],"mappings":";;;;;IAeA,IAAM,SAAS;QACb,GAAC,UAAG,kBAAM,CAAC,kBAAM,CAAC,MAAM,CAAC,CAAE,IAAG,6CAA6C;QAC3E,GAAC,UAAG,kBAAM,CAAC,kBAAM,CAAC,MAAM,CAAC,CAAE,IAAG,iCAAiC;QAC/D,GAAC,UAAG,kBAAM,CAAC,kBAAM,CAAC,QAAQ,CAAC,CAAE,IAAG,2CAA2C;QAC3E,GAAC,UAAG,kBAAM,CAAC,kBAAM,CAAC,OAAO,CAAC,CAAE,IAAG,2CAA2C;QAC1E,GAAC,UAAG,kBAAM,CAAC,kBAAM,CAAC,OAAO,CAAC,CAAE,IAAG,iCAAiC;QAChE,GAAC,UAAG,kBAAM,CAAC,kBAAM,CAAC,OAAO,CAAC,CAAE,IAAG,6BAA6B;QAC5D,GAAC,UAAG,kBAAM,CAAC,kBAAM,CAAC,QAAQ,CAAC,CAAE,IAAG,+DAA+D;QAC/F,GAAC,UAAG,kBAAM,CAAC,kBAAM,CAAC,OAAO,CAAC,CAAE,IAC1B,uFAAuF;QACzF,GAAC,UAAG,wBAAY,CAAC,wBAAY,CAAC,UAAU,CAAC,CAAE,IAAG,2BAA2B;WAC1E,CAAC;IAEK,IAAM,KAAK,GAA0B,UAAC,EAAkD;YAAhD,QAAQ,cAAA,EAAE,SAAS,eAAA,EAAE,KAAK,WAAA,EAAE,kBAAkB,wBAAA;QAC3F,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE;YAChD,OAAO,6BAAK,SAAS,EAAE,kBAAkB,GAAI,CAAC;SAC/C;QACD,OAAO,CACL,8CACE,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,OAAO,EAAE,aAAa,IAClB,IAAA,0BAAc,EAAC,QAAQ,CAAC,IAC5B,SAAS,EAAE,iBAAU,KAAK,KAAK,kBAAM,CAAC,kBAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,kBAAM,CAAC,kBAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAS;YAEhH,+CAAM,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,IAAM,IAAA,0BAAc,EAAC,SAAS,CAAC,EAAI,CACxD,CACP,CAAC;IACJ,CAAC,CAAC;IAfW,QAAA,KAAK,SAehB","sourcesContent":["import * as React from 'react';\nimport { LegendShape } from './Legends.types';\nimport { CustomPoints, getSecureProps, Points } from '../../utilities/utilities';\n\nexport interface IShapeProps {\n svgProps: React.SVGAttributes<SVGElement>;\n pathProps: React.SVGAttributes<SVGPathElement>;\n shape: LegendShape;\n classNameForNonSvg?: string;\n}\n\ntype PointPathType = {\n [key: string]: string;\n};\n\nconst pointPath: PointPathType = {\n [`${Points[Points.circle]}`]: 'M1 6 A5 5 0 1 0 12 6 M1 6 A5 5 0 0 1 12 6',\n [`${Points[Points.square]}`]: 'M1 1 L12 1 L12 12 L1 12 L1 1 Z',\n [`${Points[Points.triangle]}`]: 'M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z',\n [`${Points[Points.pyramid]}`]: 'M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z',\n [`${Points[Points.diamond]}`]: 'M2 2 L10 2 L10 10 L2 10 L2 2 Z',\n [`${Points[Points.hexagon]}`]: 'M9 0H3L0 5L3 10H9L12 5L9 0Z',\n [`${Points[Points.pentagon]}`]: 'M6.06061 0L0 4.21277L2.30303 11H9.69697L12 4.21277L6.06061 0Z',\n [`${Points[Points.octagon]}`]:\n 'M7.08333 0H2.91667L0 2.91667V7.08333L2.91667 10H7.08333L10 7.08333V2.91667L7.08333 0Z',\n [`${CustomPoints[CustomPoints.dottedLine]}`]: 'M0 6 H3 M5 6 H8 M10 6 H13',\n};\n\nexport const Shape: React.FC<IShapeProps> = ({ svgProps, pathProps, shape, classNameForNonSvg }) => {\n if (Object.keys(pointPath).indexOf(shape) === -1) {\n return <div className={classNameForNonSvg} />;\n }\n return (\n <svg\n width={14}\n height={14}\n viewBox={'-1 -1 14 14'}\n {...getSecureProps(svgProps)}\n transform={`rotate(${shape === Points[Points.diamond] ? 45 : shape === Points[Points.pyramid] ? 180 : 0}, 0, 0)`}\n >\n <path d={pointPath[shape]} {...getSecureProps(pathProps)} />\n </svg>\n );\n};\n"]}
1
+ {"version":3,"file":"shape.js","sourceRoot":"../src/","sources":["components/Legends/shape.tsx"],"names":[],"mappings":";;;;;IAeA,IAAM,SAAS;QACb,GAAC,UAAG,kBAAM,CAAC,kBAAM,CAAC,MAAM,CAAC,CAAE,IAAG,6CAA6C;QAC3E,GAAC,UAAG,kBAAM,CAAC,kBAAM,CAAC,MAAM,CAAC,CAAE,IAAG,iCAAiC;QAC/D,GAAC,UAAG,kBAAM,CAAC,kBAAM,CAAC,QAAQ,CAAC,CAAE,IAAG,2CAA2C;QAC3E,GAAC,UAAG,kBAAM,CAAC,kBAAM,CAAC,OAAO,CAAC,CAAE,IAAG,2CAA2C;QAC1E,GAAC,UAAG,kBAAM,CAAC,kBAAM,CAAC,OAAO,CAAC,CAAE,IAAG,iCAAiC;QAChE,GAAC,UAAG,kBAAM,CAAC,kBAAM,CAAC,OAAO,CAAC,CAAE,IAAG,6BAA6B;QAC5D,GAAC,UAAG,kBAAM,CAAC,kBAAM,CAAC,QAAQ,CAAC,CAAE,IAAG,+DAA+D;QAC/F,GAAC,UAAG,kBAAM,CAAC,kBAAM,CAAC,OAAO,CAAC,CAAE,IAC1B,uFAAuF;QACzF,GAAC,UAAG,wBAAY,CAAC,wBAAY,CAAC,UAAU,CAAC,CAAE,IAAG,2BAA2B;WAC1E,CAAC;IAEK,IAAM,KAAK,GAA0B,UAAC,EAAkD;YAAhD,QAAQ,cAAA,EAAE,SAAS,eAAA,EAAE,KAAK,WAAA,EAAE,kBAAkB,wBAAA;QAC3F,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YACjD,OAAO,6BAAK,SAAS,EAAE,kBAAkB,GAAI,CAAC;QAChD,CAAC;QACD,OAAO,CACL,8CACE,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,OAAO,EAAE,aAAa,IAClB,IAAA,0BAAc,EAAC,QAAQ,CAAC,IAC5B,SAAS,EAAE,iBAAU,KAAK,KAAK,kBAAM,CAAC,kBAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,kBAAM,CAAC,kBAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAS;YAEhH,+CAAM,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,IAAM,IAAA,0BAAc,EAAC,SAAS,CAAC,EAAI,CACxD,CACP,CAAC;IACJ,CAAC,CAAC;IAfW,QAAA,KAAK,SAehB","sourcesContent":["import * as React from 'react';\nimport { LegendShape } from './Legends.types';\nimport { CustomPoints, getSecureProps, Points } from '../../utilities/utilities';\n\nexport interface IShapeProps {\n svgProps: React.SVGAttributes<SVGElement>;\n pathProps: React.SVGAttributes<SVGPathElement>;\n shape: LegendShape;\n classNameForNonSvg?: string;\n}\n\ntype PointPathType = {\n [key: string]: string;\n};\n\nconst pointPath: PointPathType = {\n [`${Points[Points.circle]}`]: 'M1 6 A5 5 0 1 0 12 6 M1 6 A5 5 0 0 1 12 6',\n [`${Points[Points.square]}`]: 'M1 1 L12 1 L12 12 L1 12 L1 1 Z',\n [`${Points[Points.triangle]}`]: 'M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z',\n [`${Points[Points.pyramid]}`]: 'M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z',\n [`${Points[Points.diamond]}`]: 'M2 2 L10 2 L10 10 L2 10 L2 2 Z',\n [`${Points[Points.hexagon]}`]: 'M9 0H3L0 5L3 10H9L12 5L9 0Z',\n [`${Points[Points.pentagon]}`]: 'M6.06061 0L0 4.21277L2.30303 11H9.69697L12 4.21277L6.06061 0Z',\n [`${Points[Points.octagon]}`]:\n 'M7.08333 0H2.91667L0 2.91667V7.08333L2.91667 10H7.08333L10 7.08333V2.91667L7.08333 0Z',\n [`${CustomPoints[CustomPoints.dottedLine]}`]: 'M0 6 H3 M5 6 H8 M10 6 H13',\n};\n\nexport const Shape: React.FC<IShapeProps> = ({ svgProps, pathProps, shape, classNameForNonSvg }) => {\n if (Object.keys(pointPath).indexOf(shape) === -1) {\n return <div className={classNameForNonSvg} />;\n }\n return (\n <svg\n width={14}\n height={14}\n viewBox={'-1 -1 14 14'}\n {...getSecureProps(svgProps)}\n transform={`rotate(${shape === Points[Points.diamond] ? 45 : shape === Points[Points.pyramid] ? 180 : 0}, 0, 0)`}\n >\n <path d={pointPath[shape]} {...getSecureProps(pathProps)} />\n </svg>\n );\n};\n"]}
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { IAccessibilityProps, IBasestate, ILineChartProps, ILineChartPoints, ICustomizedCalloutData, IColorFillBarsProps, ILineChartDataPoint } from '../../index';
3
+ import { IChart } from '../../types/index';
3
4
  type LineChartDataWithIndex = ILineChartPoints & {
4
5
  index: number;
5
6
  };
@@ -14,7 +15,7 @@ export interface ILineChartState extends IBasestate {
14
15
  nearestCircleToHighlight: ILineChartDataPoint | null;
15
16
  activeLine: number | null;
16
17
  }
17
- export declare class LineChartBase extends React.Component<ILineChartProps, ILineChartState> {
18
+ export declare class LineChartBase extends React.Component<ILineChartProps, ILineChartState> implements IChart {
18
19
  static defaultProps: Partial<ILineChartProps>;
19
20
  private _points;
20
21
  private _calloutPoints;
@@ -39,9 +40,11 @@ export declare class LineChartBase extends React.Component<ILineChartProps, ILin
39
40
  private _firstRenderOptimization;
40
41
  private _emptyChartId;
41
42
  private _isRTL;
43
+ private _cartesianChartRef;
42
44
  constructor(props: ILineChartProps);
43
45
  componentDidUpdate(prevProps: ILineChartProps): void;
44
46
  render(): JSX.Element;
47
+ get chartContainer(): HTMLElement | null;
45
48
  private _getDomainNRangeValues;
46
49
  private _injectIndexPropertyInLineChartData;
47
50
  private _getCustomizedCallout;
@@ -544,6 +544,7 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
544
544
  var _a = _this_1.props.data, chartTitle = _a.chartTitle, lineChartData = _a.lineChartData;
545
545
  return (chartTitle ? "".concat(chartTitle, ". ") : '') + "Line chart with ".concat((lineChartData === null || lineChartData === void 0 ? void 0 : lineChartData.length) || 0, " lines. ");
546
546
  };
547
+ (0, Utilities_1.initializeComponentRef)(_this_1);
547
548
  _this_1.state = {
548
549
  hoverXValue: '',
549
550
  activeLegend: '',
@@ -573,6 +574,7 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
573
574
  _this_1._createLegendsMemoized = (0, Utilities_1.memoizeFunction)(function (data) { return _this_1._createLegends(data); });
574
575
  _this_1._firstRenderOptimization = true;
575
576
  _this_1._emptyChartId = (0, Utilities_1.getId)('_LineChart_empty');
577
+ _this_1._cartesianChartRef = React.createRef();
576
578
  props.eventAnnotationProps &&
577
579
  props.eventAnnotationProps.labelHeight &&
578
580
  (_this_1.eventLabelHeight = props.eventAnnotationProps.labelHeight);
@@ -613,7 +615,7 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
613
615
  tickValues: tickValues,
614
616
  tickFormat: tickFormat,
615
617
  };
616
- return !this._isChartEmpty() ? (React.createElement(index_2.CartesianChart, tslib_1.__assign({}, this.props, { chartTitle: this._getChartTitle(), points: points, chartType: index_3.ChartTypes.LineChart, isCalloutForStack: true, calloutProps: calloutProps, tickParams: tickParams, legendBars: legendBars, createYAxis: index_3.createNumericYAxis, getmargins: this._getMargins, getMinMaxOfYAxis: index_3.findNumericMinMaxOfY, getGraphData: this._initializeLineChartData, xAxisType: isXAxisDateType ? index_3.XAxisTypes.DateAxis : index_3.XAxisTypes.NumericAxis, customizedCallout: this._getCustomizedCallout(), getDomainNRangeValues: this._getDomainNRangeValues, createStringYAxis: index_3.createStringYAxis, onChartMouseLeave: this._handleChartMouseLeave, enableFirstRenderOptimization: this.props.enablePerfOptimization && this._firstRenderOptimization,
618
+ return !this._isChartEmpty() ? (React.createElement(index_2.CartesianChart, tslib_1.__assign({}, this.props, { chartTitle: this._getChartTitle(), points: points, chartType: index_3.ChartTypes.LineChart, isCalloutForStack: true, calloutProps: calloutProps, tickParams: tickParams, legendBars: legendBars, createYAxis: index_3.createNumericYAxis, getmargins: this._getMargins, getMinMaxOfYAxis: index_3.findNumericMinMaxOfY, getGraphData: this._initializeLineChartData, xAxisType: isXAxisDateType ? index_3.XAxisTypes.DateAxis : index_3.XAxisTypes.NumericAxis, customizedCallout: this._getCustomizedCallout(), getDomainNRangeValues: this._getDomainNRangeValues, createStringYAxis: index_3.createStringYAxis, onChartMouseLeave: this._handleChartMouseLeave, enableFirstRenderOptimization: this.props.enablePerfOptimization && this._firstRenderOptimization, ref: this._cartesianChartRef,
617
619
  /* eslint-disable react/jsx-no-bind */
618
620
  // eslint-disable-next-line react/no-children-prop
619
621
  children: function (props) {
@@ -629,6 +631,14 @@ define(["require", "exports", "tslib", "react", "d3-selection", "d3-array", "../
629
631
  eventAnnotationProps && (React.createElement(EventAnnotation_1.EventsAnnotation, tslib_1.__assign({ theme: _this_1.props.theme }, eventAnnotationProps, { scale: props.xScale, chartYTop: _this_1.margins.top + _this_1.eventLabelHeight, chartYBottom: props.containerHeight - 35 }))))));
630
632
  } }))) : (React.createElement("div", { id: this._emptyChartId, role: 'alert', style: { opacity: '0' }, "aria-label": 'Graph has no data to display' }));
631
633
  };
634
+ Object.defineProperty(LineChartBase.prototype, "chartContainer", {
635
+ get: function () {
636
+ var _a;
637
+ return ((_a = this._cartesianChartRef.current) === null || _a === void 0 ? void 0 : _a.chartContainer) || null;
638
+ },
639
+ enumerable: false,
640
+ configurable: true
641
+ });
632
642
  LineChartBase.prototype._createLegends = function (data) {
633
643
  var _this_1 = this;
634
644
  var _a = this.props, legendProps = _a.legendProps, _b = _a.allowMultipleShapesForPoints, allowMultipleShapesForPoints = _b === void 0 ? false : _b;