@fluentui/react-charts 9.3.5 → 9.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. package/CHANGELOG.md +42 -2
  2. package/dist/index.d.ts +239 -55
  3. package/lib/AnnotationOnlyChart.js +1 -0
  4. package/lib/AnnotationOnlyChart.js.map +1 -0
  5. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +194 -0
  6. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
  7. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +1 -0
  8. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
  9. package/lib/components/AnnotationOnlyChart/index.js +2 -0
  10. package/lib/components/AnnotationOnlyChart/index.js.map +1 -0
  11. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +31 -0
  12. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -0
  13. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +23 -0
  14. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -0
  15. package/lib/components/AreaChart/AreaChart.js +3 -16
  16. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  17. package/lib/components/AreaChart/useAreaChartStyles.styles.js +11 -6
  18. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  19. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -1
  20. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  21. package/lib/components/ChartTable/ChartTable.js +2 -10
  22. package/lib/components/ChartTable/ChartTable.js.map +1 -1
  23. package/lib/components/ChartTable/ChartTable.types.js.map +1 -1
  24. package/lib/components/ChartTable/useChartTableStyles.styles.js +59 -39
  25. package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  26. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +5 -5
  27. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  28. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +617 -0
  29. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
  30. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +1 -0
  31. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
  32. package/lib/components/CommonComponents/Annotations/index.js +2 -0
  33. package/lib/components/CommonComponents/Annotations/index.js.map +1 -0
  34. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +173 -0
  35. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -0
  36. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +126 -0
  37. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -0
  38. package/lib/components/CommonComponents/CartesianChart.js +159 -132
  39. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  40. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  41. package/lib/components/CommonComponents/ChartPopover.js +1 -2
  42. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  43. package/lib/components/CommonComponents/index.js +2 -0
  44. package/lib/components/CommonComponents/index.js.map +1 -1
  45. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +32 -14
  46. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  47. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +17 -2
  48. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  49. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +2 -6
  50. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  51. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +1 -2
  52. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  53. package/lib/components/DeclarativeChart/DeclarativeChart.js +83 -40
  54. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  55. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +4 -8
  56. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  57. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +692 -94
  58. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  59. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +23 -8
  60. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  61. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +2 -2
  62. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  63. package/lib/components/DonutChart/DonutChart.js +3 -12
  64. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  65. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  66. package/lib/components/DonutChart/Pie/Pie.js +4 -2
  67. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  68. package/lib/components/DonutChart/useDonutChartStyles.styles.js +2 -2
  69. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  70. package/lib/components/FunnelChart/FunnelChart.js +2 -10
  71. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  72. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -1
  73. package/lib/components/GanttChart/GanttChart.js +6 -19
  74. package/lib/components/GanttChart/GanttChart.js.map +1 -1
  75. package/lib/components/GanttChart/GanttChart.types.js.map +1 -1
  76. package/lib/components/GanttChart/useGanttChartStyles.styles.js +3 -1
  77. package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +1 -1
  78. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +3 -1
  79. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
  80. package/lib/components/GaugeChart/GaugeChart.js +2 -10
  81. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  82. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  83. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +8 -20
  84. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  85. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +11 -6
  86. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  87. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +3 -1
  88. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  89. package/lib/components/HeatMapChart/HeatMapChart.js +4 -17
  90. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  91. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  92. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +3 -1
  93. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  94. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +3 -1
  95. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
  96. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +25 -12
  97. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  98. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +4 -4
  99. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  100. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +5 -23
  101. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  102. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  103. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +3 -1
  104. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  105. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +3 -1
  106. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  107. package/lib/components/Legends/Legends.types.js.map +1 -1
  108. package/lib/components/Legends/OverflowMenu.js.map +1 -1
  109. package/lib/components/Legends/useLegendsStyles.styles.js +97 -37
  110. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
  111. package/lib/components/Legends/useLegendsStyles.styles.raw.js +10 -11
  112. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  113. package/lib/components/LineChart/LineChart.js +11 -20
  114. package/lib/components/LineChart/LineChart.js.map +1 -1
  115. package/lib/components/LineChart/LineChart.types.js +1 -1
  116. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  117. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +3 -4
  118. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  119. package/lib/components/LineChart/useLineChartStyles.styles.js +15 -10
  120. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  121. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +3 -1
  122. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  123. package/lib/components/SankeyChart/SankeyChart.js +3 -9
  124. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  125. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  126. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +13 -10
  127. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  128. package/lib/components/ScatterChart/ScatterChart.js +24 -24
  129. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  130. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  131. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +13 -8
  132. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  133. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -1
  134. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  135. package/lib/components/Sparkline/Sparkline.js +11 -7
  136. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  137. package/lib/components/VerticalBarChart/VerticalBarChart.js +3 -15
  138. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  139. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +13 -8
  140. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  141. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +3 -1
  142. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  143. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +8 -18
  144. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  145. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  146. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +11 -6
  147. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  148. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -1
  149. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  150. package/lib/index.js +1 -0
  151. package/lib/index.js.map +1 -1
  152. package/lib/types/ChartAnnotation.js +1 -0
  153. package/lib/types/ChartAnnotation.js.map +1 -0
  154. package/lib/types/DataPoint.js.map +1 -1
  155. package/lib/types/index.js +1 -0
  156. package/lib/types/index.js.map +1 -1
  157. package/lib/utilities/Common.styles.js +1 -2
  158. package/lib/utilities/Common.styles.js.map +1 -1
  159. package/lib/utilities/Common.styles.raw.js +1 -2
  160. package/lib/utilities/Common.styles.raw.js.map +1 -1
  161. package/lib/utilities/FocusableTooltipText.js +1 -1
  162. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  163. package/lib/utilities/getWindow.js +0 -1
  164. package/lib/utilities/getWindow.js.map +1 -1
  165. package/lib/utilities/hooks.js +34 -0
  166. package/lib/utilities/hooks.js.map +1 -0
  167. package/lib/utilities/image-export-utils.js +221 -73
  168. package/lib/utilities/image-export-utils.js.map +1 -1
  169. package/lib/utilities/utilities.js +39 -37
  170. package/lib/utilities/utilities.js.map +1 -1
  171. package/lib-commonjs/AnnotationOnlyChart.js +6 -0
  172. package/lib-commonjs/AnnotationOnlyChart.js.map +1 -0
  173. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +205 -0
  174. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
  175. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +6 -0
  176. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
  177. package/lib-commonjs/components/AnnotationOnlyChart/index.js +7 -0
  178. package/lib-commonjs/components/AnnotationOnlyChart/index.js.map +1 -0
  179. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +56 -0
  180. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -0
  181. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +33 -0
  182. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -0
  183. package/lib-commonjs/components/AreaChart/AreaChart.js +2 -15
  184. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  185. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +14 -15
  186. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  187. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -1
  188. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  189. package/lib-commonjs/components/ChartTable/ChartTable.js +3 -10
  190. package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
  191. package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +1 -1
  192. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +74 -102
  193. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  194. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +4 -4
  195. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  196. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +628 -0
  197. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
  198. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +4 -0
  199. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
  200. package/lib-commonjs/components/CommonComponents/Annotations/index.js +7 -0
  201. package/lib-commonjs/components/CommonComponents/Annotations/index.js.map +1 -0
  202. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +265 -0
  203. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -0
  204. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +161 -0
  205. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -0
  206. package/lib-commonjs/components/CommonComponents/CartesianChart.js +159 -131
  207. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  208. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  209. package/lib-commonjs/components/CommonComponents/ChartPopover.js +1 -2
  210. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
  211. package/lib-commonjs/components/CommonComponents/index.js +2 -0
  212. package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
  213. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +35 -22
  214. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  215. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +17 -2
  216. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  217. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +0 -14
  218. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  219. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +0 -1
  220. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  221. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +82 -39
  222. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  223. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  224. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +678 -60
  225. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  226. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +25 -16
  227. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  228. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +1 -1
  229. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  230. package/lib-commonjs/components/DonutChart/DonutChart.js +2 -11
  231. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  232. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  233. package/lib-commonjs/components/DonutChart/Pie/Pie.js +4 -2
  234. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  235. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +2 -2
  236. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  237. package/lib-commonjs/components/FunnelChart/FunnelChart.js +2 -10
  238. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
  239. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -1
  240. package/lib-commonjs/components/GanttChart/GanttChart.js +5 -18
  241. package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
  242. package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -1
  243. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +3 -1
  244. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +1 -1
  245. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +3 -1
  246. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
  247. package/lib-commonjs/components/GaugeChart/GaugeChart.js +2 -10
  248. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  249. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  250. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +8 -20
  251. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  252. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +14 -15
  253. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  254. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +3 -1
  255. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  256. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +3 -16
  257. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  258. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  259. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +3 -1
  260. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  261. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +3 -1
  262. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
  263. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +47 -34
  264. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  265. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +3 -3
  266. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  267. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +4 -21
  268. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  269. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  270. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +3 -1
  271. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  272. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +3 -1
  273. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  274. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  275. package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -1
  276. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +144 -86
  277. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
  278. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +9 -10
  279. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  280. package/lib-commonjs/components/LineChart/LineChart.js +11 -20
  281. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  282. package/lib-commonjs/components/LineChart/LineChart.types.js +1 -1
  283. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  284. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +2 -2
  285. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  286. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +18 -19
  287. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  288. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +3 -1
  289. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  290. package/lib-commonjs/components/SankeyChart/SankeyChart.js +3 -9
  291. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  292. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  293. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +16 -19
  294. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  295. package/lib-commonjs/components/ScatterChart/ScatterChart.js +22 -22
  296. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  297. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  298. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +16 -17
  299. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  300. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -1
  301. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  302. package/lib-commonjs/components/Sparkline/Sparkline.js +11 -7
  303. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
  304. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +3 -15
  305. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  306. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +16 -17
  307. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  308. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +3 -1
  309. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  310. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +7 -17
  311. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  312. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  313. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +14 -15
  314. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  315. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -1
  316. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  317. package/lib-commonjs/index.js +1 -0
  318. package/lib-commonjs/index.js.map +1 -1
  319. package/lib-commonjs/types/ChartAnnotation.js +6 -0
  320. package/lib-commonjs/types/ChartAnnotation.js.map +1 -0
  321. package/lib-commonjs/types/DataPoint.js.map +1 -1
  322. package/lib-commonjs/types/index.js +1 -0
  323. package/lib-commonjs/types/index.js.map +1 -1
  324. package/lib-commonjs/utilities/Common.styles.js +1 -2
  325. package/lib-commonjs/utilities/Common.styles.js.map +1 -1
  326. package/lib-commonjs/utilities/Common.styles.raw.js +1 -2
  327. package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -1
  328. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
  329. package/lib-commonjs/utilities/getWindow.js +0 -1
  330. package/lib-commonjs/utilities/getWindow.js.map +1 -1
  331. package/lib-commonjs/utilities/hooks.js +45 -0
  332. package/lib-commonjs/utilities/hooks.js.map +1 -0
  333. package/lib-commonjs/utilities/image-export-utils.js +222 -74
  334. package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
  335. package/lib-commonjs/utilities/utilities.js +37 -33
  336. package/lib-commonjs/utilities/utilities.js.map +1 -1
  337. package/package.json +11 -11
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HorizontalBarChartProps, HorizontalBarChartStyles, HorizontalBarChartVariant } from './index';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { HighContrastSelector } from '../../utilities/index';\n\n/**\n * @internal\n */\nexport const hbcClassNames: SlotClassNames<HorizontalBarChartStyles> = {\n root: 'fui-hbc__root',\n items: 'fui-hbc__items',\n chart: 'fui-hbc__chart',\n chartTitle: 'fui-hbc__chartTitle',\n barWrapper: 'fui-hbc__barWrapper',\n chartTitleLeft: 'fui-hbc__chartTitleLeft',\n chartTitleRight: 'fui-hbc__chartTitleRight',\n chartDataTextDenominator: 'fui-hbc__textDenom',\n benchmarkContainer: 'fui-hbc__benchmark',\n triangle: 'fui-hbc__triangle',\n barLabel: 'fui-hbc__barLabel',\n chartWrapper: 'fui-hbc__chartWrapper',\n legendContainer: 'fui-hbc__legendContainer',\n};\n\n/**\n * Base Styles\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%', // Support custom width\n textAlign: 'left',\n },\n items10pMargin: {\n marginBottom: tokens.spacingVerticalMNudge,\n },\n items16pMargin: {\n marginBottom: tokens.spacingVerticalL,\n },\n chart: {\n width: '100%',\n height: '12px', // Support custom bar height\n display: 'block',\n overflow: 'visible',\n },\n barWrapper: {},\n chartTitle: {\n ...typographyStyles.caption1,\n display: 'flex',\n justifyContent: 'space-between',\n },\n chartTitleLeft: {\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n display: 'block',\n color: tokens.colorNeutralForeground1,\n },\n chartTitleLeft4pMargin: {\n marginBottom: '4px',\n },\n chartTitleLeft5pMargin: {\n marginBottom: '5px',\n },\n chartTitleRight: {\n ...typographyStyles.body1Strong,\n color: tokens.colorNeutralForeground1,\n },\n chartDataTextDenominator: {\n ...typographyStyles.body1,\n color: tokens.colorNeutralForeground1,\n },\n benchmarkContainer: {\n position: 'relative',\n height: '7px',\n marginTop: '-3px',\n marginBottom: '-1px',\n },\n triangle: {\n width: '0',\n height: '0',\n ...shorthands.borderLeft('4px', 'solid', 'transparent'),\n ...shorthands.borderRight('4px', 'solid', 'transparent'),\n ...shorthands.borderTop('7px', 'solid'),\n borderTopColor: tokens.colorPaletteBlueBorderActive,\n marginBottom: tokens.spacingVerticalXS,\n position: 'absolute',\n },\n barLabel: {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1,\n [HighContrastSelector]: {\n stroke: 'CanvasText',\n },\n },\n chartWrapper40ppadding: {\n paddingRight: '40p',\n },\n chartWrapper0ppadding: {\n paddingRight: tokens.spacingHorizontalNone,\n },\n legendContainer: { paddingTop: tokens.spacingVerticalL },\n});\n\n/**\n * Apply styling to the Carousel slots based on the state\n */\nexport const useHorizontalBarChartStyles = (props: HorizontalBarChartProps): HorizontalBarChartStyles => {\n const { className, showTriangle, variant, hideLabels } = props; // ToDo - width, barHeight is non enumerable. Need to be used inline.\n const baseStyles = useStyles();\n\n return {\n root: mergeClasses(hbcClassNames.root, baseStyles.root, className, props.styles?.root),\n items: mergeClasses(\n hbcClassNames.items,\n showTriangle || variant === HorizontalBarChartVariant.AbsoluteScale\n ? baseStyles.items16pMargin\n : baseStyles.items10pMargin,\n props.styles?.items,\n ),\n chart: mergeClasses(hbcClassNames.chart, baseStyles.chart, props.styles?.chart),\n chartTitle: mergeClasses(hbcClassNames.chartTitle, baseStyles.chartTitle, props.styles?.chartTitle),\n barWrapper: mergeClasses(hbcClassNames.barWrapper, baseStyles.barWrapper, props.styles?.barWrapper),\n chartTitleLeft: mergeClasses(\n hbcClassNames.chartTitleLeft,\n baseStyles.chartTitleLeft,\n variant === HorizontalBarChartVariant.AbsoluteScale\n ? baseStyles.chartTitleLeft4pMargin\n : baseStyles.chartTitleLeft5pMargin,\n props.styles?.chartTitleLeft,\n ),\n chartTitleRight: mergeClasses(\n hbcClassNames.chartTitleRight,\n baseStyles.chartTitleRight,\n props.styles?.chartTitleRight,\n ),\n chartDataTextDenominator: mergeClasses(\n hbcClassNames.chartDataTextDenominator,\n baseStyles.chartDataTextDenominator,\n props.styles?.chartDataTextDenominator,\n ),\n benchmarkContainer: mergeClasses(\n hbcClassNames.benchmarkContainer,\n baseStyles.benchmarkContainer,\n props.styles?.benchmarkContainer,\n ),\n triangle: mergeClasses(hbcClassNames.triangle, baseStyles.triangle, props.styles?.triangle),\n barLabel: mergeClasses(hbcClassNames.barLabel, baseStyles.barLabel, props.styles?.barLabel),\n chartWrapper: mergeClasses(\n hbcClassNames.chartWrapper,\n variant === HorizontalBarChartVariant.AbsoluteScale && !hideLabels\n ? baseStyles.chartWrapper40ppadding\n : baseStyles.chartWrapper0ppadding,\n props.styles?.chartWrapper,\n ),\n legendContainer: mergeClasses(\n hbcClassNames.legendContainer,\n baseStyles.legendContainer,\n props.styles?.legendContainer,\n ),\n };\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","typographyStyles","HorizontalBarChartVariant","HighContrastSelector","hbcClassNames","root","items","chart","chartTitle","barWrapper","chartTitleLeft","chartTitleRight","chartDataTextDenominator","benchmarkContainer","triangle","barLabel","chartWrapper","legendContainer","useStyles","display","flexDirection","width","textAlign","items10pMargin","marginBottom","spacingVerticalMNudge","items16pMargin","spacingVerticalL","height","overflow","caption1","justifyContent","textOverflow","whiteSpace","color","colorNeutralForeground1","chartTitleLeft4pMargin","chartTitleLeft5pMargin","body1Strong","body1","position","marginTop","borderLeft","borderRight","borderTop","borderTopColor","colorPaletteBlueBorderActive","spacingVerticalXS","caption1Strong","fill","stroke","chartWrapper40ppadding","paddingRight","chartWrapper0ppadding","spacingHorizontalNone","paddingTop","useHorizontalBarChartStyles","props","className","showTriangle","variant","hideLabels","baseStyles","styles","AbsoluteScale"],"mappings":"AAAA;;;;;;;;;;;;IAWaO,aAAAA;;;+BAoGAoD;eAAAA;;;uBA7GwC,iBAAiB;4BAC7B,wBAAwB;uBAC4B,UAAU;wBAElE,wBAAwB;AAKtD,sBAAgE;IACrEnD,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,YAAY;IACZC,YAAY;IACZC,gBAAgB;IAChBC,iBAAiB;IACjBC,0BAA0B;IAC1BC,oBAAoB;IACpBC,UAAU;IACVC,UAAU;IACVC,cAAc;IACdC,iBAAiB;AACnB,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYrB,iBAAAA,EAAW;IAC3BQ,MAAM;QACJc,SAAS;QACTC,eAAe;QACfC,OAAO;QACPC,WAAW;IACb;IACAC,gBAAgB;QACdC,cAAcxB,kBAAAA,CAAOyB,qBAAqB;IAC5C;IACAC,gBAAgB;QACdF,cAAcxB,kBAAAA,CAAO2B,gBAAgB;IACvC;IACApB,OAAO;QACLc,OAAO;QACPO,QAAQ;QACRT,SAAS;QACTU,UAAU;IACZ;IACApB,YAAY,CAAC;IACbD,YAAY;QACV,GAAGP,4BAAAA,CAAiB6B,QAAQ;QAC5BX,SAAS;QACTY,gBAAgB;IAClB;IACArB,gBAAgB;QACdsB,cAAc;QACdH,UAAU;QACVI,YAAY;QACZd,SAAS;QACTe,OAAOlC,kBAAAA,CAAOmC,uBAAuB;IACvC;IACAC,wBAAwB;QACtBZ,cAAc;IAChB;IACAa,wBAAwB;QACtBb,cAAc;IAChB;IACAb,iBAAiB;QACf,GAAGV,4BAAAA,CAAiBqC,WAAW;QAC/BJ,OAAOlC,kBAAAA,CAAOmC,uBAAuB;IACvC;IACAvB,0BAA0B;QACxB,GAAGX,4BAAAA,CAAiBsC,KAAK;QACzBL,OAAOlC,kBAAAA,CAAOmC,uBAAu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A,CACnC6C,iBAAAA,MAAMM,MAAAA,AAAM,MAAA,QAAZN,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAc7C,wBAAwB;QAExCC,wBAAoBf,mBAAAA,EAClBM,cAAcS,kBAAkB,EAChCiD,WAAWjD,kBAAkB,EAAA,CAC7B4C,iBAAAA,MAAMM,MAAAA,AAAM,MAAA,QAAZN,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAc5C,kBAAkB;QAElCC,cAAUhB,mBAAAA,EAAaM,cAAcU,QAAQ,EAAEgD,WAAWhD,QAAQ,EAAA,CAAE2C,iBAAAA,MAAMM,MAAAA,AAAM,MAAA,QAAZN,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAc3C,QAAQ;QAC1FC,UAAUjB,uBAAAA,EAAaM,cAAcW,QAAQ,EAAE+C,WAAW/C,QAAQ,EAAA,CAAE0C,kBAAAA,MAAMM,MAAAA,AAAM,MAAA,QAAZN,oBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,gBAAc1C,QAAQ;QAC1FC,kBAAclB,mBAAAA,EACZM,cAAcY,YAAY,EAC1B4C,YAAY1D,gCAAAA,CAA0B8D,aAAa,IAAI,CAACH,aACpDC,WAAWX,sBAAsB,GACjCW,WAAWT,qBAAqB,EAAA,CACpCI,kBAAAA,MAAMM,MAAAA,AAAM,MAAA,QAAZN,oBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,gBAAczC,YAAY;QAE5BC,qBAAiBnB,mBAAAA,EACfM,cAAca,eAAe,EAC7B6C,WAAW7C,eAAe,EAAA,CAC1BwC,kBAAAA,MAAMM,MAAAA,AAAM,MAAA,QAAZN,oBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,gBAAcxC,eAAe;IAEjC;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HorizontalBarChartProps, HorizontalBarChartStyles, HorizontalBarChartVariant } from './index';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { HighContrastSelector } from '../../utilities/index';\n\n/**\n * @internal\n */\nexport const hbcClassNames: SlotClassNames<HorizontalBarChartStyles> = {\n root: 'fui-hbc__root',\n items: 'fui-hbc__items',\n chart: 'fui-hbc__chart',\n chartTitle: 'fui-hbc__chartTitle',\n barWrapper: 'fui-hbc__barWrapper',\n chartTitleLeft: 'fui-hbc__chartTitleLeft',\n chartTitleRight: 'fui-hbc__chartTitleRight',\n chartDataTextDenominator: 'fui-hbc__textDenom',\n benchmarkContainer: 'fui-hbc__benchmark',\n triangle: 'fui-hbc__triangle',\n barLabel: 'fui-hbc__barLabel',\n chartWrapper: 'fui-hbc__chartWrapper',\n legendContainer: 'fui-hbc__legendContainer',\n};\n\n/**\n * Base Styles\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%', // Support custom width\n textAlign: 'left',\n },\n items10pMargin: {\n marginBottom: tokens.spacingVerticalMNudge,\n },\n items16pMargin: {\n marginBottom: tokens.spacingVerticalL,\n },\n chart: {\n width: '100%',\n height: '12px', // Support custom bar height\n display: 'block',\n overflow: 'visible',\n },\n barWrapper: {},\n chartTitle: {\n ...typographyStyles.caption1,\n display: 'flex',\n justifyContent: 'space-between',\n },\n chartTitleLeft: {\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n display: 'block',\n color: tokens.colorNeutralForeground1,\n },\n chartTitleLeft4pMargin: {\n marginBottom: '4px',\n },\n chartTitleLeft5pMargin: {\n marginBottom: '5px',\n },\n chartTitleRight: {\n ...typographyStyles.body1Strong,\n color: tokens.colorNeutralForeground1,\n },\n chartDataTextDenominator: {\n ...typographyStyles.body1,\n color: tokens.colorNeutralForeground1,\n },\n benchmarkContainer: {\n position: 'relative',\n height: '7px',\n marginTop: '-3px',\n marginBottom: '-1px',\n },\n triangle: {\n width: '0',\n height: '0',\n borderLeft: `4px solid transparent`,\n borderRight: `4px solid transparent`,\n borderTop: `7px solid`,\n borderTopColor: tokens.colorPaletteBlueBorderActive,\n marginBottom: tokens.spacingVerticalXS,\n position: 'absolute',\n },\n barLabel: {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1,\n [HighContrastSelector]: {\n stroke: 'CanvasText',\n },\n },\n chartWrapper40ppadding: {\n paddingRight: '40p',\n },\n chartWrapper0ppadding: {\n paddingRight: tokens.spacingHorizontalNone,\n },\n legendContainer: { paddingTop: tokens.spacingVerticalL },\n});\n\n/**\n * Apply styling to the Carousel slots based on the state\n */\nexport const useHorizontalBarChartStyles = (props: HorizontalBarChartProps): HorizontalBarChartStyles => {\n const { className, showTriangle, variant, hideLabels } = props; // ToDo - width, barHeight is non enumerable. Need to be used inline.\n const baseStyles = useStyles();\n\n return {\n root: mergeClasses(hbcClassNames.root, baseStyles.root, className, props.styles?.root),\n items: mergeClasses(\n hbcClassNames.items,\n showTriangle || variant === HorizontalBarChartVariant.AbsoluteScale\n ? baseStyles.items16pMargin\n : baseStyles.items10pMargin,\n props.styles?.items,\n ),\n chart: mergeClasses(hbcClassNames.chart, baseStyles.chart, props.styles?.chart),\n chartTitle: mergeClasses(hbcClassNames.chartTitle, baseStyles.chartTitle, props.styles?.chartTitle),\n barWrapper: mergeClasses(hbcClassNames.barWrapper, baseStyles.barWrapper, props.styles?.barWrapper),\n chartTitleLeft: mergeClasses(\n hbcClassNames.chartTitleLeft,\n baseStyles.chartTitleLeft,\n variant === HorizontalBarChartVariant.AbsoluteScale\n ? baseStyles.chartTitleLeft4pMargin\n : baseStyles.chartTitleLeft5pMargin,\n props.styles?.chartTitleLeft,\n ),\n chartTitleRight: mergeClasses(\n hbcClassNames.chartTitleRight,\n baseStyles.chartTitleRight,\n props.styles?.chartTitleRight,\n ),\n chartDataTextDenominator: mergeClasses(\n hbcClassNames.chartDataTextDenominator,\n baseStyles.chartDataTextDenominator,\n props.styles?.chartDataTextDenominator,\n ),\n benchmarkContainer: mergeClasses(\n hbcClassNames.benchmarkContainer,\n baseStyles.benchmarkContainer,\n props.styles?.benchmarkContainer,\n ),\n triangle: mergeClasses(hbcClassNames.triangle, baseStyles.triangle, props.styles?.triangle),\n barLabel: mergeClasses(hbcClassNames.barLabel, baseStyles.barLabel, props.styles?.barLabel),\n chartWrapper: mergeClasses(\n hbcClassNames.chartWrapper,\n variant === HorizontalBarChartVariant.AbsoluteScale && !hideLabels\n ? baseStyles.chartWrapper40ppadding\n : baseStyles.chartWrapper0ppadding,\n props.styles?.chartWrapper,\n ),\n legendContainer: mergeClasses(\n hbcClassNames.legendContainer,\n baseStyles.legendContainer,\n props.styles?.legendContainer,\n ),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","typographyStyles","HorizontalBarChartVariant","HighContrastSelector","hbcClassNames","root","items","chart","chartTitle","barWrapper","chartTitleLeft","chartTitleRight","chartDataTextDenominator","benchmarkContainer","triangle","barLabel","chartWrapper","legendContainer","useStyles","display","flexDirection","width","textAlign","items10pMargin","marginBottom","spacingVerticalMNudge","items16pMargin","spacingVerticalL","height","overflow","caption1","justifyContent","textOverflow","whiteSpace","color","colorNeutralForeground1","chartTitleLeft4pMargin","chartTitleLeft5pMargin","body1Strong","body1","position","marginTop","borderLeft","borderRight","borderTop","borderTopColor","colorPaletteBlueBorderActive","spacingVerticalXS","caption1Strong","fill","stroke","chartWrapper40ppadding","paddingRight","chartWrapper0ppadding","spacingHorizontalNone","paddingTop","useHorizontalBarChartStyles","props","className","showTriangle","variant","hideLabels","baseStyles","styles","AbsoluteScale"],"mappings":"AAAA;;;;;;;;;;;;IAWaM,aAAAA;;;+BAoGAoD;eAAAA;;;uBA7G4B,iBAAiB;4BACjB,wBAAwB;uBAC4B,UAAU;wBAElE,wBAAwB;AAKtD,sBAAgE;IACrEnD,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,YAAY;IACZC,YAAY;IAC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,QAAZN,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAc3C,QAAQ;QAC1FC,cAAUhB,mBAAAA,EAAaK,cAAcW,QAAQ,EAAE+C,WAAW/C,QAAQ,EAAA,CAAE0C,kBAAAA,MAAMM,MAAAA,AAAM,MAAA,QAAZN,oBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,gBAAc1C,QAAQ;QAC1FC,kBAAcjB,mBAAAA,EACZK,cAAcY,YAAY,EAC1B4C,YAAY1D,gCAAAA,CAA0B8D,aAAa,IAAI,CAACH,aACpDC,WAAWX,sBAAsB,GACjCW,WAAWT,qBAAqB,EAAA,CACpCI,kBAAAA,MAAMM,MAAAA,AAAM,MAAA,QAAZN,oBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,gBAAczC,YAAY;QAE5BC,qBAAiBlB,mBAAAA,EACfK,cAAca,eAAe,EAC7B6C,WAAW7C,eAAe,EAAA,CAC1BwC,kBAAAA,MAAMM,MAAAA,AAAM,MAAA,QAAZN,oBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,gBAAcxC,eAAe;IAEjC;AACF,EAAE"}
@@ -19,7 +19,7 @@ const _CartesianChart = require("../CommonComponents/CartesianChart");
19
19
  const _ChartPopover = require("../CommonComponents/ChartPopover");
20
20
  const _index = require("../../utilities/index");
21
21
  const _vbcutils = require("../../utilities/vbc-utils");
22
- const _imageexportutils = require("../../utilities/image-export-utils");
22
+ const _hooks = require("../../utilities/hooks");
23
23
  const HorizontalBarChartWithAxis = /*#__PURE__*/ _react.forwardRef((props = {
24
24
  yAxisCategoryOrder: 'default'
25
25
  }, forwardedRef)=>{
@@ -44,9 +44,8 @@ const HorizontalBarChartWithAxis = /*#__PURE__*/ _react.forwardRef((props = {
44
44
  let _domainMargin = _index.MIN_DOMAIN_MARGIN;
45
45
  var _props_yAxisPadding;
46
46
  let _yAxisPadding = (_props_yAxisPadding = props.yAxisPadding) !== null && _props_yAxisPadding !== void 0 ? _props_yAxisPadding : 0.5;
47
- const cartesianChartRef = _react.useRef(null);
47
+ const { cartesianChartRef, legendsRef: _legendsRef } = (0, _hooks.useImageExport)(props.componentRef, props.hideLegend);
48
48
  const X_ORIGIN = 0;
49
- const _legendsRef = _react.useRef(null);
50
49
  const [color, setColor] = _react.useState('');
51
50
  const [dataForHoverCard, setDataForHoverCard] = _react.useState(0);
52
51
  const [isLegendSelected, setIsLegendSelected] = _react.useState(((_props_legendProps = props.legendProps) === null || _props_legendProps === void 0 ? void 0 : _props_legendProps.selectedLegends) && props.legendProps.selectedLegends.length > 0 || ((_props_legendProps1 = props.legendProps) === null || _props_legendProps1 === void 0 ? void 0 : _props_legendProps1.selectedLegend) !== undefined);
@@ -77,17 +76,6 @@ const HorizontalBarChartWithAxis = /*#__PURE__*/ _react.forwardRef((props = {
77
76
  }, [
78
77
  props
79
78
  ]);
80
- _react.useImperativeHandle(props.componentRef, ()=>{
81
- var _cartesianChartRef_current;
82
- var _cartesianChartRef_current_chartContainer;
83
- return {
84
- chartContainer: (_cartesianChartRef_current_chartContainer = (_cartesianChartRef_current = cartesianChartRef.current) === null || _cartesianChartRef_current === void 0 ? void 0 : _cartesianChartRef_current.chartContainer) !== null && _cartesianChartRef_current_chartContainer !== void 0 ? _cartesianChartRef_current_chartContainer : null,
85
- toImage: (opts)=>{
86
- var _cartesianChartRef_current, _legendsRef_current;
87
- return (0, _imageexportutils.toImage)((_cartesianChartRef_current = cartesianChartRef.current) === null || _cartesianChartRef_current === void 0 ? void 0 : _cartesianChartRef_current.chartContainer, (_legendsRef_current = _legendsRef.current) === null || _legendsRef_current === void 0 ? void 0 : _legendsRef_current.toSVG, _isRtl, opts);
88
- }
89
- };
90
- }, []);
91
79
  function _adjustProps() {
92
80
  _points = props.data || [];
93
81
  _barHeight = props.barHeight || 32;
@@ -110,7 +98,6 @@ const HorizontalBarChartWithAxis = /*#__PURE__*/ _react.forwardRef((props = {
110
98
  selectedPointIndex = index;
111
99
  }
112
100
  });
113
- // eslint-disable-next-line @typescript-eslint/no-shadow
114
101
  let color;
115
102
  if (useSingleColor) {
116
103
  //if useSingle color , then check if user has given a palette or not
@@ -129,7 +116,6 @@ const HorizontalBarChartWithAxis = /*#__PURE__*/ _react.forwardRef((props = {
129
116
  isPopoverOpen: isPopoverOpen
130
117
  }));
131
118
  }
132
- // eslint-disable-next-line @typescript-eslint/no-shadow
133
119
  function _renderCallout(props) {
134
120
  return props ? _renderContentForOnlyBars(props) : null;
135
121
  }
@@ -174,7 +160,6 @@ const HorizontalBarChartWithAxis = /*#__PURE__*/ _react.forwardRef((props = {
174
160
  }
175
161
  function _onBarHover(point, color, mouseEvent) {
176
162
  mouseEvent.persist();
177
- // eslint-disable-next-line @typescript-eslint/no-shadow
178
163
  if ((isLegendSelected === false || _isLegendHighlighted(point.legend)) && _calloutAnchorPoint !== point) {
179
164
  _calloutAnchorPoint = point;
180
165
  setPopoverOpen(true);
@@ -196,7 +181,6 @@ const HorizontalBarChartWithAxis = /*#__PURE__*/ _react.forwardRef((props = {
196
181
  _calloutAnchorPoint = null;
197
182
  setPopoverOpen(false);
198
183
  }
199
- // eslint-disable-next-line @typescript-eslint/no-shadow
200
184
  function _onBarFocus(event, point, refArrayIndexNumber, color) {
201
185
  let cx = 0;
202
186
  let cy = 0;
@@ -205,7 +189,6 @@ const HorizontalBarChartWithAxis = /*#__PURE__*/ _react.forwardRef((props = {
205
189
  cy = targetRect.top + targetRect.height / 2;
206
190
  _updatePosition(cx, cy);
207
191
  if ((isLegendSelected === false || _isLegendHighlighted(point.legend)) && _calloutAnchorPoint !== point) {
208
- // eslint-disable-next-line @typescript-eslint/no-shadow
209
192
  _refArray.forEach((obj, index)=>{
210
193
  if (refArrayIndexNumber === index) {
211
194
  setPopoverOpen(true);
@@ -614,10 +597,10 @@ const HorizontalBarChartWithAxis = /*#__PURE__*/ _react.forwardRef((props = {
614
597
  setPopoverOpen(true);
615
598
  }
616
599
  }
617
- function _getDomainNRangeValues(points, margins, width, chartType, isRTL, xAxisType, barWidth, tickValues, shiftX) {
600
+ function _getDomainNRangeValues(points, margins, width, chartType, isRTL, xAxisType, barWidth, tickValues) {
618
601
  let domainNRangeValue;
619
602
  if (xAxisType === _index.XAxisTypes.NumericAxis) {
620
- domainNRangeValue = (0, _index.domainRangeOfNumericForHorizontalBarChartWithAxis)(points, margins, width, isRTL, shiftX, X_ORIGIN);
603
+ domainNRangeValue = (0, _index.domainRangeOfNumericForHorizontalBarChartWithAxis)(points, margins, width, isRTL, X_ORIGIN);
621
604
  } else {
622
605
  domainNRangeValue = {
623
606
  dStartValue: 0,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { scaleLinear as d3ScaleLinear, ScaleLinear as D3ScaleLinear, scaleBand as d3ScaleBand } from 'd3-scale';\nimport { Legend, LegendContainer } from '../../components/Legends/Legends.types';\nimport { Legends } from '../../components/Legends/Legends';\nimport { useId } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport {\n AccessibilityProps,\n HorizontalBarChartWithAxisDataPoint,\n RefArrayData,\n Margins,\n ChartPopoverProps,\n Chart,\n ImageExportOptions,\n} from '../../index';\nimport { ChildProps } from '../CommonComponents/CartesianChart.types';\nimport { CartesianChart } from '../CommonComponents/CartesianChart';\nimport { HorizontalBarChartWithAxisProps } from './HorizontalBarChartWithAxis.types';\nimport { ChartPopover } from '../CommonComponents/ChartPopover';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n YAxisType,\n XAxisTypes,\n NumericAxis,\n StringAxis,\n getTypeOfAxis,\n getNextColor,\n findHBCWANumericMinMaxOfY,\n createYAxisForHorizontalBarChartWithAxis,\n IDomainNRange,\n domainRangeOfNumericForHorizontalBarChartWithAxis,\n createStringYAxisForHorizontalBarChartWithAxis,\n areArraysEqual,\n useRtl,\n DataVizPalette,\n getColorFromToken,\n computeLongestBars,\n groupChartDataByYValue,\n MIN_DOMAIN_MARGIN,\n sortAxisCategories,\n} from '../../utilities/index';\nimport { getClosestPairDiffAndRange } from '../../utilities/vbc-utils';\nimport { toImage } from '../../utilities/image-export-utils';\ntype ColorScale = (_p?: number) => string;\n\nexport const HorizontalBarChartWithAxis: React.FunctionComponent<HorizontalBarChartWithAxisProps> = React.forwardRef<\n HTMLDivElement,\n HorizontalBarChartWithAxisProps\n>((props = { yAxisCategoryOrder: 'default' }, forwardedRef) => {\n const _refArray: RefArrayData[] = [];\n const _calloutId: string = useId('callout');\n const _isRtl: boolean = useRtl();\n const _xAxisType: XAxisTypes =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.NumericAxis;\n const _yAxisType: YAxisType =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data![0].y, false) as YAxisType)\n : YAxisType.StringAxis;\n const _emptyChartId: string = useId('_HBCWithAxis_empty');\n let _points: HorizontalBarChartWithAxisDataPoint[] = [];\n let _barHeight: number = 0;\n let _colors: string[] = [];\n let _margins: Margins;\n let _bars: JSXElement[];\n let _yAxisLabels: string[];\n let _xMax: number;\n let _calloutAnchorPoint: HorizontalBarChartWithAxisDataPoint | null;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _longestBarPositiveTotalValue: number;\n let _longestBarNegativeTotalValue: number;\n let _domainMargin: number = MIN_DOMAIN_MARGIN;\n let _yAxisPadding: number = props.yAxisPadding ?? 0.5;\n const cartesianChartRef = React.useRef<Chart>(null);\n const X_ORIGIN: number = 0;\n const _legendsRef = React.useRef<LegendContainer>(null);\n\n const [color, setColor] = React.useState<string>('');\n const [dataForHoverCard, setDataForHoverCard] = React.useState<number>(0);\n const [isLegendSelected, setIsLegendSelected] = React.useState<boolean>(\n (props.legendProps?.selectedLegends && props.legendProps.selectedLegends.length > 0) ||\n props.legendProps?.selectedLegend !== undefined,\n );\n const [isLegendHovered, setIsLegendHovered] = React.useState<boolean>(false);\n const [selectedLegendTitle, setSelectedLegendTitle] = React.useState<string>(props.legendProps?.selectedLegend ?? '');\n const [xCalloutValue, setXCalloutValue] = React.useState<string>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string>('');\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<HorizontalBarChartWithAxisDataPoint>();\n const [callOutAccessibilityData, setCallOutAccessibilityData] = React.useState<AccessibilityProps>();\n const [isPopoverOpen, setPopoverOpen] = React.useState<boolean>(false);\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const prevPropsRef = React.useRef<HorizontalBarChartWithAxisProps | null>(null);\n\n React.useEffect(() => {\n if (prevPropsRef.current) {\n const prevProps = prevPropsRef.current;\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, props.legendProps?.selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n }\n prevPropsRef.current = props;\n }, [props]);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: cartesianChartRef.current?.chartContainer ?? null,\n toImage: (opts?: ImageExportOptions): Promise<string> => {\n return toImage(cartesianChartRef.current?.chartContainer, _legendsRef.current?.toSVG, _isRtl, opts);\n },\n }),\n [],\n );\n\n function _adjustProps(): void {\n _points = props.data || [];\n _barHeight = props.barHeight || 32;\n const defaultPalette: string[] = [\n getColorFromToken(DataVizPalette.color6),\n getColorFromToken(DataVizPalette.color1),\n getColorFromToken(DataVizPalette.color5),\n getColorFromToken(DataVizPalette.color7),\n ];\n _colors = props.colors! || defaultPalette;\n }\n\n function _getMargins(margins: Margins) {\n _margins = margins;\n }\n\n function _renderContentForOnlyBars(point: HorizontalBarChartWithAxisDataPoint): JSXElement {\n const { useSingleColor = false } = props;\n let selectedPointIndex = 0;\n props.data!.forEach((yDataPoint: HorizontalBarChartWithAxisDataPoint, index: number) => {\n if (yDataPoint.y === point.y) {\n selectedPointIndex = index;\n }\n });\n // eslint-disable-next-line @typescript-eslint/no-shadow\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = props.colors ? _createColors()(1) : getNextColor(1, 0);\n } else {\n color = point.color ? point.color : props.colors ? _createColors()(point.x) : getNextColor(selectedPointIndex, 0);\n }\n return (\n <>\n <ChartPopover\n XValue={point.xAxisCalloutData || point.x.toString()}\n legend={point.legend}\n YValue={point.yAxisCalloutData || point.y}\n color={color}\n culture={props.culture}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n />\n </>\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n function _renderCallout(props?: HorizontalBarChartWithAxisDataPoint): JSXElement | null {\n return props ? _renderContentForOnlyBars(props) : null;\n }\n\n function _getCustomizedCallout() {\n return props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps, _renderCallout)\n : null;\n }\n\n function _getGraphData(\n xScale: NumericAxis,\n yScale: NumericAxis | StringAxis,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n yElement?: SVGElement | null,\n ) {\n const stackedChartData = groupChartDataByYValue(_points);\n const longestBars = computeLongestBars(stackedChartData, X_ORIGIN);\n _longestBarPositiveTotalValue = longestBars.longestPositiveBar;\n _longestBarNegativeTotalValue = longestBars.longestNegativeBar;\n\n const { xBarScale, yBarScale } =\n _yAxisType === YAxisType.NumericAxis\n ? _getScales(containerHeight, containerWidth, true)\n : _getScales(containerHeight, containerWidth, false);\n const xRange = xBarScale.range();\n let allBars: JSXElement[] = [];\n // when the chart mounts, the xRange[1] is sometimes seen to be < 0 (like -40) while xRange[0] > 0.\n if (xRange[0] < xRange[1]) {\n allBars = stackedChartData\n .map(singleBarData =>\n _yAxisType === YAxisType.NumericAxis\n ? _createNumericBars(\n containerHeight,\n containerWidth,\n xElement!,\n yElement!,\n singleBarData,\n xBarScale,\n yBarScale,\n )\n : _createStringBars(\n containerHeight,\n containerWidth,\n xElement!,\n yElement!,\n singleBarData,\n xBarScale,\n yBarScale,\n ),\n )\n .flat();\n }\n\n return (_bars = allBars);\n }\n\n function _createColors(): D3ScaleLinear<string, string> | ColorScale {\n const increment = _colors.length <= 1 ? 1 : 1 / (_colors.length - 1);\n const { useSingleColor = false } = props;\n if (useSingleColor) {\n return (_p?: number) => {\n const { colors } = props;\n return colors && colors.length > 0 ? colors[0] : getColorFromToken(DataVizPalette.color16);\n };\n }\n const domainValues = [];\n for (let i = 0; i < _colors.length; i++) {\n domainValues.push(increment * i * _xMax);\n }\n const colorScale = d3ScaleLinear<string>().domain(domainValues).range(_colors);\n return colorScale;\n }\n\n function _refCallback(element: SVGRectElement, legendTitle: string): void {\n _refArray.push({ index: legendTitle, refElement: element });\n }\n\n function _onBarHover(\n point: HorizontalBarChartWithAxisDataPoint,\n // eslint-disable-next-line @typescript-eslint/no-shadow\n color: string,\n mouseEvent: React.MouseEvent<SVGElement, MouseEvent>,\n ): void {\n mouseEvent.persist();\n // eslint-disable-next-line @typescript-eslint/no-shadow\n if ((isLegendSelected === false || _isLegendHighlighted(point.legend)) && _calloutAnchorPoint !== point) {\n _calloutAnchorPoint = point;\n setPopoverOpen(true);\n _updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n setDataForHoverCard(point.x);\n setSelectedLegendTitle(point.legend!);\n setColor(props.useSingleColor || props.enableGradient ? color : point.color!);\n // To display callout value, if no callout value given, taking given point.x value as a string.\n setXCalloutValue(point.yAxisCalloutData! || point.y.toString());\n setYCalloutValue(point.xAxisCalloutData || point.x.toString());\n setDataPointCalloutProps(point);\n setCallOutAccessibilityData(point.callOutAccessibilityData);\n }\n }\n\n function _onBarLeave(): void {\n setPopoverOpen(false);\n }\n\n function _handleChartMouseLeave(): void {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n function _onBarFocus(\n event: React.FocusEvent<SVGRectElement, Element>,\n point: HorizontalBarChartWithAxisDataPoint,\n refArrayIndexNumber: number,\n color: string,\n ): void {\n let cx = 0;\n let cy = 0;\n\n const targetRect = (event.target as SVGRectElement).getBoundingClientRect();\n cx = targetRect.left + targetRect.width / 2;\n cy = targetRect.top + targetRect.height / 2;\n _updatePosition(cx, cy);\n if ((isLegendSelected === false || _isLegendHighlighted(point.legend)) && _calloutAnchorPoint !== point) {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n _refArray.forEach((obj: RefArrayData, index: number) => {\n if (refArrayIndexNumber === index) {\n setPopoverOpen(true);\n setSelectedLegendTitle(point.legend!);\n setDataForHoverCard(point.x);\n setColor(props.useSingleColor ? color : point.color!);\n setXCalloutValue(point.yAxisCalloutData || point.y.toString());\n setYCalloutValue(point.xAxisCalloutData! || point.x.toString());\n setDataPointCalloutProps(point);\n setCallOutAccessibilityData(point.callOutAccessibilityData);\n }\n });\n }\n }\n\n function _getScales(\n containerHeight: number,\n containerWidth: number,\n isNumericScale: boolean,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): { xBarScale: any; yBarScale: any } {\n const xMax = _longestBarPositiveTotalValue;\n const xMin = _longestBarNegativeTotalValue;\n const xDomain = [Math.min(X_ORIGIN, xMin), Math.max(X_ORIGIN, xMax)];\n if (isNumericScale) {\n const yMax = d3Max(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n const yMin = d3Min(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n const yDomainMax = Math.max(yMax, props.yMaxValue || 0);\n // Default to 0 if yMinValue is not provided.\n const yMinProp = props.yMinValue || 0;\n const yDomainMin = Math.min(yMin, yMinProp);\n const xBarScale = d3ScaleLinear()\n .domain(xDomain)\n .nice()\n .range([_margins.left!, containerWidth - _margins.right!]);\n const yBarScale = d3ScaleLinear()\n .domain([yDomainMin, yDomainMax])\n .range([containerHeight - (_margins.bottom! + _domainMargin), _margins.top! + _domainMargin]);\n return { xBarScale, yBarScale };\n } else {\n // please note these padding default values must be consistent in here\n // and CatrtesianChartBase w for more details refer example\n // http://using-d3js.com/04_07_ordinal_scales.html\n const yBarScale = d3ScaleBand()\n .domain(_yAxisLabels)\n .range([containerHeight - (_margins.bottom! + _domainMargin), _margins.top! + _domainMargin])\n .padding(_yAxisPadding);\n\n const xBarScale = d3ScaleLinear()\n .domain(xDomain)\n .nice()\n .range([_margins.left!, containerWidth - _margins.right!]);\n return { xBarScale, yBarScale };\n }\n }\n\n function _createNumericBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n singleBarData: HorizontalBarChartWithAxisDataPoint[],\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xBarScale: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yBarScale: any,\n ): JSXElement[] {\n const { useSingleColor = false } = props;\n const sortedBars: HorizontalBarChartWithAxisDataPoint[] = [...singleBarData];\n sortedBars.sort((a, b) => {\n const aValue = typeof a.y === 'number' ? a.y : parseFloat(a.y);\n const bValue = typeof b.y === 'number' ? b.y : parseFloat(b.y);\n return bValue - aValue;\n });\n\n let prevWidthPositive = 0;\n let prevWidthNegative = 0;\n let prevPoint = 0;\n\n const totalPositiveBars = singleBarData.filter(\n (point: HorizontalBarChartWithAxisDataPoint) => point.x >= X_ORIGIN,\n ).length;\n const totalNegativeBars = singleBarData.length - totalPositiveBars;\n let currPositiveCounter = 0;\n let currNegativeCounter = 0;\n\n const bars = sortedBars.map((point: HorizontalBarChartWithAxisDataPoint, index: number) => {\n let shouldHighlight = true;\n if (isLegendHovered || isLegendSelected) {\n shouldHighlight = _isLegendHighlighted(point.legend);\n }\n if (point.x >= X_ORIGIN) {\n ++currPositiveCounter;\n }\n if (point.x < X_ORIGIN) {\n ++currNegativeCounter;\n }\n const barStartX = _isRtl\n ? containerWidth -\n (_margins.right! + Math.max(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN)) - _margins.left!)\n : Math.min(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN));\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let startColor: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n startColor = props.colors ? _createColors()(1) : getNextColor(1, 0);\n } else {\n startColor = props.colors ? _createColors()(point.x) : getNextColor(index, 0);\n }\n\n startColor = point.color && !useSingleColor ? point.color : startColor;\n\n const prevBarWidth = Math.abs(xBarScale(prevPoint + X_ORIGIN) - xBarScale(X_ORIGIN));\n prevPoint > X_ORIGIN ? (prevWidthPositive += prevBarWidth) : (prevWidthNegative += prevBarWidth);\n const currentWidth = Math.abs(xBarScale(point.x + X_ORIGIN) - xBarScale(X_ORIGIN));\n const gapWidthLTR =\n currentWidth > 2 &&\n ((point.x > X_ORIGIN && currPositiveCounter !== totalPositiveBars) ||\n (point.x < X_ORIGIN && (totalPositiveBars !== 0 || currNegativeCounter > 1)))\n ? 2\n : 0;\n const gapWidthRTL =\n currentWidth > 2 &&\n ((point.x > X_ORIGIN && (totalNegativeBars !== 0 || currPositiveCounter > 1)) ||\n (point.x < X_ORIGIN && currNegativeCounter !== totalNegativeBars))\n ? 2\n : 0;\n let xStart = X_ORIGIN;\n if (_isRtl) {\n xStart = point.x > X_ORIGIN ? barStartX - prevWidthPositive : barStartX + prevWidthNegative;\n } else {\n xStart = point.x > X_ORIGIN ? barStartX + prevWidthPositive : barStartX - prevWidthNegative;\n }\n prevPoint = point.x;\n\n return (\n <React.Fragment key={`${index}_${point.x}`}>\n <rect\n key={point.y}\n x={xStart}\n y={yBarScale(point.y) - _barHeight / 2}\n data-is-focusable={shouldHighlight}\n width={currentWidth - (_isRtl ? gapWidthRTL : gapWidthLTR)}\n height={_barHeight}\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n rx={props.roundCorners ? 3 : 0}\n onClick={point.onClick}\n onMouseOver={(event: React.MouseEvent<SVGElement, MouseEvent>) => _onBarHover(point, startColor, event)}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n aria-labelledby={`toolTip${_calloutId}`}\n onMouseLeave={_onBarLeave}\n onFocus={event => _onBarFocus(event, point, index, startColor)}\n onBlur={_onBarLeave}\n fill={startColor}\n opacity={shouldHighlight ? 1 : 0.1}\n tabIndex={point.legend !== '' ? 0 : undefined}\n />\n </React.Fragment>\n );\n });\n return bars;\n }\n\n function _getUniqueYValues() {\n const mapY: Record<string, number | string> = {};\n props.data?.forEach((point: HorizontalBarChartWithAxisDataPoint) => {\n mapY[point.y] = point.y;\n });\n const uniqueY = Object.values(mapY);\n return uniqueY;\n }\n\n function _calculateAppropriateBarHeight(data: number[] | Date[], totalWidth: number, innerPadding: number) {\n const result = getClosestPairDiffAndRange(data);\n if (!result || result[1] === 0) {\n return 16;\n }\n const closestPairDiff = result[0];\n let range = result[1];\n const yMax = d3Max(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n // Since we are always rendering from 0 to yMax, we need to ensure that the range is at least yMax\n // to calculate the bar height correctly.\n range = Math.max(range, yMax);\n // Refer to https://microsoft.github.io/fluentui-charting-contrib/docs/rfcs/fix-overlapping-bars-on-continuous-axes\n // for the derivation of the following formula.\n const barWidth = Math.floor(\n (totalWidth * closestPairDiff * (1 - innerPadding)) / (range + closestPairDiff * (1 - innerPadding)),\n );\n return barWidth;\n }\n\n function _getDomainMarginsForHorizontalBarChart(containerHeight: number): Margins {\n _domainMargin = MIN_DOMAIN_MARGIN;\n const uniqueY = _getUniqueYValues();\n /** Rate at which the space between the bars changes wrt the bar height */\n _yAxisPadding = _yAxisPadding === 1 ? 0.99 : _yAxisPadding;\n const barGapRate = _yAxisPadding / (1 - _yAxisPadding);\n const numBars = uniqueY.length + (uniqueY.length - 1) * barGapRate;\n // Total height available to render the bars\n const totalHeight = containerHeight - (_margins.top! + MIN_DOMAIN_MARGIN) - (_margins.bottom! + MIN_DOMAIN_MARGIN);\n if (_yAxisType !== YAxisType.StringAxis) {\n // Calculate bar height dynamically\n _barHeight =\n props.barHeight || _calculateAppropriateBarHeight(uniqueY as number[] | Date[], totalHeight, _yAxisPadding);\n _barHeight = Math.max(_barHeight, 1);\n _domainMargin += _barHeight / 2;\n } else {\n // Calculate the appropriate bar height\n _barHeight = props.barHeight || totalHeight / numBars;\n /** Total height required to render the bars. Directly proportional to bar height */\n const reqHeight = numBars * _barHeight;\n if (totalHeight >= reqHeight) {\n // Center align the chart by setting equal left and right margins for domain\n _domainMargin = MIN_DOMAIN_MARGIN + (totalHeight - reqHeight) / 2;\n }\n }\n\n return {\n ..._margins,\n top: _margins.top! + _domainMargin,\n bottom: _margins.bottom! + _domainMargin,\n };\n }\n\n function _createStringBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n singleBarData: HorizontalBarChartWithAxisDataPoint[],\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xBarScale: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yBarScale: any,\n ): JSXElement[] {\n const { useSingleColor = false } = props;\n let prevWidthPositive = 0;\n let prevWidthNegative = 0;\n let prevPoint = 0;\n const totalPositiveBars = singleBarData.filter(\n (point: HorizontalBarChartWithAxisDataPoint) => point.x >= X_ORIGIN,\n ).length;\n const totalNegativeBars = singleBarData.length - totalPositiveBars;\n let currPositiveCounter = 0;\n let currNegativeCounter = 0;\n const bars = singleBarData.map((point: HorizontalBarChartWithAxisDataPoint, index: number) => {\n let shouldHighlight = true;\n if (isLegendHovered || isLegendSelected) {\n shouldHighlight = _isLegendHighlighted(point.legend);\n }\n if (point.x >= X_ORIGIN) {\n ++currPositiveCounter;\n }\n if (point.x < X_ORIGIN) {\n ++currNegativeCounter;\n }\n const barStartX = _isRtl\n ? containerWidth -\n (_margins.right! + Math.max(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN)) - _margins.left!)\n : Math.min(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN));\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let startColor: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n startColor = props.colors ? _createColors()(1) : getNextColor(1, 0);\n } else {\n startColor = props.colors ? _createColors()(point.x) : getNextColor(index, 0);\n }\n\n startColor = point.color && !useSingleColor ? point.color : startColor;\n const prevBarWidth = Math.abs(xBarScale(prevPoint + X_ORIGIN) - xBarScale(X_ORIGIN));\n prevPoint > 0 ? (prevWidthPositive += prevBarWidth) : (prevWidthNegative += prevBarWidth);\n const currentWidth = Math.abs(xBarScale(point.x + X_ORIGIN) - xBarScale(X_ORIGIN));\n const gapWidthLTR =\n currentWidth > 2 &&\n ((point.x > X_ORIGIN && currPositiveCounter !== totalPositiveBars) ||\n (point.x < X_ORIGIN && (totalPositiveBars !== 0 || currNegativeCounter > 1)))\n ? 2\n : 0;\n const gapWidthRTL =\n currentWidth > 2 &&\n ((point.x > X_ORIGIN && (totalNegativeBars !== 0 || currPositiveCounter > 1)) ||\n (point.x < X_ORIGIN && currNegativeCounter !== totalNegativeBars))\n ? 2\n : 0;\n prevPoint = point.x;\n let xStart = X_ORIGIN;\n if (_isRtl) {\n xStart = point.x > X_ORIGIN ? barStartX - prevWidthPositive : barStartX + prevWidthNegative;\n } else {\n xStart = point.x > X_ORIGIN ? barStartX + prevWidthPositive : barStartX - prevWidthNegative;\n }\n return (\n <React.Fragment key={`${index}_${point.x}`}>\n <rect\n transform={`translate(0,${0.5 * (yBarScale.bandwidth() - _barHeight)})`}\n key={point.x}\n x={xStart}\n y={yBarScale(point.y)}\n rx={props.roundCorners ? 3 : 0}\n width={currentWidth - (_isRtl ? gapWidthRTL : gapWidthLTR)}\n height={_barHeight}\n aria-labelledby={`toolTip${_calloutId}`}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={(event: React.MouseEvent<SVGElement, MouseEvent>) => _onBarHover(point, startColor, event)}\n onMouseLeave={_onBarLeave}\n onBlur={_onBarLeave}\n data-is-focusable={shouldHighlight}\n opacity={shouldHighlight ? 1 : 0.1}\n onFocus={event => _onBarFocus(event, point, index, startColor)}\n fill={startColor}\n tabIndex={point.legend !== '' ? 0 : undefined}\n />\n </React.Fragment>\n );\n });\n return bars;\n }\n\n function _onLegendHover(customMessage: string): void {\n if (!_isLegendSelected()) {\n setIsLegendHovered(true);\n setSelectedLegendTitle(customMessage);\n }\n }\n\n function _onLegendLeave(isLegendFocused?: boolean): void {\n if (!!isLegendFocused || !_isLegendSelected()) {\n setIsLegendHovered(false);\n setSelectedLegendTitle('');\n setIsLegendSelected(isLegendFocused ? false : _isLegendSelected());\n }\n }\n\n function _getLegendData(data: HorizontalBarChartWithAxisDataPoint[]): JSXElement {\n const { useSingleColor } = props;\n const actions: Legend[] = [];\n const mapLegendToColor: Record<string, string> = {};\n\n data.forEach((point: HorizontalBarChartWithAxisDataPoint, _index: number) => {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const color: string = useSingleColor ? (props.colors ? _createColors()(1) : getNextColor(1, 0)) : point.color!;\n\n mapLegendToColor[point.legend!] = color;\n });\n Object.entries(mapLegendToColor).forEach(([legendTitle, color]) => {\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: legendTitle,\n color,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(legendTitle);\n },\n // eslint-disable-next-line @typescript-eslint/no-shadow\n onMouseOutAction: (isLegendSelected?: boolean) => {\n _onLegendLeave(isLegendSelected);\n },\n };\n actions.push(legend);\n });\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n onChange={_onLegendSelectionChange}\n legendRef={_legendsRef}\n />\n );\n return legends;\n }\n\n function _isLegendSelected(): boolean {\n return isLegendSelected!;\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n function _isLegendHighlighted(legend?: string) {\n return _getHighlightedLegend().includes(legend!);\n }\n\n function _getHighlightedLegend() {\n return selectedLegends.length > 0 ? selectedLegends : selectedLegendTitle ? [selectedLegendTitle] : [];\n }\n\n function _onLegendSelectionChange(\n // eslint-disable-next-line @typescript-eslint/no-shadow\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(selectedLegends);\n setSelectedLegendTitle(currentLegend?.title!);\n } else {\n setSelectedLegends(selectedLegends.slice(-1));\n setSelectedLegendTitle(currentLegend?.title!);\n }\n setIsLegendSelected(selectedLegends.length > 0);\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n }\n\n function _getAxisData(yAxisData: IAxisData) {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n // For HBCWA x and y Values are swapped\n const { yAxisDomainValues: domainValue } = yAxisData;\n _xMax = Math.max(domainValue[domainValue.length - 1], props.xMaxValue || 0);\n }\n }\n function _getAriaLabel(point: HorizontalBarChartWithAxisDataPoint): string {\n const xValue = point.xAxisCalloutData || point.x;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ` + `${yValue}.`;\n }\n\n function _getChartTitle(): string {\n const { chartTitle, data } = props;\n return (chartTitle ? `${chartTitle}. ` : '') + `Horizontal bar chart with ${data?.length || 0} bars. `;\n }\n\n function _getOrderedYAxisLabels() {\n const shouldOrderYAxisLabelsByCategoryOrder =\n _yAxisType === YAxisType.StringAxis && props.yAxisCategoryOrder !== 'default';\n if (!shouldOrderYAxisLabelsByCategoryOrder) {\n // Keep the original ordering logic as the default behavior to ensure backward compatibility\n const reversedBars = [..._points].reverse();\n return reversedBars.map((point: HorizontalBarChartWithAxisDataPoint) => point.y as string);\n }\n\n return sortAxisCategories(_mapCategoryToValues(), props.yAxisCategoryOrder);\n }\n\n function _mapCategoryToValues() {\n const categoryToValues: Record<string, number[]> = {};\n _points.forEach(point => {\n if (!categoryToValues[point.y]) {\n categoryToValues[point.y] = [];\n }\n categoryToValues[point.y].push(point.x);\n });\n return categoryToValues;\n }\n\n function _isChartEmpty(): boolean {\n return !(props.data && props.data.length > 0);\n }\n\n function _updatePosition(newX: number, newY: number): void {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n\n // Calculate the distance moved\n const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));\n // Update the position only if the distance moved is greater than the threshold\n if (distance > threshold) {\n setClickPosition({ x: newX, y: newY });\n setPopoverOpen(true);\n }\n }\n\n function _getDomainNRangeValues(\n points: HorizontalBarChartWithAxisDataPoint[],\n margins: Margins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n shiftX: number,\n ) {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfNumericForHorizontalBarChartWithAxis(\n points,\n margins,\n width,\n isRTL,\n shiftX,\n X_ORIGIN,\n );\n } else {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n }\n return domainNRangeValue;\n }\n\n if (!_isChartEmpty()) {\n _adjustProps();\n const calloutProps: ChartPopoverProps = {\n color: color,\n legend: selectedLegendTitle,\n XValue: xCalloutValue,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData),\n customCallout: {\n customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n isCartesian: true,\n isPopoverOpen,\n clickPosition,\n };\n const tickParams = {\n tickValues: props.tickValues,\n tickFormat: props.tickFormat,\n };\n\n _yAxisLabels = _getOrderedYAxisLabels();\n _xMax = Math.max(d3Max(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.x)!, props.xMaxValue || 0);\n const legendBars: JSXElement = _getLegendData(_points);\n return (\n <CartesianChart\n yAxisPadding={_yAxisPadding}\n {...props}\n chartTitle={_getChartTitle()}\n points={_points}\n chartType={ChartTypes.HorizontalBarChartWithAxis}\n xAxisType={_xAxisType}\n yAxisType={_yAxisType}\n getDomainNRangeValues={_getDomainNRangeValues}\n stringDatasetForYAxisDomain={_yAxisLabels}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n createYAxis={createYAxisForHorizontalBarChartWithAxis}\n createStringYAxis={createStringYAxisForHorizontalBarChartWithAxis}\n getMinMaxOfYAxis={findHBCWANumericMinMaxOfY}\n barwidth={_barHeight}\n getmargins={_getMargins}\n getYDomainMargins={_getDomainMarginsForHorizontalBarChart}\n getGraphData={_getGraphData}\n getAxisData={_getAxisData}\n onChartMouseLeave={_handleChartMouseLeave}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line @typescript-eslint/no-shadow\n children={(props: ChildProps) => {\n return (\n <>\n <g>{_bars}</g>\n </>\n );\n }}\n />\n );\n } else {\n return (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n }\n});\nHorizontalBarChartWithAxis.displayName = 'HorizontalBarChartWithAxis';\n"],"names":["React","max","d3Max","min","d3Min","scaleLinear","d3ScaleLinear","scaleBand","d3ScaleBand","Legends","useId","CartesianChart","ChartPopover","ChartTypes","getAccessibleDataObject","YAxisType","XAxisTypes","getTypeOfAxis","getNextColor","findHBCWANumericMinMaxOfY","createYAxisForHorizontalBarChartWithAxis","domainRangeOfNumericForHorizontalBarChartWithAxis","createStringYAxisForHorizontalBarChartWithAxis","areArraysEqual","useRtl","DataVizPalette","getColorFromToken","computeLongestBars","groupChartDataByYValue","MIN_DOMAIN_MARGIN","sortAxisCategories","getClosestPairDiffAndRange","toImage","HorizontalBarChartWithAxis","forwardRef","props","yAxisCategoryOrder","forwardedRef","_refArray","_calloutId","_isRtl","_xAxisType","data","length","x","NumericAxis","_yAxisType","y","StringAxis","_emptyChartId","_points","_barHeight","_colors","_margins","_bars","_yAxisLabels","_xMax","_calloutAnchorPoint","_longestBarPositiveTotalValue","_longestBarNegativeTotalValue","_domainMargin","_yAxisPadding","yAxisPadding","cartesianChartRef","useRef","X_ORIGIN","_legendsRef","color","setColor","useState","dataForHoverCard","setDataForHoverCard","isLegendSelected","setIsLegendSelected","legendProps","selectedLegends","selectedLegend","undefined","isLegendHovered","setIsLegendHovered","selectedLegendTitle","setSelectedLegendTitle","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","setSelectedLegends","dataPointCalloutProps","setDataPointCalloutProps","callOutAccessibilityData","setCallOutAccessibilityData","isPopoverOpen","setPopoverOpen","clickPosition","setClickPosition","prevPropsRef","useEffect","current","prevProps","useImperativeHandle","componentRef","chartContainer","opts","toSVG","_adjustProps","barHeight","defaultPalette","color6","color1","color5","color7","colors","_getMargins","margins","_renderContentForOnlyBars","point","useSingleColor","selectedPointIndex","forEach","yDataPoint","index","_createColors","XValue","xAxisCalloutData","toString","legend","YValue","yAxisCalloutData","culture","_renderCallout","_getCustomizedCallout","onRenderCalloutPerDataPoint","_getGraphData","xScale","yScale","containerHeight","containerWidth","xElement","yElement","stackedChartData","longestBars","longestPositiveBar","longestNegativeBar","xBarScale","yBarScale","_getScales","xRange","range","allBars","map","singleBarData","_createNumericBars","_createStringBars","flat","increment","_p","color16","domainValues","i","push","colorScale","domain","_refCallback","element","legendTitle","refElement","_onBarHover","mouseEvent","persist","_isLegendHighlighted","_updatePosition","clientX","clientY","enableGradient","_onBarLeave","_handleChartMouseLeave","_onBarFocus","event","refArrayIndexNumber","cx","cy","targetRect","target","getBoundingClientRect","left","width","top","height","obj","isNumericScale","xMax","xMin","xDomain","Math","yMax","yMin","yDomainMax","yMaxValue","yMinProp","yMinValue","yDomainMin","nice","right","bottom","padding","sortedBars","sort","a","b","aValue","parseFloat","bValue","prevWidthPositive","prevWidthNegative","prevPoint","totalPositiveBars","filter","totalNegativeBars","currPositiveCounter","currNegativeCounter","bars","shouldHighlight","barStartX","Fragment","key","startColor","prevBarWidth","abs","currentWidth","gapWidthLTR","gapWidthRTL","xStart","rect","data-is-focusable","ref","e","rx","roundCorners","onClick","onMouseOver","aria-label","_getAriaLabel","role","aria-labelledby","onMouseLeave","onFocus","onBlur","fill","opacity","tabIndex","_getUniqueYValues","mapY","uniqueY","Object","values","_calculateAppropriateBarHeight","totalWidth","innerPadding","result","closestPairDiff","barWidth","floor","_getDomainMarginsForHorizontalBarChart","barGapRate","numBars","totalHeight","reqHeight","transform","bandwidth","_onLegendHover","customMessage","_isLegendSelected","_onLegendLeave","isLegendFocused","_getLegendData","actions","mapLegendToColor","_index","entries","title","hoverAction","onMouseOutAction","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onChange","_onLegendSelectionChange","legendRef","_getHighlightedLegend","includes","currentLegend","canSelectMultipleLegends","slice","_getAxisData","yAxisData","yAxisDomainValues","domainValue","xMaxValue","xValue","yValue","ariaLabel","_getChartTitle","chartTitle","_getOrderedYAxisLabels","shouldOrderYAxisLabelsByCategoryOrder","reversedBars","reverse","_mapCategoryToValues","categoryToValues","_isChartEmpty","newX","newY","threshold","distance","sqrt","pow","_getDomainNRangeValues","points","chartType","isRTL","xAxisType","tickValues","shiftX","domainNRangeValue","dStartValue","dEndValue","rStartValue","rEndValue","calloutProps","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","isCartesian","tickParams","tickFormat","legendBars","yAxisType","getDomainNRangeValues","stringDatasetForYAxisDomain","createYAxis","createStringYAxis","getMinMaxOfYAxis","barwidth","getmargins","getYDomainMargins","getGraphData","getAxisData","onChartMouseLeave","children","g","div","id","style","displayName"],"mappings":"AAAA;;;;;+BAkDaiC;;;;;;;iEAhDU,QAAQ;yBACY,WAAW;yBAC+C,WAAW;yBAExF,mCAAmC;gCACrC,4BAA4B;gCAYnB,qCAAqC;8BAEvC,mCAAmC;uBAwBzD,wBAAwB;0BACY,4BAA4B;kCAC/C,qCAAqC;AAGtD,mCAAMA,WAAAA,GAAuFjC,OAAMkC,UAAU,CAGlH,CAACC,QAAQ;IAAEC,oBAAoB;AAAU,CAAC,EAAEC;QAiCzCF,oBACCA,qBAGyEA,qBAGNA;IAvCvE,MAAMG,YAA4B,EAAE;IACpC,MAAMC,iBAAqB7B,qBAAAA,EAAM;IACjC,MAAM8B,aAAkBhB,aAAAA;IACxB,MAAMiB,aACJN,MAAMO,IAAI,IAAKP,MAAMO,IAAI,CAAEC,MAAM,GAAG,QAC/B1B,oBAAAA,EAAckB,MAAMO,IAAK,CAAC,EAAE,CAACE,CAAC,EAAE,QACjC5B,iBAAAA,CAAW6B,WAAW;IAC5B,MAAMC,aACJX,MAAMO,IAAI,IAAKP,MAAMO,IAAI,CAAEC,MAAM,GAAG,QAC/B1B,oBAAAA,EAAckB,MAAMO,IAAK,CAAC,EAAE,CAACK,CAAC,EAAE,SACjChC,gBAAAA,CAAUiC,UAAU;IAC1B,MAAMC,oBAAwBvC,qBAAAA,EAAM;IACpC,IAAIwC,UAAiD,EAAE;IACvD,IAAIC,aAAqB;IACzB,IAAIC,UAAoB,EAAE;IAC1B,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,8DAA8D;IAC9D,IAAIC;IACJ,IAAIC;IACJ,IAAIC,gBAAwB/B,wBAAAA;QACAM;IAA5B,IAAI0B,gBAAwB1B,CAAAA,sBAAAA,MAAM2B,YAAAA,AAAY,MAAA,QAAlB3B,wBAAA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OAAAA;YAAIC,IAAIjT;YAAeiM,MAAM;YAASiH,OAAO;gBAAE3G,SAAS;YAAI;YAAGR,cAAY;;IAEhF;AACF,GAAG;AACH/M,2BAA2BmU,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { max as d3Max, min as d3Min } from 'd3-array';\nimport { scaleLinear as d3ScaleLinear, ScaleLinear as D3ScaleLinear, scaleBand as d3ScaleBand } from 'd3-scale';\nimport { Legend } from '../../components/Legends/Legends.types';\nimport { Legends } from '../../components/Legends/Legends';\nimport { useId } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport {\n AccessibilityProps,\n HorizontalBarChartWithAxisDataPoint,\n RefArrayData,\n Margins,\n ChartPopoverProps,\n} from '../../index';\nimport { ChildProps } from '../CommonComponents/CartesianChart.types';\nimport { CartesianChart } from '../CommonComponents/CartesianChart';\nimport { HorizontalBarChartWithAxisProps } from './HorizontalBarChartWithAxis.types';\nimport { ChartPopover } from '../CommonComponents/ChartPopover';\nimport {\n ChartTypes,\n IAxisData,\n getAccessibleDataObject,\n YAxisType,\n XAxisTypes,\n NumericAxis,\n StringAxis,\n getTypeOfAxis,\n getNextColor,\n findHBCWANumericMinMaxOfY,\n createYAxisForHorizontalBarChartWithAxis,\n IDomainNRange,\n domainRangeOfNumericForHorizontalBarChartWithAxis,\n createStringYAxisForHorizontalBarChartWithAxis,\n areArraysEqual,\n useRtl,\n DataVizPalette,\n getColorFromToken,\n computeLongestBars,\n groupChartDataByYValue,\n MIN_DOMAIN_MARGIN,\n sortAxisCategories,\n} from '../../utilities/index';\nimport { getClosestPairDiffAndRange } from '../../utilities/vbc-utils';\nimport { useImageExport } from '../../utilities/hooks';\ntype ColorScale = (_p?: number) => string;\n\nexport const HorizontalBarChartWithAxis: React.FunctionComponent<HorizontalBarChartWithAxisProps> = React.forwardRef<\n HTMLDivElement,\n HorizontalBarChartWithAxisProps\n>((props = { yAxisCategoryOrder: 'default' }, forwardedRef) => {\n const _refArray: RefArrayData[] = [];\n const _calloutId: string = useId('callout');\n const _isRtl: boolean = useRtl();\n const _xAxisType: XAxisTypes =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data![0].x, true) as XAxisTypes)\n : XAxisTypes.NumericAxis;\n const _yAxisType: YAxisType =\n props.data! && props.data!.length > 0\n ? (getTypeOfAxis(props.data![0].y, false) as YAxisType)\n : YAxisType.StringAxis;\n const _emptyChartId: string = useId('_HBCWithAxis_empty');\n let _points: HorizontalBarChartWithAxisDataPoint[] = [];\n let _barHeight: number = 0;\n let _colors: string[] = [];\n let _margins: Margins;\n let _bars: JSXElement[];\n let _yAxisLabels: string[];\n let _xMax: number;\n let _calloutAnchorPoint: HorizontalBarChartWithAxisDataPoint | null;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let _longestBarPositiveTotalValue: number;\n let _longestBarNegativeTotalValue: number;\n let _domainMargin: number = MIN_DOMAIN_MARGIN;\n let _yAxisPadding: number = props.yAxisPadding ?? 0.5;\n const { cartesianChartRef, legendsRef: _legendsRef } = useImageExport(props.componentRef, props.hideLegend);\n const X_ORIGIN: number = 0;\n\n const [color, setColor] = React.useState<string>('');\n const [dataForHoverCard, setDataForHoverCard] = React.useState<number>(0);\n const [isLegendSelected, setIsLegendSelected] = React.useState<boolean>(\n (props.legendProps?.selectedLegends && props.legendProps.selectedLegends.length > 0) ||\n props.legendProps?.selectedLegend !== undefined,\n );\n const [isLegendHovered, setIsLegendHovered] = React.useState<boolean>(false);\n const [selectedLegendTitle, setSelectedLegendTitle] = React.useState<string>(props.legendProps?.selectedLegend ?? '');\n const [xCalloutValue, setXCalloutValue] = React.useState<string>('');\n const [yCalloutValue, setYCalloutValue] = React.useState<string>('');\n const [selectedLegends, setSelectedLegends] = React.useState<string[]>(props.legendProps?.selectedLegends || []);\n const [dataPointCalloutProps, setDataPointCalloutProps] = React.useState<HorizontalBarChartWithAxisDataPoint>();\n const [callOutAccessibilityData, setCallOutAccessibilityData] = React.useState<AccessibilityProps>();\n const [isPopoverOpen, setPopoverOpen] = React.useState<boolean>(false);\n const [clickPosition, setClickPosition] = React.useState({ x: 0, y: 0 });\n const prevPropsRef = React.useRef<HorizontalBarChartWithAxisProps | null>(null);\n\n React.useEffect(() => {\n if (prevPropsRef.current) {\n const prevProps = prevPropsRef.current;\n if (!areArraysEqual(prevProps.legendProps?.selectedLegends, props.legendProps?.selectedLegends)) {\n setSelectedLegends(props.legendProps?.selectedLegends || []);\n }\n }\n prevPropsRef.current = props;\n }, [props]);\n\n function _adjustProps(): void {\n _points = props.data || [];\n _barHeight = props.barHeight || 32;\n const defaultPalette: string[] = [\n getColorFromToken(DataVizPalette.color6),\n getColorFromToken(DataVizPalette.color1),\n getColorFromToken(DataVizPalette.color5),\n getColorFromToken(DataVizPalette.color7),\n ];\n _colors = props.colors! || defaultPalette;\n }\n\n function _getMargins(margins: Margins) {\n _margins = margins;\n }\n\n function _renderContentForOnlyBars(point: HorizontalBarChartWithAxisDataPoint): JSXElement {\n const { useSingleColor = false } = props;\n let selectedPointIndex = 0;\n props.data!.forEach((yDataPoint: HorizontalBarChartWithAxisDataPoint, index: number) => {\n if (yDataPoint.y === point.y) {\n selectedPointIndex = index;\n }\n });\n let color: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n color = props.colors ? _createColors()(1) : getNextColor(1, 0);\n } else {\n color = point.color ? point.color : props.colors ? _createColors()(point.x) : getNextColor(selectedPointIndex, 0);\n }\n return (\n <>\n <ChartPopover\n XValue={point.xAxisCalloutData || point.x.toString()}\n legend={point.legend}\n YValue={point.yAxisCalloutData || point.y}\n color={color}\n culture={props.culture}\n clickPosition={clickPosition}\n isPopoverOpen={isPopoverOpen}\n />\n </>\n );\n }\n\n function _renderCallout(props?: HorizontalBarChartWithAxisDataPoint): JSXElement | null {\n return props ? _renderContentForOnlyBars(props) : null;\n }\n\n function _getCustomizedCallout() {\n return props.onRenderCalloutPerDataPoint\n ? props.onRenderCalloutPerDataPoint(dataPointCalloutProps, _renderCallout)\n : null;\n }\n\n function _getGraphData(\n xScale: NumericAxis,\n yScale: NumericAxis | StringAxis,\n containerHeight: number,\n containerWidth: number,\n xElement?: SVGElement | null,\n yElement?: SVGElement | null,\n ) {\n const stackedChartData = groupChartDataByYValue(_points);\n const longestBars = computeLongestBars(stackedChartData, X_ORIGIN);\n _longestBarPositiveTotalValue = longestBars.longestPositiveBar;\n _longestBarNegativeTotalValue = longestBars.longestNegativeBar;\n\n const { xBarScale, yBarScale } =\n _yAxisType === YAxisType.NumericAxis\n ? _getScales(containerHeight, containerWidth, true)\n : _getScales(containerHeight, containerWidth, false);\n const xRange = xBarScale.range();\n let allBars: JSXElement[] = [];\n // when the chart mounts, the xRange[1] is sometimes seen to be < 0 (like -40) while xRange[0] > 0.\n if (xRange[0] < xRange[1]) {\n allBars = stackedChartData\n .map(singleBarData =>\n _yAxisType === YAxisType.NumericAxis\n ? _createNumericBars(\n containerHeight,\n containerWidth,\n xElement!,\n yElement!,\n singleBarData,\n xBarScale,\n yBarScale,\n )\n : _createStringBars(\n containerHeight,\n containerWidth,\n xElement!,\n yElement!,\n singleBarData,\n xBarScale,\n yBarScale,\n ),\n )\n .flat();\n }\n\n return (_bars = allBars);\n }\n\n function _createColors(): D3ScaleLinear<string, string> | ColorScale {\n const increment = _colors.length <= 1 ? 1 : 1 / (_colors.length - 1);\n const { useSingleColor = false } = props;\n if (useSingleColor) {\n return (_p?: number) => {\n const { colors } = props;\n return colors && colors.length > 0 ? colors[0] : getColorFromToken(DataVizPalette.color16);\n };\n }\n const domainValues = [];\n for (let i = 0; i < _colors.length; i++) {\n domainValues.push(increment * i * _xMax);\n }\n const colorScale = d3ScaleLinear<string>().domain(domainValues).range(_colors);\n return colorScale;\n }\n\n function _refCallback(element: SVGRectElement, legendTitle: string): void {\n _refArray.push({ index: legendTitle, refElement: element });\n }\n\n function _onBarHover(\n point: HorizontalBarChartWithAxisDataPoint,\n color: string,\n mouseEvent: React.MouseEvent<SVGElement, MouseEvent>,\n ): void {\n mouseEvent.persist();\n if ((isLegendSelected === false || _isLegendHighlighted(point.legend)) && _calloutAnchorPoint !== point) {\n _calloutAnchorPoint = point;\n setPopoverOpen(true);\n _updatePosition(mouseEvent.clientX, mouseEvent.clientY);\n setDataForHoverCard(point.x);\n setSelectedLegendTitle(point.legend!);\n setColor(props.useSingleColor || props.enableGradient ? color : point.color!);\n // To display callout value, if no callout value given, taking given point.x value as a string.\n setXCalloutValue(point.yAxisCalloutData! || point.y.toString());\n setYCalloutValue(point.xAxisCalloutData || point.x.toString());\n setDataPointCalloutProps(point);\n setCallOutAccessibilityData(point.callOutAccessibilityData);\n }\n }\n\n function _onBarLeave(): void {\n setPopoverOpen(false);\n }\n\n function _handleChartMouseLeave(): void {\n _calloutAnchorPoint = null;\n setPopoverOpen(false);\n }\n\n function _onBarFocus(\n event: React.FocusEvent<SVGRectElement, Element>,\n point: HorizontalBarChartWithAxisDataPoint,\n refArrayIndexNumber: number,\n color: string,\n ): void {\n let cx = 0;\n let cy = 0;\n\n const targetRect = (event.target as SVGRectElement).getBoundingClientRect();\n cx = targetRect.left + targetRect.width / 2;\n cy = targetRect.top + targetRect.height / 2;\n _updatePosition(cx, cy);\n if ((isLegendSelected === false || _isLegendHighlighted(point.legend)) && _calloutAnchorPoint !== point) {\n _refArray.forEach((obj: RefArrayData, index: number) => {\n if (refArrayIndexNumber === index) {\n setPopoverOpen(true);\n setSelectedLegendTitle(point.legend!);\n setDataForHoverCard(point.x);\n setColor(props.useSingleColor ? color : point.color!);\n setXCalloutValue(point.yAxisCalloutData || point.y.toString());\n setYCalloutValue(point.xAxisCalloutData! || point.x.toString());\n setDataPointCalloutProps(point);\n setCallOutAccessibilityData(point.callOutAccessibilityData);\n }\n });\n }\n }\n\n function _getScales(\n containerHeight: number,\n containerWidth: number,\n isNumericScale: boolean,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): { xBarScale: any; yBarScale: any } {\n const xMax = _longestBarPositiveTotalValue;\n const xMin = _longestBarNegativeTotalValue;\n const xDomain = [Math.min(X_ORIGIN, xMin), Math.max(X_ORIGIN, xMax)];\n if (isNumericScale) {\n const yMax = d3Max(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n const yMin = d3Min(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n const yDomainMax = Math.max(yMax, props.yMaxValue || 0);\n // Default to 0 if yMinValue is not provided.\n const yMinProp = props.yMinValue || 0;\n const yDomainMin = Math.min(yMin, yMinProp);\n const xBarScale = d3ScaleLinear()\n .domain(xDomain)\n .nice()\n .range([_margins.left!, containerWidth - _margins.right!]);\n const yBarScale = d3ScaleLinear()\n .domain([yDomainMin, yDomainMax])\n .range([containerHeight - (_margins.bottom! + _domainMargin), _margins.top! + _domainMargin]);\n return { xBarScale, yBarScale };\n } else {\n // please note these padding default values must be consistent in here\n // and CatrtesianChartBase w for more details refer example\n // http://using-d3js.com/04_07_ordinal_scales.html\n const yBarScale = d3ScaleBand()\n .domain(_yAxisLabels)\n .range([containerHeight - (_margins.bottom! + _domainMargin), _margins.top! + _domainMargin])\n .padding(_yAxisPadding);\n\n const xBarScale = d3ScaleLinear()\n .domain(xDomain)\n .nice()\n .range([_margins.left!, containerWidth - _margins.right!]);\n return { xBarScale, yBarScale };\n }\n }\n\n function _createNumericBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n singleBarData: HorizontalBarChartWithAxisDataPoint[],\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xBarScale: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yBarScale: any,\n ): JSXElement[] {\n const { useSingleColor = false } = props;\n const sortedBars: HorizontalBarChartWithAxisDataPoint[] = [...singleBarData];\n sortedBars.sort((a, b) => {\n const aValue = typeof a.y === 'number' ? a.y : parseFloat(a.y);\n const bValue = typeof b.y === 'number' ? b.y : parseFloat(b.y);\n return bValue - aValue;\n });\n\n let prevWidthPositive = 0;\n let prevWidthNegative = 0;\n let prevPoint = 0;\n\n const totalPositiveBars = singleBarData.filter(\n (point: HorizontalBarChartWithAxisDataPoint) => point.x >= X_ORIGIN,\n ).length;\n const totalNegativeBars = singleBarData.length - totalPositiveBars;\n let currPositiveCounter = 0;\n let currNegativeCounter = 0;\n\n const bars = sortedBars.map((point: HorizontalBarChartWithAxisDataPoint, index: number) => {\n let shouldHighlight = true;\n if (isLegendHovered || isLegendSelected) {\n shouldHighlight = _isLegendHighlighted(point.legend);\n }\n if (point.x >= X_ORIGIN) {\n ++currPositiveCounter;\n }\n if (point.x < X_ORIGIN) {\n ++currNegativeCounter;\n }\n const barStartX = _isRtl\n ? containerWidth -\n (_margins.right! + Math.max(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN)) - _margins.left!)\n : Math.min(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN));\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let startColor: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n startColor = props.colors ? _createColors()(1) : getNextColor(1, 0);\n } else {\n startColor = props.colors ? _createColors()(point.x) : getNextColor(index, 0);\n }\n\n startColor = point.color && !useSingleColor ? point.color : startColor;\n\n const prevBarWidth = Math.abs(xBarScale(prevPoint + X_ORIGIN) - xBarScale(X_ORIGIN));\n prevPoint > X_ORIGIN ? (prevWidthPositive += prevBarWidth) : (prevWidthNegative += prevBarWidth);\n const currentWidth = Math.abs(xBarScale(point.x + X_ORIGIN) - xBarScale(X_ORIGIN));\n const gapWidthLTR =\n currentWidth > 2 &&\n ((point.x > X_ORIGIN && currPositiveCounter !== totalPositiveBars) ||\n (point.x < X_ORIGIN && (totalPositiveBars !== 0 || currNegativeCounter > 1)))\n ? 2\n : 0;\n const gapWidthRTL =\n currentWidth > 2 &&\n ((point.x > X_ORIGIN && (totalNegativeBars !== 0 || currPositiveCounter > 1)) ||\n (point.x < X_ORIGIN && currNegativeCounter !== totalNegativeBars))\n ? 2\n : 0;\n let xStart = X_ORIGIN;\n if (_isRtl) {\n xStart = point.x > X_ORIGIN ? barStartX - prevWidthPositive : barStartX + prevWidthNegative;\n } else {\n xStart = point.x > X_ORIGIN ? barStartX + prevWidthPositive : barStartX - prevWidthNegative;\n }\n prevPoint = point.x;\n\n return (\n <React.Fragment key={`${index}_${point.x}`}>\n <rect\n key={point.y}\n x={xStart}\n y={yBarScale(point.y) - _barHeight / 2}\n data-is-focusable={shouldHighlight}\n width={currentWidth - (_isRtl ? gapWidthRTL : gapWidthLTR)}\n height={_barHeight}\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n rx={props.roundCorners ? 3 : 0}\n onClick={point.onClick}\n onMouseOver={(event: React.MouseEvent<SVGElement, MouseEvent>) => _onBarHover(point, startColor, event)}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n aria-labelledby={`toolTip${_calloutId}`}\n onMouseLeave={_onBarLeave}\n onFocus={event => _onBarFocus(event, point, index, startColor)}\n onBlur={_onBarLeave}\n fill={startColor}\n opacity={shouldHighlight ? 1 : 0.1}\n tabIndex={point.legend !== '' ? 0 : undefined}\n />\n </React.Fragment>\n );\n });\n return bars;\n }\n\n function _getUniqueYValues() {\n const mapY: Record<string, number | string> = {};\n props.data?.forEach((point: HorizontalBarChartWithAxisDataPoint) => {\n mapY[point.y] = point.y;\n });\n const uniqueY = Object.values(mapY);\n return uniqueY;\n }\n\n function _calculateAppropriateBarHeight(data: number[] | Date[], totalWidth: number, innerPadding: number) {\n const result = getClosestPairDiffAndRange(data);\n if (!result || result[1] === 0) {\n return 16;\n }\n const closestPairDiff = result[0];\n let range = result[1];\n const yMax = d3Max(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n // Since we are always rendering from 0 to yMax, we need to ensure that the range is at least yMax\n // to calculate the bar height correctly.\n range = Math.max(range, yMax);\n // Refer to https://microsoft.github.io/fluentui-charting-contrib/docs/rfcs/fix-overlapping-bars-on-continuous-axes\n // for the derivation of the following formula.\n const barWidth = Math.floor(\n (totalWidth * closestPairDiff * (1 - innerPadding)) / (range + closestPairDiff * (1 - innerPadding)),\n );\n return barWidth;\n }\n\n function _getDomainMarginsForHorizontalBarChart(containerHeight: number): Margins {\n _domainMargin = MIN_DOMAIN_MARGIN;\n const uniqueY = _getUniqueYValues();\n /** Rate at which the space between the bars changes wrt the bar height */\n _yAxisPadding = _yAxisPadding === 1 ? 0.99 : _yAxisPadding;\n const barGapRate = _yAxisPadding / (1 - _yAxisPadding);\n const numBars = uniqueY.length + (uniqueY.length - 1) * barGapRate;\n // Total height available to render the bars\n const totalHeight = containerHeight - (_margins.top! + MIN_DOMAIN_MARGIN) - (_margins.bottom! + MIN_DOMAIN_MARGIN);\n if (_yAxisType !== YAxisType.StringAxis) {\n // Calculate bar height dynamically\n _barHeight =\n props.barHeight || _calculateAppropriateBarHeight(uniqueY as number[] | Date[], totalHeight, _yAxisPadding);\n _barHeight = Math.max(_barHeight, 1);\n _domainMargin += _barHeight / 2;\n } else {\n // Calculate the appropriate bar height\n _barHeight = props.barHeight || totalHeight / numBars;\n /** Total height required to render the bars. Directly proportional to bar height */\n const reqHeight = numBars * _barHeight;\n if (totalHeight >= reqHeight) {\n // Center align the chart by setting equal left and right margins for domain\n _domainMargin = MIN_DOMAIN_MARGIN + (totalHeight - reqHeight) / 2;\n }\n }\n\n return {\n ..._margins,\n top: _margins.top! + _domainMargin,\n bottom: _margins.bottom! + _domainMargin,\n };\n }\n\n function _createStringBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n singleBarData: HorizontalBarChartWithAxisDataPoint[],\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xBarScale: any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yBarScale: any,\n ): JSXElement[] {\n const { useSingleColor = false } = props;\n let prevWidthPositive = 0;\n let prevWidthNegative = 0;\n let prevPoint = 0;\n const totalPositiveBars = singleBarData.filter(\n (point: HorizontalBarChartWithAxisDataPoint) => point.x >= X_ORIGIN,\n ).length;\n const totalNegativeBars = singleBarData.length - totalPositiveBars;\n let currPositiveCounter = 0;\n let currNegativeCounter = 0;\n const bars = singleBarData.map((point: HorizontalBarChartWithAxisDataPoint, index: number) => {\n let shouldHighlight = true;\n if (isLegendHovered || isLegendSelected) {\n shouldHighlight = _isLegendHighlighted(point.legend);\n }\n if (point.x >= X_ORIGIN) {\n ++currPositiveCounter;\n }\n if (point.x < X_ORIGIN) {\n ++currNegativeCounter;\n }\n const barStartX = _isRtl\n ? containerWidth -\n (_margins.right! + Math.max(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN)) - _margins.left!)\n : Math.min(xBarScale(point.x + X_ORIGIN), xBarScale(X_ORIGIN));\n const barHeight: number = Math.max(yBarScale(point.y), 0);\n if (barHeight < 1) {\n return <React.Fragment key={point.x}> </React.Fragment>;\n }\n let startColor: string;\n if (useSingleColor) {\n //if useSingle color , then check if user has given a palette or not\n // and pick the first color from that or else from our paltette.\n startColor = props.colors ? _createColors()(1) : getNextColor(1, 0);\n } else {\n startColor = props.colors ? _createColors()(point.x) : getNextColor(index, 0);\n }\n\n startColor = point.color && !useSingleColor ? point.color : startColor;\n const prevBarWidth = Math.abs(xBarScale(prevPoint + X_ORIGIN) - xBarScale(X_ORIGIN));\n prevPoint > 0 ? (prevWidthPositive += prevBarWidth) : (prevWidthNegative += prevBarWidth);\n const currentWidth = Math.abs(xBarScale(point.x + X_ORIGIN) - xBarScale(X_ORIGIN));\n const gapWidthLTR =\n currentWidth > 2 &&\n ((point.x > X_ORIGIN && currPositiveCounter !== totalPositiveBars) ||\n (point.x < X_ORIGIN && (totalPositiveBars !== 0 || currNegativeCounter > 1)))\n ? 2\n : 0;\n const gapWidthRTL =\n currentWidth > 2 &&\n ((point.x > X_ORIGIN && (totalNegativeBars !== 0 || currPositiveCounter > 1)) ||\n (point.x < X_ORIGIN && currNegativeCounter !== totalNegativeBars))\n ? 2\n : 0;\n prevPoint = point.x;\n let xStart = X_ORIGIN;\n if (_isRtl) {\n xStart = point.x > X_ORIGIN ? barStartX - prevWidthPositive : barStartX + prevWidthNegative;\n } else {\n xStart = point.x > X_ORIGIN ? barStartX + prevWidthPositive : barStartX - prevWidthNegative;\n }\n return (\n <React.Fragment key={`${index}_${point.x}`}>\n <rect\n transform={`translate(0,${0.5 * (yBarScale.bandwidth() - _barHeight)})`}\n key={point.x}\n x={xStart}\n y={yBarScale(point.y)}\n rx={props.roundCorners ? 3 : 0}\n width={currentWidth - (_isRtl ? gapWidthRTL : gapWidthLTR)}\n height={_barHeight}\n aria-labelledby={`toolTip${_calloutId}`}\n aria-label={_getAriaLabel(point)}\n role=\"img\"\n ref={(e: SVGRectElement) => {\n _refCallback(e, point.legend!);\n }}\n onClick={point.onClick}\n onMouseOver={(event: React.MouseEvent<SVGElement, MouseEvent>) => _onBarHover(point, startColor, event)}\n onMouseLeave={_onBarLeave}\n onBlur={_onBarLeave}\n data-is-focusable={shouldHighlight}\n opacity={shouldHighlight ? 1 : 0.1}\n onFocus={event => _onBarFocus(event, point, index, startColor)}\n fill={startColor}\n tabIndex={point.legend !== '' ? 0 : undefined}\n />\n </React.Fragment>\n );\n });\n return bars;\n }\n\n function _onLegendHover(customMessage: string): void {\n if (!_isLegendSelected()) {\n setIsLegendHovered(true);\n setSelectedLegendTitle(customMessage);\n }\n }\n\n function _onLegendLeave(isLegendFocused?: boolean): void {\n if (!!isLegendFocused || !_isLegendSelected()) {\n setIsLegendHovered(false);\n setSelectedLegendTitle('');\n setIsLegendSelected(isLegendFocused ? false : _isLegendSelected());\n }\n }\n\n function _getLegendData(data: HorizontalBarChartWithAxisDataPoint[]): JSXElement {\n const { useSingleColor } = props;\n const actions: Legend[] = [];\n const mapLegendToColor: Record<string, string> = {};\n\n data.forEach((point: HorizontalBarChartWithAxisDataPoint, _index: number) => {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const color: string = useSingleColor ? (props.colors ? _createColors()(1) : getNextColor(1, 0)) : point.color!;\n\n mapLegendToColor[point.legend!] = color;\n });\n Object.entries(mapLegendToColor).forEach(([legendTitle, color]) => {\n // mapping data to the format Legends component needs\n const legend: Legend = {\n title: legendTitle,\n color,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(legendTitle);\n },\n // eslint-disable-next-line @typescript-eslint/no-shadow\n onMouseOutAction: (isLegendSelected?: boolean) => {\n _onLegendLeave(isLegendSelected);\n },\n };\n actions.push(legend);\n });\n const legends = (\n <Legends\n legends={actions}\n enabledWrapLines={props.enabledLegendsWrapLines}\n overflowText={props.legendsOverflowText}\n {...props.legendProps}\n onChange={_onLegendSelectionChange}\n legendRef={_legendsRef}\n />\n );\n return legends;\n }\n\n function _isLegendSelected(): boolean {\n return isLegendSelected!;\n }\n\n /**\n * This function checks if the given legend is highlighted or not.\n * A legend can be highlighted in 2 ways:\n * 1. selection: if the user clicks on it\n * 2. hovering: if there is no selected legend and the user hovers over it\n */\n function _isLegendHighlighted(legend?: string) {\n return _getHighlightedLegend().includes(legend!);\n }\n\n function _getHighlightedLegend() {\n return selectedLegends.length > 0 ? selectedLegends : selectedLegendTitle ? [selectedLegendTitle] : [];\n }\n\n function _onLegendSelectionChange(\n // eslint-disable-next-line @typescript-eslint/no-shadow\n selectedLegends: string[],\n event: React.MouseEvent<HTMLButtonElement>,\n currentLegend?: Legend,\n ): void {\n if (props.legendProps?.canSelectMultipleLegends) {\n setSelectedLegends(selectedLegends);\n setSelectedLegendTitle(currentLegend?.title!);\n } else {\n setSelectedLegends(selectedLegends.slice(-1));\n setSelectedLegendTitle(currentLegend?.title!);\n }\n setIsLegendSelected(selectedLegends.length > 0);\n if (props.legendProps?.onChange) {\n props.legendProps.onChange(selectedLegends, event, currentLegend);\n }\n }\n\n function _getAxisData(yAxisData: IAxisData) {\n if (yAxisData && yAxisData.yAxisDomainValues.length) {\n // For HBCWA x and y Values are swapped\n const { yAxisDomainValues: domainValue } = yAxisData;\n _xMax = Math.max(domainValue[domainValue.length - 1], props.xMaxValue || 0);\n }\n }\n function _getAriaLabel(point: HorizontalBarChartWithAxisDataPoint): string {\n const xValue = point.xAxisCalloutData || point.x;\n const yValue = point.yAxisCalloutData || point.y;\n return point.callOutAccessibilityData?.ariaLabel || `${xValue}. ` + `${yValue}.`;\n }\n\n function _getChartTitle(): string {\n const { chartTitle, data } = props;\n return (chartTitle ? `${chartTitle}. ` : '') + `Horizontal bar chart with ${data?.length || 0} bars. `;\n }\n\n function _getOrderedYAxisLabels() {\n const shouldOrderYAxisLabelsByCategoryOrder =\n _yAxisType === YAxisType.StringAxis && props.yAxisCategoryOrder !== 'default';\n if (!shouldOrderYAxisLabelsByCategoryOrder) {\n // Keep the original ordering logic as the default behavior to ensure backward compatibility\n const reversedBars = [..._points].reverse();\n return reversedBars.map((point: HorizontalBarChartWithAxisDataPoint) => point.y as string);\n }\n\n return sortAxisCategories(_mapCategoryToValues(), props.yAxisCategoryOrder);\n }\n\n function _mapCategoryToValues() {\n const categoryToValues: Record<string, number[]> = {};\n _points.forEach(point => {\n if (!categoryToValues[point.y]) {\n categoryToValues[point.y] = [];\n }\n categoryToValues[point.y].push(point.x);\n });\n return categoryToValues;\n }\n\n function _isChartEmpty(): boolean {\n return !(props.data && props.data.length > 0);\n }\n\n function _updatePosition(newX: number, newY: number): void {\n const threshold = 1; // Set a threshold for movement\n const { x, y } = clickPosition;\n\n // Calculate the distance moved\n const distance = Math.sqrt(Math.pow(newX - x, 2) + Math.pow(newY - y, 2));\n // Update the position only if the distance moved is greater than the threshold\n if (distance > threshold) {\n setClickPosition({ x: newX, y: newY });\n setPopoverOpen(true);\n }\n }\n\n function _getDomainNRangeValues(\n points: HorizontalBarChartWithAxisDataPoint[],\n margins: Margins,\n width: number,\n chartType: ChartTypes,\n isRTL: boolean,\n xAxisType: XAxisTypes,\n barWidth: number,\n tickValues: Date[] | number[] | undefined,\n ) {\n let domainNRangeValue: IDomainNRange;\n if (xAxisType === XAxisTypes.NumericAxis) {\n domainNRangeValue = domainRangeOfNumericForHorizontalBarChartWithAxis(points, margins, width, isRTL, X_ORIGIN);\n } else {\n domainNRangeValue = { dStartValue: 0, dEndValue: 0, rStartValue: 0, rEndValue: 0 };\n }\n return domainNRangeValue;\n }\n\n if (!_isChartEmpty()) {\n _adjustProps();\n const calloutProps: ChartPopoverProps = {\n color: color,\n legend: selectedLegendTitle,\n XValue: xCalloutValue,\n YValue: yCalloutValue ? yCalloutValue : dataForHoverCard,\n ...props.calloutProps,\n ...getAccessibleDataObject(callOutAccessibilityData),\n customCallout: {\n customizedCallout: _getCustomizedCallout() !== null ? _getCustomizedCallout()! : undefined,\n customCalloutProps: props.calloutPropsPerDataPoint\n ? props.calloutPropsPerDataPoint(dataPointCalloutProps!)\n : undefined,\n },\n isCartesian: true,\n isPopoverOpen,\n clickPosition,\n };\n const tickParams = {\n tickValues: props.tickValues,\n tickFormat: props.tickFormat,\n };\n\n _yAxisLabels = _getOrderedYAxisLabels();\n _xMax = Math.max(d3Max(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.x)!, props.xMaxValue || 0);\n const legendBars: JSXElement = _getLegendData(_points);\n return (\n <CartesianChart\n yAxisPadding={_yAxisPadding}\n {...props}\n chartTitle={_getChartTitle()}\n points={_points}\n chartType={ChartTypes.HorizontalBarChartWithAxis}\n xAxisType={_xAxisType}\n yAxisType={_yAxisType}\n getDomainNRangeValues={_getDomainNRangeValues}\n stringDatasetForYAxisDomain={_yAxisLabels}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n createYAxis={createYAxisForHorizontalBarChartWithAxis}\n createStringYAxis={createStringYAxisForHorizontalBarChartWithAxis}\n getMinMaxOfYAxis={findHBCWANumericMinMaxOfY}\n barwidth={_barHeight}\n getmargins={_getMargins}\n getYDomainMargins={_getDomainMarginsForHorizontalBarChart}\n getGraphData={_getGraphData}\n getAxisData={_getAxisData}\n onChartMouseLeave={_handleChartMouseLeave}\n componentRef={cartesianChartRef}\n /* eslint-disable react/jsx-no-bind */\n // eslint-disable-next-line @typescript-eslint/no-shadow\n children={(props: ChildProps) => {\n return (\n <>\n <g>{_bars}</g>\n </>\n );\n }}\n />\n );\n } else {\n return (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n }\n});\nHorizontalBarChartWithAxis.displayName = 'HorizontalBarChartWithAxis';\n"],"names":["React","max","d3Max","min","d3Min","scaleLinear","d3ScaleLinear","scaleBand","d3ScaleBand","Legends","useId","CartesianChart","ChartPopover","ChartTypes","getAccessibleDataObject","YAxisType","XAxisTypes","getTypeOfAxis","getNextColor","findHBCWANumericMinMaxOfY","createYAxisForHorizontalBarChartWithAxis","domainRangeOfNumericForHorizontalBarChartWithAxis","createStringYAxisForHorizontalBarChartWithAxis","areArraysEqual","useRtl","DataVizPalette","getColorFromToken","computeLongestBars","groupChartDataByYValue","MIN_DOMAIN_MARGIN","sortAxisCategories","getClosestPairDiffAndRange","useImageExport","HorizontalBarChartWithAxis","forwardRef","props","yAxisCategoryOrder","forwardedRef","_refArray","_calloutId","_isRtl","_xAxisType","data","length","x","NumericAxis","_yAxisType","y","StringAxis","_emptyChartId","_points","_barHeight","_colors","_margins","_bars","_yAxisLabels","_xMax","_calloutAnchorPoint","_longestBarPositiveTotalValue","_longestBarNegativeTotalValue","_domainMargin","_yAxisPadding","yAxisPadding","cartesianChartRef","legendsRef","_legendsRef","componentRef","hideLegend","X_ORIGIN","color","setColor","useState","dataForHoverCard","setDataForHoverCard","isLegendSelected","setIsLegendSelected","legendProps","selectedLegends","selectedLegend","undefined","isLegendHovered","setIsLegendHovered","selectedLegendTitle","setSelectedLegendTitle","xCalloutValue","setXCalloutValue","yCalloutValue","setYCalloutValue","setSelectedLegends","dataPointCalloutProps","setDataPointCalloutProps","callOutAccessibilityData","setCallOutAccessibilityData","isPopoverOpen","setPopoverOpen","clickPosition","setClickPosition","prevPropsRef","useRef","useEffect","current","prevProps","_adjustProps","barHeight","defaultPalette","color6","color1","color5","color7","colors","_getMargins","margins","_renderContentForOnlyBars","point","useSingleColor","selectedPointIndex","forEach","yDataPoint","index","_createColors","XValue","xAxisCalloutData","toString","legend","YValue","yAxisCalloutData","culture","_renderCallout","_getCustomizedCallout","onRenderCalloutPerDataPoint","_getGraphData","xScale","yScale","containerHeight","containerWidth","xElement","yElement","stackedChartData","longestBars","longestPositiveBar","longestNegativeBar","xBarScale","yBarScale","_getScales","xRange","range","allBars","map","singleBarData","_createNumericBars","_createStringBars","flat","increment","_p","color16","domainValues","i","push","colorScale","domain","_refCallback","element","legendTitle","refElement","_onBarHover","mouseEvent","persist","_isLegendHighlighted","_updatePosition","clientX","clientY","enableGradient","_onBarLeave","_handleChartMouseLeave","_onBarFocus","event","refArrayIndexNumber","cx","cy","targetRect","target","getBoundingClientRect","left","width","top","height","obj","isNumericScale","xMax","xMin","xDomain","Math","yMax","yMin","yDomainMax","yMaxValue","yMinProp","yMinValue","yDomainMin","nice","right","bottom","padding","sortedBars","sort","a","b","aValue","parseFloat","bValue","prevWidthPositive","prevWidthNegative","prevPoint","totalPositiveBars","filter","totalNegativeBars","currPositiveCounter","currNegativeCounter","bars","shouldHighlight","barStartX","Fragment","key","startColor","prevBarWidth","abs","currentWidth","gapWidthLTR","gapWidthRTL","xStart","rect","data-is-focusable","ref","e","rx","roundCorners","onClick","onMouseOver","aria-label","_getAriaLabel","role","aria-labelledby","onMouseLeave","onFocus","onBlur","fill","opacity","tabIndex","_getUniqueYValues","mapY","uniqueY","Object","values","_calculateAppropriateBarHeight","totalWidth","innerPadding","result","closestPairDiff","barWidth","floor","_getDomainMarginsForHorizontalBarChart","barGapRate","numBars","totalHeight","reqHeight","transform","bandwidth","_onLegendHover","customMessage","_isLegendSelected","_onLegendLeave","isLegendFocused","_getLegendData","actions","mapLegendToColor","_index","entries","title","hoverAction","onMouseOutAction","legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onChange","_onLegendSelectionChange","legendRef","_getHighlightedLegend","includes","currentLegend","canSelectMultipleLegends","slice","_getAxisData","yAxisData","yAxisDomainValues","domainValue","xMaxValue","xValue","yValue","ariaLabel","_getChartTitle","chartTitle","_getOrderedYAxisLabels","shouldOrderYAxisLabelsByCategoryOrder","reversedBars","reverse","_mapCategoryToValues","categoryToValues","_isChartEmpty","newX","newY","threshold","distance","sqrt","pow","_getDomainNRangeValues","points","chartType","isRTL","xAxisType","tickValues","domainNRangeValue","dStartValue","dEndValue","rStartValue","rEndValue","calloutProps","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","isCartesian","tickParams","tickFormat","legendBars","yAxisType","getDomainNRangeValues","stringDatasetForYAxisDomain","createYAxis","createStringYAxis","getMinMaxOfYAxis","barwidth","getmargins","getYDomainMargins","getGraphData","getAxisData","onChartMouseLeave","children","g","div","id","style","displayName"],"mappings":"AAAA;;;;;+BAgDaiC;;;;;;;iEA9CU,QAAQ;yBACY,WAAW;yBAC+C,WAAW;yBAExF,mCAAmC;gCACrC,4BAA4B;gCAUnB,qCAAqC;8BAEvC,mCAAmC;uBAwBzD,wBAAwB;0BACY,4BAA4B;uBACxC,wBAAwB;AAGhD,mCAAMA,WAAAA,GAAuFjC,OAAMkC,UAAU,CAGlH,CAACC,QAAQ;IAAEC,oBAAoB;AAAU,CAAC,EAAEC;QAgCzCF,oBACCA,qBAGyEA,qBAGNA;IAtCvE,MAAMG,YAA4B,EAAE;IACpC,MAAMC,iBAAqB7B,qBAAAA,EAAM;IACjC,MAAM8B,aAAkBhB,aAAAA;IACxB,MAAMiB,aACJN,MAAMO,IAAI,IAAKP,MAAMO,IAAI,CAAEC,MAAM,GAAG,QAC/B1B,oBAAAA,EAAckB,MAAMO,IAAK,CAAC,EAAE,CAACE,CAAC,EAAE,QACjC5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,GAAG;AACH7M,2BAA2BgU,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.ts"],"sourcesContent":["import { RenderFunction } from '../../utilities/index';\nimport {\n CartesianChartProps,\n CartesianChartStyleProps,\n CartesianChartStyles,\n HorizontalBarChartWithAxisDataPoint,\n} from '../../index';\n\n/**\n * Horizontal Bar Chart with Axis properties\n * {@docCategory HorizontalBarChartWithAxis}\n */\nexport interface HorizontalBarChartWithAxisProps extends CartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data?: HorizontalBarChartWithAxisDataPoint[];\n\n /**\n * Define a custom callout renderer for a data point.\n */\n onRenderCalloutPerDataPoint?: RenderFunction<HorizontalBarChartWithAxisDataPoint>;\n\n /**\n * Width of each bar in the chart.\n */\n barHeight?: number;\n\n /**\n * Colors from which to select the color of each bar.\n */\n colors?: string[];\n\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * This prop makes sure that all the bars are of same color.\n * it will take the first color from the array of colors in\n * prop `colors` or if `colors` prop is not given then default color is palette.blueLight\n * @default false\n */\n useSingleColor?: boolean;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: HorizontalBarChartWithAxisStyles;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * it's padding between bar's or lines in the graph\n */\n yAxisPadding?: number;\n\n /**\n *@default false\n *Used for to elipse y axis labes and show tooltip on x axis labels\n */\n showYAxisLablesTooltip?: boolean;\n\n /**\n *@default false\n *Used for showing complete y axis lables */\n showYAxisLables?: boolean;\n\n /**\n * @default false\n * The prop used to enable gradient fill color for the chart.\n */\n enableGradient?: boolean;\n\n /**\n * @default false\n * The prop used to enable rounded corners for the bars.\n */\n roundCorners?: boolean;\n}\n\n/**\n * Horizontal Bar Chart with Axis style properties\n * {@docCategory HorizontalBarChartWithAxis}\n */\nexport interface HorizontalBarChartWithAxisStyleProps extends CartesianChartStyleProps {\n /**\n * color of the datapoint legend\n */\n legendColor?: string;\n}\n\n/**\n * Horizontal Bar Chart with Axis styles\n * {@docCategory HorizontalBarChartWithAxis}\n */\nexport interface HorizontalBarChartWithAxisStyles extends CartesianChartStyles {\n /**\n * Style for the chart label.\n *\n */\n chartLabel?: string;\n\n /**\n * Style for the line representing the domain of the x-axis.\n *\n */\n xAxisDomain?: string;\n\n /**\n * Style for the lines representing the ticks along the x-axis.\n *\n */\n xAxisTicks?: string;\n\n /**\n * Style for the text labeling each tick along the x-axis.\n *\n */\n xAxisText?: string;\n\n /**\n * Style for the line representing the domain of the y-axis.\n *\n */\n yAxisDomain?: string;\n\n /**\n * Style for the lines representing the ticks along the y-axis.\n *\n */\n yAxisTicks?: string;\n\n /**\n * Style for the text labeling each tick along the y-axis.\n *\n */\n yAxisText?: string;\n\n /**\n * Style to change the opacity of bars in dataviz when we hover on a single bar or legends\n */\n opacityChangeOnHover: string;\n}\n"],"names":[],"mappings":"AAgGA;;;CAGC,GACD,WA+CC"}
1
+ {"version":3,"sources":["../src/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.ts"],"sourcesContent":["import { RenderFunction } from '../../utilities/index';\nimport {\n CartesianChartProps,\n CartesianChartStyleProps,\n CartesianChartStyles,\n HorizontalBarChartWithAxisDataPoint,\n} from '../../index';\n\n/**\n * Horizontal Bar Chart with Axis properties\n * {@docCategory HorizontalBarChartWithAxis}\n */\nexport interface HorizontalBarChartWithAxisProps extends CartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data?: HorizontalBarChartWithAxisDataPoint[];\n\n /**\n * Define a custom callout renderer for a data point.\n */\n onRenderCalloutPerDataPoint?: RenderFunction<HorizontalBarChartWithAxisDataPoint>;\n\n /**\n * Width of each bar in the chart.\n */\n barHeight?: number;\n\n /**\n * Colors from which to select the color of each bar.\n */\n colors?: string[];\n\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * This prop makes sure that all the bars are of same color.\n * it will take the first color from the array of colors in\n * prop `colors` or if `colors` prop is not given then default color is palette.blueLight\n * @default false\n */\n useSingleColor?: boolean;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: HorizontalBarChartWithAxisStyles;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * it's padding between bar's or lines in the graph\n */\n yAxisPadding?: number;\n\n /**\n * @default false\n * The prop used to enable gradient fill color for the chart.\n */\n enableGradient?: boolean;\n\n /**\n * @default false\n * The prop used to enable rounded corners for the bars.\n */\n roundCorners?: boolean;\n}\n\n/**\n * Horizontal Bar Chart with Axis style properties\n * {@docCategory HorizontalBarChartWithAxis}\n */\nexport interface HorizontalBarChartWithAxisStyleProps extends CartesianChartStyleProps {\n /**\n * color of the datapoint legend\n */\n legendColor?: string;\n}\n\n/**\n * Horizontal Bar Chart with Axis styles\n * {@docCategory HorizontalBarChartWithAxis}\n */\nexport interface HorizontalBarChartWithAxisStyles extends CartesianChartStyles {\n /**\n * Style for the chart label.\n *\n */\n chartLabel?: string;\n\n /**\n * Style for the line representing the domain of the x-axis.\n *\n */\n xAxisDomain?: string;\n\n /**\n * Style for the lines representing the ticks along the x-axis.\n *\n */\n xAxisTicks?: string;\n\n /**\n * Style for the text labeling each tick along the x-axis.\n *\n */\n xAxisText?: string;\n\n /**\n * Style for the line representing the domain of the y-axis.\n *\n */\n yAxisDomain?: string;\n\n /**\n * Style for the lines representing the ticks along the y-axis.\n *\n */\n yAxisTicks?: string;\n\n /**\n * Style for the text labeling each tick along the y-axis.\n *\n */\n yAxisText?: string;\n\n /**\n * Style to change the opacity of bars in dataviz when we hover on a single bar or legends\n */\n opacityChangeOnHover: string;\n}\n"],"names":[],"mappings":"AAqFA;;;CAGC,GACD,WA+CC"}
@@ -40,7 +40,9 @@ const hbcWithAxisClassNames = {
40
40
  chartWrapper: '',
41
41
  svgTooltip: '',
42
42
  chart: '',
43
- axisAnnotation: ''
43
+ axisAnnotation: '',
44
+ plotContainer: '',
45
+ annotationLayer: ''
44
46
  };
45
47
  const useStyles = /*#__PURE__*/ (0, _react.__styles)({
46
48
  opacityChangeOnHover: {
@@ -1 +1 @@
1
- {"version":3,"sources":["useHorizontalBarChartWithAxisStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nexport const hbcWithAxisClassNames = {\n opacityChangeOnHover: 'fui-hbcwa__opacityChangeOnHover',\n xAxisTicks: 'fui-hbcwa__xAxisTicks',\n tooltip: 'fui-hbcwa__tooltip',\n chartLabel: '',\n xAxisDomain: '',\n xAxisText: '',\n yAxisDomain: '',\n yAxisTicks: '',\n yAxisText: '',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: ''\n};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {\n opacity: 0.1\n },\n xAxisTicks: {}\n});\n/**\n * Apply styling to the HorizontalBarChartWithAxis slots based on the state\n */ export const useHorizontalBarChartWithAxisStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n opacityChangeOnHover: mergeClasses(hbcWithAxisClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover),\n xAxisTicks: mergeClasses(hbcWithAxisClassNames.xAxisTicks, baseStyles.xAxisTicks)\n };\n};\n"],"names":["__styles","mergeClasses","hbcWithAxisClassNames","opacityChangeOnHover","xAxisTicks","tooltip","chartLabel","xAxisDomain","xAxisText","yAxisDomain","yAxisTicks","yAxisText","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","abs64n","d","useHorizontalBarChartWithAxisStyles","props","baseStyles"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAECE,qBAAqB;;;uCAgCkB;eAAnC0B;;;uBAjCwB,gBAAgB;AAClD,8BAA8B;IACjCzB,oBAAoB,EAAE,iCAAiC;IACvDC,UAAU,EAAE,uBAAuB;IACnCC,OAAO,EAAE,oBAAoB;IAC7BC,UAAU,EAAE,EAAE;IACdC,WAAW,EAAE,EAAE;IACfC,SAAS,EAAE,EAAE;IACbC,WAAW,EAAE,EAAE;IACfC,UAAU,EAAE,EAAE;IACdC,SAAS,EAAE,EAAE;IACbC,IAAI,EAAE,EAAE;IACRC,KAAK,EAAE,EAAE;IACTC,KAAK,EAAE,EAAE;IACTC,eAAe,EAAE,EAAE;IACnBC,KAAK,EAAE,EAAE;IACTC,kBAAkB,EAAE,EAAE;IACtBC,SAAS,EAAE,EAAE;IACbC,UAAU,EAAE,EAAE;IACdC,WAAW,EAAE,EAAE;IACfC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE,EAAE;IACdC,KAAK,EAAE,EAAE;IACTC,cAAc,EAAE;AACpB,CAAC;AACD,MAAMC,SAAS,GAAA,WAAA,OAAGzB,eAAA,EAAA;IAAAG,oBAAA,EAAA;QAAAuB,MAAA,EAAA;IAAA;IAAAtB,UAAA,EAAA,CAAA;AAAA,GAAA;IAAAuB,CAAA,EAAA;QAAA;KAAA;AAAA,CAKjB,CAAC;AAGS,4CAA6CE,KAAK,IAAG;IAC5D,MAAMC,UAAU,GAAGL,SAAS,CAAC,CAAC;IAC9B,OAAO;QACHtB,oBAAoB,MAAEF,mBAAY,EAACC,qBAAqB,CAACC,oBAAoB,EAAE2B,UAAU,CAAC3B,oBAAoB,CAAC;QAC/GC,UAAU,MAAEH,mBAAY,EAACC,qBAAqB,CAACE,UAAU,EAAE0B,UAAU,CAAC1B,UAAU;IACpF,CAAC;AACL,CAAC"}
1
+ {"version":3,"sources":["useHorizontalBarChartWithAxisStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nexport const hbcWithAxisClassNames = {\n opacityChangeOnHover: 'fui-hbcwa__opacityChangeOnHover',\n xAxisTicks: 'fui-hbcwa__xAxisTicks',\n tooltip: 'fui-hbcwa__tooltip',\n chartLabel: '',\n xAxisDomain: '',\n xAxisText: '',\n yAxisDomain: '',\n yAxisTicks: '',\n yAxisText: '',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n plotContainer: '',\n annotationLayer: ''\n};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {\n opacity: 0.1\n },\n xAxisTicks: {}\n});\n/**\n * Apply styling to the HorizontalBarChartWithAxis slots based on the state\n */ export const useHorizontalBarChartWithAxisStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n opacityChangeOnHover: mergeClasses(hbcWithAxisClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover),\n xAxisTicks: mergeClasses(hbcWithAxisClassNames.xAxisTicks, baseStyles.xAxisTicks)\n };\n};\n"],"names":["__styles","mergeClasses","hbcWithAxisClassNames","opacityChangeOnHover","xAxisTicks","tooltip","chartLabel","xAxisDomain","xAxisText","yAxisDomain","yAxisTicks","yAxisText","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","plotContainer","annotationLayer","useStyles","abs64n","d","useHorizontalBarChartWithAxisStyles","props","baseStyles"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAECE,qBAAqB;;;IAkCjB4B,mCAAmC;;;;uBAnCX,gBAAgB;AAClD,8BAA8B;IACjC3B,oBAAoB,EAAE,iCAAiC;IACvDC,UAAU,EAAE,uBAAuB;IACnCC,OAAO,EAAE,oBAAoB;IAC7BC,UAAU,EAAE,EAAE;IACdC,WAAW,EAAE,EAAE;IACfC,SAAS,EAAE,EAAE;IACbC,WAAW,EAAE,EAAE;IACfC,UAAU,EAAE,EAAE;IACdC,SAAS,EAAE,EAAE;IACbC,IAAI,EAAE,EAAE;IACRC,KAAK,EAAE,EAAE;IACTC,KAAK,EAAE,EAAE;IACTC,eAAe,EAAE,EAAE;IACnBC,KAAK,EAAE,EAAE;IACTC,kBAAkB,EAAE,EAAE;IACtBC,SAAS,EAAE,EAAE;IACbC,UAAU,EAAE,EAAE;IACdC,WAAW,EAAE,EAAE;IACfC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE,EAAE;IACdC,KAAK,EAAE,EAAE;IACTC,cAAc,EAAE,EAAE;IAClBC,aAAa,EAAE,EAAE;IACjBC,eAAe,EAAE;AACrB,CAAC;AACD,MAAMC,SAAS,GAAA,WAAA,OAAG3B,eAAA,EAAA;IAAAG,oBAAA,EAAA;QAAAyB,MAAA,EAAA;IAAA;IAAAxB,UAAA,EAAA,CAAA;AAAA,GAAA;IAAAyB,CAAA,EAAA;QAAA;KAAA;AAAA,CAKjB,CAAC;AAGS,4CAA6CE,KAAK,IAAG;IAC5D,MAAMC,UAAU,GAAGL,SAAS,CAAC,CAAC;IAC9B,OAAO;QACHxB,oBAAoB,MAAEF,mBAAY,EAACC,qBAAqB,CAACC,oBAAoB,EAAE6B,UAAU,CAAC7B,oBAAoB,CAAC;QAC/GC,UAAU,MAAEH,mBAAY,EAACC,qBAAqB,CAACE,UAAU,EAAE4B,UAAU,CAAC5B,UAAU;IACpF,CAAC;AACL,CAAC"}
@@ -40,7 +40,9 @@ const hbcWithAxisClassNames = {
40
40
  chartWrapper: '',
41
41
  svgTooltip: '',
42
42
  chart: '',
43
- axisAnnotation: ''
43
+ axisAnnotation: '',
44
+ plotContainer: '',
45
+ annotationLayer: ''
44
46
  };
45
47
  const useStyles = (0, _react.makeStyles)({
46
48
  opacityChangeOnHover: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { HorizontalBarChartWithAxisProps, HorizontalBarChartWithAxisStyles } from './index';\nimport { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const hbcWithAxisClassNames: SlotClassNames<HorizontalBarChartWithAxisStyles> = {\n opacityChangeOnHover: 'fui-hbcwa__opacityChangeOnHover',\n xAxisTicks: 'fui-hbcwa__xAxisTicks',\n tooltip: 'fui-hbcwa__tooltip',\n chartLabel: '',\n xAxisDomain: '',\n xAxisText: '',\n yAxisDomain: '',\n yAxisTicks: '',\n yAxisText: '',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n};\n\nconst useStyles = makeStyles({\n opacityChangeOnHover: {\n opacity: 0.1, // supports custom opacity\n },\n\n xAxisTicks: {},\n});\n\n/**\n * Apply styling to the HorizontalBarChartWithAxis slots based on the state\n */\nexport const useHorizontalBarChartWithAxisStyles = (\n props: HorizontalBarChartWithAxisProps,\n): HorizontalBarChartWithAxisStyles => {\n const baseStyles = useStyles();\n\n return {\n opacityChangeOnHover: mergeClasses(hbcWithAxisClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover),\n xAxisTicks: mergeClasses(hbcWithAxisClassNames.xAxisTicks, baseStyles.xAxisTicks),\n };\n};\n"],"names":["makeStyles","mergeClasses","hbcWithAxisClassNames","opacityChangeOnHover","xAxisTicks","tooltip","chartLabel","xAxisDomain","xAxisText","yAxisDomain","yAxisTicks","yAxisText","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","opacity","useHorizontalBarChartWithAxisStyles","props","baseStyles"],"mappings":"AAAA;;;;;;;;;;;;IAMaE,qBAAAA;;;uCAoCAyB;;;;uBAxC4B,iBAAiB;AAInD,8BAAgF;IACrFxB,sBAAsB;IACtBC,YAAY;IACZC,SAAS;IACTC,YAAY;IACZC,aAAa;IACbC,WAAW;IACXC,aAAa;IACbC,YAAY;IACZC,WAAW;IACXC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;IACPC,gBAAgB;AAClB,EAAE;AAEF,MAAMC,gBAAYzB,iBAAAA,EAAW;IAC3BG,sBAAsB;QACpBuB,SAAS;IACX;IAEAtB,YAAY,CAAC;AACf;AAKO,MAAMuB,sCAAsC,CACjDC;IAEA,MAAMC,aAAaJ;IAEnB,OAAO;QACLtB,0BAAsBF,mBAAAA,EAAaC,sBAAsBC,oBAAoB,EAAE0B,WAAW1B,oBAAoB;QAC9GC,gBAAYH,mBAAAA,EAAaC,sBAAsBE,UAAU,EAAEyB,WAAWzB,UAAU;IAClF;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { HorizontalBarChartWithAxisProps, HorizontalBarChartWithAxisStyles } from './index';\nimport { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const hbcWithAxisClassNames: SlotClassNames<HorizontalBarChartWithAxisStyles> = {\n opacityChangeOnHover: 'fui-hbcwa__opacityChangeOnHover',\n xAxisTicks: 'fui-hbcwa__xAxisTicks',\n tooltip: 'fui-hbcwa__tooltip',\n chartLabel: '',\n xAxisDomain: '',\n xAxisText: '',\n yAxisDomain: '',\n yAxisTicks: '',\n yAxisText: '',\n root: '',\n xAxis: '',\n yAxis: '',\n legendContainer: '',\n hover: '',\n descriptionMessage: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: '',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n plotContainer: '',\n annotationLayer: '',\n};\n\nconst useStyles = makeStyles({\n opacityChangeOnHover: {\n opacity: 0.1, // supports custom opacity\n },\n\n xAxisTicks: {},\n});\n\n/**\n * Apply styling to the HorizontalBarChartWithAxis slots based on the state\n */\nexport const useHorizontalBarChartWithAxisStyles = (\n props: HorizontalBarChartWithAxisProps,\n): HorizontalBarChartWithAxisStyles => {\n const baseStyles = useStyles();\n\n return {\n opacityChangeOnHover: mergeClasses(hbcWithAxisClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover),\n xAxisTicks: mergeClasses(hbcWithAxisClassNames.xAxisTicks, baseStyles.xAxisTicks),\n };\n};\n"],"names":["makeStyles","mergeClasses","hbcWithAxisClassNames","opacityChangeOnHover","xAxisTicks","tooltip","chartLabel","xAxisDomain","xAxisText","yAxisDomain","yAxisTicks","yAxisText","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","plotContainer","annotationLayer","useStyles","opacity","useHorizontalBarChartWithAxisStyles","props","baseStyles"],"mappings":"AAAA;;;;;;;;;;;;IAMaE,qBAAAA;;;uCAsCA2B;eAAAA;;;uBA1C4B,iBAAiB;AAInD,8BAAgF;IACrF1B,sBAAsB;IACtBC,YAAY;IACZC,SAAS;IACTC,YAAY;IACZC,aAAa;IACbC,WAAW;IACXC,aAAa;IACbC,YAAY;IACZC,WAAW;IACXC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;IACPC,gBAAgB;IAChBC,eAAe;IACfC,iBAAiB;AACnB,EAAE;AAEF,MAAMC,gBAAY3B,iBAAAA,EAAW;IAC3BG,sBAAsB;QACpByB,SAAS;IACX;IAEAxB,YAAY,CAAC;AACf;AAKO,4CAA4C,CACjD0B;IAEA,MAAMC,aAAaJ;IAEnB,OAAO;QACLxB,0BAAsBF,mBAAAA,EAAaC,sBAAsBC,oBAAoB,EAAE4B,WAAW5B,oBAAoB;QAC9GC,gBAAYH,mBAAAA,EAAaC,sBAAsBE,UAAU,EAAE2B,WAAW3B,UAAU;IAClF;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Legends/Legends.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { CustomPoints, Points } from '../../utilities/utilities';\n\n/**\n * @public\n * Legends styles\n * {@docCategory Legends}\n */\nexport interface LegendsStyles {\n /**\n * Style set for the root of the legend component\n */\n root?: string;\n\n /**\n * Style set for Legend. This is a wrapping class for text of legend and the rectange box that represents a legend\n */\n legend?: string;\n\n /**\n * Style set for the rectangle that represents a legend\n */\n rect?: string;\n\n /**\n * styles set for the shape that represents a legend\n */\n shape?: string;\n\n /**\n * Style set for the triangle that represents a legend\n */\n triangle?: string;\n\n /**\n * Style for the legend text\n */\n text?: string;\n\n /**\n * Style for the legend text\n */\n hoverChange?: string;\n\n /**\n * Style for the area that is resizable\n */\n resizableArea?: string;\n\n /*\n * Style for the container that holds the legend and any optional JSX annotation from client is used\n */\n legendContainer?: string;\n\n /**\n * Style for the annotation that is used in the legend\n */\n annotation?: string;\n}\n\n/**\n * @public\n * ILegend interface\n * {@docCategory Legends}\n */\nexport interface Legend {\n /**\n * Defines the title of the legend\n */\n title: string;\n\n /**\n * Defines the function that is executed on clicking this legend\n */\n action?: VoidFunction;\n\n /**\n * Defines the function that is executed upon hovering over the legend\n */\n hoverAction?: VoidFunction;\n\n /**\n * Defines the function that is executed upon moving the mouse away from the legend\n */\n onMouseOutAction?: (isLegendFocused?: boolean) => void;\n\n /**\n * The color for the legend\n */\n color: string;\n\n /**\n * The opacity of the legend color\n */\n opacity?: number;\n\n /**\n * The shape for the legend\n */\n shape?: LegendShape;\n\n /**\n * Indicated whether or not to apply stripe pattern\n */\n stripePattern?: boolean;\n\n /**\n * Indicates if the legend belongs to a line in the Bar Chart\n */\n isLineLegendInBarChart?: boolean;\n\n /*\n * native button props for the legend button\n */\n nativeButtonProps?: React.ButtonHTMLAttributes<HTMLButtonElement>;\n\n /**\n * The annotation for the legend, function returning a React node\n */\n legendAnnotation?: () => React.ReactNode;\n}\n\n/**\n * @public\n * Legend style properties\n * {@docCategory Legends}\n */\nexport interface LegendStyleProps {\n className?: string;\n colorOnSelectedState?: string;\n borderColor?: string;\n opacity?: number;\n overflow?: boolean;\n stripePattern?: boolean;\n isLineLegendInBarChart?: boolean;\n}\n\n/**\n * @public\n * Legend properties\n * {@docCategory Legends}\n */\nexport interface LegendsProps {\n /**\n * Prop that takes list of legends\n */\n legends: Legend[];\n\n /**\n * Additional CSS class(es) to apply to the legneds component.\n */\n className?: string;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: LegendsStyles;\n\n /**\n * This prop makes the legends component align itself to the center in the container it is sitting in\n */\n centerLegends?: boolean;\n\n /**\n * Enable the legends to wrap lines if there is not enough space to show all legends on a single line\n */\n enabledWrapLines?: boolean;\n\n /**\n * style for the overflow component\n */\n overflowStyles?: React.CSSProperties;\n\n /**\n * text for overflow legends string\n */\n overflowText?: string;\n\n /**\n * prop that decides if legends are focusable\n * @default true\n */\n allowFocusOnLegends?: boolean;\n\n /**\n * prop that decide if we can select multiple legends or single legend at a time\n * @default false\n */\n canSelectMultipleLegends?: boolean;\n\n /**\n * Callback issued when the selected option changes.\n */\n onChange?: (selectedLegends: string[], event: React.MouseEvent<HTMLButtonElement>, currentLegend?: Legend) => void;\n\n /**\n * Keys (title) that will be initially used to set selected items. This prop is used for multi-select scenarios when\n * canSelectMultipleLegends is true; for single-select, use defaultSelectedLegend.\n *\n * Updating this prop does not change the selection after the component has been initialized. For controlled\n * selections, use selectedLegends instead.\n *\n * @see selectedLegends for setting the selected legends in controlled mode.\n * @see defaultSelectedLegend for setting the initially selected legend when canSelectMultipleLegends is false.\n */\n defaultSelectedLegends?: string[];\n\n /**\n * Key that will be initially used to set selected item. This prop is used for single-select scenarios when\n * canSelectMultipleLegends is false or unspecified; for multi-select, use defaultSelectedLegends.\n *\n * Updating this prop does not change the selection after the component has been initialized. For controlled\n * selections, use selectedLegend instead.\n *\n * @see selectedLegend for setting the selected legend in controlled mode.\n * @see defaultSelectedLegends for setting the initially selected legends when canSelectMultipleLegends is true.\n */\n defaultSelectedLegend?: string;\n\n /**\n * Keys (title) that will be used to set selected items in multi-select scenarios when canSelectMultipleLegends is\n * true. For single-select, use selectedLegend.\n *\n * When this prop is provided, the component is controlled and does not automatically update the selection based on\n * user interactions; the parent component must update the value passed to this property by handling the onChange\n * event.\n *\n * @see defaultSelectedLegends for setting the initially-selected legends in uncontrolled mode.\n * @see selectedLegends for setting the selected legends when `canSelectMultipleLegends` is `true`.\n */\n selectedLegends?: string[];\n\n /**\n * Key (title) that will be used to set the selected item in single-select scenarios when canSelectMultipleLegends is\n * false or unspecified. For multi-select, use selectedLegends.\n *\n * When this prop is provided, the component is controlled and does not automatically update the selection based on\n * user interactions; the parent component must update the value passed to this property by handling the onChange\n * event.\n *\n * @see defaultSelectedLegend for setting the initially-selected legend in uncontrolled mode.\n * @see selectedLegend for setting the selected legend when `canSelectMultipleLegends` is `false`.\n */\n selectedLegend?: string;\n\n /**\n * The shape for the legend.\n */\n shape?: LegendShape;\n\n /**\n * Callback to access the public methods and properties of the component.\n */\n legendRef?: React.RefObject<LegendContainer | null>;\n}\n\n/**\n * @public\n * The shape for the legend\n * default: show the rect legend\n * triangle: show the triangle legend\n * {@docCategory Legends}\n */\nexport type LegendShape = 'default' | 'triangle' | keyof typeof Points | keyof typeof CustomPoints;\n\n/**\n * {@docCategory Legends}\n */\nexport interface LegendContainer {\n toSVG: (\n svgWidth: number,\n isRTL?: boolean,\n ) => {\n node: SVGGElement | null;\n width: number;\n height: number;\n };\n}\n"],"names":["React"],"mappings":";;;;;iEAAuB,QAAQ"}
1
+ {"version":3,"sources":["../src/components/Legends/Legends.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { CustomPoints, Points } from '../../utilities/utilities';\n\n/**\n * @public\n * Legends styles\n * {@docCategory Legends}\n */\nexport interface LegendsStyles {\n /**\n * Style set for the root of the legend component\n */\n root?: string;\n\n /**\n * Style set for Legend. This is a wrapping class for text of legend and the rectange box that represents a legend\n */\n legend?: string;\n\n /**\n * Style set for the rectangle that represents a legend\n */\n rect?: string;\n\n /**\n * styles set for the shape that represents a legend\n */\n shape?: string;\n\n /**\n * Style set for the triangle that represents a legend\n */\n triangle?: string;\n\n /**\n * Style for the legend text\n */\n text?: string;\n\n /**\n * Style for the legend text\n */\n hoverChange?: string;\n\n /**\n * Style for the area that is resizable\n */\n resizableArea?: string;\n\n /*\n * Style for the container that holds the legend and any optional JSX annotation from client is used\n */\n legendContainer?: string;\n\n /**\n * Style for the annotation that is used in the legend\n */\n annotation?: string;\n}\n\n/**\n * @public\n * ILegend interface\n * {@docCategory Legends}\n */\nexport interface Legend {\n /**\n * Defines the title of the legend\n */\n title: string;\n\n /**\n * Defines the function that is executed on clicking this legend\n */\n action?: VoidFunction;\n\n /**\n * Defines the function that is executed upon hovering over the legend\n */\n hoverAction?: VoidFunction;\n\n /**\n * Defines the function that is executed upon moving the mouse away from the legend\n */\n onMouseOutAction?: (isLegendFocused?: boolean) => void;\n\n /**\n * The color for the legend\n */\n color: string;\n\n /**\n * The opacity of the legend color\n */\n opacity?: number;\n\n /**\n * The shape for the legend\n */\n shape?: LegendShape;\n\n /**\n * Indicated whether or not to apply stripe pattern\n */\n stripePattern?: boolean;\n\n /**\n * Indicates if the legend belongs to a line in the Bar Chart\n */\n isLineLegendInBarChart?: boolean;\n\n /*\n * native button props for the legend button\n */\n nativeButtonProps?: React.ButtonHTMLAttributes<HTMLButtonElement>;\n\n /**\n * The annotation for the legend, function returning a React node\n */\n legendAnnotation?: () => React.ReactNode;\n}\n\n/**\n * @public\n * Legend style properties\n * {@docCategory Legends}\n */\nexport interface LegendStyleProps {\n className?: string;\n colorOnSelectedState?: string;\n borderColor?: string;\n opacity?: number;\n overflow?: boolean;\n stripePattern?: boolean;\n isLineLegendInBarChart?: boolean;\n}\n\n/**\n * @public\n * Legend properties\n * {@docCategory Legends}\n */\nexport interface LegendsProps {\n /**\n * Prop that takes list of legends\n */\n legends: Legend[];\n\n /**\n * Additional CSS class(es) to apply to the legneds component.\n */\n className?: string;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: LegendsStyles;\n\n /**\n * This prop makes the legends component align itself to the center in the container it is sitting in\n */\n centerLegends?: boolean;\n\n /**\n * Enable the legends to wrap lines if there is not enough space to show all legends on a single line\n */\n enabledWrapLines?: boolean;\n\n /**\n * style for the overflow component\n */\n overflowStyles?: React.CSSProperties;\n\n /**\n * text for overflow legends string\n */\n overflowText?: string;\n\n /**\n * prop that decides if legends are focusable\n * @default true\n */\n allowFocusOnLegends?: boolean;\n\n /**\n * prop that decide if we can select multiple legends or single legend at a time\n * @default false\n */\n canSelectMultipleLegends?: boolean;\n\n /**\n * Callback issued when the selected option changes.\n */\n onChange?: (selectedLegends: string[], event: React.MouseEvent<HTMLButtonElement>, currentLegend?: Legend) => void;\n\n /**\n * Keys (title) that will be initially used to set selected items. This prop is used for multi-select scenarios when\n * canSelectMultipleLegends is true; for single-select, use defaultSelectedLegend.\n *\n * Updating this prop does not change the selection after the component has been initialized. For controlled\n * selections, use selectedLegends instead.\n *\n * @see selectedLegends for setting the selected legends in controlled mode.\n * @see defaultSelectedLegend for setting the initially selected legend when canSelectMultipleLegends is false.\n */\n defaultSelectedLegends?: string[];\n\n /**\n * Key that will be initially used to set selected item. This prop is used for single-select scenarios when\n * canSelectMultipleLegends is false or unspecified; for multi-select, use defaultSelectedLegends.\n *\n * Updating this prop does not change the selection after the component has been initialized. For controlled\n * selections, use selectedLegend instead.\n *\n * @see selectedLegend for setting the selected legend in controlled mode.\n * @see defaultSelectedLegends for setting the initially selected legends when canSelectMultipleLegends is true.\n */\n defaultSelectedLegend?: string;\n\n /**\n * Keys (title) that will be used to set selected items in multi-select scenarios when canSelectMultipleLegends is\n * true. For single-select, use selectedLegend.\n *\n * When this prop is provided, the component is controlled and does not automatically update the selection based on\n * user interactions; the parent component must update the value passed to this property by handling the onChange\n * event.\n *\n * @see defaultSelectedLegends for setting the initially-selected legends in uncontrolled mode.\n * @see selectedLegends for setting the selected legends when `canSelectMultipleLegends` is `true`.\n */\n selectedLegends?: string[];\n\n /**\n * Key (title) that will be used to set the selected item in single-select scenarios when canSelectMultipleLegends is\n * false or unspecified. For multi-select, use selectedLegends.\n *\n * When this prop is provided, the component is controlled and does not automatically update the selection based on\n * user interactions; the parent component must update the value passed to this property by handling the onChange\n * event.\n *\n * @see defaultSelectedLegend for setting the initially-selected legend in uncontrolled mode.\n * @see selectedLegend for setting the selected legend when `canSelectMultipleLegends` is `false`.\n */\n selectedLegend?: string;\n\n /**\n * The shape for the legend.\n */\n shape?: LegendShape;\n\n /**\n * Callback to access the public methods and properties of the component.\n */\n legendRef?: React.Ref<LegendContainer>;\n}\n\n/**\n * @public\n * The shape for the legend\n * default: show the rect legend\n * triangle: show the triangle legend\n * {@docCategory Legends}\n */\nexport type LegendShape = 'default' | 'triangle' | keyof typeof Points | keyof typeof CustomPoints;\n\n/**\n * {@docCategory Legends}\n */\nexport interface LegendContainer {\n toSVG: (\n svgWidth: number,\n isRTL?: boolean,\n ) => {\n node: SVGSVGElement | null;\n width: number;\n height: number;\n };\n}\n"],"names":["React"],"mappings":";;;;;iEAAuB,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Legends/OverflowMenu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { Menu, MenuTrigger, MenuPopover, MenuList, MenuItem } from '@fluentui/react-menu';\nimport { MenuButton } from '@fluentui/react-button';\nimport { useOverflowMenu } from '@fluentui/react-overflow';\n\nexport const OverflowMenu: React.FC<{\n itemIds: string[];\n title: string;\n items: // eslint-disable-next-line @typescript-eslint/no-deprecated\n JSXElement[];\n}> = ({ itemIds, title, items }) => {\n const { ref, overflowCount, isOverflowing } = useOverflowMenu<HTMLButtonElement>();\n let displayLabel = title;\n displayLabel = title === '' ? `+${overflowCount} items` : `+${overflowCount} ${title}`;\n\n if (!isOverflowing) {\n return null;\n }\n const remainingItemsCount = itemIds.length - overflowCount;\n const menuList = [];\n for (let i = remainingItemsCount; i < itemIds.length; i++) {\n menuList.push(\n <MenuItem tabIndex={-1} key={i}>\n {items[i]}\n </MenuItem>,\n );\n }\n return (\n <Menu>\n <MenuTrigger disableButtonEnhancement>\n <MenuButton ref={ref}>{displayLabel}</MenuButton>\n </MenuTrigger>\n\n <MenuPopover>\n <MenuList>{menuList}</MenuList>\n </MenuPopover>\n </Menu>\n );\n};\n"],"names":["React","Menu","MenuTrigger","MenuPopover","MenuList","MenuItem","MenuButton","useOverflowMenu","OverflowMenu","itemIds","title","items","ref","overflowCount","isOverflowing","displayLabel","remainingItemsCount","length","menuList","i","push","tabIndex","key","disableButtonEnhancement"],"mappings":"AAAA;;;;;+BAQaQ;;;;;;;iEANU,QAAQ;2BAEoC,uBAAuB;6BAC/D,yBAAyB;+BACpB,2BAA2B;AAEpD,qBAKF,CAAC,EAAEC,OAAO,EAAEC,KAAK,EAAEC,KAAK,EAAE;IAC7B,MAAM,EAAEC,GAAG,EAAEC,aAAa,EAAEC,aAAa,EAAE,OAAGP,8BAAAA;IAC9C,IAAIQ,eAAeL;IACnBK,eAAeL,UAAU,KAAK,CAAC,CAAC,EAAEG,cAAc,MAAM,CAAC,GAAG,CAAC,CAAC,EAAEA,cAAc,CAAC,EAAEH,OAAO;IAEtF,IAAI,CAACI,eAAe;QAClB,OAAO;IACT;IACA,MAAME,sBAAsBP,QAAQQ,MAAM,GAAGJ;IAC7C,MAAMK,WAAW,EAAE;IACnB,IAAK,IAAIC,IAAIH,qBAAqBG,IAAIV,QAAQQ,MAAM,EAAEE,IAAK;QACzDD,SAASE,IAAI,CAAA,WAAA,GACX,OAAA,aAAA,CAACf,mBAAAA,EAAAA;YAASgB,UAAU,CAAC;YAAGC,KAAKH;WAC1BR,KAAK,CAACQ,EAAE;IAGf;IACA,OAAA,WAAA,GACE,OAAA,aAAA,CAAClB,eAAAA,EAAAA,MAAAA,WAAAA,GACC,OAAA,aAAA,CAACC,sBAAAA,EAAAA;QAAYqB,0BAAAA;qBACX,OAAA,aAAA,CAACjB,uBAAAA,EAAAA;QAAWM,KAAKA;OAAMG,gBAAAA,WAAAA,GAGzB,OAAA,aAAA,CAACZ,sBAAAA,EAAAA,MAAAA,WAAAA,GACC,OAAA,aAAA,CAACC,mBAAAA,EAAAA,MAAUc;AAInB,EAAE"}
1
+ {"version":3,"sources":["../src/components/Legends/OverflowMenu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { Menu, MenuTrigger, MenuPopover, MenuList, MenuItem } from '@fluentui/react-menu';\nimport { MenuButton } from '@fluentui/react-button';\nimport { useOverflowMenu } from '@fluentui/react-overflow';\n\nexport const OverflowMenu: React.FC<{\n itemIds: string[];\n title: string;\n items: JSXElement[];\n}> = ({ itemIds, title, items }) => {\n const { ref, overflowCount, isOverflowing } = useOverflowMenu<HTMLButtonElement>();\n let displayLabel = title;\n displayLabel = title === '' ? `+${overflowCount} items` : `+${overflowCount} ${title}`;\n\n if (!isOverflowing) {\n return null;\n }\n const remainingItemsCount = itemIds.length - overflowCount;\n const menuList = [];\n for (let i = remainingItemsCount; i < itemIds.length; i++) {\n menuList.push(\n <MenuItem tabIndex={-1} key={i}>\n {items[i]}\n </MenuItem>,\n );\n }\n return (\n <Menu>\n <MenuTrigger disableButtonEnhancement>\n <MenuButton ref={ref}>{displayLabel}</MenuButton>\n </MenuTrigger>\n\n <MenuPopover>\n <MenuList>{menuList}</MenuList>\n </MenuPopover>\n </Menu>\n );\n};\n"],"names":["React","Menu","MenuTrigger","MenuPopover","MenuList","MenuItem","MenuButton","useOverflowMenu","OverflowMenu","itemIds","title","items","ref","overflowCount","isOverflowing","displayLabel","remainingItemsCount","length","menuList","i","push","tabIndex","key","disableButtonEnhancement"],"mappings":"AAAA;;;;;+BAQaQ;;;;;;;iEANU,QAAQ;2BAEoC,uBAAuB;6BAC/D,yBAAyB;+BACpB,2BAA2B;AAEpD,qBAIF,CAAC,EAAEC,OAAO,EAAEC,KAAK,EAAEC,KAAK,EAAE;IAC7B,MAAM,EAAEC,GAAG,EAAEC,aAAa,EAAEC,aAAa,EAAE,OAAGP,8BAAAA;IAC9C,IAAIQ,eAAeL;IACnBK,eAAeL,UAAU,KAAK,CAAC,CAAC,EAAEG,cAAc,MAAM,CAAC,GAAG,CAAC,CAAC,EAAEA,cAAc,CAAC,EAAEH,OAAO;IAEtF,IAAI,CAACI,eAAe;QAClB,OAAO;IACT;IACA,MAAME,sBAAsBP,QAAQQ,MAAM,GAAGJ;IAC7C,MAAMK,WAAW,EAAE;IACnB,IAAK,IAAIC,IAAIH,qBAAqBG,IAAIV,QAAQQ,MAAM,EAAEE,IAAK;QACzDD,SAASE,IAAI,CAAA,WAAA,GACX,OAAA,aAAA,CAACf,mBAAAA,EAAAA;YAASgB,UAAU,CAAC;YAAGC,KAAKH;WAC1BR,KAAK,CAACQ,EAAE;IAGf;IACA,OAAA,WAAA,GACE,OAAA,aAAA,CAAClB,eAAAA,EAAAA,MAAAA,WAAAA,GACC,OAAA,aAAA,CAACC,sBAAAA,EAAAA;QAAYqB,0BAAAA;qBACX,OAAA,aAAA,CAACjB,uBAAAA,EAAAA;QAAWM,KAAKA;OAAMG,gBAAAA,WAAAA,GAGzB,OAAA,aAAA,CAACZ,sBAAAA,EAAAA,MAAAA,WAAAA,GACC,OAAA,aAAA,CAACC,mBAAAA,EAAAA,MAAUc;AAInB,EAAE"}