@fluentui/react-charts 0.0.0-nightly-20250423-1342.1 → 0.0.0-nightly-20250423-1415.1

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 (483) hide show
  1. package/CHANGELOG.md +16 -16
  2. package/dist/index.d.ts +3337 -0
  3. package/lib/AreaChart.js +1 -0
  4. package/lib/AreaChart.js.map +1 -0
  5. package/lib/CartesianChart.js +1 -0
  6. package/lib/CartesianChart.js.map +1 -0
  7. package/lib/DeclarativeChart.js +1 -0
  8. package/lib/DeclarativeChart.js.map +1 -0
  9. package/lib/DonutChart.js +1 -0
  10. package/lib/DonutChart.js.map +1 -0
  11. package/lib/GaugeChart.js +1 -0
  12. package/lib/GaugeChart.js.map +1 -0
  13. package/lib/GroupedVerticalBarChart.js +1 -0
  14. package/lib/GroupedVerticalBarChart.js.map +1 -0
  15. package/lib/HeatMapChart.js +1 -0
  16. package/lib/HeatMapChart.js.map +1 -0
  17. package/lib/HorizontalBarChart.js +1 -0
  18. package/lib/HorizontalBarChart.js.map +1 -0
  19. package/lib/HorizontalBarChartWithAxis.js +1 -0
  20. package/lib/HorizontalBarChartWithAxis.js.map +1 -0
  21. package/lib/Legends.js +1 -0
  22. package/lib/Legends.js.map +1 -0
  23. package/lib/LineChart.js +1 -0
  24. package/lib/LineChart.js.map +1 -0
  25. package/lib/Popover.js +1 -0
  26. package/lib/Popover.js.map +1 -0
  27. package/lib/ResponsiveContainer.js +1 -0
  28. package/lib/ResponsiveContainer.js.map +1 -0
  29. package/lib/SankeyChart.js +1 -0
  30. package/lib/SankeyChart.js.map +1 -0
  31. package/lib/ScatterChart.js +1 -0
  32. package/lib/ScatterChart.js.map +1 -0
  33. package/lib/Sparkline.js +1 -0
  34. package/lib/Sparkline.js.map +1 -0
  35. package/lib/VerticalBarChart.js +1 -0
  36. package/lib/VerticalBarChart.js.map +1 -0
  37. package/lib/VerticalStackedBarChart.js +1 -0
  38. package/lib/VerticalStackedBarChart.js.map +1 -0
  39. package/lib/components/AreaChart/AreaChart.js +775 -0
  40. package/lib/components/AreaChart/AreaChart.js.map +1 -0
  41. package/lib/components/AreaChart/AreaChart.types.js +4 -0
  42. package/lib/components/AreaChart/AreaChart.types.js.map +1 -0
  43. package/lib/components/AreaChart/index.js +3 -0
  44. package/lib/components/AreaChart/index.js.map +1 -0
  45. package/lib/components/AreaChart/useAreaChartStyles.styles.js +64 -0
  46. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -0
  47. package/lib/components/CommonComponents/CartesianChart.js +478 -0
  48. package/lib/components/CommonComponents/CartesianChart.js.map +1 -0
  49. package/lib/components/CommonComponents/CartesianChart.types.js +1 -0
  50. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -0
  51. package/lib/components/CommonComponents/ChartPopover.js +187 -0
  52. package/lib/components/CommonComponents/ChartPopover.js.map +1 -0
  53. package/lib/components/CommonComponents/ChartPopover.types.js +1 -0
  54. package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -0
  55. package/lib/components/CommonComponents/index.js +4 -0
  56. package/lib/components/CommonComponents/index.js.map +1 -0
  57. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +229 -0
  58. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -0
  59. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +178 -0
  60. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -0
  61. package/lib/components/DeclarativeChart/DeclarativeChart.js +197 -0
  62. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
  63. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +811 -0
  64. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -0
  65. package/lib/components/DeclarativeChart/imageExporter.js +221 -0
  66. package/lib/components/DeclarativeChart/imageExporter.js.map +1 -0
  67. package/lib/components/DeclarativeChart/index.js +1 -0
  68. package/lib/components/DeclarativeChart/index.js.map +1 -0
  69. package/lib/components/DonutChart/Arc/Arc.js +110 -0
  70. package/lib/components/DonutChart/Arc/Arc.js.map +1 -0
  71. package/lib/components/DonutChart/Arc/Arc.types.js +1 -0
  72. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -0
  73. package/lib/components/DonutChart/Arc/index.js +2 -0
  74. package/lib/components/DonutChart/Arc/index.js.map +1 -0
  75. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +54 -0
  76. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -0
  77. package/lib/components/DonutChart/DonutChart.js +291 -0
  78. package/lib/components/DonutChart/DonutChart.js.map +1 -0
  79. package/lib/components/DonutChart/DonutChart.types.js +1 -0
  80. package/lib/components/DonutChart/DonutChart.types.js.map +1 -0
  81. package/lib/components/DonutChart/Pie/Pie.js +72 -0
  82. package/lib/components/DonutChart/Pie/Pie.js.map +1 -0
  83. package/lib/components/DonutChart/Pie/Pie.types.js +1 -0
  84. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -0
  85. package/lib/components/DonutChart/Pie/index.js +2 -0
  86. package/lib/components/DonutChart/Pie/index.js.map +1 -0
  87. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +44 -0
  88. package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -0
  89. package/lib/components/DonutChart/index.js +3 -0
  90. package/lib/components/DonutChart/index.js.map +1 -0
  91. package/lib/components/DonutChart/useDonutChartStyles.styles.js +58 -0
  92. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -0
  93. package/lib/components/GaugeChart/GaugeChart.js +592 -0
  94. package/lib/components/GaugeChart/GaugeChart.js.map +1 -0
  95. package/lib/components/GaugeChart/GaugeChart.types.js +4 -0
  96. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -0
  97. package/lib/components/GaugeChart/index.js +3 -0
  98. package/lib/components/GaugeChart/index.js.map +1 -0
  99. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +174 -0
  100. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -0
  101. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +501 -0
  102. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -0
  103. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +4 -0
  104. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -0
  105. package/lib/components/GroupedVerticalBarChart/index.js +3 -0
  106. package/lib/components/GroupedVerticalBarChart/index.js.map +1 -0
  107. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +90 -0
  108. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -0
  109. package/lib/components/HeatMapChart/HeatMapChart.js +588 -0
  110. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -0
  111. package/lib/components/HeatMapChart/HeatMapChart.types.js +4 -0
  112. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -0
  113. package/lib/components/HeatMapChart/index.js +3 -0
  114. package/lib/components/HeatMapChart/index.js.map +1 -0
  115. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +46 -0
  116. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -0
  117. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +402 -0
  118. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
  119. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +6 -0
  120. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -0
  121. package/lib/components/HorizontalBarChart/index.js +3 -0
  122. package/lib/components/HorizontalBarChart/index.js.map +1 -0
  123. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +163 -0
  124. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -0
  125. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +571 -0
  126. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -0
  127. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +4 -0
  128. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -0
  129. package/lib/components/HorizontalBarChartWithAxis/index.js +3 -0
  130. package/lib/components/HorizontalBarChartWithAxis/index.js.map +1 -0
  131. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +76 -0
  132. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -0
  133. package/lib/components/Legends/Legends.js +303 -0
  134. package/lib/components/Legends/Legends.js.map +1 -0
  135. package/lib/components/Legends/Legends.types.js +1 -0
  136. package/lib/components/Legends/Legends.types.js.map +1 -0
  137. package/lib/components/Legends/OverflowMenu.js +25 -0
  138. package/lib/components/Legends/OverflowMenu.js.map +1 -0
  139. package/lib/components/Legends/index.js +3 -0
  140. package/lib/components/Legends/index.js.map +1 -0
  141. package/lib/components/Legends/shape.js +35 -0
  142. package/lib/components/Legends/shape.js.map +1 -0
  143. package/lib/components/Legends/useLegendsStyles.styles.js +147 -0
  144. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -0
  145. package/lib/components/LineChart/LineChart.js +1034 -0
  146. package/lib/components/LineChart/LineChart.js.map +1 -0
  147. package/lib/components/LineChart/LineChart.types.js +3 -0
  148. package/lib/components/LineChart/LineChart.types.js.map +1 -0
  149. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +119 -0
  150. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -0
  151. package/lib/components/LineChart/eventAnnotation/LabelLink.js +57 -0
  152. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -0
  153. package/lib/components/LineChart/eventAnnotation/Textbox.js +40 -0
  154. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -0
  155. package/lib/components/LineChart/index.js +4 -0
  156. package/lib/components/LineChart/index.js.map +1 -0
  157. package/lib/components/LineChart/useLineChartStyles.styles.js +65 -0
  158. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -0
  159. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +65 -0
  160. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -0
  161. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js +1 -0
  162. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -0
  163. package/lib/components/ResponsiveContainer/index.js +1 -0
  164. package/lib/components/ResponsiveContainer/index.js.map +1 -0
  165. package/lib/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js +23 -0
  166. package/lib/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js.map +1 -0
  167. package/lib/components/SankeyChart/SankeyChart.js +1022 -0
  168. package/lib/components/SankeyChart/SankeyChart.js.map +1 -0
  169. package/lib/components/SankeyChart/SankeyChart.types.js +3 -0
  170. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -0
  171. package/lib/components/SankeyChart/index.js +3 -0
  172. package/lib/components/SankeyChart/index.js.map +1 -0
  173. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +109 -0
  174. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -0
  175. package/lib/components/ScatterChart/ScatterChart.js +465 -0
  176. package/lib/components/ScatterChart/ScatterChart.js.map +1 -0
  177. package/lib/components/ScatterChart/ScatterChart.types.js +4 -0
  178. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -0
  179. package/lib/components/ScatterChart/index.js +3 -0
  180. package/lib/components/ScatterChart/index.js.map +1 -0
  181. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +65 -0
  182. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -0
  183. package/lib/components/Sparkline/Sparkline.js +119 -0
  184. package/lib/components/Sparkline/Sparkline.js.map +1 -0
  185. package/lib/components/Sparkline/Sparkline.types.js +4 -0
  186. package/lib/components/Sparkline/Sparkline.types.js.map +1 -0
  187. package/lib/components/Sparkline/index.js +3 -0
  188. package/lib/components/Sparkline/index.js.map +1 -0
  189. package/lib/components/Sparkline/useSparklineStyles.styles.js +49 -0
  190. package/lib/components/Sparkline/useSparklineStyles.styles.js.map +1 -0
  191. package/lib/components/VerticalBarChart/VerticalBarChart.js +926 -0
  192. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -0
  193. package/lib/components/VerticalBarChart/VerticalBarChart.types.js +4 -0
  194. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -0
  195. package/lib/components/VerticalBarChart/index.js +3 -0
  196. package/lib/components/VerticalBarChart/index.js.map +1 -0
  197. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +74 -0
  198. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -0
  199. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +904 -0
  200. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -0
  201. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +1 -0
  202. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -0
  203. package/lib/components/VerticalStackedBarChart/index.js +3 -0
  204. package/lib/components/VerticalStackedBarChart/index.js.map +1 -0
  205. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +73 -0
  206. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -0
  207. package/lib/index.js +20 -0
  208. package/lib/index.js.map +1 -0
  209. package/lib/types/DataPoint.js +1 -0
  210. package/lib/types/DataPoint.js.map +1 -0
  211. package/lib/types/EventAnnotation.js +1 -0
  212. package/lib/types/EventAnnotation.js.map +1 -0
  213. package/lib/types/LegendDataItem.js +1 -0
  214. package/lib/types/LegendDataItem.js.map +1 -0
  215. package/lib/types/index.js +2 -0
  216. package/lib/types/index.js.map +1 -0
  217. package/lib/utilities/FocusableTooltipText.js +65 -0
  218. package/lib/utilities/FocusableTooltipText.js.map +1 -0
  219. package/lib/utilities/KeyCodes.js +8 -0
  220. package/lib/utilities/KeyCodes.js.map +1 -0
  221. package/lib/utilities/SVGTooltipText.js +183 -0
  222. package/lib/utilities/SVGTooltipText.js.map +1 -0
  223. package/lib/utilities/async-utils.js +380 -0
  224. package/lib/utilities/async-utils.js.map +1 -0
  225. package/lib/utilities/colors.js +269 -0
  226. package/lib/utilities/colors.js.map +1 -0
  227. package/lib/utilities/getWindow.js +25 -0
  228. package/lib/utilities/getWindow.js.map +1 -0
  229. package/lib/utilities/index.js +3 -0
  230. package/lib/utilities/index.js.map +1 -0
  231. package/lib/utilities/locale-util.js +15 -0
  232. package/lib/utilities/locale-util.js.map +1 -0
  233. package/lib/utilities/overflow-utils.js +27 -0
  234. package/lib/utilities/overflow-utils.js.map +1 -0
  235. package/lib/utilities/string.js +32 -0
  236. package/lib/utilities/string.js.map +1 -0
  237. package/lib/utilities/test-data.js +329 -0
  238. package/lib/utilities/test-data.js.map +1 -0
  239. package/lib/utilities/utilities.js +1405 -0
  240. package/lib/utilities/utilities.js.map +1 -0
  241. package/lib/utilities/vbc-utils.js +27 -0
  242. package/lib/utilities/vbc-utils.js.map +1 -0
  243. package/lib-commonjs/AreaChart.js +6 -0
  244. package/lib-commonjs/AreaChart.js.map +1 -0
  245. package/lib-commonjs/CartesianChart.js +6 -0
  246. package/lib-commonjs/CartesianChart.js.map +1 -0
  247. package/lib-commonjs/DeclarativeChart.js +6 -0
  248. package/lib-commonjs/DeclarativeChart.js.map +1 -0
  249. package/lib-commonjs/DonutChart.js +6 -0
  250. package/lib-commonjs/DonutChart.js.map +1 -0
  251. package/lib-commonjs/GaugeChart.js +6 -0
  252. package/lib-commonjs/GaugeChart.js.map +1 -0
  253. package/lib-commonjs/GroupedVerticalBarChart.js +6 -0
  254. package/lib-commonjs/GroupedVerticalBarChart.js.map +1 -0
  255. package/lib-commonjs/HeatMapChart.js +6 -0
  256. package/lib-commonjs/HeatMapChart.js.map +1 -0
  257. package/lib-commonjs/HorizontalBarChart.js +6 -0
  258. package/lib-commonjs/HorizontalBarChart.js.map +1 -0
  259. package/lib-commonjs/HorizontalBarChartWithAxis.js +6 -0
  260. package/lib-commonjs/HorizontalBarChartWithAxis.js.map +1 -0
  261. package/lib-commonjs/Legends.js +6 -0
  262. package/lib-commonjs/Legends.js.map +1 -0
  263. package/lib-commonjs/LineChart.js +6 -0
  264. package/lib-commonjs/LineChart.js.map +1 -0
  265. package/lib-commonjs/Popover.js +6 -0
  266. package/lib-commonjs/Popover.js.map +1 -0
  267. package/lib-commonjs/ResponsiveContainer.js +6 -0
  268. package/lib-commonjs/ResponsiveContainer.js.map +1 -0
  269. package/lib-commonjs/SankeyChart.js +6 -0
  270. package/lib-commonjs/SankeyChart.js.map +1 -0
  271. package/lib-commonjs/ScatterChart.js +6 -0
  272. package/lib-commonjs/ScatterChart.js.map +1 -0
  273. package/lib-commonjs/Sparkline.js +6 -0
  274. package/lib-commonjs/Sparkline.js.map +1 -0
  275. package/lib-commonjs/VerticalBarChart.js +6 -0
  276. package/lib-commonjs/VerticalBarChart.js.map +1 -0
  277. package/lib-commonjs/VerticalStackedBarChart.js +6 -0
  278. package/lib-commonjs/VerticalStackedBarChart.js.map +1 -0
  279. package/lib-commonjs/components/AreaChart/AreaChart.js +781 -0
  280. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -0
  281. package/lib-commonjs/components/AreaChart/AreaChart.types.js +7 -0
  282. package/lib-commonjs/components/AreaChart/AreaChart.types.js.map +1 -0
  283. package/lib-commonjs/components/AreaChart/index.js +8 -0
  284. package/lib-commonjs/components/AreaChart/index.js.map +1 -0
  285. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +104 -0
  286. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -0
  287. package/lib-commonjs/components/CommonComponents/CartesianChart.js +484 -0
  288. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -0
  289. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js +6 -0
  290. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -0
  291. package/lib-commonjs/components/CommonComponents/ChartPopover.js +197 -0
  292. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -0
  293. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js +4 -0
  294. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +1 -0
  295. package/lib-commonjs/components/CommonComponents/index.js +9 -0
  296. package/lib-commonjs/components/CommonComponents/index.js.map +1 -0
  297. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +356 -0
  298. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -0
  299. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +261 -0
  300. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -0
  301. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +205 -0
  302. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
  303. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +859 -0
  304. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -0
  305. package/lib-commonjs/components/DeclarativeChart/imageExporter.js +231 -0
  306. package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -0
  307. package/lib-commonjs/components/DeclarativeChart/index.js +6 -0
  308. package/lib-commonjs/components/DeclarativeChart/index.js.map +1 -0
  309. package/lib-commonjs/components/DonutChart/Arc/Arc.js +117 -0
  310. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -0
  311. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js +4 -0
  312. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -0
  313. package/lib-commonjs/components/DonutChart/Arc/index.js +7 -0
  314. package/lib-commonjs/components/DonutChart/Arc/index.js.map +1 -0
  315. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +83 -0
  316. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -0
  317. package/lib-commonjs/components/DonutChart/DonutChart.js +298 -0
  318. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -0
  319. package/lib-commonjs/components/DonutChart/DonutChart.types.js +6 -0
  320. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -0
  321. package/lib-commonjs/components/DonutChart/Pie/Pie.js +79 -0
  322. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -0
  323. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js +4 -0
  324. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -0
  325. package/lib-commonjs/components/DonutChart/Pie/index.js +7 -0
  326. package/lib-commonjs/components/DonutChart/Pie/index.js.map +1 -0
  327. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +61 -0
  328. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -0
  329. package/lib-commonjs/components/DonutChart/index.js +8 -0
  330. package/lib-commonjs/components/DonutChart/index.js.map +1 -0
  331. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +82 -0
  332. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -0
  333. package/lib-commonjs/components/GaugeChart/GaugeChart.js +621 -0
  334. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -0
  335. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js +7 -0
  336. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -0
  337. package/lib-commonjs/components/GaugeChart/index.js +8 -0
  338. package/lib-commonjs/components/GaugeChart/index.js.map +1 -0
  339. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +252 -0
  340. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -0
  341. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +507 -0
  342. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -0
  343. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js +7 -0
  344. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -0
  345. package/lib-commonjs/components/GroupedVerticalBarChart/index.js +8 -0
  346. package/lib-commonjs/components/GroupedVerticalBarChart/index.js.map +1 -0
  347. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +139 -0
  348. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -0
  349. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +599 -0
  350. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -0
  351. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js +7 -0
  352. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -0
  353. package/lib-commonjs/components/HeatMapChart/index.js +8 -0
  354. package/lib-commonjs/components/HeatMapChart/index.js.map +1 -0
  355. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +68 -0
  356. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -0
  357. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +408 -0
  358. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
  359. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +17 -0
  360. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -0
  361. package/lib-commonjs/components/HorizontalBarChart/index.js +8 -0
  362. package/lib-commonjs/components/HorizontalBarChart/index.js.map +1 -0
  363. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +251 -0
  364. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -0
  365. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +580 -0
  366. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -0
  367. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js +7 -0
  368. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -0
  369. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js +8 -0
  370. package/lib-commonjs/components/HorizontalBarChartWithAxis/index.js.map +1 -0
  371. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +116 -0
  372. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -0
  373. package/lib-commonjs/components/Legends/Legends.js +313 -0
  374. package/lib-commonjs/components/Legends/Legends.js.map +1 -0
  375. package/lib-commonjs/components/Legends/Legends.types.js +6 -0
  376. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -0
  377. package/lib-commonjs/components/Legends/OverflowMenu.js +36 -0
  378. package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -0
  379. package/lib-commonjs/components/Legends/index.js +8 -0
  380. package/lib-commonjs/components/Legends/index.js.map +1 -0
  381. package/lib-commonjs/components/Legends/shape.js +46 -0
  382. package/lib-commonjs/components/Legends/shape.js.map +1 -0
  383. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +304 -0
  384. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -0
  385. package/lib-commonjs/components/LineChart/LineChart.js +1040 -0
  386. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -0
  387. package/lib-commonjs/components/LineChart/LineChart.types.js +6 -0
  388. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -0
  389. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +129 -0
  390. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -0
  391. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js +68 -0
  392. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -0
  393. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +51 -0
  394. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -0
  395. package/lib-commonjs/components/LineChart/index.js +9 -0
  396. package/lib-commonjs/components/LineChart/index.js.map +1 -0
  397. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +96 -0
  398. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -0
  399. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +76 -0
  400. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -0
  401. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js +6 -0
  402. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -0
  403. package/lib-commonjs/components/ResponsiveContainer/index.js +6 -0
  404. package/lib-commonjs/components/ResponsiveContainer/index.js.map +1 -0
  405. package/lib-commonjs/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js +47 -0
  406. package/lib-commonjs/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js.map +1 -0
  407. package/lib-commonjs/components/SankeyChart/SankeyChart.js +1038 -0
  408. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -0
  409. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js +6 -0
  410. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -0
  411. package/lib-commonjs/components/SankeyChart/index.js +8 -0
  412. package/lib-commonjs/components/SankeyChart/index.js.map +1 -0
  413. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +179 -0
  414. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -0
  415. package/lib-commonjs/components/ScatterChart/ScatterChart.js +471 -0
  416. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -0
  417. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js +7 -0
  418. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -0
  419. package/lib-commonjs/components/ScatterChart/index.js +8 -0
  420. package/lib-commonjs/components/ScatterChart/index.js.map +1 -0
  421. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +96 -0
  422. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -0
  423. package/lib-commonjs/components/Sparkline/Sparkline.js +125 -0
  424. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -0
  425. package/lib-commonjs/components/Sparkline/Sparkline.types.js +7 -0
  426. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -0
  427. package/lib-commonjs/components/Sparkline/index.js +8 -0
  428. package/lib-commonjs/components/Sparkline/index.js.map +1 -0
  429. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +77 -0
  430. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +1 -0
  431. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +928 -0
  432. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -0
  433. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js +7 -0
  434. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -0
  435. package/lib-commonjs/components/VerticalBarChart/index.js +8 -0
  436. package/lib-commonjs/components/VerticalBarChart/index.js.map +1 -0
  437. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +117 -0
  438. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -0
  439. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +915 -0
  440. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -0
  441. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js +6 -0
  442. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -0
  443. package/lib-commonjs/components/VerticalStackedBarChart/index.js +8 -0
  444. package/lib-commonjs/components/VerticalStackedBarChart/index.js.map +1 -0
  445. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +120 -0
  446. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -0
  447. package/lib-commonjs/index.js +25 -0
  448. package/lib-commonjs/index.js.map +1 -0
  449. package/lib-commonjs/types/DataPoint.js +4 -0
  450. package/lib-commonjs/types/DataPoint.js.map +1 -0
  451. package/lib-commonjs/types/EventAnnotation.js +6 -0
  452. package/lib-commonjs/types/EventAnnotation.js.map +1 -0
  453. package/lib-commonjs/types/LegendDataItem.js +4 -0
  454. package/lib-commonjs/types/LegendDataItem.js.map +1 -0
  455. package/lib-commonjs/types/index.js +7 -0
  456. package/lib-commonjs/types/index.js.map +1 -0
  457. package/lib-commonjs/utilities/FocusableTooltipText.js +75 -0
  458. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -0
  459. package/lib-commonjs/utilities/KeyCodes.js +18 -0
  460. package/lib-commonjs/utilities/KeyCodes.js.map +1 -0
  461. package/lib-commonjs/utilities/SVGTooltipText.js +193 -0
  462. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -0
  463. package/lib-commonjs/utilities/async-utils.js +382 -0
  464. package/lib-commonjs/utilities/async-utils.js.map +1 -0
  465. package/lib-commonjs/utilities/colors.js +293 -0
  466. package/lib-commonjs/utilities/colors.js.map +1 -0
  467. package/lib-commonjs/utilities/getWindow.js +28 -0
  468. package/lib-commonjs/utilities/getWindow.js.map +1 -0
  469. package/lib-commonjs/utilities/index.js +8 -0
  470. package/lib-commonjs/utilities/index.js.map +1 -0
  471. package/lib-commonjs/utilities/locale-util.js +25 -0
  472. package/lib-commonjs/utilities/locale-util.js.map +1 -0
  473. package/lib-commonjs/utilities/overflow-utils.js +36 -0
  474. package/lib-commonjs/utilities/overflow-utils.js.map +1 -0
  475. package/lib-commonjs/utilities/string.js +29 -0
  476. package/lib-commonjs/utilities/string.js.map +1 -0
  477. package/lib-commonjs/utilities/test-data.js +383 -0
  478. package/lib-commonjs/utilities/test-data.js.map +1 -0
  479. package/lib-commonjs/utilities/utilities.js +1371 -0
  480. package/lib-commonjs/utilities/utilities.js.map +1 -0
  481. package/lib-commonjs/utilities/vbc-utils.js +45 -0
  482. package/lib-commonjs/utilities/vbc-utils.js.map +1 -0
  483. package/package.json +13 -13
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["HorizontalBarChartWithAxis.tsx"],"sourcesContent":["import * as React from 'react';\nimport { max as d3Max } from 'd3-array';\nimport { select as d3Select } from 'd3-selection';\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 { useHorizontalBarChartWithAxisStyles } from './useHorizontalBarChartWithAxisStyles.styles';\nimport {\n AccessibilityProps,\n HorizontalBarChartWithAxisDataPoint,\n RefArrayData,\n Margins,\n ChartPopoverProps,\n Chart,\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 areArraysEqual,\n useRtl,\n DataVizPalette,\n getColorFromToken,\n} from '../../utilities/index';\ntype ColorScale = (_p?: number) => string;\n\nexport const HorizontalBarChartWithAxis: React.FunctionComponent<HorizontalBarChartWithAxisProps> = React.forwardRef<\n HTMLDivElement,\n HorizontalBarChartWithAxisProps\n>((props, forwardedRef) => {\n const _refArray: RefArrayData[] = [];\n const _calloutId: string = useId('callout');\n const _isRtl: boolean = useRtl();\n const _tooltipId: string = useId('HBCWATooltipID_');\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: JSX.Element[];\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 tooltipElement: any;\n const cartesianChartRef = React.useRef<Chart>(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 }),\n [],\n );\n\n const classes = useHorizontalBarChartWithAxisStyles(props);\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): JSX.Element {\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 ?? 'en-us'}\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): JSX.Element | 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 return (_bars =\n _yAxisType === YAxisType.NumericAxis\n ? _createNumericBars(containerHeight, containerWidth, xElement!, yElement!)\n : _createStringBars(containerHeight, containerWidth, xElement!, yElement!));\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(point: HorizontalBarChartWithAxisDataPoint, refArrayIndexNumber: number, color: string): void {\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 if (isNumericScale) {\n const xMax = d3Max(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.x as number)!;\n const yMax = d3Max(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.y as number)!;\n const xBarScale = d3ScaleLinear()\n .domain(_isRtl ? [xMax, 0] : [0, xMax])\n .nice()\n .range([_margins.left!, containerWidth - _margins.right!]);\n const yBarScale = d3ScaleLinear()\n .domain([0, yMax])\n .range([containerHeight - _margins.bottom!, _margins.top!]);\n return { xBarScale, yBarScale };\n } else {\n const xMax = d3Max(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.x as number)!;\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! - _barHeight / 2, _margins.top! + _barHeight / 2])\n .padding(props.yAxisPadding || 0);\n\n const xBarScale = d3ScaleLinear()\n .domain(_isRtl ? [xMax, 0] : [0, xMax])\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 ): JSX.Element[] {\n const { useSingleColor = false } = props;\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth, true);\n const sortedBars: HorizontalBarChartWithAxisDataPoint[] = [..._points];\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 const bars = sortedBars.map((point: HorizontalBarChartWithAxisDataPoint, index: number) => {\n let shouldHighlight = true;\n if (isLegendHovered || isLegendSelected) {\n shouldHighlight = _isLegendHighlighted(point.legend);\n }\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 return (\n <React.Fragment key={`${index}_${point.x}`}>\n <rect\n key={point.y}\n x={_isRtl ? xBarScale(point.x) : _margins.left!}\n y={yBarScale(point.y) - _barHeight / 2}\n data-is-focusable={shouldHighlight}\n width={\n _isRtl\n ? containerWidth - _margins.right! - Math.max(xBarScale(point.x), 0)\n : Math.max(xBarScale(point.x), 0) - _margins.left!\n }\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={() => _onBarFocus(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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _tooltipOfYAxislabels(ytooltipProps: any) {\n const { tooltipCls, yAxis, id } = ytooltipProps;\n if (yAxis === null) {\n return null;\n }\n const div = d3Select('body').append('div').attr('id', id).attr('class', tooltipCls).style('opacity', 0);\n const aa = yAxis!.selectAll('#BaseSpan')._groups[0];\n const baseSpanLength = aa && Object.keys(aa)!.length;\n const originalDataArray: string[] = [];\n for (let i = 0; i < baseSpanLength; i++) {\n const originalData = aa[i].dataset && (Object.values(aa[i].dataset)[0] as string);\n originalDataArray.push(originalData);\n }\n const tickObject = yAxis!.selectAll('.tick')._groups[0];\n const tickObjectLength = tickObject && Object.keys(tickObject)!.length;\n for (let i = 0; i < tickObjectLength; i++) {\n const d1 = tickObject[i];\n d3Select(d1)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .on('mouseover', (event: any, d) => {\n if (!tooltipElement) {\n div.style('opacity', 0.9);\n div\n .text(originalDataArray[i])\n .style('left', event.pageX + 'px')\n .style('top', event.pageY - 28 + 'px');\n }\n })\n .on('mouseout', d => {\n div.style('opacity', 0);\n });\n }\n }\n\n function _createStringBars(\n containerHeight: number,\n containerWidth: number,\n xElement: SVGElement,\n yElement: SVGElement,\n ): JSX.Element[] {\n const { xBarScale, yBarScale } = _getScales(containerHeight, containerWidth, false);\n const { useSingleColor = false } = props;\n const bars = _points.map((point: HorizontalBarChartWithAxisDataPoint, index: number) => {\n let shouldHighlight = true;\n if (isLegendHovered || isLegendSelected) {\n shouldHighlight = _isLegendHighlighted(point.legend);\n }\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 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={_isRtl ? xBarScale(point.x) : _margins.left!}\n y={yBarScale(point.y)}\n rx={props.roundCorners ? 3 : 0}\n width={\n _isRtl\n ? containerWidth - _margins.right! - Math.max(xBarScale(point.x), 0)\n : Math.max(xBarScale(point.x), 0) - _margins.left!\n }\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={() => _onBarFocus(point, index, startColor)}\n fill={startColor}\n tabIndex={point.legend !== '' ? 0 : undefined}\n />\n </React.Fragment>\n );\n });\n\n // Removing un wanted tooltip div from DOM, when prop not provided, for proper cleanup\n // of unwanted DOM elements, to prevent flacky behaviour in tooltips , that might occur\n // in creating tooltips when tooltips are enabled( as we try to recreate a tspan with _tooltipId)\n if (!props.showYAxisLablesTooltip) {\n try {\n // eslint-disable-next-line @nx/workspace-no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n //eslint-disable-next-line no-empty\n } catch (e) {}\n }\n // Used to display tooltip at y axis labels.\n if (props.showYAxisLablesTooltip) {\n const yAxisElement = d3Select(yElement).call(yBarScale);\n if (!tooltipElement) {\n try {\n // eslint-disable-next-line @nx/workspace-no-restricted-globals\n document.getElementById(_tooltipId) && document.getElementById(_tooltipId)!.remove();\n //eslint-disable-next-line no-empty\n } catch (e) {}\n }\n const ytooltipProps = {\n tooltipCls: classes.tooltip!,\n id: _tooltipId,\n yAxis: yAxisElement,\n };\n yAxisElement && _tooltipOfYAxislabels(ytooltipProps);\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[]): JSX.Element {\n const { useSingleColor } = props;\n const actions: Legend[] = [];\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 // mapping data to the format Legends component needs\n const legend: Legend = {\n title: point.legend!,\n color,\n hoverAction: () => {\n _handleChartMouseLeave();\n _onLegendHover(point.legend!);\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 />\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 _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 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 const reversedBars = [..._points].reverse();\n _yAxisLabels = reversedBars.map((point: HorizontalBarChartWithAxisDataPoint) => point.y as string);\n _xMax = Math.max(d3Max(_points, (point: HorizontalBarChartWithAxisDataPoint) => point.x)!, props.xMaxValue || 0);\n const legendBars: JSX.Element = _getLegendData(_points);\n return (\n <CartesianChart\n {...props}\n chartTitle={_getChartTitle()}\n points={_points}\n chartType={ChartTypes.HorizontalBarChartWithAxis}\n xAxisType={_xAxisType}\n yAxisType={_yAxisType}\n stringDatasetForYAxisDomain={_yAxisLabels}\n calloutProps={calloutProps}\n tickParams={tickParams}\n legendBars={legendBars}\n barwidth={_barHeight}\n getmargins={_getMargins}\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":["HorizontalBarChartWithAxis","React","forwardRef","props","forwardedRef","_refArray","_calloutId","useId","_isRtl","useRtl","_tooltipId","_xAxisType","data","length","getTypeOfAxis","x","XAxisTypes","NumericAxis","_yAxisType","y","YAxisType","StringAxis","_emptyChartId","_points","_barHeight","_colors","_margins","_bars","_yAxisLabels","_xMax","_calloutAnchorPoint","tooltipElement","cartesianChartRef","useRef","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","areArraysEqual","useImperativeHandle","componentRef","chartContainer","classes","useHorizontalBarChartWithAxisStyles","_adjustProps","barHeight","defaultPalette","getColorFromToken","DataVizPalette","color6","color1","color5","color7","colors","_getMargins","margins","_renderContentForOnlyBars","point","useSingleColor","selectedPointIndex","forEach","yDataPoint","index","_createColors","getNextColor","createElement","Fragment","ChartPopover","XValue","xAxisCalloutData","toString","legend","YValue","yAxisCalloutData","culture","_renderCallout","_getCustomizedCallout","onRenderCalloutPerDataPoint","_getGraphData","xScale","yScale","containerHeight","containerWidth","xElement","yElement","_createNumericBars","_createStringBars","increment","_p","color16","domainValues","i","push","colorScale","d3ScaleLinear","domain","range","_refCallback","element","legendTitle","refElement","_onBarHover","mouseEvent","persist","_isLegendHighlighted","_updatePosition","clientX","clientY","enableGradient","_onBarLeave","_handleChartMouseLeave","_onBarFocus","refArrayIndexNumber","obj","_getScales","isNumericScale","xMax","d3Max","yMax","xBarScale","nice","left","right","yBarScale","bottom","top","d3ScaleBand","padding","yAxisPadding","sortedBars","sort","a","b","aValue","parseFloat","bValue","bars","map","shouldHighlight","Math","max","key","startColor","rect","data-is-focusable","width","height","ref","e","rx","roundCorners","onClick","onMouseOver","event","aria-label","_getAriaLabel","role","aria-labelledby","onMouseLeave","onFocus","onBlur","fill","opacity","tabIndex","_tooltipOfYAxislabels","ytooltipProps","tooltipCls","yAxis","id","div","d3Select","append","attr","style","aa","selectAll","_groups","baseSpanLength","Object","keys","originalDataArray","originalData","dataset","values","tickObject","tickObjectLength","d1","on","d","text","pageX","pageY","transform","bandwidth","showYAxisLablesTooltip","document","getElementById","remove","yAxisElement","call","tooltip","_onLegendHover","customMessage","_isLegendSelected","_onLegendLeave","isLegendFocused","_getLegendData","actions","_index","title","hoverAction","onMouseOutAction","legends","Legends","enabledWrapLines","enabledLegendsWrapLines","overflowText","legendsOverflowText","onChange","_onLegendSelectionChange","_getHighlightedLegend","includes","currentLegend","canSelectMultipleLegends","slice","_getAxisData","yAxisData","yAxisDomainValues","domainValue","xMaxValue","xValue","yValue","ariaLabel","_getChartTitle","chartTitle","_isChartEmpty","newX","newY","threshold","distance","sqrt","pow","calloutProps","getAccessibleDataObject","customCallout","customizedCallout","customCalloutProps","calloutPropsPerDataPoint","isCartesian","tickParams","tickValues","tickFormat","reversedBars","reverse","legendBars","CartesianChart","points","chartType","ChartTypes","xAxisType","yAxisType","stringDatasetForYAxisDomain","barwidth","getmargins","getGraphData","getAxisData","onChartMouseLeave","children","g","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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U1Q;YACV2Q,YAAYjN;YACZkN,cAAc1L;YACd2L,aAAaxC;YACbyC,mBAAmB5J;YACnBtE,cAAcpC;YACd,oCAAoC,GACpC,wDAAwD;YACxDuQ,UAAU,CAACpS;gBACT,OAAA,WAAA,GACEF,OAAA4F,aAAA,CAAA5F,OAAA6F,QAAA,EAAA,MAAA,WAAA,GACE7F,OAAA4F,aAAA,CAAC2M,KAAAA,MAAG7Q;YAGV;;IAGN,OAAO;QACL,OAAA,WAAA,GACE1B,OAAA4F,aAAA,CAACwG,OAAAA;YAAID,IAAI9K;YAAekK,MAAM;YAASiB,OAAO;gBAAEX,SAAS;YAAI;YAAGR,cAAY;;IAEhF;AACF;AACAtL,2BAA2ByS,WAAW,GAAG"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Horizontal Bar Chart with Axis styles
3
+ * {@docCategory HorizontalBarChartWithAxis}
4
+ */ "use strict";
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["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":[],"rangeMappings":";;;","mappings":"AAgGA;;;CAGC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./HorizontalBarChartWithAxis"), exports);
7
+ _export_star._(require("./HorizontalBarChartWithAxis.types"), exports);
8
+ _export_star._(require("../../types/index"), exports);
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './HorizontalBarChartWithAxis';\nexport * from './HorizontalBarChartWithAxis.types';\nexport * from '../../types/index';\n"],"names":[],"rangeMappings":";;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA"}
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ hbcWithAxisClassNames: function() {
13
+ return hbcWithAxisClassNames;
14
+ },
15
+ useHorizontalBarChartWithAxisStyles: function() {
16
+ return useHorizontalBarChartWithAxisStyles;
17
+ }
18
+ });
19
+ const _react = require("@griffel/react");
20
+ const hbcWithAxisClassNames = {
21
+ opacityChangeOnHover: 'fui-hbcwa__opacityChangeOnHover',
22
+ xAxisTicks: 'fui-hbcwa__xAxisTicks',
23
+ tooltip: 'fui-hbcwa__tooltip',
24
+ chartLabel: '',
25
+ xAxisDomain: '',
26
+ xAxisText: '',
27
+ yAxisDomain: '',
28
+ yAxisTicks: '',
29
+ yAxisText: '',
30
+ root: '',
31
+ xAxis: '',
32
+ yAxis: '',
33
+ legendContainer: '',
34
+ hover: '',
35
+ calloutContentRoot: '',
36
+ calloutContentX: '',
37
+ calloutContentY: '',
38
+ descriptionMessage: '',
39
+ calloutDateTimeContainer: '',
40
+ calloutInfoContainer: '',
41
+ calloutBlockContainer: '',
42
+ calloutBlockContainertoDrawShapefalse: '',
43
+ calloutBlockContainertoDrawShapetrue: '',
44
+ calloutlegendText: '',
45
+ axisTitle: '',
46
+ chartTitle: '',
47
+ shapeStyles: '',
48
+ chartWrapper: ''
49
+ };
50
+ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
51
+ opacityChangeOnHover: {
52
+ abs64n: "f9das1l"
53
+ },
54
+ xAxisTicks: {},
55
+ tooltip: {
56
+ Bahqtrf: "fk6fouc",
57
+ Be2twd7: "fkhj508",
58
+ Bhrd7zp: "figsok6",
59
+ Bg96gwp: "f1i3iumi",
60
+ mc9l5x: "f22iagw",
61
+ Beiy3e4: "f1vx9l62",
62
+ z8tnut: "f17mpqex",
63
+ z189sj: [
64
+ "f1vdfbxk",
65
+ "f1f5gg8d"
66
+ ],
67
+ Byoj8tv: "fdvome7",
68
+ uwmqm3: [
69
+ "f1f5gg8d",
70
+ "f1vdfbxk"
71
+ ],
72
+ qhf8xq: "f1euv43f",
73
+ fsow6f: "f17mccla",
74
+ Bhzewxz: "fr6rvge",
75
+ De3pzq: "fxugw4r",
76
+ Beyfa6y: 0,
77
+ Bbmb7ep: 0,
78
+ Btl43ni: 0,
79
+ B7oj6ja: 0,
80
+ Dimara: "fq9zq91",
81
+ Bkecrkj: "f1aehjj5"
82
+ }
83
+ }, {
84
+ d: [
85
+ ".f9das1l{opacity:0.1;}",
86
+ ".fk6fouc{font-family:var(--fontFamilyBase);}",
87
+ ".fkhj508{font-size:var(--fontSizeBase300);}",
88
+ ".figsok6{font-weight:var(--fontWeightRegular);}",
89
+ ".f1i3iumi{line-height:var(--lineHeightBase300);}",
90
+ ".f22iagw{display:flex;}",
91
+ ".f1vx9l62{flex-direction:column;}",
92
+ ".f17mpqex{padding-top:var(--spacingHorizontalS);}",
93
+ ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}",
94
+ ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}",
95
+ ".fdvome7{padding-bottom:var(--spacingHorizontalS);}",
96
+ ".f1euv43f{position:absolute;}",
97
+ ".f17mccla{text-align:center;}",
98
+ ".fr6rvge{top:var(--spacingVerticalNone);}",
99
+ ".fxugw4r{background-color:var(--colorNeutralBackground1);}",
100
+ [
101
+ ".fq9zq91{border-radius:var(--borderRadiusSmall);}",
102
+ {
103
+ p: -1
104
+ }
105
+ ],
106
+ ".f1aehjj5{pointer-events:none;}"
107
+ ]
108
+ });
109
+ const useHorizontalBarChartWithAxisStyles = (props)=>{
110
+ const baseStyles = useStyles();
111
+ return {
112
+ opacityChangeOnHover: (0, _react.mergeClasses)(hbcWithAxisClassNames.opacityChangeOnHover, baseStyles.opacityChangeOnHover),
113
+ xAxisTicks: (0, _react.mergeClasses)(hbcWithAxisClassNames.xAxisTicks, baseStyles.xAxisTicks),
114
+ tooltip: (0, _react.mergeClasses)(hbcWithAxisClassNames.tooltip, baseStyles.tooltip)
115
+ };
116
+ }; //# sourceMappingURL=useHorizontalBarChartWithAxisStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useHorizontalBarChartWithAxisStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\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 calloutContentRoot: '',\n calloutContentX: '',\n calloutContentY: '',\n descriptionMessage: '',\n calloutDateTimeContainer: '',\n calloutInfoContainer: '',\n calloutBlockContainer: '',\n calloutBlockContainertoDrawShapefalse: '',\n calloutBlockContainertoDrawShapetrue: '',\n calloutlegendText: '',\n axisTitle: '',\n chartTitle: '',\n shapeStyles: '',\n chartWrapper: ''\n};\nconst useStyles = makeStyles({\n opacityChangeOnHover: {\n opacity: 0.1\n },\n xAxisTicks: {},\n tooltip: {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.padding(tokens.spacingHorizontalS),\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n backgroundColor: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none'\n }\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 tooltip: mergeClasses(hbcWithAxisClassNames.tooltip, baseStyles.tooltip)\n };\n};\n"],"names":["hbcWithAxisClassNames","useHorizontalBarChartWithAxisStyles","opacityChangeOnHover","xAxisTicks","tooltip","chartLabel","xAxisDomain","xAxisText","yAxisDomain","yAxisTicks","yAxisText","root","xAxis","yAxis","legendContainer","hover","calloutContentRoot","calloutContentX","calloutContentY","descriptionMessage","calloutDateTimeContainer","calloutInfoContainer","calloutBlockContainer","calloutBlockContainertoDrawShapefalse","calloutBlockContainertoDrawShapetrue","calloutlegendText","axisTitle","chartTitle","shapeStyles","chartWrapper","useStyles","__styles","abs64n","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","De3pzq","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","d","p","props","baseStyles","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,qBAAqB;eAArBA;;IAkDIC,mCAAmC;eAAnCA;;;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AAU,EAAEqD,WAAWrD,UAAU;QAChFC,SAASqD,IAAAA,mBAAY,EAACzD,sBAAsBI,OAAO,EAAEoD,WAAWpD,OAAO;IAC3E;AACJ"}
@@ -0,0 +1,313 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Legends", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return Legends;
9
+ }
10
+ });
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _reactbutton = require("@fluentui/react-button");
14
+ const _shape = require("./shape");
15
+ const _useLegendsStylesstyles = require("./useLegendsStyles.styles");
16
+ const _reactoverflow = require("@fluentui/react-overflow");
17
+ const _reacttabster = require("@fluentui/react-tabster");
18
+ const _OverflowMenu = require("./OverflowMenu");
19
+ const _reacttheme = require("@fluentui/react-theme");
20
+ const Legends = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
21
+ /** Boolean variable to check if one or more legends are selected */ let _isLegendSelected = false;
22
+ // set states separately for each instance of the component
23
+ const [activeLegend, setActiveLegend] = _react.useState('');
24
+ const [selectedLegends, setSelectedLegends] = _react.useState({});
25
+ const focusAttributes = (0, _reacttabster.useFocusableGroup)();
26
+ const arrowAttributes = (0, _reacttabster.useArrowNavigationGroup)({
27
+ axis: 'horizontal',
28
+ memorizeCurrent: true
29
+ });
30
+ _react.useEffect(()=>{
31
+ var _props_selectedLegends;
32
+ const initialSelectedLegends = (_props_selectedLegends = props.selectedLegends) !== null && _props_selectedLegends !== void 0 ? _props_selectedLegends : props.defaultSelectedLegends;
33
+ var _props_selectedLegend;
34
+ const initialSelectedLegend = (_props_selectedLegend = props.selectedLegend) !== null && _props_selectedLegend !== void 0 ? _props_selectedLegend : props.defaultSelectedLegend;
35
+ let selectedLegendsState = {};
36
+ if (props.canSelectMultipleLegends) {
37
+ var _this;
38
+ selectedLegendsState = ((_this = initialSelectedLegends !== null && initialSelectedLegends !== void 0 ? initialSelectedLegends : []) === null || _this === void 0 ? void 0 : _this.reduce((combineDict, key)=>({
39
+ [key]: true,
40
+ ...combineDict
41
+ }), {})) || {};
42
+ setSelectedLegends(selectedLegendsState);
43
+ } else if (initialSelectedLegend !== undefined) {
44
+ selectedLegendsState = {
45
+ [initialSelectedLegend]: true
46
+ };
47
+ setSelectedLegends(selectedLegendsState);
48
+ }
49
+ }, [
50
+ props.canSelectMultipleLegends,
51
+ props.defaultSelectedLegend,
52
+ props.defaultSelectedLegends,
53
+ props.selectedLegend,
54
+ props.selectedLegends
55
+ ]);
56
+ _isLegendSelected = Object.keys(selectedLegends).length > 0;
57
+ const dataToRender = _generateData();
58
+ const { overflowStyles, allowFocusOnLegends = true, canSelectMultipleLegends = false } = props;
59
+ const classes = (0, _useLegendsStylesstyles.useLegendStyles)(props);
60
+ const itemIds = dataToRender.map((_item, index)=>index.toString());
61
+ const overflowHoverCardLegends = [];
62
+ props.legends.map((legend, index)=>{
63
+ const hoverCardElement = _renderButton(legend, index);
64
+ overflowHoverCardLegends.push(hoverCardElement);
65
+ });
66
+ const overflowString = props.overflowText ? props.overflowText : 'more';
67
+ return props.enabledWrapLines ? renderWrappedLegends() : renderLegends();
68
+ function renderLegends() {
69
+ return /*#__PURE__*/ _react.createElement("div", {
70
+ ...focusAttributes,
71
+ ...arrowAttributes,
72
+ ...allowFocusOnLegends && {
73
+ role: 'listbox',
74
+ 'aria-label': 'Legends',
75
+ 'aria-multiselectable': canSelectMultipleLegends
76
+ },
77
+ className: classes.root
78
+ }, /*#__PURE__*/ _react.createElement(_reactoverflow.Overflow, null, /*#__PURE__*/ _react.createElement("div", {
79
+ className: classes.resizableArea,
80
+ style: {
81
+ textAlign: props.centerLegends ? 'center' : 'unset'
82
+ }
83
+ }, dataToRender.map((item, id)=>/*#__PURE__*/ _react.createElement(_reactoverflow.OverflowItem, {
84
+ key: id,
85
+ id: id.toString()
86
+ }, _renderButton(item))), /*#__PURE__*/ _react.createElement(_OverflowMenu.OverflowMenu, {
87
+ itemIds: itemIds,
88
+ title: `${overflowString}`,
89
+ items: overflowHoverCardLegends
90
+ }))));
91
+ }
92
+ function renderWrappedLegends() {
93
+ return /*#__PURE__*/ _react.createElement("div", {
94
+ ...focusAttributes,
95
+ ...arrowAttributes,
96
+ ...allowFocusOnLegends && {
97
+ role: 'listbox',
98
+ 'aria-label': 'Legends',
99
+ 'aria-multiselectable': canSelectMultipleLegends
100
+ },
101
+ style: {
102
+ justifyContent: props.centerLegends ? 'center' : 'unset',
103
+ flexWrap: 'wrap',
104
+ ...overflowStyles
105
+ },
106
+ className: classes.root
107
+ }, /*#__PURE__*/ _react.createElement("div", {
108
+ className: classes.resizableArea,
109
+ style: {
110
+ display: 'flex',
111
+ flexWrap: 'wrap',
112
+ overflow: 'auto'
113
+ }
114
+ }, dataToRender.map((item, id)=>/*#__PURE__*/ _react.createElement("div", {
115
+ key: id,
116
+ style: {
117
+ flex: '0 1 auto',
118
+ margin: '4px'
119
+ }
120
+ }, _renderButton(item)))));
121
+ }
122
+ function _generateData() {
123
+ const { shape } = props;
124
+ const dataItems = props.legends.map((legend, index)=>{
125
+ return {
126
+ /* ...(allowFocusOnLegends && {
127
+ nativeButtonProps: getIntrinsicElementProps(
128
+ 'div',
129
+ {
130
+ legend,
131
+ ...buttonProperties,
132
+ },
133
+ ['title'],
134
+ ),
135
+ 'aria-setsize': props.legends.length,
136
+ 'aria-posinset': index + 1,
137
+ }), */ title: legend.title,
138
+ action: legend.action,
139
+ hoverAction: legend.hoverAction,
140
+ onMouseOutAction: legend.onMouseOutAction,
141
+ color: legend.color,
142
+ shape: shape ? shape : legend.shape,
143
+ stripePattern: legend.stripePattern,
144
+ isLineLegendInBarChart: legend.isLineLegendInBarChart,
145
+ opacity: legend.opacity,
146
+ key: index
147
+ };
148
+ });
149
+ return dataItems;
150
+ }
151
+ /**
152
+ * Determine whether the component is in "controlled" mode for selections, where the selected legend(s) are
153
+ * determined entirely by props passed in from the parent component.
154
+ */ function _isInControlledMode() {
155
+ return props.canSelectMultipleLegends ? props.selectedLegends !== undefined : props.selectedLegend !== undefined;
156
+ }
157
+ /**
158
+ * Get the new selected legends based on the legend that was clicked when multi-select is enabled.
159
+ * @param legend The legend that was clicked
160
+ * @returns An object with the new selected legend(s) state data.
161
+ */ function _getNewSelectedLegendsForMultiselect(legend) {
162
+ let legendsSelected = {
163
+ ...selectedLegends
164
+ };
165
+ if (legendsSelected[legend.title]) {
166
+ // Delete entry for the deselected legend to make
167
+ // the number of keys equal to the number of selected legends
168
+ delete legendsSelected[legend.title];
169
+ } else {
170
+ legendsSelected[legend.title] = true;
171
+ // Clear set if all legends are selected
172
+ if (Object.keys(legendsSelected).length === props.legends.length) {
173
+ legendsSelected = {};
174
+ }
175
+ }
176
+ return legendsSelected;
177
+ }
178
+ /**
179
+ * Get the new selected legends based on the legend that was clicked when single-select is enabled.
180
+ * @param legend The legend that was clicked
181
+ * @returns An object with the new selected legend state data.
182
+ */ function _getNewSelectedLegendsForSingleSelect(legend) {
183
+ return selectedLegends[legend.title] ? {} : {
184
+ [legend.title]: true
185
+ };
186
+ }
187
+ function _onClick(legend, event) {
188
+ var _props_onChange, _legend_action;
189
+ const { canSelectMultipleLegends = false } = props;
190
+ const nextSelectedLegends = canSelectMultipleLegends ? _getNewSelectedLegendsForMultiselect(legend) : _getNewSelectedLegendsForSingleSelect(legend);
191
+ if (!_isInControlledMode()) {
192
+ setSelectedLegends(nextSelectedLegends);
193
+ }
194
+ (_props_onChange = props.onChange) === null || _props_onChange === void 0 ? void 0 : _props_onChange.call(props, Object.keys(nextSelectedLegends), event, legend);
195
+ (_legend_action = legend.action) === null || _legend_action === void 0 ? void 0 : _legend_action.call(legend);
196
+ }
197
+ function _onHoverOverLegend(legend) {
198
+ if (legend.hoverAction) {
199
+ setActiveLegend(legend.title);
200
+ legend.hoverAction();
201
+ }
202
+ }
203
+ function _onLeave(legend) {
204
+ if (legend.onMouseOutAction) {
205
+ setActiveLegend('');
206
+ legend.onMouseOutAction();
207
+ }
208
+ }
209
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
210
+ function _renderButton(data, index) {
211
+ const { allowFocusOnLegends = true } = props;
212
+ const legend = {
213
+ title: data.title,
214
+ color: data.color,
215
+ shape: data.shape,
216
+ action: data.action,
217
+ hoverAction: data.hoverAction,
218
+ onMouseOutAction: data.onMouseOutAction,
219
+ stripePattern: data.stripePattern,
220
+ isLineLegendInBarChart: data.isLineLegendInBarChart,
221
+ opacity: data.opacity
222
+ };
223
+ const color = _getColor(legend.title, legend.color);
224
+ const onClickHandler = (event)=>{
225
+ _onClick(legend, event);
226
+ };
227
+ const onHoverHandler = ()=>{
228
+ _onHoverOverLegend(legend);
229
+ };
230
+ const onMouseOut = ()=>{
231
+ _onLeave(legend);
232
+ };
233
+ const shape = _getShape(legend, color);
234
+ return /*#__PURE__*/ _react.createElement(_reactbutton.Button, {
235
+ ...allowFocusOnLegends && {
236
+ 'aria-selected': !!selectedLegends[legend.title],
237
+ role: 'option',
238
+ 'aria-label': `${legend.title}`,
239
+ 'aria-setsize': data['aria-setsize'],
240
+ 'aria-posinset': data['aria-posinset']
241
+ },
242
+ ...data.nativeButtonProps && {
243
+ ...data.nativeButtonProps
244
+ },
245
+ key: index,
246
+ className: classes.legend,
247
+ onClick: onClickHandler,
248
+ onMouseOver: onHoverHandler,
249
+ onMouseOut: onMouseOut,
250
+ onFocus: onHoverHandler,
251
+ onBlur: onMouseOut,
252
+ appearance: 'outline',
253
+ size: "small",
254
+ style: {
255
+ '--rect-height': legend.isLineLegendInBarChart ? '4px' : '12px',
256
+ '--rect-backgroundColor': legend.stripePattern ? '' : color,
257
+ '--rect-borderColor': legend.color ? legend.color : _reacttheme.tokens.colorNeutralStroke1,
258
+ '--rect-content': legend.stripePattern ? `repeating-linear-gradient(135deg, transparent, transparent 3px, ${color} 1px, ${color} 4px)` : ''
259
+ }
260
+ }, shape, /*#__PURE__*/ _react.createElement("div", {
261
+ className: classes.text,
262
+ style: {
263
+ opacity: color === _reacttheme.tokens.colorNeutralBackground1 ? '0.67' : ''
264
+ }
265
+ }, legend.title));
266
+ }
267
+ function _getShape(legend, color) {
268
+ const svgParentProps = {
269
+ className: classes.shape
270
+ };
271
+ const svgChildProps = {
272
+ fill: color,
273
+ strokeWidth: 2,
274
+ stroke: legend.color
275
+ };
276
+ return /*#__PURE__*/ _react.createElement(_shape.Shape, {
277
+ svgProps: svgParentProps,
278
+ pathProps: svgChildProps,
279
+ shape: legend.shape,
280
+ classNameForNonSvg: classes.rect,
281
+ style: {
282
+ height: legend.isLineLegendInBarChart ? '4px' : '12px',
283
+ backgroundColor: legend.stripePattern ? '' : color,
284
+ borderColor: legend.color ? legend.color : _reacttheme.tokens.colorNeutralStroke1,
285
+ content: legend.stripePattern ? `repeating-linear-gradient(135deg, transparent, transparent 3px, ${color} 1px, ${color} 4px)` : '',
286
+ '--rect-content-high-contrast': `linear-gradient(to right, ${color}, ${color})`,
287
+ '--rect-opacity-high-contrast': color === _reacttheme.tokens.colorNeutralBackground1 ? '0.6' : ''
288
+ }
289
+ });
290
+ }
291
+ function _getColor(title, color) {
292
+ let legendColor = color;
293
+ // if one or more legends are selected
294
+ if (_isLegendSelected) {
295
+ // if the given legend (title) is one of the selected legends
296
+ if (selectedLegends[title]) {
297
+ legendColor = color;
298
+ } else {
299
+ legendColor = _reacttheme.tokens.colorNeutralBackground1;
300
+ }
301
+ } else {
302
+ // if the given legend is hovered
303
+ // or none of the legends is hovered
304
+ if (activeLegend === title || activeLegend === '') {
305
+ legendColor = color;
306
+ } else {
307
+ legendColor = _reacttheme.tokens.colorNeutralBackground1;
308
+ }
309
+ }
310
+ return legendColor;
311
+ }
312
+ });
313
+ Legends.displayName = 'Legends';