ngwr 15.4.0 → 15.6.0

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 (678) hide show
  1. package/README.md +3 -4
  2. package/affix/styles/_index.scss +2 -0
  3. package/alert/styles/_index.scss +18 -0
  4. package/anchor/styles/_index.scss +1 -0
  5. package/avatar/styles/_index.scss +44 -4
  6. package/back-top/styles/_index.scss +1 -0
  7. package/badge/styles/_index.scss +1 -0
  8. package/breadcrumbs/styles/_index.scss +1 -0
  9. package/burger/styles/_index.scss +1 -0
  10. package/button/styles/_index.scss +1 -0
  11. package/calendar/styles/_index.scss +1 -0
  12. package/card/styles/_index.scss +1 -0
  13. package/carousel/styles/_index.scss +1 -0
  14. package/cascader/styles/_index.scss +1 -0
  15. package/charts/bar-chart/styles/_index.scss +1 -0
  16. package/charts/boxplot-chart/styles/_index.scss +1 -0
  17. package/charts/bullet-chart/styles/_index.scss +1 -0
  18. package/charts/calendar-heatmap/styles/_index.scss +1 -0
  19. package/charts/candlestick-chart/styles/_index.scss +1 -0
  20. package/charts/chart-legend/styles/_index.scss +1 -0
  21. package/charts/donut-chart/styles/_index.scss +1 -0
  22. package/charts/funnel-chart/styles/_index.scss +1 -0
  23. package/charts/gauge/styles/_index.scss +1 -0
  24. package/charts/heatmap-chart/styles/_index.scss +1 -0
  25. package/charts/line-chart/styles/_index.scss +1 -0
  26. package/charts/meter-group/styles/_index.scss +1 -0
  27. package/charts/radar-chart/styles/_index.scss +1 -0
  28. package/charts/scatter-chart/styles/_index.scss +1 -0
  29. package/charts/sparkline/styles/_index.scss +2 -0
  30. package/charts/treemap-chart/styles/_index.scss +1 -0
  31. package/charts/waterfall-chart/styles/_index.scss +1 -0
  32. package/checkbox/styles/_index.scss +1 -0
  33. package/collapse/styles/_index.scss +1 -0
  34. package/color-picker/styles/_index.scss +1 -0
  35. package/command-palette/styles/_index.scss +1 -0
  36. package/comment/styles/_index.scss +271 -0
  37. package/compare/styles/_index.scss +1 -0
  38. package/context-menu/styles/_index.scss +1 -0
  39. package/counter/styles/_index.scss +1 -0
  40. package/date-picker/styles/_index.scss +1 -0
  41. package/density/styles/_index.scss +2 -0
  42. package/descriptions/styles/_index.scss +1 -0
  43. package/dialog/styles/_index.scss +7 -0
  44. package/divider/styles/_index.scss +1 -0
  45. package/drawer/styles/_index.scss +1 -0
  46. package/dropdown/styles/_index.scss +1 -0
  47. package/editor/styles/_index.scss +1 -0
  48. package/empty/styles/_index.scss +1 -0
  49. package/event-calendar/styles/_index.scss +1 -0
  50. package/fesm2022/ngwr-affix.mjs +2 -0
  51. package/fesm2022/ngwr-affix.mjs.map +1 -1
  52. package/fesm2022/ngwr-alert.mjs +7 -3
  53. package/fesm2022/ngwr-alert.mjs.map +1 -1
  54. package/fesm2022/ngwr-anchor.mjs +2 -0
  55. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  56. package/fesm2022/ngwr-avatar.mjs +71 -6
  57. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  58. package/fesm2022/ngwr-back-top.mjs +2 -0
  59. package/fesm2022/ngwr-back-top.mjs.map +1 -1
  60. package/fesm2022/ngwr-badge.mjs +9 -0
  61. package/fesm2022/ngwr-badge.mjs.map +1 -1
  62. package/fesm2022/ngwr-breadcrumbs.mjs +7 -2
  63. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  64. package/fesm2022/ngwr-burger.mjs +5 -0
  65. package/fesm2022/ngwr-burger.mjs.map +1 -1
  66. package/fesm2022/ngwr-button.mjs +6 -0
  67. package/fesm2022/ngwr-button.mjs.map +1 -1
  68. package/fesm2022/ngwr-calendar.mjs +2 -0
  69. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  70. package/fesm2022/ngwr-card.mjs +11 -2
  71. package/fesm2022/ngwr-card.mjs.map +1 -1
  72. package/fesm2022/ngwr-carousel.mjs +6 -0
  73. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  74. package/fesm2022/ngwr-cascader.mjs +3 -3
  75. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  76. package/fesm2022/ngwr-charts-bar-chart.mjs +2 -1
  77. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  78. package/fesm2022/ngwr-charts-boxplot-chart.mjs +2 -0
  79. package/fesm2022/ngwr-charts-boxplot-chart.mjs.map +1 -1
  80. package/fesm2022/ngwr-charts-bullet-chart.mjs +2 -1
  81. package/fesm2022/ngwr-charts-bullet-chart.mjs.map +1 -1
  82. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +2 -0
  83. package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
  84. package/fesm2022/ngwr-charts-candlestick-chart.mjs +2 -1
  85. package/fesm2022/ngwr-charts-candlestick-chart.mjs.map +1 -1
  86. package/fesm2022/ngwr-charts-chart-legend.mjs +9 -0
  87. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
  88. package/fesm2022/ngwr-charts-donut-chart.mjs +5 -0
  89. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  90. package/fesm2022/ngwr-charts-funnel-chart.mjs +5 -1
  91. package/fesm2022/ngwr-charts-funnel-chart.mjs.map +1 -1
  92. package/fesm2022/ngwr-charts-gauge.mjs +5 -1
  93. package/fesm2022/ngwr-charts-gauge.mjs.map +1 -1
  94. package/fesm2022/ngwr-charts-heatmap-chart.mjs +2 -1
  95. package/fesm2022/ngwr-charts-heatmap-chart.mjs.map +1 -1
  96. package/fesm2022/ngwr-charts-line-chart.mjs +2 -1
  97. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  98. package/fesm2022/ngwr-charts-meter-group.mjs +5 -0
  99. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  100. package/fesm2022/ngwr-charts-radar-chart.mjs +2 -1
  101. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
  102. package/fesm2022/ngwr-charts-scatter-chart.mjs +5 -1
  103. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
  104. package/fesm2022/ngwr-charts-sparkline.mjs +5 -0
  105. package/fesm2022/ngwr-charts-sparkline.mjs.map +1 -1
  106. package/fesm2022/ngwr-charts-treemap-chart.mjs +2 -0
  107. package/fesm2022/ngwr-charts-treemap-chart.mjs.map +1 -1
  108. package/fesm2022/ngwr-charts-waterfall-chart.mjs +2 -0
  109. package/fesm2022/ngwr-charts-waterfall-chart.mjs.map +1 -1
  110. package/fesm2022/ngwr-checkbox.mjs +9 -1
  111. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  112. package/fesm2022/ngwr-collapse.mjs +11 -2
  113. package/fesm2022/ngwr-collapse.mjs.map +1 -1
  114. package/fesm2022/ngwr-color-picker.mjs +3 -1
  115. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  116. package/fesm2022/ngwr-command-palette.mjs +2 -1
  117. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  118. package/fesm2022/ngwr-comment-testing.mjs +60 -0
  119. package/fesm2022/ngwr-comment-testing.mjs.map +1 -0
  120. package/fesm2022/ngwr-comment.mjs +524 -0
  121. package/fesm2022/ngwr-comment.mjs.map +1 -0
  122. package/fesm2022/ngwr-compare.mjs +2 -1
  123. package/fesm2022/ngwr-compare.mjs.map +1 -1
  124. package/fesm2022/ngwr-context-menu.mjs +12 -2
  125. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  126. package/fesm2022/ngwr-counter.mjs +17 -23
  127. package/fesm2022/ngwr-counter.mjs.map +1 -1
  128. package/fesm2022/ngwr-date-picker.mjs +17 -2
  129. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  130. package/fesm2022/ngwr-density.mjs +2 -1
  131. package/fesm2022/ngwr-density.mjs.map +1 -1
  132. package/fesm2022/ngwr-descriptions.mjs +9 -0
  133. package/fesm2022/ngwr-descriptions.mjs.map +1 -1
  134. package/fesm2022/ngwr-dialog-testing.mjs +14 -0
  135. package/fesm2022/ngwr-dialog-testing.mjs.map +1 -1
  136. package/fesm2022/ngwr-dialog.mjs +315 -136
  137. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  138. package/fesm2022/ngwr-directives.mjs +7 -4
  139. package/fesm2022/ngwr-directives.mjs.map +1 -1
  140. package/fesm2022/ngwr-divider.mjs +2 -0
  141. package/fesm2022/ngwr-divider.mjs.map +1 -1
  142. package/fesm2022/ngwr-drawer.mjs +22 -3
  143. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  144. package/fesm2022/ngwr-dropdown.mjs +11 -2
  145. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  146. package/fesm2022/ngwr-editor.mjs +3 -2
  147. package/fesm2022/ngwr-editor.mjs.map +1 -1
  148. package/fesm2022/ngwr-empty.mjs +5 -0
  149. package/fesm2022/ngwr-empty.mjs.map +1 -1
  150. package/fesm2022/ngwr-event-calendar.mjs +5 -1
  151. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  152. package/fesm2022/ngwr-file-upload.mjs +2 -1
  153. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  154. package/fesm2022/ngwr-form.mjs +10 -0
  155. package/fesm2022/ngwr-form.mjs.map +1 -1
  156. package/fesm2022/ngwr-graph.mjs +2 -1
  157. package/fesm2022/ngwr-graph.mjs.map +1 -1
  158. package/fesm2022/ngwr-hotkey.mjs +86 -6
  159. package/fesm2022/ngwr-hotkey.mjs.map +1 -1
  160. package/fesm2022/ngwr-i18n-ar.mjs +22 -3
  161. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  162. package/fesm2022/ngwr-i18n-cs.mjs +22 -3
  163. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  164. package/fesm2022/ngwr-i18n-de.mjs +22 -3
  165. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  166. package/fesm2022/ngwr-i18n-en.mjs +22 -3
  167. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  168. package/fesm2022/ngwr-i18n-es.mjs +22 -3
  169. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  170. package/fesm2022/ngwr-i18n-fr.mjs +22 -3
  171. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  172. package/fesm2022/ngwr-i18n-he.mjs +22 -3
  173. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  174. package/fesm2022/ngwr-i18n-hi.mjs +22 -3
  175. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  176. package/fesm2022/ngwr-i18n-id.mjs +22 -3
  177. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  178. package/fesm2022/ngwr-i18n-it.mjs +22 -3
  179. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  180. package/fesm2022/ngwr-i18n-ja.mjs +22 -3
  181. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  182. package/fesm2022/ngwr-i18n-ko.mjs +22 -3
  183. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  184. package/fesm2022/ngwr-i18n-nl.mjs +22 -3
  185. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  186. package/fesm2022/ngwr-i18n-pl.mjs +22 -3
  187. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  188. package/fesm2022/ngwr-i18n-pt.mjs +22 -3
  189. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  190. package/fesm2022/ngwr-i18n-ru.mjs +22 -3
  191. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  192. package/fesm2022/ngwr-i18n-sv.mjs +22 -3
  193. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  194. package/fesm2022/ngwr-i18n-tr.mjs +22 -3
  195. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  196. package/fesm2022/ngwr-i18n-uk.mjs +22 -3
  197. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  198. package/fesm2022/ngwr-i18n-vi.mjs +22 -3
  199. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  200. package/fesm2022/ngwr-i18n-zh-tw.mjs +22 -3
  201. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  202. package/fesm2022/ngwr-i18n-zh.mjs +22 -3
  203. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  204. package/fesm2022/ngwr-icon.mjs +2 -0
  205. package/fesm2022/ngwr-icon.mjs.map +1 -1
  206. package/fesm2022/ngwr-image-cropper.mjs +2 -1
  207. package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
  208. package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
  209. package/fesm2022/ngwr-input-number.mjs +110 -12
  210. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  211. package/fesm2022/ngwr-input-otp.mjs +2 -1
  212. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  213. package/fesm2022/ngwr-input.mjs +20 -2
  214. package/fesm2022/ngwr-input.mjs.map +1 -1
  215. package/fesm2022/ngwr-keyboard.mjs +79 -18
  216. package/fesm2022/ngwr-keyboard.mjs.map +1 -1
  217. package/fesm2022/ngwr-knob.mjs +5 -1
  218. package/fesm2022/ngwr-knob.mjs.map +1 -1
  219. package/fesm2022/ngwr-layout.mjs +21 -3
  220. package/fesm2022/ngwr-layout.mjs.map +1 -1
  221. package/fesm2022/ngwr-lightbox.mjs +3 -3
  222. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  223. package/fesm2022/ngwr-list.mjs +7 -2
  224. package/fesm2022/ngwr-list.mjs.map +1 -1
  225. package/fesm2022/ngwr-load-state-testing.mjs +43 -0
  226. package/fesm2022/ngwr-load-state-testing.mjs.map +1 -0
  227. package/fesm2022/ngwr-load-state.mjs +495 -0
  228. package/fesm2022/ngwr-load-state.mjs.map +1 -0
  229. package/fesm2022/ngwr-mention.mjs +48 -20
  230. package/fesm2022/ngwr-mention.mjs.map +1 -1
  231. package/fesm2022/ngwr-page-header.mjs +49 -2
  232. package/fesm2022/ngwr-page-header.mjs.map +1 -1
  233. package/fesm2022/ngwr-pagination.mjs +3 -1
  234. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  235. package/fesm2022/ngwr-pipes.mjs +40 -1
  236. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  237. package/fesm2022/ngwr-platform.mjs +134 -2
  238. package/fesm2022/ngwr-platform.mjs.map +1 -1
  239. package/fesm2022/ngwr-popconfirm.mjs +6 -1
  240. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  241. package/fesm2022/ngwr-popover.mjs +10 -1
  242. package/fesm2022/ngwr-popover.mjs.map +1 -1
  243. package/fesm2022/ngwr-progress.mjs +5 -0
  244. package/fesm2022/ngwr-progress.mjs.map +1 -1
  245. package/fesm2022/ngwr-pull-to-refresh.mjs +2 -1
  246. package/fesm2022/ngwr-pull-to-refresh.mjs.map +1 -1
  247. package/fesm2022/ngwr-qr.mjs +2 -1
  248. package/fesm2022/ngwr-qr.mjs.map +1 -1
  249. package/fesm2022/ngwr-radio.mjs +6 -1
  250. package/fesm2022/ngwr-radio.mjs.map +1 -1
  251. package/fesm2022/ngwr-rating.mjs +5 -1
  252. package/fesm2022/ngwr-rating.mjs.map +1 -1
  253. package/fesm2022/ngwr-result.mjs +17 -0
  254. package/fesm2022/ngwr-result.mjs.map +1 -1
  255. package/fesm2022/ngwr-schema-form.mjs +9 -2
  256. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  257. package/fesm2022/ngwr-segmented.mjs +2 -0
  258. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  259. package/fesm2022/ngwr-select.mjs +65 -17
  260. package/fesm2022/ngwr-select.mjs.map +1 -1
  261. package/fesm2022/ngwr-sidebar.mjs +2 -0
  262. package/fesm2022/ngwr-sidebar.mjs.map +1 -1
  263. package/fesm2022/ngwr-skeleton.mjs +30 -5
  264. package/fesm2022/ngwr-skeleton.mjs.map +1 -1
  265. package/fesm2022/ngwr-slider.mjs +26 -4
  266. package/fesm2022/ngwr-slider.mjs.map +1 -1
  267. package/fesm2022/ngwr-sortable-list.mjs +9 -3
  268. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  269. package/fesm2022/ngwr-speed-dial.mjs +2 -0
  270. package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
  271. package/fesm2022/ngwr-spinner.mjs +5 -0
  272. package/fesm2022/ngwr-spinner.mjs.map +1 -1
  273. package/fesm2022/ngwr-splitter.mjs +2 -1
  274. package/fesm2022/ngwr-splitter.mjs.map +1 -1
  275. package/fesm2022/ngwr-statistic.mjs +7 -1
  276. package/fesm2022/ngwr-statistic.mjs.map +1 -1
  277. package/fesm2022/ngwr-stepper.mjs +6 -0
  278. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  279. package/fesm2022/ngwr-storage.mjs +54 -33
  280. package/fesm2022/ngwr-storage.mjs.map +1 -1
  281. package/fesm2022/ngwr-switch.mjs +5 -1
  282. package/fesm2022/ngwr-switch.mjs.map +1 -1
  283. package/fesm2022/ngwr-table.mjs +153 -39
  284. package/fesm2022/ngwr-table.mjs.map +1 -1
  285. package/fesm2022/ngwr-tabs.mjs +3 -1
  286. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  287. package/fesm2022/ngwr-textarea.mjs +2 -0
  288. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  289. package/fesm2022/ngwr-timeline.mjs +9 -0
  290. package/fesm2022/ngwr-timeline.mjs.map +1 -1
  291. package/fesm2022/ngwr-toast.mjs +6 -1
  292. package/fesm2022/ngwr-toast.mjs.map +1 -1
  293. package/fesm2022/ngwr-toolbar.mjs +5 -0
  294. package/fesm2022/ngwr-toolbar.mjs.map +1 -1
  295. package/fesm2022/ngwr-tour.mjs +6 -2
  296. package/fesm2022/ngwr-tour.mjs.map +1 -1
  297. package/fesm2022/ngwr-transfer.mjs +6 -1
  298. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  299. package/fesm2022/ngwr-tree.mjs +2 -1
  300. package/fesm2022/ngwr-tree.mjs.map +1 -1
  301. package/fesm2022/ngwr-typography.mjs +5 -0
  302. package/fesm2022/ngwr-typography.mjs.map +1 -1
  303. package/fesm2022/ngwr-utils-router.mjs +165 -0
  304. package/fesm2022/ngwr-utils-router.mjs.map +1 -0
  305. package/fesm2022/ngwr-utils.mjs +374 -3
  306. package/fesm2022/ngwr-utils.mjs.map +1 -1
  307. package/fesm2022/ngwr-version.mjs +1 -1
  308. package/fesm2022/ngwr-version.mjs.map +1 -1
  309. package/fesm2022/ngwr-window.mjs +4 -1
  310. package/fesm2022/ngwr-window.mjs.map +1 -1
  311. package/file-upload/styles/_index.scss +1 -0
  312. package/form/styles/_index.scss +1 -0
  313. package/graph/styles/_index.scss +1 -0
  314. package/i18n/ar.json +22 -3
  315. package/i18n/cs.json +22 -3
  316. package/i18n/de.json +22 -3
  317. package/i18n/en.json +22 -3
  318. package/i18n/es.json +22 -3
  319. package/i18n/fr.json +22 -3
  320. package/i18n/he.json +22 -3
  321. package/i18n/hi.json +22 -3
  322. package/i18n/id.json +22 -3
  323. package/i18n/it.json +22 -3
  324. package/i18n/ja.json +22 -3
  325. package/i18n/ko.json +22 -3
  326. package/i18n/nl.json +22 -3
  327. package/i18n/pl.json +22 -3
  328. package/i18n/pt.json +22 -3
  329. package/i18n/ru.json +22 -3
  330. package/i18n/sv.json +22 -3
  331. package/i18n/tr.json +22 -3
  332. package/i18n/uk.json +22 -3
  333. package/i18n/vi.json +22 -3
  334. package/i18n/zh-TW.json +22 -3
  335. package/i18n/zh.json +22 -3
  336. package/icon/styles/_index.scss +1 -0
  337. package/image-cropper/styles/_index.scss +1 -0
  338. package/input/styles/_index.scss +1 -0
  339. package/input-number/styles/_index.scss +1 -0
  340. package/input-otp/styles/_index.scss +1 -0
  341. package/keyboard/styles/_index.scss +1 -0
  342. package/knob/styles/_index.scss +1 -0
  343. package/layout/styles/_index.scss +1 -0
  344. package/lightbox/styles/_index.scss +1 -0
  345. package/list/styles/_index.scss +1 -0
  346. package/llms-full.txt +45 -279
  347. package/llms.txt +16 -16
  348. package/load-state/styles/_index.scss +49 -0
  349. package/loading-bar/styles/_index.scss +1 -0
  350. package/mcp/catalog.js +3 -3
  351. package/mention/styles/_index.scss +1 -0
  352. package/package.json +23 -212
  353. package/page-header/styles/_index.scss +82 -0
  354. package/pagination/styles/_index.scss +1 -0
  355. package/popconfirm/styles/_index.scss +1 -0
  356. package/popover/styles/_index.scss +1 -0
  357. package/progress/styles/_index.scss +1 -0
  358. package/pull-to-refresh/styles/_index.scss +1 -0
  359. package/qr/styles/_index.scss +1 -0
  360. package/radio/styles/_index.scss +1 -0
  361. package/rating/styles/_index.scss +1 -0
  362. package/result/styles/_index.scss +1 -0
  363. package/schema-form/styles/_index.scss +1 -0
  364. package/schematics/component-style/index.js +1 -1
  365. package/schematics/component-style/schema.json +1 -1
  366. package/schematics/use/rule.js +0 -1
  367. package/schematics/use/symbol-map.json +8 -28
  368. package/schematics/utility/global-styles.js +3 -3
  369. package/segmented/styles/_index.scss +1 -0
  370. package/select/styles/_index.scss +1 -0
  371. package/sidebar/styles/_index.scss +1 -0
  372. package/skeleton/styles/_index.scss +65 -29
  373. package/skills/ngwr/SKILL.md +3 -4
  374. package/skills/ngwr/references/catalog.md +5 -47
  375. package/skills/ngwr/references/setup.md +1 -2
  376. package/slider/styles/_index.scss +1 -0
  377. package/sortable-list/styles/_index.scss +1 -0
  378. package/speed-dial/styles/_index.scss +1 -0
  379. package/spinner/styles/_index.scss +1 -0
  380. package/splitter/styles/_index.scss +1 -0
  381. package/statistic/styles/_index.scss +1 -0
  382. package/stepper/styles/_index.scss +1 -0
  383. package/styles/_animations.scss +0 -4
  384. package/switch/styles/_index.scss +1 -0
  385. package/table/styles/_index.scss +18 -0
  386. package/tabs/styles/_index.scss +1 -0
  387. package/textarea/styles/_index.scss +1 -0
  388. package/theme/styles/_focus.scss +0 -6
  389. package/theme/styles/_index.scss +6 -0
  390. package/theme/styles/_loaded.scss +29 -0
  391. package/theme/styles/_motion.scss +1 -0
  392. package/timeline/styles/_index.scss +1 -0
  393. package/toast/styles/_index.scss +1 -0
  394. package/toolbar/styles/_index.scss +1 -0
  395. package/tour/styles/_index.scss +1 -0
  396. package/transfer/styles/_index.scss +1 -0
  397. package/tree/styles/_index.scss +1 -0
  398. package/types/ngwr-alert.d.ts +10 -1
  399. package/types/ngwr-avatar.d.ts +49 -0
  400. package/types/ngwr-badge.d.ts +4 -2
  401. package/types/ngwr-breadcrumbs.d.ts +1 -0
  402. package/types/ngwr-burger.d.ts +1 -0
  403. package/types/ngwr-button.d.ts +2 -1
  404. package/types/ngwr-card.d.ts +2 -0
  405. package/types/ngwr-carousel.d.ts +3 -3
  406. package/types/ngwr-charts-chart-legend.d.ts +1 -0
  407. package/types/ngwr-charts-donut-chart.d.ts +1 -0
  408. package/types/ngwr-charts-funnel-chart.d.ts +1 -0
  409. package/types/ngwr-charts-gauge.d.ts +1 -0
  410. package/types/ngwr-charts-meter-group.d.ts +1 -0
  411. package/types/ngwr-charts-scatter-chart.d.ts +1 -0
  412. package/types/ngwr-charts-sparkline.d.ts +1 -0
  413. package/types/ngwr-checkbox.d.ts +2 -0
  414. package/types/ngwr-collapse.d.ts +2 -0
  415. package/types/ngwr-comment-testing.d.ts +90 -0
  416. package/types/ngwr-comment.d.ts +306 -0
  417. package/types/ngwr-compare.d.ts +1 -1
  418. package/types/ngwr-context-menu.d.ts +2 -0
  419. package/types/ngwr-counter.d.ts +12 -8
  420. package/types/ngwr-descriptions.d.ts +2 -0
  421. package/types/ngwr-dialog-testing.d.ts +7 -0
  422. package/types/ngwr-dialog.d.ts +113 -6
  423. package/types/ngwr-directives.d.ts +7 -3
  424. package/types/ngwr-divider.d.ts +1 -1
  425. package/types/ngwr-drawer.d.ts +5 -1
  426. package/types/ngwr-dropdown.d.ts +16 -3
  427. package/types/ngwr-empty.d.ts +1 -0
  428. package/types/ngwr-event-calendar.d.ts +1 -0
  429. package/types/ngwr-form.d.ts +2 -0
  430. package/types/ngwr-hotkey.d.ts +60 -3
  431. package/types/ngwr-image-cropper.d.ts +1 -1
  432. package/types/ngwr-input-number-testing.d.ts +5 -0
  433. package/types/ngwr-input-number.d.ts +91 -12
  434. package/types/ngwr-input.d.ts +4 -0
  435. package/types/ngwr-keyboard.d.ts +28 -1
  436. package/types/ngwr-knob.d.ts +1 -0
  437. package/types/ngwr-layout.d.ts +4 -0
  438. package/types/ngwr-list.d.ts +1 -0
  439. package/types/ngwr-load-state-testing.d.ts +65 -0
  440. package/types/ngwr-load-state.d.ts +269 -0
  441. package/types/ngwr-mention.d.ts +27 -7
  442. package/types/ngwr-page-header.d.ts +60 -8
  443. package/types/ngwr-pipes.d.ts +19 -0
  444. package/types/ngwr-platform.d.ts +73 -7
  445. package/types/ngwr-popconfirm.d.ts +3 -2
  446. package/types/ngwr-progress.d.ts +2 -1
  447. package/types/ngwr-radio.d.ts +1 -0
  448. package/types/ngwr-rating.d.ts +1 -0
  449. package/types/ngwr-result.d.ts +4 -0
  450. package/types/ngwr-schema-form.d.ts +1 -0
  451. package/types/ngwr-select.d.ts +75 -27
  452. package/types/ngwr-skeleton.d.ts +22 -2
  453. package/types/ngwr-slider.d.ts +21 -0
  454. package/types/ngwr-sortable-list.d.ts +2 -1
  455. package/types/ngwr-spinner.d.ts +1 -0
  456. package/types/ngwr-splitter.d.ts +1 -1
  457. package/types/ngwr-statistic.d.ts +1 -0
  458. package/types/ngwr-stepper.d.ts +2 -1
  459. package/types/ngwr-storage.d.ts +33 -3
  460. package/types/ngwr-switch.d.ts +1 -0
  461. package/types/ngwr-table.d.ts +181 -45
  462. package/types/ngwr-timeline.d.ts +3 -1
  463. package/types/ngwr-toolbar.d.ts +1 -0
  464. package/types/ngwr-tour.d.ts +1 -0
  465. package/types/ngwr-transfer.d.ts +1 -0
  466. package/types/ngwr-typography.d.ts +1 -0
  467. package/types/ngwr-utils-router.d.ts +95 -0
  468. package/types/ngwr-utils.d.ts +339 -2
  469. package/types/ngwr-version.d.ts +1 -1
  470. package/typography/styles/_index.scss +1 -0
  471. package/virtual-scroll/styles/_index.scss +1 -0
  472. package/window/styles/_index.scss +1 -0
  473. package/bits/aurora/aurora.scss +0 -1
  474. package/bits/aurora/styles/_index.scss +0 -8
  475. package/bits/aurora/styles/_rules.scss +0 -36
  476. package/bits/blur-text/blur-text.scss +0 -1
  477. package/bits/blur-text/styles/_index.scss +0 -27
  478. package/bits/border-glow/border-glow.scss +0 -4
  479. package/bits/border-glow/styles/_index.scss +0 -15
  480. package/bits/border-glow/styles/_rules.scss +0 -259
  481. package/bits/circular-text/circular-text.scss +0 -1
  482. package/bits/circular-text/styles/_index.scss +0 -15
  483. package/bits/circular-text/styles/_rules.scss +0 -60
  484. package/bits/click-spark/click-spark.scss +0 -5
  485. package/bits/click-spark/styles/_index.scss +0 -11
  486. package/bits/click-spark/styles/_rules.scss +0 -20
  487. package/bits/decrypt-text/decrypt-text.scss +0 -1
  488. package/bits/decrypt-text/styles/_index.scss +0 -15
  489. package/bits/decrypt-text/styles/_rules.scss +0 -40
  490. package/bits/dot-grid/dot-grid.scss +0 -1
  491. package/bits/dot-grid/styles/_index.scss +0 -8
  492. package/bits/dot-grid/styles/_rules.scss +0 -54
  493. package/bits/falling-text/falling-text.scss +0 -1
  494. package/bits/falling-text/styles/_index.scss +0 -15
  495. package/bits/falling-text/styles/_rules.scss +0 -44
  496. package/bits/glitch-text/glitch-text.scss +0 -1
  497. package/bits/glitch-text/styles/_index.scss +0 -15
  498. package/bits/glitch-text/styles/_rules.scss +0 -161
  499. package/bits/gradient-text/gradient-text.scss +0 -1
  500. package/bits/gradient-text/styles/_index.scss +0 -15
  501. package/bits/gradient-text/styles/_rules.scss +0 -118
  502. package/bits/iridescence/iridescence.scss +0 -1
  503. package/bits/iridescence/styles/_index.scss +0 -8
  504. package/bits/iridescence/styles/_rules.scss +0 -72
  505. package/bits/marquee/marquee.scss +0 -1
  506. package/bits/marquee/styles/_index.scss +0 -15
  507. package/bits/marquee/styles/_rules.scss +0 -203
  508. package/bits/ripple-grid/ripple-grid.scss +0 -1
  509. package/bits/ripple-grid/styles/_index.scss +0 -8
  510. package/bits/ripple-grid/styles/_rules.scss +0 -63
  511. package/bits/rotating-text/rotating-text.scss +0 -1
  512. package/bits/rotating-text/styles/_index.scss +0 -39
  513. package/bits/shiny-text/shiny-text.scss +0 -1
  514. package/bits/shiny-text/styles/_index.scss +0 -15
  515. package/bits/shiny-text/styles/_rules.scss +0 -121
  516. package/bits/splash-cursor/splash-cursor.scss +0 -1
  517. package/bits/splash-cursor/styles/_index.scss +0 -28
  518. package/bits/split-text/split-text.scss +0 -1
  519. package/bits/split-text/styles/_index.scss +0 -35
  520. package/bits/spotlight-card/spotlight-card.scss +0 -1
  521. package/bits/spotlight-card/styles/_index.scss +0 -15
  522. package/bits/spotlight-card/styles/_rules.scss +0 -52
  523. package/bits/star-border/star-border.scss +0 -1
  524. package/bits/star-border/styles/_index.scss +0 -15
  525. package/bits/star-border/styles/_rules.scss +0 -126
  526. package/bits/threads/styles/_index.scss +0 -8
  527. package/bits/threads/styles/_rules.scss +0 -76
  528. package/bits/threads/threads.scss +0 -1
  529. package/bits/tilt-card/styles/_index.scss +0 -15
  530. package/bits/tilt-card/styles/_rules.scss +0 -56
  531. package/bits/tilt-card/tilt-card.scss +0 -1
  532. package/bits/typewriter/styles/_index.scss +0 -15
  533. package/bits/typewriter/styles/_rules.scss +0 -45
  534. package/bits/typewriter/typewriter.scss +0 -1
  535. package/bits/waves/styles/_index.scss +0 -15
  536. package/bits/waves/styles/_rules.scss +0 -54
  537. package/bits/waves/waves.scss +0 -1
  538. package/fesm2022/ngwr-bits-aurora.mjs +0 -461
  539. package/fesm2022/ngwr-bits-aurora.mjs.map +0 -1
  540. package/fesm2022/ngwr-bits-blur-text-testing.mjs +0 -49
  541. package/fesm2022/ngwr-bits-blur-text-testing.mjs.map +0 -1
  542. package/fesm2022/ngwr-bits-blur-text.mjs +0 -337
  543. package/fesm2022/ngwr-bits-blur-text.mjs.map +0 -1
  544. package/fesm2022/ngwr-bits-border-glow-testing.mjs +0 -147
  545. package/fesm2022/ngwr-bits-border-glow-testing.mjs.map +0 -1
  546. package/fesm2022/ngwr-bits-border-glow.mjs +0 -561
  547. package/fesm2022/ngwr-bits-border-glow.mjs.map +0 -1
  548. package/fesm2022/ngwr-bits-circular-text-testing.mjs +0 -63
  549. package/fesm2022/ngwr-bits-circular-text-testing.mjs.map +0 -1
  550. package/fesm2022/ngwr-bits-circular-text.mjs +0 -228
  551. package/fesm2022/ngwr-bits-circular-text.mjs.map +0 -1
  552. package/fesm2022/ngwr-bits-click-spark.mjs +0 -304
  553. package/fesm2022/ngwr-bits-click-spark.mjs.map +0 -1
  554. package/fesm2022/ngwr-bits-confetti.mjs +0 -175
  555. package/fesm2022/ngwr-bits-confetti.mjs.map +0 -1
  556. package/fesm2022/ngwr-bits-decrypt-text-testing.mjs +0 -62
  557. package/fesm2022/ngwr-bits-decrypt-text-testing.mjs.map +0 -1
  558. package/fesm2022/ngwr-bits-decrypt-text.mjs +0 -525
  559. package/fesm2022/ngwr-bits-decrypt-text.mjs.map +0 -1
  560. package/fesm2022/ngwr-bits-dot-grid-testing.mjs +0 -40
  561. package/fesm2022/ngwr-bits-dot-grid-testing.mjs.map +0 -1
  562. package/fesm2022/ngwr-bits-dot-grid.mjs +0 -479
  563. package/fesm2022/ngwr-bits-dot-grid.mjs.map +0 -1
  564. package/fesm2022/ngwr-bits-falling-text-testing.mjs +0 -56
  565. package/fesm2022/ngwr-bits-falling-text-testing.mjs.map +0 -1
  566. package/fesm2022/ngwr-bits-falling-text.mjs +0 -418
  567. package/fesm2022/ngwr-bits-falling-text.mjs.map +0 -1
  568. package/fesm2022/ngwr-bits-fuzzy-text-testing.mjs +0 -38
  569. package/fesm2022/ngwr-bits-fuzzy-text-testing.mjs.map +0 -1
  570. package/fesm2022/ngwr-bits-fuzzy-text.mjs +0 -715
  571. package/fesm2022/ngwr-bits-fuzzy-text.mjs.map +0 -1
  572. package/fesm2022/ngwr-bits-glitch-text-testing.mjs +0 -63
  573. package/fesm2022/ngwr-bits-glitch-text-testing.mjs.map +0 -1
  574. package/fesm2022/ngwr-bits-glitch-text.mjs +0 -172
  575. package/fesm2022/ngwr-bits-glitch-text.mjs.map +0 -1
  576. package/fesm2022/ngwr-bits-gradient-text-testing.mjs +0 -89
  577. package/fesm2022/ngwr-bits-gradient-text-testing.mjs.map +0 -1
  578. package/fesm2022/ngwr-bits-gradient-text.mjs +0 -217
  579. package/fesm2022/ngwr-bits-gradient-text.mjs.map +0 -1
  580. package/fesm2022/ngwr-bits-iridescence-testing.mjs +0 -31
  581. package/fesm2022/ngwr-bits-iridescence-testing.mjs.map +0 -1
  582. package/fesm2022/ngwr-bits-iridescence.mjs +0 -591
  583. package/fesm2022/ngwr-bits-iridescence.mjs.map +0 -1
  584. package/fesm2022/ngwr-bits-marquee-testing.mjs +0 -126
  585. package/fesm2022/ngwr-bits-marquee-testing.mjs.map +0 -1
  586. package/fesm2022/ngwr-bits-marquee.mjs +0 -451
  587. package/fesm2022/ngwr-bits-marquee.mjs.map +0 -1
  588. package/fesm2022/ngwr-bits-ripple-grid-testing.mjs +0 -40
  589. package/fesm2022/ngwr-bits-ripple-grid-testing.mjs.map +0 -1
  590. package/fesm2022/ngwr-bits-ripple-grid.mjs +0 -806
  591. package/fesm2022/ngwr-bits-ripple-grid.mjs.map +0 -1
  592. package/fesm2022/ngwr-bits-rotating-text-testing.mjs +0 -50
  593. package/fesm2022/ngwr-bits-rotating-text-testing.mjs.map +0 -1
  594. package/fesm2022/ngwr-bits-rotating-text.mjs +0 -413
  595. package/fesm2022/ngwr-bits-rotating-text.mjs.map +0 -1
  596. package/fesm2022/ngwr-bits-shiny-text-testing.mjs +0 -92
  597. package/fesm2022/ngwr-bits-shiny-text-testing.mjs.map +0 -1
  598. package/fesm2022/ngwr-bits-shiny-text.mjs +0 -315
  599. package/fesm2022/ngwr-bits-shiny-text.mjs.map +0 -1
  600. package/fesm2022/ngwr-bits-splash-cursor-testing.mjs +0 -25
  601. package/fesm2022/ngwr-bits-splash-cursor-testing.mjs.map +0 -1
  602. package/fesm2022/ngwr-bits-splash-cursor.mjs +0 -1282
  603. package/fesm2022/ngwr-bits-splash-cursor.mjs.map +0 -1
  604. package/fesm2022/ngwr-bits-split-text-testing.mjs +0 -54
  605. package/fesm2022/ngwr-bits-split-text-testing.mjs.map +0 -1
  606. package/fesm2022/ngwr-bits-split-text.mjs +0 -378
  607. package/fesm2022/ngwr-bits-split-text.mjs.map +0 -1
  608. package/fesm2022/ngwr-bits-spotlight-card-testing.mjs +0 -113
  609. package/fesm2022/ngwr-bits-spotlight-card-testing.mjs.map +0 -1
  610. package/fesm2022/ngwr-bits-spotlight-card.mjs +0 -228
  611. package/fesm2022/ngwr-bits-spotlight-card.mjs.map +0 -1
  612. package/fesm2022/ngwr-bits-star-border-testing.mjs +0 -57
  613. package/fesm2022/ngwr-bits-star-border-testing.mjs.map +0 -1
  614. package/fesm2022/ngwr-bits-star-border.mjs +0 -162
  615. package/fesm2022/ngwr-bits-star-border.mjs.map +0 -1
  616. package/fesm2022/ngwr-bits-threads-testing.mjs +0 -41
  617. package/fesm2022/ngwr-bits-threads-testing.mjs.map +0 -1
  618. package/fesm2022/ngwr-bits-threads.mjs +0 -482
  619. package/fesm2022/ngwr-bits-threads.mjs.map +0 -1
  620. package/fesm2022/ngwr-bits-tilt-card-testing.mjs +0 -83
  621. package/fesm2022/ngwr-bits-tilt-card-testing.mjs.map +0 -1
  622. package/fesm2022/ngwr-bits-tilt-card.mjs +0 -260
  623. package/fesm2022/ngwr-bits-tilt-card.mjs.map +0 -1
  624. package/fesm2022/ngwr-bits-typewriter-testing.mjs +0 -61
  625. package/fesm2022/ngwr-bits-typewriter-testing.mjs.map +0 -1
  626. package/fesm2022/ngwr-bits-typewriter.mjs +0 -469
  627. package/fesm2022/ngwr-bits-typewriter.mjs.map +0 -1
  628. package/fesm2022/ngwr-bits-waves-testing.mjs +0 -37
  629. package/fesm2022/ngwr-bits-waves-testing.mjs.map +0 -1
  630. package/fesm2022/ngwr-bits-waves.mjs +0 -865
  631. package/fesm2022/ngwr-bits-waves.mjs.map +0 -1
  632. package/types/ngwr-bits-aurora.d.ts +0 -114
  633. package/types/ngwr-bits-blur-text-testing.d.ts +0 -162
  634. package/types/ngwr-bits-blur-text.d.ts +0 -135
  635. package/types/ngwr-bits-border-glow-testing.d.ts +0 -230
  636. package/types/ngwr-bits-border-glow.d.ts +0 -166
  637. package/types/ngwr-bits-circular-text-testing.d.ts +0 -178
  638. package/types/ngwr-bits-circular-text.d.ts +0 -70
  639. package/types/ngwr-bits-click-spark.d.ts +0 -101
  640. package/types/ngwr-bits-confetti.d.ts +0 -80
  641. package/types/ngwr-bits-decrypt-text-testing.d.ts +0 -204
  642. package/types/ngwr-bits-decrypt-text.d.ts +0 -135
  643. package/types/ngwr-bits-dot-grid-testing.d.ts +0 -92
  644. package/types/ngwr-bits-dot-grid.d.ts +0 -158
  645. package/types/ngwr-bits-falling-text-testing.d.ts +0 -170
  646. package/types/ngwr-bits-falling-text.d.ts +0 -95
  647. package/types/ngwr-bits-fuzzy-text-testing.d.ts +0 -112
  648. package/types/ngwr-bits-fuzzy-text.d.ts +0 -208
  649. package/types/ngwr-bits-glitch-text-testing.d.ts +0 -183
  650. package/types/ngwr-bits-glitch-text.d.ts +0 -60
  651. package/types/ngwr-bits-gradient-text-testing.d.ts +0 -168
  652. package/types/ngwr-bits-gradient-text.d.ts +0 -73
  653. package/types/ngwr-bits-iridescence-testing.d.ts +0 -85
  654. package/types/ngwr-bits-iridescence.d.ts +0 -244
  655. package/types/ngwr-bits-marquee-testing.d.ts +0 -266
  656. package/types/ngwr-bits-marquee.d.ts +0 -188
  657. package/types/ngwr-bits-ripple-grid-testing.d.ts +0 -96
  658. package/types/ngwr-bits-ripple-grid.d.ts +0 -299
  659. package/types/ngwr-bits-rotating-text-testing.d.ts +0 -173
  660. package/types/ngwr-bits-rotating-text.d.ts +0 -127
  661. package/types/ngwr-bits-shiny-text-testing.d.ts +0 -147
  662. package/types/ngwr-bits-shiny-text.d.ts +0 -131
  663. package/types/ngwr-bits-splash-cursor-testing.d.ts +0 -77
  664. package/types/ngwr-bits-splash-cursor.d.ts +0 -162
  665. package/types/ngwr-bits-split-text-testing.d.ts +0 -191
  666. package/types/ngwr-bits-split-text.d.ts +0 -163
  667. package/types/ngwr-bits-spotlight-card-testing.d.ts +0 -279
  668. package/types/ngwr-bits-spotlight-card.d.ts +0 -94
  669. package/types/ngwr-bits-star-border-testing.d.ts +0 -117
  670. package/types/ngwr-bits-star-border.d.ts +0 -62
  671. package/types/ngwr-bits-threads-testing.d.ts +0 -97
  672. package/types/ngwr-bits-threads.d.ts +0 -216
  673. package/types/ngwr-bits-tilt-card-testing.d.ts +0 -140
  674. package/types/ngwr-bits-tilt-card.d.ts +0 -94
  675. package/types/ngwr-bits-typewriter-testing.d.ts +0 -201
  676. package/types/ngwr-bits-typewriter.d.ts +0 -165
  677. package/types/ngwr-bits-waves-testing.d.ts +0 -103
  678. package/types/ngwr-bits-waves.d.ts +0 -142
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-charts-bar-chart.mjs","names":[],"sources":["../../../projects/lib/charts/bar-chart/bar-chart.ts","../../../projects/lib/charts/bar-chart/bar-chart.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n type ElementRef,\n LOCALE_ID,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n isDevMode,\n model,\n viewChildren,\n} from '@angular/core';\n\nimport { WrChartLegend, type WrChartLegendItem } from 'ngwr/charts/chart-legend';\nimport {\n WrChartTable,\n type WrChartMarkerShape,\n type WrChartTableData,\n chartColor,\n chartDash,\n chartMarker,\n chartMarkerExtent,\n chartMarkerPath,\n useChartNumbers,\n} from 'ngwr/charts/core';\nimport { readI18nText, useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { type WrChartTooltipRow, type WrChartTooltipTarget, useChartTooltip } from 'ngwr/popover';\nimport { clamp } from 'ngwr/utils';\n\nimport type { WrBarChartDatum, WrBarLine, WrBarOrientation, WrBarSeries } from './types';\n\n/** A share of the value axis for an inline style: four decimals, `-0` folded to `0`. */\nconst short = (value: number): number => Math.round(value * 1e4) / 1e4 || 0;\n\n/** A share as a percentage of a line's box, to two decimals, `-0` folded to `0`. */\nconst percent = (share: number): number => Math.round(share * 1e4) / 100 || 0;\n\n/**\n * How large a line's point is, in px: the radius of the circle every marker shape has\n * the area of. A step up from the line chart's 3px dot, since a point here sits on a bar\n * rather than on the page and keeps a ring of the surface round it.\n */\nconst POINT_RADIUS = 4;\n\n/** One series' bar in one category, as `series` draws it. */\ninterface SeriesBar {\n /** The series' position in `series`, which is what the bar is tracked by. */\n readonly series: number;\n readonly color: string;\n /** The outline's `stroke-dasharray`, `''` for a solid one. */\n readonly dash: string;\n /** Where the bar starts along the value axis, as a share of it from its minimum. */\n readonly start: number;\n /** How much of the value axis the bar covers. */\n readonly size: number;\n /** The series' name and its own value: the bar's accessible name. */\n readonly name: string;\n}\n\n/** A value printed past the end of a bar, or of a pile of them. */\ninterface EndLabel {\n readonly text: string;\n /** Where the end is along the value axis, as a share of it from its minimum. */\n readonly at: number;\n /** Whether the bar grows towards the axis' minimum, so the value goes past that end. */\n readonly below: boolean;\n /**\n * What the printed value announces: a pile's total, \"Total: 20\", under `stacked`, where\n * no bar's own name carries it. `null` past a single bar, whose name already does.\n */\n readonly name: string | null;\n}\n\n/**\n * One lane of a category: the strip one bar runs along. Grouped, a lane per series\n * shown, side by side; stacked, one lane holding every series' bar.\n */\ninterface Lane {\n readonly key: number;\n readonly bars: readonly SeriesBar[];\n readonly ends: readonly EndLabel[];\n}\n\n/** One category drawn from `series`: its name and its lanes. */\ninterface Category {\n readonly label: string;\n readonly lanes: readonly Lane[];\n}\n\n/**\n * Where something of a line sits in the line's own box, as percentages of it: `x` from\n * its left edge, `y` from its top. The box runs from the middle of the first category to\n * the middle of the last, so the categories are evenly spaced along it.\n */\ninterface LinePosition {\n readonly x: number;\n readonly y: number;\n}\n\n/** One point of a line: a category with a value. */\ninterface LinePoint extends LinePosition {\n /** The category's position, which is what the point is tracked by. */\n readonly category: number;\n /** The category's name and the line's value there: the point's accessible name. */\n readonly name: string;\n}\n\n/** One straight run of a line, between the points of two neighbouring categories. */\ninterface LineSegment {\n readonly from: LinePosition;\n readonly to: LinePosition;\n}\n\n/** One line of `lines`, as the chart draws it. */\ninterface LineLayer {\n /** The line's position in `lines`, which is what it is tracked by. */\n readonly index: number;\n readonly label: string;\n readonly color: string;\n /** The line's `stroke-dasharray`, `''` for a solid one. */\n readonly dash: string;\n readonly marker: WrChartMarkerShape;\n /** The marker's path, drawn about its point. */\n readonly d: string;\n /** How many categories the line's box spans, which the stylesheet sizes the box from. */\n readonly count: number;\n readonly segments: readonly LineSegment[];\n readonly points: readonly LinePoint[];\n}\n\n/**\n * Bar chart. Pass `[data]` for one series — each datum becomes a bar — or `[series]`\n * with `[categories]` for several, drawn side by side or, with `stacked`, piled on each\n * other. Vertical by default; `orientation=\"horizontal\"` lays the bars along the inline\n * axis with the category names in a gutter beside them. Axis-free: the values are\n * printed at the bars. No external dependency.\n *\n * @example\n * ```html\n * <wr-bar-chart [data]=\"[\n * { label: 'Mon', value: 12 },\n * { label: 'Tue', value: 18, color: 'var(--wr-color-success)' },\n * { label: 'Wed', value: 9 }\n * ]\" />\n *\n * <wr-bar-chart\n * [categories]=\"['Q1', 'Q2', 'Q3', 'Q4']\"\n * [series]=\"[\n * { label: 'North', data: [12, 18, 9, 22] },\n * { label: 'South', data: [8, 11, 14, 10] }\n * ]\"\n * stacked\n * />\n * ```\n *\n * **Several series.** Every category gets a bar per series shown, in series order —\n * or, with `stacked`, one pile, positive values up from zero and negative ones down\n * from it, each sign on its own, as `wr-line-chart` stacks. A negative value draws\n * below the zero line, which `series` draws wherever zero falls. Each series takes its\n * colour and its own dash: the bar's body is a tint of the colour and its outline the\n * colour itself, in the series' dash, the first one solid. The default palette's\n * colours sit within about 1.06:1 of each other in luminance, so the dash is what tells\n * two series apart without hue, and the legend keys each series by the same dash.\n *\n * **`data` is unchanged**: one series, a bar per datum, a negative value drawn as an\n * empty bar with its number still printed — except beside `lines`, whose axis can reach\n * below zero: there a negative value is drawn down from zero, as `series` draws it. With\n * both set, `series` wins, and dev mode says so.\n *\n * **Lines over the bars.** `lines` draws a line per entry through the middle of each\n * category, with a point at every value, on the bars' own value axis: a fitted axis is\n * fitted to the bars and the lines together, so a line above every bar raises the top\n * and one below zero brings the zero line up, `data` bars included — and a negative\n * `data` bar draws down from it. It works with\n * `data` and with `series`, grouped or stacked, and lying down, where the lines run down\n * the rows. A line takes the next palette colour after the bars', its own dash, the\n * first one solid, and its own marker shape, the first a circle; the legend keys each\n * by both, the tooltip gives its value, and the data table a column. A line never\n * stacks, and prints no value at its points: the tooltip and each point's name carry it.\n * The track keeps room at each end of the value axis for the largest marker, so a point\n * at either end is not cut off by the chart's box.\n *\n * **What a screen reader gets.** The plot is a named `role=\"group\"`. With `data`, each\n * bar is a `role=\"img\"` named by its label and its value. With `series`, each category\n * is a `role=\"group\"` named by the category, and each bar in it a `role=\"img\"` named by\n * its series and its own value; under `stacked`, each pile's printed total is a\n * `role=\"img\"` too, \"Total: 20\", since no bar's name carries it. Each of `lines` is a\n * `role=\"group\"` named by the line, after the bars, and each of its points a\n * `role=\"img\"` named by its category and the line's value there. No part of the chart is\n * a tab stop, unless\n * `toggleableLegend` makes the legend rows buttons. `dataTable` adds the same figures as\n * a table, for a reader who wants to move cell by cell.\n *\n * @see https://ngwr.dev/charts/bar-chart\n */\n@Component({\n selector: 'wr-bar-chart',\n templateUrl: './bar-chart.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-bar-chart',\n '[class.wr-bar-chart--horizontal]': 'horizontal()',\n '[class.wr-bar-chart--series]': 'seriesMode()',\n '[class.wr-bar-chart--stacked]': 'seriesMode() && stacked()',\n '[class.wr-bar-chart--combo]': 'hasLines()',\n // How far the largest of `lines`' markers reaches along the value axis: the room the\n // stylesheet keeps at each end of the track, so a point there stays in the chart's box.\n '[style.--wr-bar-chart-reach]': 'hasLines() ? lineReach() : null',\n // How many categories share the track: standing up, the gaps between them are held to\n // a share of the track by it, so a long list keeps its bars rather than gaps alone.\n '[style.--wr-bar-chart-categories]': 'categoryTotal() || null',\n },\n imports: [WrChartLegend, WrChartTable],\n})\nexport class WrBarChart {\n /**\n * The bars, left to right. One series: a datum with no `color` of its own\n * takes the chart's `color`, so by default every bar comes out the same.\n * A negative value draws an empty bar with its number printed — or, beside `lines`,\n * a bar down from zero. A value that is not a finite number is MISSING: an empty bar\n * with no number printed, named by its label alone, an empty cell in the data table.\n * Ignored while `series` has entries.\n */\n readonly data = input<readonly WrBarChartDatum[]>([]);\n\n /**\n * Several series over the same categories: one bar per series in every category,\n * side by side, or piled up with `stacked`. A series with no `color` takes the next\n * entry from the chart's palette, and each takes the next dash for its outline, the\n * first one solid. Wins over `data` while it has entries.\n */\n readonly series = input<readonly WrBarSeries[]>([]);\n\n /**\n * The categories' names for `series`, in order: a series takes one value per\n * category. A category past the end of this list, which a longer series reaches, is\n * named by its position, counting from 1, in `LOCALE_ID`'s digits. Not read with\n * `data`, whose datums carry their own labels.\n */\n readonly categories = input<readonly string[]>([]);\n\n /**\n * Lines drawn over the bars, through the middle of each category, with a point at\n * every value: a target, a rate, a running average beside the figures it describes.\n * Each takes one value per category, on the bars' own value axis, and a fitted axis is\n * fitted to the bars and the lines together. Works with `data` and with `series`,\n * grouped or stacked, standing up or lying down, where the lines run down the rows.\n *\n * A line with no `color` takes the palette's next colour after the bars' — past the\n * last series, or the palette's second beside `data` — and each takes the next dash and\n * the next marker shape, the first solid with a circle, so two lines differ without\n * hue. The legend lists every line after the series, keyed by its dash and its marker;\n * the tooltip gives each line's value in the category; the data table a column per line\n * after the series' columns, or after the bars'. A missing value breaks the line, and a\n * lone value between two missing ones is a point with no line. Lines never stack, and\n * print no value: the tooltip and each point's name carry it.\n *\n * Beside `data`, a negative bar draws down from zero rather than as an empty bar, since\n * the lines' axis can reach below zero and an empty bar there would read as zero. The\n * track keeps room at each end of the value axis for the largest marker, ring included,\n * so a point on either end is not cut off.\n */\n readonly lines = input<readonly WrBarLine[]>([]);\n\n /**\n * Pile each category's bars on each other, in series order, so the end of the pile\n * reads the total. Positive values pile up from zero and negative ones down from it,\n * each sign on its own, so no bar crosses another. A missing value adds nothing.\n * Each bar's accessible name, the tooltip and the data table keep each series' own\n * value; the value printed past a pile (`showValues`) is the pile's total, one for\n * each sign the category has, and announces itself as \"Total: 20\" (`barChart.total`).\n * `series` only. @default false\n */\n readonly stacked = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Which way the bars run. `horizontal` lays them along the inline axis, one row per\n * category, with the names in a gutter at inline start as wide as the longest (up to\n * `--wr-bar-chart-label-max-width`, then ellipsised). Under RTL the gutter is on the\n * right and the bars grow leftwards. Lying down, `height` is the least the plot takes:\n * the rows share it, but each bar's row keeps at least `--wr-bar-chart-row-min-size`\n * (one line of the value's text), so a long list of categories or series grows the\n * chart rather than thinning its bars to nothing. @default 'vertical'\n */\n readonly orientation = input<WrBarOrientation>('vertical');\n\n /**\n * Accessible name of the chart. Falls back to `barChart.label`, then `'Bar chart'`.\n * Also the data table's caption.\n */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'barChart.label', 'Bar chart');\n\n /**\n * The word a stacked pile's printed total announces itself by, \"Total: 20\". From the\n * catalog only, as the legend's \"hidden\" is: one word an app rewords once there.\n */\n private readonly totalText = readI18nText('barChart.total', 'Total');\n\n /**\n * The data table's heading for the column of `data`'s bars, which have no series name\n * of their own. From the catalog only, as the total's word is.\n */\n private readonly valueText = readI18nText('barChart.value', 'Value');\n\n /**\n * How a bar, a point and a pile's total name themselves: a label and a figure, \"Mon: 12\",\n * from the catalog, so a language that joins the two another way can.\n */\n private readonly datumText = useI18nFormatter('barChart.datum', '{{label}}: {{value}}');\n\n /** A category with no name of its own, by its position from 1 in the reader's own digits. */\n private readonly ordinals = new Intl.NumberFormat(inject(LOCALE_ID));\n\n /** Default bar colour when a datum has none. `data` only. @default 'var(--wr-color-primary)' */\n readonly color = input<string>('var(--wr-color-primary)');\n\n /**\n * Show value labels at each bar, past its end: above a bar standing up, beyond its end\n * lying down — below (or before) a negative `series` bar, and the pile's total for each\n * sign with `stacked`. A value too wide for a `series` bar standing up is left out\n * rather than cut, since a cut number reads as another one; the tooltip and each bar's\n * name carry it whole. @default true\n */\n readonly showValues = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Pixel height of the chart area. With `orientation=\"horizontal\"` it is the least the\n * plot takes: each bar's row keeps at least `--wr-bar-chart-row-min-size`, so rows that\n * need more grow the plot past it. @default 200\n */\n readonly height = input(200, { transform: (v: unknown): number => Math.max(40, coerceNumberProperty(v, 200)) });\n\n /**\n * Explicit max value. `0` = auto. With `series` it fixes the positive end of the axis;\n * the negative end is still fitted to the data. A value past it is drawn to the edge,\n * and its name, the tooltip and the data table still give its own figure. @default 0\n */\n readonly max = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n\n /**\n * Show a tooltip with the bar's label and value on hover — with `series`, the\n * category's name and a row per series shown. Pointer only — the accessible names\n * already carry every value. @default true\n */\n readonly tooltip = input(true, { transform: coerceBooleanProperty });\n\n /** Show the legend above the chart. With `series`, or beside `lines`, which it then lists. @default true */\n readonly showLegend = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Make each legend row a toggle button that shows and hides its series, through\n * `hiddenSeries` — or its line, through `hiddenLines`. A row is a\n * `<button aria-pressed>`, pressed while its series is shown, so the legend becomes one\n * tab stop per row. With `series`, or beside `lines`. @default false\n */\n readonly toggleableLegend = input(false, { transform: coerceBooleanProperty });\n\n /**\n * The positions in `series` of the series that are hidden. Positions rather than\n * labels, since two series may share a label. A toggleable legend writes it, and a\n * host may bind it with or without one: `[(hiddenSeries)]`.\n *\n * A hidden series is left out of everything that reads its values: it draws no bars\n * and leaves its lane, so the others widen; it leaves the stack, the tooltip and the\n * data table; and a fitted axis is fitted to the series still shown. The categories do\n * not change, since they belong to the chart rather than to one series. The legend\n * keeps the hidden series' row, struck through, so it can be shown again. A position\n * past the end of `series` is kept and ignored.\n */\n readonly hiddenSeries = model<readonly number[]>([]);\n\n /**\n * The positions in `lines` of the lines that are hidden, as `hiddenSeries` holds the\n * series': a toggleable legend writes it, and a host may bind it with or without one,\n * `[(hiddenLines)]`. A hidden line draws nothing and leaves the tooltip and the data\n * table, and a fitted axis is fitted to what is still shown. The legend keeps its row,\n * struck through. A position past the end of `lines` is kept and ignored.\n */\n readonly hiddenLines = model<readonly number[]>([]);\n\n /**\n * Render the chart's figures as a table that only assistive technology reaches: a row\n * per category, headed by its name, and a column per series shown — or, with `data`,\n * one column for the bars, headed \"Value\" (`barChart.value`) — then one per line shown,\n * every value written the way the tooltip writes it. A missing value is an empty cell,\n * and a stacked chart's table keeps each series' own values.\n *\n * Each bar's accessible name already carries its value; the table is for a reader\n * who wants to move cell by cell. It is rendered beside the plot, clipped to nothing:\n * it takes no room, draws nothing and holds no tab stop. A hidden series or line leaves\n * it. @default false\n */\n readonly dataTable = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Writes every number the chart shows: the labels at the bars, the tooltip and\n * each bar's accessible name. `null` uses `Intl.NumberFormat` in `LOCALE_ID`, with\n * compact labels from a thousand up (`1.2K`, `3.4M`).\n */\n readonly valueFormat = input<((value: number) => string) | null>(null);\n\n /**\n * The chart's number writers: `value` for the tooltip and each bar's accessible\n * name, the whole figure; `label` above the bar, compact from a thousand up, where a\n * column is too narrow for `1,234,567`, and exactly as `value` writes it below —\n * compact rounding would print 12.5 as `13`, and below a thousand there is nothing to\n * abbreviate.\n */\n private readonly numbers = useChartNumbers(this.valueFormat);\n\n private readonly barEls = viewChildren<ElementRef<HTMLElement>>('barEl');\n\n private readonly categoryEls = viewChildren<ElementRef<HTMLElement>>('categoryEl');\n\n /** Every point of every line, in the order {@link lineLayers} lists them. */\n private readonly pointEls = viewChildren<ElementRef<SVGSVGElement>>('pointEl');\n\n constructor() {\n // Two inputs that each describe the whole chart: drawing one and silently dropping\n // the other looks like data that failed to load.\n if (isDevMode()) {\n let warned = false;\n effect(() => {\n if (warned || this.data().length === 0 || this.series().length === 0) return;\n warned = true;\n // eslint-disable-next-line no-console -- dev-mode validation\n console.warn(\n '[NGWR] <wr-bar-chart>: both `data` and `series` are set. The chart draws `series` and ignores `data`; ' +\n 'pass one of them.'\n );\n });\n }\n }\n\n /** Whether the chart draws `series` rather than `data`. */\n protected readonly seriesMode = computed(() => this.series().length > 0);\n\n protected readonly horizontal = computed(() => this.orientation() === 'horizontal');\n\n /**\n * Whether the chart has `lines` to draw, shown or hidden. Beside `data` it moves the\n * bars into the layout `series` uses, whose track the lines are drawn over; hiding\n * every line keeps that layout, so a legend toggle never reflows the bars.\n */\n protected readonly hasLines = computed(() => this.lines().length > 0);\n\n /**\n * A datum's value, with anything non-finite read as `0` for the geometry.\n *\n * One `NaN` used to take out the whole chart rather than its own bar:\n * `Math.max(...values)` is `NaN` as soon as one value is, so the scale fell\n * back to `1` and every OTHER bar was asked for a height of `value * 100`%.\n * The bad bar also printed the literal text `NaN` above itself. It is not a zero\n * either, so nothing a reader meets prints one for it (see `bars`).\n */\n private static value(raw: number): number {\n return Number.isFinite(raw) ? raw : 0;\n }\n\n /** A label and a figure, as a name: \"Mon: 12\". */\n private name(label: string, value: number): string {\n return this.datumText({ label, value: this.numbers.value(value) });\n }\n\n /** How many categories the chart draws, whichever input it draws. */\n protected readonly categoryTotal = computed(() => (this.seriesMode() ? this.categoryCount() : this.data().length));\n\n /**\n * The value axis for `data`, from `lo` to `hi`: from zero to the tallest bar, or to\n * `max` when one is given. Beside `lines` it is stretched to every line value shown and\n * to every bar below zero — which then draws down from zero, as a `series` bar does,\n * rather than as an empty bar that would read as zero on an axis reaching below it — so\n * either lifts the zero line the bars stand on. With nothing to scale it runs from 0\n * to 1.\n */\n private readonly dataScale = computed(() => {\n const data = this.data();\n // Whether `lines` are set, shown or not: hiding every line keeps the layout, and with\n // it a negative bar's place below zero.\n const combo = this.hasLines();\n let lo = 0;\n let hi = 0;\n for (const d of data) {\n const value = WrBarChart.value(d.value);\n hi = Math.max(hi, value);\n if (combo) lo = Math.min(lo, value);\n }\n for (const line of this.visibleLines()) {\n for (let c = 0; c < data.length; c++) {\n const v = line.data[c];\n if (v === null || v === undefined) continue;\n lo = Math.min(lo, v);\n hi = Math.max(hi, v);\n }\n }\n const explicit = this.max();\n if (explicit > 0) hi = explicit;\n if (hi - lo <= 0) hi = 1;\n return { lo, hi };\n });\n\n protected readonly bars = computed(() => {\n const { lo, hi } = this.dataScale();\n // Zero is the axis minimum until a line or, beside lines, a bar goes below it; the bars\n // stand on it, and a bar's share is of the whole axis, so it can reach no further than\n // the top. Beside `lines` a negative bar hangs from zero down to its value; without\n // them it is an empty bar on zero.\n const combo = this.hasLines();\n const floor = this.at(0);\n const zero = this.zero();\n return this.data().map(d => {\n const value = WrBarChart.value(d.value);\n // A missing value is drawn as the empty bar a zero is, and printed as nothing.\n const missing = !Number.isFinite(d.value);\n const text = missing ? '' : this.numbers.value(value);\n const below = combo && value < 0;\n const share = below ? Math.min(floor, -value / (hi - lo)) : Math.min(1 - floor, Math.max(0, value) / (hi - lo));\n return {\n label: d.label,\n value,\n /** Whether the datum's value is not a finite number: no figure is printed, named or tabled for it. */\n missing,\n /** The label printed above the bar. */\n display: missing ? '' : this.numbers.label(value),\n /** The whole figure, for the tooltip. */\n text,\n color: d.color ?? this.color(),\n /**\n * The bar's share of the plot, from 0 to 1, written as its `flex-grow` — see\n * the stylesheet for why a grow factor and not a `height` percentage.\n */\n share,\n /** Whether the bar hangs below zero, beside `lines`: its value is printed past its lower end. */\n below,\n /**\n * Where the bar starts along the value axis, from its minimum: zero, or the bar's\n * own end for one below it. Beside `lines`, the share the spacer under it takes.\n */\n start: below ? short(zero - share) : zero,\n /** Where the bar ends along the value axis, from its minimum: what the value printed past it is placed by. */\n at: below ? short(zero - share) : zero + share,\n /**\n * The bar's accessible name. The label and the value sit in separate\n * rows, so a screen reader read every number and then every label with\n * nothing tying the two together — and with `showValues` off the\n * numbers were not in the accessible tree at all. A missing value is the\n * label alone.\n */\n name: missing ? d.label : this.name(d.label, value),\n };\n });\n });\n\n /**\n * Every series, resolved: its palette colour, its dash, and its data with `null` at\n * every missing value. Hidden ones included, since the legend lists them.\n */\n private readonly resolvedSeries = computed(() =>\n this.series().map((s, index) => ({\n index,\n label: s.label,\n color: s.color ?? chartColor(index),\n dash: chartDash(index),\n data: s.data.map(v => (typeof v === 'number' && Number.isFinite(v) ? v : null)),\n }))\n );\n\n /** The series drawn, read and fitted to: every one `hiddenSeries` does not name. */\n private readonly visibleSeries = computed(() => {\n const hidden = new Set(this.hiddenSeries());\n return this.resolvedSeries().filter(s => !hidden.has(s.index));\n });\n\n /**\n * Every line, resolved: its colour — the palette's next after the bars' — its dash, its\n * marker, and its data with `null` at every missing value. Hidden ones included, since\n * the legend lists them.\n */\n private readonly resolvedLines = computed(() => {\n // Past the series' colours, or past the one `data` paints its bars in by default.\n const offset = this.seriesMode() ? this.series().length : 1;\n return this.lines().map((line, index) => ({\n index,\n label: line.label,\n color: line.color ?? chartColor(offset + index),\n dash: chartDash(index),\n marker: chartMarker(index),\n data: line.data.map(v => (typeof v === 'number' && Number.isFinite(v) ? v : null)),\n }));\n });\n\n /** The lines drawn, read and fitted to: every one `hiddenLines` does not name. */\n private readonly visibleLines = computed(() => {\n const hidden = new Set(this.hiddenLines());\n return this.resolvedLines().filter(line => !hidden.has(line.index));\n });\n\n /** How many categories `series` has: as many as are named, or as the longest series reaches. */\n private readonly categoryCount = computed(() =>\n this.resolvedSeries().reduce((count, s) => Math.max(count, s.data.length), this.categories().length)\n );\n\n /**\n * The value axis for `series`, from `lo` (zero or below) to `hi` (above zero): the\n * extremes of the series shown, or of their piles under `stacked`, and of the lines\n * shown, so the longest bar or the farthest point reaches the end of the plot, as it\n * does with `data`. A positive `max` fixes `hi`. With nothing to scale it runs from 0\n * to 1.\n */\n private readonly seriesScale = computed(() => {\n const series = this.visibleSeries();\n const lines = this.visibleLines();\n const stacked = this.stacked();\n let lo = 0;\n let hi = 0;\n for (let c = 0; c < this.categoryCount(); c++) {\n let up = 0;\n let down = 0;\n for (const s of series) {\n const v = s.data[c];\n if (v === null || v === undefined) continue;\n if (!stacked) {\n lo = Math.min(lo, v);\n hi = Math.max(hi, v);\n } else if (v < 0) down += v;\n else up += v;\n }\n lo = Math.min(lo, down);\n hi = Math.max(hi, up);\n // A line shares the axis, and never stacks.\n for (const line of lines) {\n const v = line.data[c];\n if (v === null || v === undefined) continue;\n lo = Math.min(lo, v);\n hi = Math.max(hi, v);\n }\n }\n const explicit = this.max();\n if (explicit > 0) hi = explicit;\n if (hi - lo <= 0) hi = 1;\n return { lo, hi };\n });\n\n /** The value axis the chart draws on: `series`' or `data`'s. */\n private readonly scale = computed(() => (this.seriesMode() ? this.seriesScale() : this.dataScale()));\n\n /** A value's place along the value axis, as a share of it from its minimum, held to the axis. */\n private at(value: number): number {\n const { lo, hi } = this.scale();\n return clamp((value - lo) / (hi - lo), 0, 1);\n }\n\n /**\n * Every category `series` draws, with its lanes: grouped, a lane per series shown, a\n * missing value leaving its lane empty so the bars beside it keep their places;\n * stacked, one lane holding each series' bar on the pile of the ones before it on the\n * same side of zero. With `showValues`, a lane also carries the values printed past\n * its ends: each bar's own, or each pile's total.\n */\n protected readonly seriesCategories = computed<readonly Category[]>(() => {\n if (!this.seriesMode()) return [];\n const series = this.visibleSeries();\n const labels = this.categories();\n const values = this.showValues();\n const zero = this.at(0);\n const name = (label: string, value: number): string => this.name(label, value);\n\n return Array.from({ length: this.categoryCount() }, (_, c): Category => {\n const label = labels[c] ?? this.ordinals.format(c + 1);\n if (!this.stacked()) {\n const lanes = series.map((s): Lane => {\n const v = s.data[c];\n if (v === null || v === undefined) return { key: s.index, bars: [], ends: [] };\n const end = this.at(v);\n const bar = {\n series: s.index,\n color: s.color,\n dash: s.dash,\n start: short(Math.min(zero, end)),\n size: short(Math.abs(end - zero)),\n name: name(s.label, v),\n };\n return {\n key: s.index,\n bars: [bar],\n ends: values ? [{ text: this.numbers.label(v), at: short(end), below: v < 0, name: null }] : [],\n };\n });\n return { label, lanes };\n }\n\n let up = 0;\n let down = 0;\n let rises = false;\n let falls = false;\n const bars = series.flatMap((s): SeriesBar[] => {\n const v = s.data[c];\n if (v === null || v === undefined) return [];\n const base = v < 0 ? down : up;\n const top = base + v;\n if (v < 0) {\n down = top;\n falls = true;\n } else {\n up = top;\n rises = true;\n }\n const from = this.at(base);\n const to = this.at(top);\n return [\n {\n series: s.index,\n color: s.color,\n dash: s.dash,\n start: short(Math.min(from, to)),\n size: short(Math.abs(to - from)),\n name: name(s.label, v),\n },\n ];\n });\n // A pile's total is printed, and no bar's own name carries it, so the printed value\n // announces itself — with the whole figure, as a bar's name does.\n const total = (value: number, below: boolean): EndLabel => ({\n text: this.numbers.label(value),\n at: short(this.at(value)),\n below,\n name: name(this.totalText(), value),\n });\n const ends: EndLabel[] = [];\n if (values && rises) ends.push(total(up, false));\n if (values && falls) ends.push(total(down, true));\n return { label, lanes: [{ key: 0, bars, ends }] };\n });\n });\n\n /** The category names, in order, whichever input the chart draws. */\n protected readonly categoryLabels = computed(() =>\n this.seriesMode() ? this.seriesCategories().map(c => c.label) : this.data().map(d => d.label)\n );\n\n /**\n * Where zero is along the value axis, as a share of it: the baseline. `data` goes below\n * zero only where one of `lines` does.\n */\n protected readonly zero = computed(() => short(this.at(0)));\n\n /**\n * The values printed past the bars, sorted by the end they go past: the room the plot\n * keeps beyond each end of the axis is a hidden copy of these, so it is exactly as\n * large as the largest, in the value's own font. Each text once.\n */\n protected readonly rooms = computed(() => {\n if (!this.showValues()) return { max: [], min: [] };\n if (!this.seriesMode()) {\n const bars = this.bars();\n return {\n max: [...new Set(bars.filter(b => !b.below && !b.missing).map(b => b.display))],\n min: [...new Set(bars.filter(b => b.below && !b.missing).map(b => b.display))],\n };\n }\n const ends = this.seriesCategories().flatMap(c => c.lanes.flatMap(lane => lane.ends));\n return {\n max: [...new Set(ends.filter(e => !e.below).map(e => e.text))],\n min: [...new Set(ends.filter(e => e.below).map(e => e.text))],\n };\n });\n\n /**\n * Every line shown, as the chart draws it: its segments and its points, placed in the\n * line's own box. The box runs from the middle of the first category to the middle of\n * the last (the stylesheet sizes it from `count`), so category `c` of `n` is `c / (n − 1)`\n * of the way along it — or its middle, with one category. Across the box is the value\n * axis: up from the bottom standing up, along from inline start lying down, where the\n * stylesheet mirrors the box under RTL as the bars mirror.\n */\n protected readonly lineLayers = computed<readonly LineLayer[]>(() => {\n const count = this.seriesMode() ? this.categoryCount() : this.data().length;\n if (count === 0) return [];\n const labels = this.categoryLabels();\n const horizontal = this.horizontal();\n const along = (c: number): number => (count === 1 ? 50 : percent(c / (count - 1)));\n const place = (c: number, value: number): LinePosition => {\n const at = this.at(value);\n return horizontal ? { x: percent(at), y: along(c) } : { x: along(c), y: percent(1 - at) };\n };\n\n return this.visibleLines().map((line): LineLayer => {\n const segments: LineSegment[] = [];\n const points: LinePoint[] = [];\n let previous: LinePosition | null = null;\n for (let c = 0; c < count; c++) {\n const value = line.data[c];\n if (value === null || value === undefined) {\n // A missing value breaks the line: the next point starts a new run.\n previous = null;\n continue;\n }\n const position = place(c, value);\n if (previous) segments.push({ from: previous, to: position });\n points.push({ ...position, category: c, name: this.name(labels[c] ?? this.ordinals.format(c + 1), value) });\n previous = position;\n }\n return {\n index: line.index,\n label: line.label,\n color: line.color,\n dash: line.dash,\n marker: line.marker,\n d: chartMarkerPath(line.marker, POINT_RADIUS),\n count,\n segments,\n points,\n };\n });\n });\n\n /**\n * How far the largest of `lines`' markers reaches past its point along the value axis,\n * in px, before its ring: up or down standing up, sideways lying down. By SHAPE, not\n * radius — a triangle's point stands 1.56 times its radius off its centre. Every line\n * counts, hidden ones included, so a legend toggle never reflows the bars. The\n * stylesheet adds the ring and keeps that much room at each end of the track.\n */\n protected readonly lineReach = computed(() => {\n const horizontal = this.horizontal();\n let reach = 0;\n for (const line of this.resolvedLines()) {\n const extent = chartMarkerExtent(line.marker, POINT_RADIUS);\n reach = Math.max(reach, horizontal ? extent.side : Math.max(extent.top, extent.bottom));\n }\n return Math.round(reach * 1000) / 1000;\n });\n\n /**\n * The legend's rows: every series, keyed by its own dash, then every line, keyed by its\n * dash and its marker — hidden ones included.\n */\n protected readonly legendItems = computed<readonly WrChartLegendItem[]>(() => [\n ...this.resolvedSeries().map(({ label, color, dash }) => ({ label, color, dash })),\n ...this.resolvedLines().map(({ label, color, dash, marker }) => ({ label, color, dash, marker })),\n ]);\n\n /**\n * The legend's hidden rows. Its rows are the series and then the lines, so a hidden\n * line is its position in `lines` past the series' count. A position `hiddenSeries`\n * keeps past the end of `series` is not handed over beside lines, where it would name\n * a line; without lines `hiddenSeries` goes through as it is.\n */\n protected readonly legendHidden = computed<readonly number[]>(() => {\n const hiddenSeries = this.hiddenSeries();\n if (!this.hasLines()) return hiddenSeries;\n const offset = this.resolvedSeries().length;\n return [...hiddenSeries.filter(i => i < offset), ...this.hiddenLines().map(i => offset + i)];\n });\n\n /** A toggle on the legend, split back into `hiddenSeries` and `hiddenLines`. Writes only the one that moved. */\n protected onLegendHidden(next: readonly number[]): void {\n if (!this.hasLines()) {\n this.hiddenSeries.set(next);\n return;\n }\n const offset = this.resolvedSeries().length;\n const ascending = (a: number, b: number): number => a - b;\n const series = [...next.filter(i => i < offset), ...this.hiddenSeries().filter(i => i >= offset)].sort(ascending);\n const lines = next.filter(i => i >= offset).map(i => i - offset);\n const same = (a: readonly number[], b: readonly number[]): boolean =>\n a.length === b.length && a.every((value, i) => value === b[i]);\n if (!same(series, this.hiddenSeries())) this.hiddenSeries.set(series);\n if (!same(lines, this.hiddenLines())) this.hiddenLines.set(lines);\n }\n\n /**\n * The figures for `dataTable`: the chart's name as the caption, a column per series\n * shown — or, with `data`, one for the bars, headed by `barChart.value` — then per line\n * shown, and a row per category. Each cell is the series' own value, stacked or not,\n * written as the tooltip writes it, and empty where it is missing; a bar's is the figure\n * its name gives. With every series and line hidden there is nothing to tabulate, and\n * no rows.\n */\n protected readonly tableData = computed<WrChartTableData>(() => {\n const bars = this.seriesMode()\n ? this.visibleSeries()\n : [{ label: this.valueText(), data: this.data().map(d => (Number.isFinite(d.value) ? d.value : null)) }];\n const columns = [...bars, ...this.visibleLines()];\n const labels = this.categoryLabels();\n const rows =\n columns.length === 0\n ? []\n : labels.map((header, c) => ({\n header,\n cells: columns.map(column => {\n const value = column.data[c];\n return value === null || value === undefined ? '' : this.numbers.value(value);\n }),\n }));\n return { caption: this.resolvedAriaLabel(), columns: columns.map(column => column.label), groups: [{ rows }] };\n });\n\n /**\n * One tooltip for the whole chart, with the whole figure — the label above the bar\n * may be compact, and the tooltip is where a reader goes for the exact one.\n *\n * With `data` it points at the top edge of the BAR — above it, below it when there is\n * no room — rather than at the column, which is the full height of the plot and\n * would put the chip above every bar alike. A bar with nothing to draw (zero, or a\n * negative value without `lines`) keeps its 1px floor on the baseline, so its chip\n * points there; a missing value opens none, unless a line has a value in its category.\n * The bar is the anchor element itself, so an open chip follows it through the\n * height transition a data change starts.\n *\n * With `series` it is one chip per category: the category's name and a row per series\n * shown with a value there, pointing at the top of the box round the category's bars.\n * A category no series shown has a value in opens none.\n *\n * Each line shown with a value in the category adds a row after the bars', and the box\n * the chip points at takes in the line's point too, so the chip covers neither. Beside\n * `data`, the chip keeps the bar's label and value as its heading, over the lines' rows.\n */\n protected readonly tip = useChartTooltip(this.tooltip, index =>\n this.seriesMode() ? this.categoryTip(index) : this.barTip(index)\n );\n\n private barTip(index: number): WrChartTooltipTarget | null {\n const bar = this.bars()[index];\n const anchor = this.barEls()[index]?.nativeElement;\n if (!bar || !anchor) return null;\n const rows = this.lineRows(index);\n // A missing value has nothing to say but its label, which is already under the bar.\n if (rows.length === 0)\n return bar.missing ? null : { datum: { label: bar.label, value: bar.text, color: bar.color }, anchor };\n return {\n datum: { label: bar.label, value: bar.text, color: bar.color, rows },\n anchor: WrBarChart.around([anchor.getBoundingClientRect(), ...this.pointBoxes(index)]),\n };\n }\n\n /** A row per line shown with a value in category `index`, after the bars' rows. */\n private lineRows(index: number): WrChartTooltipRow[] {\n return this.visibleLines().flatMap(line => {\n const value = line.data[index];\n return value === null || value === undefined\n ? []\n : [{ label: line.label, value: this.numbers.value(value), color: line.color }];\n });\n }\n\n /** The box round each line's point in category `index`: the marker, not the 1px viewport it is drawn from. */\n private pointBoxes(index: number): DOMRect[] {\n const categories = this.lineLayers().flatMap(line => line.points.map(point => point.category));\n return this.pointEls().flatMap((el, i) => {\n const marker = el.nativeElement.firstElementChild;\n return categories[i] === index && marker ? [marker.getBoundingClientRect()] : [];\n });\n }\n\n /** The box round several, as a tooltip anchor. */\n private static around(boxes: readonly DOMRect[]): { x: number; y: number; width: number; height: number } {\n const left = Math.min(...boxes.map(box => box.left));\n const top = Math.min(...boxes.map(box => box.top));\n const right = Math.max(...boxes.map(box => box.right));\n const bottom = Math.max(...boxes.map(box => box.bottom));\n return { x: left, y: top, width: right - left, height: bottom - top };\n }\n\n private categoryTip(index: number): WrChartTooltipTarget | null {\n const category = this.seriesCategories()[index];\n const element = this.categoryEls()[index]?.nativeElement;\n if (!category || !element) return null;\n const rows = [\n ...this.visibleSeries().flatMap(s => {\n const value = s.data[index];\n return value === null || value === undefined\n ? []\n : [{ label: s.label, value: this.numbers.value(value), color: s.color }];\n }),\n ...this.lineRows(index),\n ];\n if (rows.length === 0) return null;\n // The box round the bars the category draws and its lines' points, so the chip points\n // at the end of the longest of them rather than at the top of the plot.\n const boxes = [\n ...[...element.querySelectorAll('.wr-bar-chart__series-bar')].map(bar => bar.getBoundingClientRect()),\n ...this.pointBoxes(index),\n ];\n if (boxes.length === 0) return null;\n return { datum: { label: category.label, value: '', rows }, anchor: WrBarChart.around(boxes) };\n }\n}\n\nexport type { WrBarChartDatum, WrBarLine, WrBarOrientation, WrBarSeries } from './types';\n","@let isSeries = seriesMode();\n@let isHorizontal = horizontal();\n@let isCombo = hasLines();\n@if ((isSeries || isCombo) && showLegend() && legendItems().length > 0) {\n <!-- Every row keys its series by the series' own dash, the one its bars' outlines are\n drawn in, and each line by its dash and its marker. Rows are tracked by position, so\n two series that share a label are two rows. -->\n <ul\n wr-chart-legend\n class=\"wr-bar-chart__legend\"\n [items]=\"legendItems()\"\n [toggleable]=\"toggleableLegend()\"\n [hiddenSeries]=\"legendHidden()\"\n (hiddenSeriesChange)=\"onLegendHidden($event)\"\n ></ul>\n}\n\n@if (!isSeries && !isHorizontal && !isCombo) {\n <!-- A named `group`, not an `img`: `img` is a children-presentational role, so the\n bars' own `img` names inside it are dropped by a user agent that follows the spec —\n WebKit drops exactly such a subtree, which is why the donut moved its `img` off the\n wrapper. -->\n <div class=\"wr-bar-chart__plot\" role=\"group\" [attr.aria-label]=\"resolvedAriaLabel()\" [style.height.px]=\"height()\">\n @for (bar of bars(); track $index) {\n <div\n class=\"wr-bar-chart__column\"\n role=\"img\"\n [attr.aria-label]=\"bar.name\"\n (mouseenter)=\"tip.enter($index)\"\n (mouseleave)=\"tip.leave($event)\"\n >\n @if (showValues() && !bar.missing) {\n <span class=\"wr-bar-chart__value\">{{ bar.display }}</span>\n }\n <div #barEl class=\"wr-bar-chart__bar\" [style.flex-grow]=\"bar.share\" [style.background]=\"bar.color\"></div>\n </div>\n }\n </div>\n <!-- Named on the column above, so the visible label row is decoration here. -->\n <div class=\"wr-bar-chart__labels\" aria-hidden=\"true\">\n @for (bar of bars(); track $index) {\n <span class=\"wr-bar-chart__label\">{{ bar.label }}</span>\n }\n </div>\n} @else {\n <!-- The layout `series`, `orientation=\"horizontal\"` and `lines` share: the plot is a grid\n of the track the bars run along, a room past each end of it for the values printed\n there, and — sideways — the gutter of category names. Still a named `group`, for the\n reason the vertical `data` plot gives. Sideways, `height` is a floor rather than a\n height: each row keeps room for a line of text, so many rows grow the plot. -->\n <div\n class=\"wr-bar-chart__plot\"\n role=\"group\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [style.height.px]=\"isHorizontal ? null : height()\"\n [style.min-height.px]=\"isHorizontal ? height() : null\"\n >\n @if (isHorizontal) {\n <!-- In the plot, so the rows share its gap with the track; decoration, as under the\n vertical bars: each row's group or image is named. -->\n <div class=\"wr-bar-chart__labels\" aria-hidden=\"true\">\n @for (label of categoryLabels(); track $index) {\n <span class=\"wr-bar-chart__label\">{{ label }}</span>\n }\n </div>\n }\n @if (showValues()) {\n <!-- Hidden copies of the values printed past each end of the axis, stacked in one\n cell: each room is as large as the largest of them, in the value's own font, so\n a value past the longest bar has exactly the space it needs. Tracked by position:\n they are measuring copies, and live data changes every text at once. -->\n <div class=\"wr-bar-chart__room wr-bar-chart__room--max\" aria-hidden=\"true\">\n @for (text of rooms().max; track $index) {\n <span class=\"wr-bar-chart__value\">{{ text }}</span>\n }\n </div>\n <div class=\"wr-bar-chart__room wr-bar-chart__room--min\" aria-hidden=\"true\">\n @for (text of rooms().min; track $index) {\n <span class=\"wr-bar-chart__value\">{{ text }}</span>\n }\n </div>\n }\n <div class=\"wr-bar-chart__track\" [style.--wr-bar-chart-zero]=\"zero()\">\n @if (isSeries) {\n @for (category of seriesCategories(); track $index) {\n <div\n #categoryEl\n class=\"wr-bar-chart__category\"\n role=\"group\"\n [attr.aria-label]=\"category.label\"\n (mouseenter)=\"tip.enter($index)\"\n (mouseleave)=\"tip.leave($event)\"\n >\n @for (lane of category.lanes; track lane.key) {\n <div class=\"wr-bar-chart__lane\">\n <!-- By position, not by label: two series may share one. Each bar hands the\n stylesheet where it starts and how much of the axis it covers. -->\n @for (bar of lane.bars; track bar.series) {\n <div\n class=\"wr-bar-chart__series-bar\"\n role=\"img\"\n [attr.aria-label]=\"bar.name\"\n [style.--wr-bar-chart-color]=\"bar.color\"\n [style.--wr-bar-chart-start]=\"bar.start\"\n [style.--wr-bar-chart-size]=\"bar.size\"\n >\n <!-- The outline, in the series' colour and its own dash: what tells two\n series apart without hue, and what the legend's key draws. Sized in\n pixels, so a dash is the same length on every bar. -->\n <svg class=\"wr-bar-chart__edge\" aria-hidden=\"true\" focusable=\"false\">\n <rect\n width=\"100%\"\n height=\"100%\"\n fill=\"none\"\n [attr.stroke]=\"bar.color\"\n [attr.stroke-dasharray]=\"bar.dash || null\"\n />\n </svg>\n </div>\n }\n @for (end of lane.ends; track $index) {\n <!-- Past one bar, hidden: the bar's own name carries its value. Past a pile,\n an image named \"Total: 20\": no bar's name carries the total, and a\n reader should not have to add the names up. -->\n <span\n class=\"wr-bar-chart__value\"\n [class.wr-bar-chart__value--below]=\"end.below\"\n [style.--wr-bar-chart-at]=\"end.at\"\n [attr.role]=\"end.name ? 'img' : null\"\n [attr.aria-label]=\"end.name\"\n [attr.aria-hidden]=\"end.name ? null : 'true'\"\n >{{ end.text }}</span\n >\n }\n </div>\n }\n </div>\n }\n } @else {\n @for (bar of bars(); track $index) {\n <!-- Beside `lines`, the column also hands the stylesheet where its bar starts: on\n zero, or at its own end for a bar hanging below it. -->\n <div\n class=\"wr-bar-chart__column\"\n role=\"img\"\n [attr.aria-label]=\"bar.name\"\n [style.--wr-bar-chart-start]=\"isCombo ? bar.start : null\"\n (mouseenter)=\"tip.enter($index)\"\n (mouseleave)=\"tip.leave($event)\"\n >\n @if (showValues() && !bar.missing) {\n <span\n class=\"wr-bar-chart__value\"\n [class.wr-bar-chart__value--below]=\"bar.below\"\n [style.--wr-bar-chart-at]=\"bar.at\"\n >{{ bar.display }}</span\n >\n }\n <div\n #barEl\n class=\"wr-bar-chart__bar\"\n [class.wr-bar-chart__bar--below]=\"bar.below\"\n [style.flex-grow]=\"bar.share\"\n [style.background]=\"bar.color\"\n ></div>\n </div>\n }\n }\n <!-- After the bars, so it is drawn over them where zero runs through the plot. -->\n <div class=\"wr-bar-chart__baseline\"></div>\n @for (line of lineLayers(); track line.index) {\n <!-- Over the bars and the baseline, and out of the pointer's way, so hovering a\n point still opens its category's tooltip. Each line is a group named by the\n line, holding a named image per point; its runs are decoration. The box runs\n from the middle of the first category to the middle of the last, which the\n stylesheet works out from `count`, and every position in it is a percentage,\n so nothing stretches: a dash and a marker keep their size at any width. -->\n <svg\n class=\"wr-bar-chart__line\"\n role=\"group\"\n focusable=\"false\"\n [attr.aria-label]=\"line.label\"\n [style.--wr-bar-chart-count]=\"line.count\"\n >\n @for (segment of line.segments; track $index) {\n <line\n class=\"wr-bar-chart__line-segment\"\n [attr.x1]=\"`${segment.from.x}%`\"\n [attr.y1]=\"`${segment.from.y}%`\"\n [attr.x2]=\"`${segment.to.x}%`\"\n [attr.y2]=\"`${segment.to.y}%`\"\n [attr.stroke]=\"line.color\"\n [attr.stroke-dasharray]=\"line.dash || null\"\n />\n }\n @for (point of line.points; track point.category) {\n <!-- A nested `<svg>` placed by percentage with its marker drawn about its origin\n in px, as the scatter chart places its points: one pixel of viewport, and\n `overflow` lets the marker reach outside it. -->\n <svg\n #pointEl\n class=\"wr-bar-chart__point\"\n role=\"img\"\n width=\"1\"\n height=\"1\"\n overflow=\"visible\"\n [attr.aria-label]=\"point.name\"\n [attr.x]=\"`${point.x}%`\"\n [attr.y]=\"`${point.y}%`\"\n [attr.data-marker]=\"line.marker\"\n >\n <path [attr.d]=\"line.d\" [attr.fill]=\"line.color\" />\n </svg>\n }\n </svg>\n }\n </div>\n </div>\n @if (!isHorizontal) {\n <!-- Named on each category's group above, so the visible label row is decoration. -->\n <div class=\"wr-bar-chart__labels\" aria-hidden=\"true\">\n @for (label of categoryLabels(); track $index) {\n <span class=\"wr-bar-chart__label\">{{ label }}</span>\n }\n </div>\n }\n}\n\n@if (dataTable() && (isSeries || bars().length > 0)) {\n <!-- The figures for a screen reader who wants to move cell by cell. Clipped to nothing\n by its own stylesheet, so it takes no room and draws nothing. With `data`, one\n column for the bars, then one per line. -->\n <wr-chart-table [data]=\"tableData()\" />\n}\n"],"mappings":";;;;;;;;;;;;;;AAyCA,MAAM,SAAS,UAA0B,KAAK,MAAM,QAAQ,GAAG,IAAI,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,CAGb,WAAS,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"ngwr-charts-bar-chart.mjs","names":[],"sources":["../../../projects/lib/charts/bar-chart/bar-chart.ts","../../../projects/lib/charts/bar-chart/bar-chart.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n type ElementRef,\n LOCALE_ID,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n isDevMode,\n model,\n viewChildren,\n} from '@angular/core';\n\nimport { WrChartLegend, type WrChartLegendItem } from 'ngwr/charts/chart-legend';\nimport {\n WrChartTable,\n type WrChartMarkerShape,\n type WrChartTableData,\n chartColor,\n chartDash,\n chartMarker,\n chartMarkerExtent,\n chartMarkerPath,\n useChartNumbers,\n} from 'ngwr/charts/core';\nimport { readI18nText, useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { type WrChartTooltipRow, type WrChartTooltipTarget, useChartTooltip } from 'ngwr/popover';\nimport { clamp, wrCheckStyles } from 'ngwr/utils';\n\nimport type { WrBarChartDatum, WrBarLine, WrBarOrientation, WrBarSeries } from './types';\n\n/** A share of the value axis for an inline style: four decimals, `-0` folded to `0`. */\nconst short = (value: number): number => Math.round(value * 1e4) / 1e4 || 0;\n\n/** A share as a percentage of a line's box, to two decimals, `-0` folded to `0`. */\nconst percent = (share: number): number => Math.round(share * 1e4) / 100 || 0;\n\n/**\n * How large a line's point is, in px: the radius of the circle every marker shape has\n * the area of. A step up from the line chart's 3px dot, since a point here sits on a bar\n * rather than on the page and keeps a ring of the surface round it.\n */\nconst POINT_RADIUS = 4;\n\n/** One series' bar in one category, as `series` draws it. */\ninterface SeriesBar {\n /** The series' position in `series`, which is what the bar is tracked by. */\n readonly series: number;\n readonly color: string;\n /** The outline's `stroke-dasharray`, `''` for a solid one. */\n readonly dash: string;\n /** Where the bar starts along the value axis, as a share of it from its minimum. */\n readonly start: number;\n /** How much of the value axis the bar covers. */\n readonly size: number;\n /** The series' name and its own value: the bar's accessible name. */\n readonly name: string;\n}\n\n/** A value printed past the end of a bar, or of a pile of them. */\ninterface EndLabel {\n readonly text: string;\n /** Where the end is along the value axis, as a share of it from its minimum. */\n readonly at: number;\n /** Whether the bar grows towards the axis' minimum, so the value goes past that end. */\n readonly below: boolean;\n /**\n * What the printed value announces: a pile's total, \"Total: 20\", under `stacked`, where\n * no bar's own name carries it. `null` past a single bar, whose name already does.\n */\n readonly name: string | null;\n}\n\n/**\n * One lane of a category: the strip one bar runs along. Grouped, a lane per series\n * shown, side by side; stacked, one lane holding every series' bar.\n */\ninterface Lane {\n readonly key: number;\n readonly bars: readonly SeriesBar[];\n readonly ends: readonly EndLabel[];\n}\n\n/** One category drawn from `series`: its name and its lanes. */\ninterface Category {\n readonly label: string;\n readonly lanes: readonly Lane[];\n}\n\n/**\n * Where something of a line sits in the line's own box, as percentages of it: `x` from\n * its left edge, `y` from its top. The box runs from the middle of the first category to\n * the middle of the last, so the categories are evenly spaced along it.\n */\ninterface LinePosition {\n readonly x: number;\n readonly y: number;\n}\n\n/** One point of a line: a category with a value. */\ninterface LinePoint extends LinePosition {\n /** The category's position, which is what the point is tracked by. */\n readonly category: number;\n /** The category's name and the line's value there: the point's accessible name. */\n readonly name: string;\n}\n\n/** One straight run of a line, between the points of two neighbouring categories. */\ninterface LineSegment {\n readonly from: LinePosition;\n readonly to: LinePosition;\n}\n\n/** One line of `lines`, as the chart draws it. */\ninterface LineLayer {\n /** The line's position in `lines`, which is what it is tracked by. */\n readonly index: number;\n readonly label: string;\n readonly color: string;\n /** The line's `stroke-dasharray`, `''` for a solid one. */\n readonly dash: string;\n readonly marker: WrChartMarkerShape;\n /** The marker's path, drawn about its point. */\n readonly d: string;\n /** How many categories the line's box spans, which the stylesheet sizes the box from. */\n readonly count: number;\n readonly segments: readonly LineSegment[];\n readonly points: readonly LinePoint[];\n}\n\n/**\n * Bar chart. Pass `[data]` for one series — each datum becomes a bar — or `[series]`\n * with `[categories]` for several, drawn side by side or, with `stacked`, piled on each\n * other. Vertical by default; `orientation=\"horizontal\"` lays the bars along the inline\n * axis with the category names in a gutter beside them. Axis-free: the values are\n * printed at the bars. No external dependency.\n *\n * @example\n * ```html\n * <wr-bar-chart [data]=\"[\n * { label: 'Mon', value: 12 },\n * { label: 'Tue', value: 18, color: 'var(--wr-color-success)' },\n * { label: 'Wed', value: 9 }\n * ]\" />\n *\n * <wr-bar-chart\n * [categories]=\"['Q1', 'Q2', 'Q3', 'Q4']\"\n * [series]=\"[\n * { label: 'North', data: [12, 18, 9, 22] },\n * { label: 'South', data: [8, 11, 14, 10] }\n * ]\"\n * stacked\n * />\n * ```\n *\n * **Several series.** Every category gets a bar per series shown, in series order —\n * or, with `stacked`, one pile, positive values up from zero and negative ones down\n * from it, each sign on its own, as `wr-line-chart` stacks. A negative value draws\n * below the zero line, which `series` draws wherever zero falls. Each series takes its\n * colour and its own dash: the bar's body is a tint of the colour and its outline the\n * colour itself, in the series' dash, the first one solid. The default palette's\n * colours sit within about 1.06:1 of each other in luminance, so the dash is what tells\n * two series apart without hue, and the legend keys each series by the same dash.\n *\n * **`data` is unchanged**: one series, a bar per datum, a negative value drawn as an\n * empty bar with its number still printed — except beside `lines`, whose axis can reach\n * below zero: there a negative value is drawn down from zero, as `series` draws it. With\n * both set, `series` wins, and dev mode says so.\n *\n * **Lines over the bars.** `lines` draws a line per entry through the middle of each\n * category, with a point at every value, on the bars' own value axis: a fitted axis is\n * fitted to the bars and the lines together, so a line above every bar raises the top\n * and one below zero brings the zero line up, `data` bars included — and a negative\n * `data` bar draws down from it. It works with\n * `data` and with `series`, grouped or stacked, and lying down, where the lines run down\n * the rows. A line takes the next palette colour after the bars', its own dash, the\n * first one solid, and its own marker shape, the first a circle; the legend keys each\n * by both, the tooltip gives its value, and the data table a column. A line never\n * stacks, and prints no value at its points: the tooltip and each point's name carry it.\n * The track keeps room at each end of the value axis for the largest marker, so a point\n * at either end is not cut off by the chart's box.\n *\n * **What a screen reader gets.** The plot is a named `role=\"group\"`. With `data`, each\n * bar is a `role=\"img\"` named by its label and its value. With `series`, each category\n * is a `role=\"group\"` named by the category, and each bar in it a `role=\"img\"` named by\n * its series and its own value; under `stacked`, each pile's printed total is a\n * `role=\"img\"` too, \"Total: 20\", since no bar's name carries it. Each of `lines` is a\n * `role=\"group\"` named by the line, after the bars, and each of its points a\n * `role=\"img\"` named by its category and the line's value there. No part of the chart is\n * a tab stop, unless\n * `toggleableLegend` makes the legend rows buttons. `dataTable` adds the same figures as\n * a table, for a reader who wants to move cell by cell.\n *\n * @see https://ngwr.dev/charts/bar-chart\n */\n@Component({\n selector: 'wr-bar-chart',\n templateUrl: './bar-chart.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-bar-chart',\n '[class.wr-bar-chart--horizontal]': 'horizontal()',\n '[class.wr-bar-chart--series]': 'seriesMode()',\n '[class.wr-bar-chart--stacked]': 'seriesMode() && stacked()',\n '[class.wr-bar-chart--combo]': 'hasLines()',\n // How far the largest of `lines`' markers reaches along the value axis: the room the\n // stylesheet keeps at each end of the track, so a point there stays in the chart's box.\n '[style.--wr-bar-chart-reach]': 'hasLines() ? lineReach() : null',\n // How many categories share the track: standing up, the gaps between them are held to\n // a share of the track by it, so a long list keeps its bars rather than gaps alone.\n '[style.--wr-bar-chart-categories]': 'categoryTotal() || null',\n },\n imports: [WrChartLegend, WrChartTable],\n})\nexport class WrBarChart {\n /**\n * The bars, left to right. One series: a datum with no `color` of its own\n * takes the chart's `color`, so by default every bar comes out the same.\n * A negative value draws an empty bar with its number printed — or, beside `lines`,\n * a bar down from zero. A value that is not a finite number is MISSING: an empty bar\n * with no number printed, named by its label alone, an empty cell in the data table.\n * Ignored while `series` has entries.\n */\n readonly data = input<readonly WrBarChartDatum[]>([]);\n\n /**\n * Several series over the same categories: one bar per series in every category,\n * side by side, or piled up with `stacked`. A series with no `color` takes the next\n * entry from the chart's palette, and each takes the next dash for its outline, the\n * first one solid. Wins over `data` while it has entries.\n */\n readonly series = input<readonly WrBarSeries[]>([]);\n\n /**\n * The categories' names for `series`, in order: a series takes one value per\n * category. A category past the end of this list, which a longer series reaches, is\n * named by its position, counting from 1, in `LOCALE_ID`'s digits. Not read with\n * `data`, whose datums carry their own labels.\n */\n readonly categories = input<readonly string[]>([]);\n\n /**\n * Lines drawn over the bars, through the middle of each category, with a point at\n * every value: a target, a rate, a running average beside the figures it describes.\n * Each takes one value per category, on the bars' own value axis, and a fitted axis is\n * fitted to the bars and the lines together. Works with `data` and with `series`,\n * grouped or stacked, standing up or lying down, where the lines run down the rows.\n *\n * A line with no `color` takes the palette's next colour after the bars' — past the\n * last series, or the palette's second beside `data` — and each takes the next dash and\n * the next marker shape, the first solid with a circle, so two lines differ without\n * hue. The legend lists every line after the series, keyed by its dash and its marker;\n * the tooltip gives each line's value in the category; the data table a column per line\n * after the series' columns, or after the bars'. A missing value breaks the line, and a\n * lone value between two missing ones is a point with no line. Lines never stack, and\n * print no value: the tooltip and each point's name carry it.\n *\n * Beside `data`, a negative bar draws down from zero rather than as an empty bar, since\n * the lines' axis can reach below zero and an empty bar there would read as zero. The\n * track keeps room at each end of the value axis for the largest marker, ring included,\n * so a point on either end is not cut off.\n */\n readonly lines = input<readonly WrBarLine[]>([]);\n\n /**\n * Pile each category's bars on each other, in series order, so the end of the pile\n * reads the total. Positive values pile up from zero and negative ones down from it,\n * each sign on its own, so no bar crosses another. A missing value adds nothing.\n * Each bar's accessible name, the tooltip and the data table keep each series' own\n * value; the value printed past a pile (`showValues`) is the pile's total, one for\n * each sign the category has, and announces itself as \"Total: 20\" (`barChart.total`).\n * `series` only. @default false\n */\n readonly stacked = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Which way the bars run. `horizontal` lays them along the inline axis, one row per\n * category, with the names in a gutter at inline start as wide as the longest (up to\n * `--wr-bar-chart-label-max-width`, then ellipsised). Under RTL the gutter is on the\n * right and the bars grow leftwards. Lying down, `height` is the least the plot takes:\n * the rows share it, but each bar's row keeps at least `--wr-bar-chart-row-min-size`\n * (one line of the value's text), so a long list of categories or series grows the\n * chart rather than thinning its bars to nothing. @default 'vertical'\n */\n readonly orientation = input<WrBarOrientation>('vertical');\n\n /**\n * Accessible name of the chart. Falls back to `barChart.label`, then `'Bar chart'`.\n * Also the data table's caption.\n */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'barChart.label', 'Bar chart');\n\n /**\n * The word a stacked pile's printed total announces itself by, \"Total: 20\". From the\n * catalog only, as the legend's \"hidden\" is: one word an app rewords once there.\n */\n private readonly totalText = readI18nText('barChart.total', 'Total');\n\n /**\n * The data table's heading for the column of `data`'s bars, which have no series name\n * of their own. From the catalog only, as the total's word is.\n */\n private readonly valueText = readI18nText('barChart.value', 'Value');\n\n /**\n * How a bar, a point and a pile's total name themselves: a label and a figure, \"Mon: 12\",\n * from the catalog, so a language that joins the two another way can.\n */\n private readonly datumText = useI18nFormatter('barChart.datum', '{{label}}: {{value}}');\n\n /** A category with no name of its own, by its position from 1 in the reader's own digits. */\n private readonly ordinals = new Intl.NumberFormat(inject(LOCALE_ID));\n\n /** Default bar colour when a datum has none. `data` only. @default 'var(--wr-color-primary)' */\n readonly color = input<string>('var(--wr-color-primary)');\n\n /**\n * Show value labels at each bar, past its end: above a bar standing up, beyond its end\n * lying down — below (or before) a negative `series` bar, and the pile's total for each\n * sign with `stacked`. A value too wide for a `series` bar standing up is left out\n * rather than cut, since a cut number reads as another one; the tooltip and each bar's\n * name carry it whole. @default true\n */\n readonly showValues = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Pixel height of the chart area. With `orientation=\"horizontal\"` it is the least the\n * plot takes: each bar's row keeps at least `--wr-bar-chart-row-min-size`, so rows that\n * need more grow the plot past it. @default 200\n */\n readonly height = input(200, { transform: (v: unknown): number => Math.max(40, coerceNumberProperty(v, 200)) });\n\n /**\n * Explicit max value. `0` = auto. With `series` it fixes the positive end of the axis;\n * the negative end is still fitted to the data. A value past it is drawn to the edge,\n * and its name, the tooltip and the data table still give its own figure. @default 0\n */\n readonly max = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n\n /**\n * Show a tooltip with the bar's label and value on hover — with `series`, the\n * category's name and a row per series shown. Pointer only — the accessible names\n * already carry every value. @default true\n */\n readonly tooltip = input(true, { transform: coerceBooleanProperty });\n\n /** Show the legend above the chart. With `series`, or beside `lines`, which it then lists. @default true */\n readonly showLegend = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Make each legend row a toggle button that shows and hides its series, through\n * `hiddenSeries` — or its line, through `hiddenLines`. A row is a\n * `<button aria-pressed>`, pressed while its series is shown, so the legend becomes one\n * tab stop per row. With `series`, or beside `lines`. @default false\n */\n readonly toggleableLegend = input(false, { transform: coerceBooleanProperty });\n\n /**\n * The positions in `series` of the series that are hidden. Positions rather than\n * labels, since two series may share a label. A toggleable legend writes it, and a\n * host may bind it with or without one: `[(hiddenSeries)]`.\n *\n * A hidden series is left out of everything that reads its values: it draws no bars\n * and leaves its lane, so the others widen; it leaves the stack, the tooltip and the\n * data table; and a fitted axis is fitted to the series still shown. The categories do\n * not change, since they belong to the chart rather than to one series. The legend\n * keeps the hidden series' row, struck through, so it can be shown again. A position\n * past the end of `series` is kept and ignored.\n */\n readonly hiddenSeries = model<readonly number[]>([]);\n\n /**\n * The positions in `lines` of the lines that are hidden, as `hiddenSeries` holds the\n * series': a toggleable legend writes it, and a host may bind it with or without one,\n * `[(hiddenLines)]`. A hidden line draws nothing and leaves the tooltip and the data\n * table, and a fitted axis is fitted to what is still shown. The legend keeps its row,\n * struck through. A position past the end of `lines` is kept and ignored.\n */\n readonly hiddenLines = model<readonly number[]>([]);\n\n /**\n * Render the chart's figures as a table that only assistive technology reaches: a row\n * per category, headed by its name, and a column per series shown — or, with `data`,\n * one column for the bars, headed \"Value\" (`barChart.value`) — then one per line shown,\n * every value written the way the tooltip writes it. A missing value is an empty cell,\n * and a stacked chart's table keeps each series' own values.\n *\n * Each bar's accessible name already carries its value; the table is for a reader\n * who wants to move cell by cell. It is rendered beside the plot, clipped to nothing:\n * it takes no room, draws nothing and holds no tab stop. A hidden series or line leaves\n * it. @default false\n */\n readonly dataTable = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Writes every number the chart shows: the labels at the bars, the tooltip and\n * each bar's accessible name. `null` uses `Intl.NumberFormat` in `LOCALE_ID`, with\n * compact labels from a thousand up (`1.2K`, `3.4M`).\n */\n readonly valueFormat = input<((value: number) => string) | null>(null);\n\n /**\n * The chart's number writers: `value` for the tooltip and each bar's accessible\n * name, the whole figure; `label` above the bar, compact from a thousand up, where a\n * column is too narrow for `1,234,567`, and exactly as `value` writes it below —\n * compact rounding would print 12.5 as `13`, and below a thousand there is nothing to\n * abbreviate.\n */\n private readonly numbers = useChartNumbers(this.valueFormat);\n\n private readonly barEls = viewChildren<ElementRef<HTMLElement>>('barEl');\n\n private readonly categoryEls = viewChildren<ElementRef<HTMLElement>>('categoryEl');\n\n /** Every point of every line, in the order {@link lineLayers} lists them. */\n private readonly pointEls = viewChildren<ElementRef<SVGSVGElement>>('pointEl');\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('charts/bar-chart');\n // Two inputs that each describe the whole chart: drawing one and silently dropping\n // the other looks like data that failed to load.\n if (isDevMode()) {\n let warned = false;\n effect(() => {\n if (warned || this.data().length === 0 || this.series().length === 0) return;\n warned = true;\n // eslint-disable-next-line no-console -- dev-mode validation\n console.warn(\n '[NGWR] <wr-bar-chart>: both `data` and `series` are set. The chart draws `series` and ignores `data`; ' +\n 'pass one of them.'\n );\n });\n }\n }\n\n /** Whether the chart draws `series` rather than `data`. */\n protected readonly seriesMode = computed(() => this.series().length > 0);\n\n protected readonly horizontal = computed(() => this.orientation() === 'horizontal');\n\n /**\n * Whether the chart has `lines` to draw, shown or hidden. Beside `data` it moves the\n * bars into the layout `series` uses, whose track the lines are drawn over; hiding\n * every line keeps that layout, so a legend toggle never reflows the bars.\n */\n protected readonly hasLines = computed(() => this.lines().length > 0);\n\n /**\n * A datum's value, with anything non-finite read as `0` for the geometry.\n *\n * One `NaN` used to take out the whole chart rather than its own bar:\n * `Math.max(...values)` is `NaN` as soon as one value is, so the scale fell\n * back to `1` and every OTHER bar was asked for a height of `value * 100`%.\n * The bad bar also printed the literal text `NaN` above itself. It is not a zero\n * either, so nothing a reader meets prints one for it (see `bars`).\n */\n private static value(raw: number): number {\n return Number.isFinite(raw) ? raw : 0;\n }\n\n /** A label and a figure, as a name: \"Mon: 12\". */\n private name(label: string, value: number): string {\n return this.datumText({ label, value: this.numbers.value(value) });\n }\n\n /** How many categories the chart draws, whichever input it draws. */\n protected readonly categoryTotal = computed(() => (this.seriesMode() ? this.categoryCount() : this.data().length));\n\n /**\n * The value axis for `data`, from `lo` to `hi`: from zero to the tallest bar, or to\n * `max` when one is given. Beside `lines` it is stretched to every line value shown and\n * to every bar below zero — which then draws down from zero, as a `series` bar does,\n * rather than as an empty bar that would read as zero on an axis reaching below it — so\n * either lifts the zero line the bars stand on. With nothing to scale it runs from 0\n * to 1.\n */\n private readonly dataScale = computed(() => {\n const data = this.data();\n // Whether `lines` are set, shown or not: hiding every line keeps the layout, and with\n // it a negative bar's place below zero.\n const combo = this.hasLines();\n let lo = 0;\n let hi = 0;\n for (const d of data) {\n const value = WrBarChart.value(d.value);\n hi = Math.max(hi, value);\n if (combo) lo = Math.min(lo, value);\n }\n for (const line of this.visibleLines()) {\n for (let c = 0; c < data.length; c++) {\n const v = line.data[c];\n if (v === null || v === undefined) continue;\n lo = Math.min(lo, v);\n hi = Math.max(hi, v);\n }\n }\n const explicit = this.max();\n if (explicit > 0) hi = explicit;\n if (hi - lo <= 0) hi = 1;\n return { lo, hi };\n });\n\n protected readonly bars = computed(() => {\n const { lo, hi } = this.dataScale();\n // Zero is the axis minimum until a line or, beside lines, a bar goes below it; the bars\n // stand on it, and a bar's share is of the whole axis, so it can reach no further than\n // the top. Beside `lines` a negative bar hangs from zero down to its value; without\n // them it is an empty bar on zero.\n const combo = this.hasLines();\n const floor = this.at(0);\n const zero = this.zero();\n return this.data().map(d => {\n const value = WrBarChart.value(d.value);\n // A missing value is drawn as the empty bar a zero is, and printed as nothing.\n const missing = !Number.isFinite(d.value);\n const text = missing ? '' : this.numbers.value(value);\n const below = combo && value < 0;\n const share = below ? Math.min(floor, -value / (hi - lo)) : Math.min(1 - floor, Math.max(0, value) / (hi - lo));\n return {\n label: d.label,\n value,\n /** Whether the datum's value is not a finite number: no figure is printed, named or tabled for it. */\n missing,\n /** The label printed above the bar. */\n display: missing ? '' : this.numbers.label(value),\n /** The whole figure, for the tooltip. */\n text,\n color: d.color ?? this.color(),\n /**\n * The bar's share of the plot, from 0 to 1, written as its `flex-grow` — see\n * the stylesheet for why a grow factor and not a `height` percentage.\n */\n share,\n /** Whether the bar hangs below zero, beside `lines`: its value is printed past its lower end. */\n below,\n /**\n * Where the bar starts along the value axis, from its minimum: zero, or the bar's\n * own end for one below it. Beside `lines`, the share the spacer under it takes.\n */\n start: below ? short(zero - share) : zero,\n /** Where the bar ends along the value axis, from its minimum: what the value printed past it is placed by. */\n at: below ? short(zero - share) : zero + share,\n /**\n * The bar's accessible name. The label and the value sit in separate\n * rows, so a screen reader read every number and then every label with\n * nothing tying the two together — and with `showValues` off the\n * numbers were not in the accessible tree at all. A missing value is the\n * label alone.\n */\n name: missing ? d.label : this.name(d.label, value),\n };\n });\n });\n\n /**\n * Every series, resolved: its palette colour, its dash, and its data with `null` at\n * every missing value. Hidden ones included, since the legend lists them.\n */\n private readonly resolvedSeries = computed(() =>\n this.series().map((s, index) => ({\n index,\n label: s.label,\n color: s.color ?? chartColor(index),\n dash: chartDash(index),\n data: s.data.map(v => (typeof v === 'number' && Number.isFinite(v) ? v : null)),\n }))\n );\n\n /** The series drawn, read and fitted to: every one `hiddenSeries` does not name. */\n private readonly visibleSeries = computed(() => {\n const hidden = new Set(this.hiddenSeries());\n return this.resolvedSeries().filter(s => !hidden.has(s.index));\n });\n\n /**\n * Every line, resolved: its colour — the palette's next after the bars' — its dash, its\n * marker, and its data with `null` at every missing value. Hidden ones included, since\n * the legend lists them.\n */\n private readonly resolvedLines = computed(() => {\n // Past the series' colours, or past the one `data` paints its bars in by default.\n const offset = this.seriesMode() ? this.series().length : 1;\n return this.lines().map((line, index) => ({\n index,\n label: line.label,\n color: line.color ?? chartColor(offset + index),\n dash: chartDash(index),\n marker: chartMarker(index),\n data: line.data.map(v => (typeof v === 'number' && Number.isFinite(v) ? v : null)),\n }));\n });\n\n /** The lines drawn, read and fitted to: every one `hiddenLines` does not name. */\n private readonly visibleLines = computed(() => {\n const hidden = new Set(this.hiddenLines());\n return this.resolvedLines().filter(line => !hidden.has(line.index));\n });\n\n /** How many categories `series` has: as many as are named, or as the longest series reaches. */\n private readonly categoryCount = computed(() =>\n this.resolvedSeries().reduce((count, s) => Math.max(count, s.data.length), this.categories().length)\n );\n\n /**\n * The value axis for `series`, from `lo` (zero or below) to `hi` (above zero): the\n * extremes of the series shown, or of their piles under `stacked`, and of the lines\n * shown, so the longest bar or the farthest point reaches the end of the plot, as it\n * does with `data`. A positive `max` fixes `hi`. With nothing to scale it runs from 0\n * to 1.\n */\n private readonly seriesScale = computed(() => {\n const series = this.visibleSeries();\n const lines = this.visibleLines();\n const stacked = this.stacked();\n let lo = 0;\n let hi = 0;\n for (let c = 0; c < this.categoryCount(); c++) {\n let up = 0;\n let down = 0;\n for (const s of series) {\n const v = s.data[c];\n if (v === null || v === undefined) continue;\n if (!stacked) {\n lo = Math.min(lo, v);\n hi = Math.max(hi, v);\n } else if (v < 0) down += v;\n else up += v;\n }\n lo = Math.min(lo, down);\n hi = Math.max(hi, up);\n // A line shares the axis, and never stacks.\n for (const line of lines) {\n const v = line.data[c];\n if (v === null || v === undefined) continue;\n lo = Math.min(lo, v);\n hi = Math.max(hi, v);\n }\n }\n const explicit = this.max();\n if (explicit > 0) hi = explicit;\n if (hi - lo <= 0) hi = 1;\n return { lo, hi };\n });\n\n /** The value axis the chart draws on: `series`' or `data`'s. */\n private readonly scale = computed(() => (this.seriesMode() ? this.seriesScale() : this.dataScale()));\n\n /** A value's place along the value axis, as a share of it from its minimum, held to the axis. */\n private at(value: number): number {\n const { lo, hi } = this.scale();\n return clamp((value - lo) / (hi - lo), 0, 1);\n }\n\n /**\n * Every category `series` draws, with its lanes: grouped, a lane per series shown, a\n * missing value leaving its lane empty so the bars beside it keep their places;\n * stacked, one lane holding each series' bar on the pile of the ones before it on the\n * same side of zero. With `showValues`, a lane also carries the values printed past\n * its ends: each bar's own, or each pile's total.\n */\n protected readonly seriesCategories = computed<readonly Category[]>(() => {\n if (!this.seriesMode()) return [];\n const series = this.visibleSeries();\n const labels = this.categories();\n const values = this.showValues();\n const zero = this.at(0);\n const name = (label: string, value: number): string => this.name(label, value);\n\n return Array.from({ length: this.categoryCount() }, (_, c): Category => {\n const label = labels[c] ?? this.ordinals.format(c + 1);\n if (!this.stacked()) {\n const lanes = series.map((s): Lane => {\n const v = s.data[c];\n if (v === null || v === undefined) return { key: s.index, bars: [], ends: [] };\n const end = this.at(v);\n const bar = {\n series: s.index,\n color: s.color,\n dash: s.dash,\n start: short(Math.min(zero, end)),\n size: short(Math.abs(end - zero)),\n name: name(s.label, v),\n };\n return {\n key: s.index,\n bars: [bar],\n ends: values ? [{ text: this.numbers.label(v), at: short(end), below: v < 0, name: null }] : [],\n };\n });\n return { label, lanes };\n }\n\n let up = 0;\n let down = 0;\n let rises = false;\n let falls = false;\n const bars = series.flatMap((s): SeriesBar[] => {\n const v = s.data[c];\n if (v === null || v === undefined) return [];\n const base = v < 0 ? down : up;\n const top = base + v;\n if (v < 0) {\n down = top;\n falls = true;\n } else {\n up = top;\n rises = true;\n }\n const from = this.at(base);\n const to = this.at(top);\n return [\n {\n series: s.index,\n color: s.color,\n dash: s.dash,\n start: short(Math.min(from, to)),\n size: short(Math.abs(to - from)),\n name: name(s.label, v),\n },\n ];\n });\n // A pile's total is printed, and no bar's own name carries it, so the printed value\n // announces itself — with the whole figure, as a bar's name does.\n const total = (value: number, below: boolean): EndLabel => ({\n text: this.numbers.label(value),\n at: short(this.at(value)),\n below,\n name: name(this.totalText(), value),\n });\n const ends: EndLabel[] = [];\n if (values && rises) ends.push(total(up, false));\n if (values && falls) ends.push(total(down, true));\n return { label, lanes: [{ key: 0, bars, ends }] };\n });\n });\n\n /** The category names, in order, whichever input the chart draws. */\n protected readonly categoryLabels = computed(() =>\n this.seriesMode() ? this.seriesCategories().map(c => c.label) : this.data().map(d => d.label)\n );\n\n /**\n * Where zero is along the value axis, as a share of it: the baseline. `data` goes below\n * zero only where one of `lines` does.\n */\n protected readonly zero = computed(() => short(this.at(0)));\n\n /**\n * The values printed past the bars, sorted by the end they go past: the room the plot\n * keeps beyond each end of the axis is a hidden copy of these, so it is exactly as\n * large as the largest, in the value's own font. Each text once.\n */\n protected readonly rooms = computed(() => {\n if (!this.showValues()) return { max: [], min: [] };\n if (!this.seriesMode()) {\n const bars = this.bars();\n return {\n max: [...new Set(bars.filter(b => !b.below && !b.missing).map(b => b.display))],\n min: [...new Set(bars.filter(b => b.below && !b.missing).map(b => b.display))],\n };\n }\n const ends = this.seriesCategories().flatMap(c => c.lanes.flatMap(lane => lane.ends));\n return {\n max: [...new Set(ends.filter(e => !e.below).map(e => e.text))],\n min: [...new Set(ends.filter(e => e.below).map(e => e.text))],\n };\n });\n\n /**\n * Every line shown, as the chart draws it: its segments and its points, placed in the\n * line's own box. The box runs from the middle of the first category to the middle of\n * the last (the stylesheet sizes it from `count`), so category `c` of `n` is `c / (n − 1)`\n * of the way along it — or its middle, with one category. Across the box is the value\n * axis: up from the bottom standing up, along from inline start lying down, where the\n * stylesheet mirrors the box under RTL as the bars mirror.\n */\n protected readonly lineLayers = computed<readonly LineLayer[]>(() => {\n const count = this.seriesMode() ? this.categoryCount() : this.data().length;\n if (count === 0) return [];\n const labels = this.categoryLabels();\n const horizontal = this.horizontal();\n const along = (c: number): number => (count === 1 ? 50 : percent(c / (count - 1)));\n const place = (c: number, value: number): LinePosition => {\n const at = this.at(value);\n return horizontal ? { x: percent(at), y: along(c) } : { x: along(c), y: percent(1 - at) };\n };\n\n return this.visibleLines().map((line): LineLayer => {\n const segments: LineSegment[] = [];\n const points: LinePoint[] = [];\n let previous: LinePosition | null = null;\n for (let c = 0; c < count; c++) {\n const value = line.data[c];\n if (value === null || value === undefined) {\n // A missing value breaks the line: the next point starts a new run.\n previous = null;\n continue;\n }\n const position = place(c, value);\n if (previous) segments.push({ from: previous, to: position });\n points.push({ ...position, category: c, name: this.name(labels[c] ?? this.ordinals.format(c + 1), value) });\n previous = position;\n }\n return {\n index: line.index,\n label: line.label,\n color: line.color,\n dash: line.dash,\n marker: line.marker,\n d: chartMarkerPath(line.marker, POINT_RADIUS),\n count,\n segments,\n points,\n };\n });\n });\n\n /**\n * How far the largest of `lines`' markers reaches past its point along the value axis,\n * in px, before its ring: up or down standing up, sideways lying down. By SHAPE, not\n * radius — a triangle's point stands 1.56 times its radius off its centre. Every line\n * counts, hidden ones included, so a legend toggle never reflows the bars. The\n * stylesheet adds the ring and keeps that much room at each end of the track.\n */\n protected readonly lineReach = computed(() => {\n const horizontal = this.horizontal();\n let reach = 0;\n for (const line of this.resolvedLines()) {\n const extent = chartMarkerExtent(line.marker, POINT_RADIUS);\n reach = Math.max(reach, horizontal ? extent.side : Math.max(extent.top, extent.bottom));\n }\n return Math.round(reach * 1000) / 1000;\n });\n\n /**\n * The legend's rows: every series, keyed by its own dash, then every line, keyed by its\n * dash and its marker — hidden ones included.\n */\n protected readonly legendItems = computed<readonly WrChartLegendItem[]>(() => [\n ...this.resolvedSeries().map(({ label, color, dash }) => ({ label, color, dash })),\n ...this.resolvedLines().map(({ label, color, dash, marker }) => ({ label, color, dash, marker })),\n ]);\n\n /**\n * The legend's hidden rows. Its rows are the series and then the lines, so a hidden\n * line is its position in `lines` past the series' count. A position `hiddenSeries`\n * keeps past the end of `series` is not handed over beside lines, where it would name\n * a line; without lines `hiddenSeries` goes through as it is.\n */\n protected readonly legendHidden = computed<readonly number[]>(() => {\n const hiddenSeries = this.hiddenSeries();\n if (!this.hasLines()) return hiddenSeries;\n const offset = this.resolvedSeries().length;\n return [...hiddenSeries.filter(i => i < offset), ...this.hiddenLines().map(i => offset + i)];\n });\n\n /** A toggle on the legend, split back into `hiddenSeries` and `hiddenLines`. Writes only the one that moved. */\n protected onLegendHidden(next: readonly number[]): void {\n if (!this.hasLines()) {\n this.hiddenSeries.set(next);\n return;\n }\n const offset = this.resolvedSeries().length;\n const ascending = (a: number, b: number): number => a - b;\n const series = [...next.filter(i => i < offset), ...this.hiddenSeries().filter(i => i >= offset)].sort(ascending);\n const lines = next.filter(i => i >= offset).map(i => i - offset);\n const same = (a: readonly number[], b: readonly number[]): boolean =>\n a.length === b.length && a.every((value, i) => value === b[i]);\n if (!same(series, this.hiddenSeries())) this.hiddenSeries.set(series);\n if (!same(lines, this.hiddenLines())) this.hiddenLines.set(lines);\n }\n\n /**\n * The figures for `dataTable`: the chart's name as the caption, a column per series\n * shown — or, with `data`, one for the bars, headed by `barChart.value` — then per line\n * shown, and a row per category. Each cell is the series' own value, stacked or not,\n * written as the tooltip writes it, and empty where it is missing; a bar's is the figure\n * its name gives. With every series and line hidden there is nothing to tabulate, and\n * no rows.\n */\n protected readonly tableData = computed<WrChartTableData>(() => {\n const bars = this.seriesMode()\n ? this.visibleSeries()\n : [{ label: this.valueText(), data: this.data().map(d => (Number.isFinite(d.value) ? d.value : null)) }];\n const columns = [...bars, ...this.visibleLines()];\n const labels = this.categoryLabels();\n const rows =\n columns.length === 0\n ? []\n : labels.map((header, c) => ({\n header,\n cells: columns.map(column => {\n const value = column.data[c];\n return value === null || value === undefined ? '' : this.numbers.value(value);\n }),\n }));\n return { caption: this.resolvedAriaLabel(), columns: columns.map(column => column.label), groups: [{ rows }] };\n });\n\n /**\n * One tooltip for the whole chart, with the whole figure — the label above the bar\n * may be compact, and the tooltip is where a reader goes for the exact one.\n *\n * With `data` it points at the top edge of the BAR — above it, below it when there is\n * no room — rather than at the column, which is the full height of the plot and\n * would put the chip above every bar alike. A bar with nothing to draw (zero, or a\n * negative value without `lines`) keeps its 1px floor on the baseline, so its chip\n * points there; a missing value opens none, unless a line has a value in its category.\n * The bar is the anchor element itself, so an open chip follows it through the\n * height transition a data change starts.\n *\n * With `series` it is one chip per category: the category's name and a row per series\n * shown with a value there, pointing at the top of the box round the category's bars.\n * A category no series shown has a value in opens none.\n *\n * Each line shown with a value in the category adds a row after the bars', and the box\n * the chip points at takes in the line's point too, so the chip covers neither. Beside\n * `data`, the chip keeps the bar's label and value as its heading, over the lines' rows.\n */\n protected readonly tip = useChartTooltip(this.tooltip, index =>\n this.seriesMode() ? this.categoryTip(index) : this.barTip(index)\n );\n\n private barTip(index: number): WrChartTooltipTarget | null {\n const bar = this.bars()[index];\n const anchor = this.barEls()[index]?.nativeElement;\n if (!bar || !anchor) return null;\n const rows = this.lineRows(index);\n // A missing value has nothing to say but its label, which is already under the bar.\n if (rows.length === 0)\n return bar.missing ? null : { datum: { label: bar.label, value: bar.text, color: bar.color }, anchor };\n return {\n datum: { label: bar.label, value: bar.text, color: bar.color, rows },\n anchor: WrBarChart.around([anchor.getBoundingClientRect(), ...this.pointBoxes(index)]),\n };\n }\n\n /** A row per line shown with a value in category `index`, after the bars' rows. */\n private lineRows(index: number): WrChartTooltipRow[] {\n return this.visibleLines().flatMap(line => {\n const value = line.data[index];\n return value === null || value === undefined\n ? []\n : [{ label: line.label, value: this.numbers.value(value), color: line.color }];\n });\n }\n\n /** The box round each line's point in category `index`: the marker, not the 1px viewport it is drawn from. */\n private pointBoxes(index: number): DOMRect[] {\n const categories = this.lineLayers().flatMap(line => line.points.map(point => point.category));\n return this.pointEls().flatMap((el, i) => {\n const marker = el.nativeElement.firstElementChild;\n return categories[i] === index && marker ? [marker.getBoundingClientRect()] : [];\n });\n }\n\n /** The box round several, as a tooltip anchor. */\n private static around(boxes: readonly DOMRect[]): { x: number; y: number; width: number; height: number } {\n const left = Math.min(...boxes.map(box => box.left));\n const top = Math.min(...boxes.map(box => box.top));\n const right = Math.max(...boxes.map(box => box.right));\n const bottom = Math.max(...boxes.map(box => box.bottom));\n return { x: left, y: top, width: right - left, height: bottom - top };\n }\n\n private categoryTip(index: number): WrChartTooltipTarget | null {\n const category = this.seriesCategories()[index];\n const element = this.categoryEls()[index]?.nativeElement;\n if (!category || !element) return null;\n const rows = [\n ...this.visibleSeries().flatMap(s => {\n const value = s.data[index];\n return value === null || value === undefined\n ? []\n : [{ label: s.label, value: this.numbers.value(value), color: s.color }];\n }),\n ...this.lineRows(index),\n ];\n if (rows.length === 0) return null;\n // The box round the bars the category draws and its lines' points, so the chip points\n // at the end of the longest of them rather than at the top of the plot.\n const boxes = [\n ...[...element.querySelectorAll('.wr-bar-chart__series-bar')].map(bar => bar.getBoundingClientRect()),\n ...this.pointBoxes(index),\n ];\n if (boxes.length === 0) return null;\n return { datum: { label: category.label, value: '', rows }, anchor: WrBarChart.around(boxes) };\n }\n}\n\nexport type { WrBarChartDatum, WrBarLine, WrBarOrientation, WrBarSeries } from './types';\n","@let isSeries = seriesMode();\n@let isHorizontal = horizontal();\n@let isCombo = hasLines();\n@if ((isSeries || isCombo) && showLegend() && legendItems().length > 0) {\n <!-- Every row keys its series by the series' own dash, the one its bars' outlines are\n drawn in, and each line by its dash and its marker. Rows are tracked by position, so\n two series that share a label are two rows. -->\n <ul\n wr-chart-legend\n class=\"wr-bar-chart__legend\"\n [items]=\"legendItems()\"\n [toggleable]=\"toggleableLegend()\"\n [hiddenSeries]=\"legendHidden()\"\n (hiddenSeriesChange)=\"onLegendHidden($event)\"\n ></ul>\n}\n\n@if (!isSeries && !isHorizontal && !isCombo) {\n <!-- A named `group`, not an `img`: `img` is a children-presentational role, so the\n bars' own `img` names inside it are dropped by a user agent that follows the spec —\n WebKit drops exactly such a subtree, which is why the donut moved its `img` off the\n wrapper. -->\n <div class=\"wr-bar-chart__plot\" role=\"group\" [attr.aria-label]=\"resolvedAriaLabel()\" [style.height.px]=\"height()\">\n @for (bar of bars(); track $index) {\n <div\n class=\"wr-bar-chart__column\"\n role=\"img\"\n [attr.aria-label]=\"bar.name\"\n (mouseenter)=\"tip.enter($index)\"\n (mouseleave)=\"tip.leave($event)\"\n >\n @if (showValues() && !bar.missing) {\n <span class=\"wr-bar-chart__value\">{{ bar.display }}</span>\n }\n <div #barEl class=\"wr-bar-chart__bar\" [style.flex-grow]=\"bar.share\" [style.background]=\"bar.color\"></div>\n </div>\n }\n </div>\n <!-- Named on the column above, so the visible label row is decoration here. -->\n <div class=\"wr-bar-chart__labels\" aria-hidden=\"true\">\n @for (bar of bars(); track $index) {\n <span class=\"wr-bar-chart__label\">{{ bar.label }}</span>\n }\n </div>\n} @else {\n <!-- The layout `series`, `orientation=\"horizontal\"` and `lines` share: the plot is a grid\n of the track the bars run along, a room past each end of it for the values printed\n there, and — sideways — the gutter of category names. Still a named `group`, for the\n reason the vertical `data` plot gives. Sideways, `height` is a floor rather than a\n height: each row keeps room for a line of text, so many rows grow the plot. -->\n <div\n class=\"wr-bar-chart__plot\"\n role=\"group\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [style.height.px]=\"isHorizontal ? null : height()\"\n [style.min-height.px]=\"isHorizontal ? height() : null\"\n >\n @if (isHorizontal) {\n <!-- In the plot, so the rows share its gap with the track; decoration, as under the\n vertical bars: each row's group or image is named. -->\n <div class=\"wr-bar-chart__labels\" aria-hidden=\"true\">\n @for (label of categoryLabels(); track $index) {\n <span class=\"wr-bar-chart__label\">{{ label }}</span>\n }\n </div>\n }\n @if (showValues()) {\n <!-- Hidden copies of the values printed past each end of the axis, stacked in one\n cell: each room is as large as the largest of them, in the value's own font, so\n a value past the longest bar has exactly the space it needs. Tracked by position:\n they are measuring copies, and live data changes every text at once. -->\n <div class=\"wr-bar-chart__room wr-bar-chart__room--max\" aria-hidden=\"true\">\n @for (text of rooms().max; track $index) {\n <span class=\"wr-bar-chart__value\">{{ text }}</span>\n }\n </div>\n <div class=\"wr-bar-chart__room wr-bar-chart__room--min\" aria-hidden=\"true\">\n @for (text of rooms().min; track $index) {\n <span class=\"wr-bar-chart__value\">{{ text }}</span>\n }\n </div>\n }\n <div class=\"wr-bar-chart__track\" [style.--wr-bar-chart-zero]=\"zero()\">\n @if (isSeries) {\n @for (category of seriesCategories(); track $index) {\n <div\n #categoryEl\n class=\"wr-bar-chart__category\"\n role=\"group\"\n [attr.aria-label]=\"category.label\"\n (mouseenter)=\"tip.enter($index)\"\n (mouseleave)=\"tip.leave($event)\"\n >\n @for (lane of category.lanes; track lane.key) {\n <div class=\"wr-bar-chart__lane\">\n <!-- By position, not by label: two series may share one. Each bar hands the\n stylesheet where it starts and how much of the axis it covers. -->\n @for (bar of lane.bars; track bar.series) {\n <div\n class=\"wr-bar-chart__series-bar\"\n role=\"img\"\n [attr.aria-label]=\"bar.name\"\n [style.--wr-bar-chart-color]=\"bar.color\"\n [style.--wr-bar-chart-start]=\"bar.start\"\n [style.--wr-bar-chart-size]=\"bar.size\"\n >\n <!-- The outline, in the series' colour and its own dash: what tells two\n series apart without hue, and what the legend's key draws. Sized in\n pixels, so a dash is the same length on every bar. -->\n <svg class=\"wr-bar-chart__edge\" aria-hidden=\"true\" focusable=\"false\">\n <rect\n width=\"100%\"\n height=\"100%\"\n fill=\"none\"\n [attr.stroke]=\"bar.color\"\n [attr.stroke-dasharray]=\"bar.dash || null\"\n />\n </svg>\n </div>\n }\n @for (end of lane.ends; track $index) {\n <!-- Past one bar, hidden: the bar's own name carries its value. Past a pile,\n an image named \"Total: 20\": no bar's name carries the total, and a\n reader should not have to add the names up. -->\n <span\n class=\"wr-bar-chart__value\"\n [class.wr-bar-chart__value--below]=\"end.below\"\n [style.--wr-bar-chart-at]=\"end.at\"\n [attr.role]=\"end.name ? 'img' : null\"\n [attr.aria-label]=\"end.name\"\n [attr.aria-hidden]=\"end.name ? null : 'true'\"\n >{{ end.text }}</span\n >\n }\n </div>\n }\n </div>\n }\n } @else {\n @for (bar of bars(); track $index) {\n <!-- Beside `lines`, the column also hands the stylesheet where its bar starts: on\n zero, or at its own end for a bar hanging below it. -->\n <div\n class=\"wr-bar-chart__column\"\n role=\"img\"\n [attr.aria-label]=\"bar.name\"\n [style.--wr-bar-chart-start]=\"isCombo ? bar.start : null\"\n (mouseenter)=\"tip.enter($index)\"\n (mouseleave)=\"tip.leave($event)\"\n >\n @if (showValues() && !bar.missing) {\n <span\n class=\"wr-bar-chart__value\"\n [class.wr-bar-chart__value--below]=\"bar.below\"\n [style.--wr-bar-chart-at]=\"bar.at\"\n >{{ bar.display }}</span\n >\n }\n <div\n #barEl\n class=\"wr-bar-chart__bar\"\n [class.wr-bar-chart__bar--below]=\"bar.below\"\n [style.flex-grow]=\"bar.share\"\n [style.background]=\"bar.color\"\n ></div>\n </div>\n }\n }\n <!-- After the bars, so it is drawn over them where zero runs through the plot. -->\n <div class=\"wr-bar-chart__baseline\"></div>\n @for (line of lineLayers(); track line.index) {\n <!-- Over the bars and the baseline, and out of the pointer's way, so hovering a\n point still opens its category's tooltip. Each line is a group named by the\n line, holding a named image per point; its runs are decoration. The box runs\n from the middle of the first category to the middle of the last, which the\n stylesheet works out from `count`, and every position in it is a percentage,\n so nothing stretches: a dash and a marker keep their size at any width. -->\n <svg\n class=\"wr-bar-chart__line\"\n role=\"group\"\n focusable=\"false\"\n [attr.aria-label]=\"line.label\"\n [style.--wr-bar-chart-count]=\"line.count\"\n >\n @for (segment of line.segments; track $index) {\n <line\n class=\"wr-bar-chart__line-segment\"\n [attr.x1]=\"`${segment.from.x}%`\"\n [attr.y1]=\"`${segment.from.y}%`\"\n [attr.x2]=\"`${segment.to.x}%`\"\n [attr.y2]=\"`${segment.to.y}%`\"\n [attr.stroke]=\"line.color\"\n [attr.stroke-dasharray]=\"line.dash || null\"\n />\n }\n @for (point of line.points; track point.category) {\n <!-- A nested `<svg>` placed by percentage with its marker drawn about its origin\n in px, as the scatter chart places its points: one pixel of viewport, and\n `overflow` lets the marker reach outside it. -->\n <svg\n #pointEl\n class=\"wr-bar-chart__point\"\n role=\"img\"\n width=\"1\"\n height=\"1\"\n overflow=\"visible\"\n [attr.aria-label]=\"point.name\"\n [attr.x]=\"`${point.x}%`\"\n [attr.y]=\"`${point.y}%`\"\n [attr.data-marker]=\"line.marker\"\n >\n <path [attr.d]=\"line.d\" [attr.fill]=\"line.color\" />\n </svg>\n }\n </svg>\n }\n </div>\n </div>\n @if (!isHorizontal) {\n <!-- Named on each category's group above, so the visible label row is decoration. -->\n <div class=\"wr-bar-chart__labels\" aria-hidden=\"true\">\n @for (label of categoryLabels(); track $index) {\n <span class=\"wr-bar-chart__label\">{{ label }}</span>\n }\n </div>\n }\n}\n\n@if (dataTable() && (isSeries || bars().length > 0)) {\n <!-- The figures for a screen reader who wants to move cell by cell. Clipped to nothing\n by its own stylesheet, so it takes no room and draws nothing. With `data`, one\n column for the bars, then one per line. -->\n <wr-chart-table [data]=\"tableData()\" />\n}\n"],"mappings":";;;;;;;;;;;;;;AAyCA,MAAM,SAAS,UAA0B,KAAK,MAAM,QAAQ,GAAG,IAAI,OAAO;AAG1E,MAAM,WAAW,UAA0B,KAAK,MAAM,QAAQ,GAAG,IAAI,OAAO;AAO5E,MAAM,eAAe;AA4KrB,IAAa,aAAb,MAAa,WAAU;CASZ,OAAO,MAAkC,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAQ5C,SAAS,MAA8B,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAQ1C,aAAa,MAAyB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAuBzC,QAAQ,MAA4B,CAAA,GAAG,GAAA,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UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,GAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,oBAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,GAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,mBAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,SAAO,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAEF,cAAY,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAGb,WAAS,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import { Component, LOCALE_ID, ViewEncapsulation, computed, effect, inject, input, isDevMode, viewChildren } from "@angular/core";
3
3
  import { coerceBooleanProperty, coerceNumberProperty } from "@angular/cdk/coercion";
4
+ import { wrCheckStyles } from "ngwr/utils";
4
5
  import { readI18nText, useI18nFormatter, useI18nText } from "ngwr/i18n";
5
6
  import { WrChartTable, chartAxis, useChartNumbers } from "ngwr/charts/core";
6
7
  import { useChartTooltip } from "ngwr/popover";
@@ -279,6 +280,7 @@ var WrBoxplotChart = class WrBoxplotChart {
279
280
  };
280
281
  }, ...ngDevMode ? [{ debugName: "tableData" }] : /* istanbul ignore next */ []);
281
282
  constructor() {
283
+ if (typeof ngDevMode === "undefined" || ngDevMode) wrCheckStyles("charts/boxplot-chart");
282
284
  if (isDevMode()) {
283
285
  const warned = /* @__PURE__ */ new Set();
284
286
  effect(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-charts-boxplot-chart.mjs","names":[],"sources":["../../../projects/lib/charts/boxplot-chart/internal/stats.ts","../../../projects/lib/charts/boxplot-chart/boxplot-chart.ts","../../../projects/lib/charts/boxplot-chart/boxplot-chart.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrBoxplotStats } from '../types';\n\n/** How far past the box, in interquartile ranges, a value may lie and still be reached by a whisker: Tukey's. */\nconst FENCE = 1.5;\n\n/**\n * The `p` quantile of `sorted`, which is ascending and not empty, by LINEAR\n * INTERPOLATION between the two closest ranks — Hyndman and Fan's type 7, the default\n * of R's `quantile()` and NumPy's `quantile()` and what Excel's `QUARTILE.INC` computes.\n *\n * The quantile sits at the zero-based position `(n − 1) · p`: on a value where that\n * position is whole, and that share of the way between the two values either side\n * where it is not. So 1, 2, 3, 4 has its first quartile at position 0.75, three\n * quarters of the way from 1 to 2: 1.75.\n *\n * @internal\n */\nexport function quantile(sorted: readonly number[], p: number): number {\n const position = (sorted.length - 1) * p;\n const below = Math.floor(position);\n const above = Math.ceil(position);\n return sorted[below] + (position - below) * (sorted[above] - sorted[below]);\n}\n\n/**\n * The summary a box plot draws for `values`: the quartiles by {@link quantile}, the\n * whiskers to the farthest value within 1.5 IQR of the box (Tukey's fences, inclusive),\n * and every value strictly past them as an outlier, ascending. Values that are not\n * finite numbers are left out; with none left, there is nothing to draw: `null`.\n *\n * A whisker never reaches INTO the box. Interpolated quartiles can sit past every value\n * on their side of the fence — 0, 100, 100, 100 has its first quartile at 75 and its\n * lowest value within the fence at 100 — so a whisker end on the wrong side of its\n * quartile is held at the quartile, as matplotlib holds it, and the whisker has no\n * length.\n *\n * @internal\n */\nexport function boxplotStats(values: readonly number[]): Required<WrBoxplotStats> | null {\n const sorted = values.filter(value => Number.isFinite(value)).sort((a, b) => a - b);\n if (sorted.length === 0) return null;\n\n const q1 = quantile(sorted, 0.25);\n const median = quantile(sorted, 0.5);\n const q3 = quantile(sorted, 0.75);\n const reach = FENCE * (q3 - q1);\n const low = q1 - reach;\n const high = q3 + reach;\n\n const inside = sorted.filter(value => value >= low && value <= high);\n // Never empty — the first value at or above the first quartile lies within the fences\n // for any count — so the fallbacks are there for the type checker alone.\n const min = Math.min(q1, inside[0] ?? q1);\n const max = Math.max(q3, inside.at(-1) ?? q3);\n const outliers = sorted.filter(value => value < low || value > high);\n\n return { min, q1, median, q3, max, outliers };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n type ElementRef,\n LOCALE_ID,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n isDevMode,\n viewChildren,\n} from '@angular/core';\n\nimport { WrChartTable, type WrChartTableData, chartAxis, useChartNumbers } from 'ngwr/charts/core';\nimport { readI18nText, useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { type WrChartTooltipRow, useChartTooltip } from 'ngwr/popover';\n\nimport { boxplotStats } from './internal/stats';\nimport type { WrBoxplotGroup, WrBoxplotStats } from './types';\n\n/** How many gaps the value axis aims for: `chartAxis`'s own default, on a plot tall enough for them. */\nconst TICK_COUNT = 4;\n\n/** How much plot height, in px, each gap of the value axis asks for: two and a half lines of tick label. */\nconst TICK_ROOM = 40;\n\n/**\n * How many of a group's outliers its tooltip writes out, the lowest first, a row each;\n * past that one more row counts the rest, so a group with dozens keeps a chip that fits\n * on the screen.\n */\nconst TOOLTIP_OUTLIERS = 3;\n\n/** A percentage to three decimals, so an inline style stays short. */\nconst percent = (value: number): number => Math.round(value * 1000) / 1000;\n\n/** A group's summary as the chart reads it: every number finite, the outliers ascending. */\ntype Summary = Required<WrBoxplotStats>;\n\n/** Where one group's marks sit, each as a percentage of the drawing's height from its top. */\ninterface DrawnBox {\n /** The upper whisker, from its end down to the box. */\n readonly upper: { readonly top: number; readonly bottom: number };\n /** The lower whisker, from the box down to its end. */\n readonly lower: { readonly top: number; readonly bottom: number };\n /** The box, from the third quartile down to the first. */\n readonly box: { readonly top: number; readonly bottom: number };\n readonly max: number;\n readonly median: number;\n readonly min: number;\n readonly outliers: readonly { readonly value: number; readonly top: number }[];\n /** Everything the group draws, outliers included: what the tooltip points at. */\n readonly extent: { readonly top: number; readonly bottom: number };\n}\n\n/** One group as the chart draws it: its data, its slot across the drawing and its marks. */\ninterface DrawnGroup {\n /** Its position in `groups`. */\n readonly index: number;\n readonly label: string;\n readonly color: string;\n /** Its summary, or `null` when it has nothing to draw. */\n readonly stats: Summary | null;\n /**\n * Where its slot starts, as a percentage of the drawing's width from its inline start:\n * the left, or the right under RTL.\n */\n readonly start: number;\n /** How wide its slot is, as a percentage of the drawing's width. */\n readonly slot: number;\n readonly marks: DrawnBox | null;\n}\n\n/** A span between two heights, top first whichever order they arrive in. */\nconst span = (a: number, b: number): { readonly top: number; readonly bottom: number } => ({\n top: Math.min(a, b),\n bottom: Math.max(a, b),\n});\n\n/**\n * The summary a group draws: its `stats` as given, when every one of the five numbers is\n * finite, else the summary of its `values`, else nothing.\n */\nfunction summarise(group: WrBoxplotGroup): Summary | null {\n const given = group.stats;\n if (given) {\n const { min, q1, median, q3, max } = given;\n if (![min, q1, median, q3, max].every(value => Number.isFinite(value))) return null;\n const outliers = (given.outliers ?? []).filter(value => Number.isFinite(value)).sort((a, b) => a - b);\n return { min, q1, median, q3, max, outliers };\n }\n return group.values ? boxplotStats(group.values) : null;\n}\n\n/**\n * Box-and-whisker plots of several groups side by side, on one value axis: a box from the\n * first quartile to the third with a line at the median, a whisker either side, and a dot\n * per outlier. No SVG and no dependency: every mark is an HTML element placed by\n * percentage, so a box keeps its width however tall the plot is.\n *\n * @example\n * ```html\n * <wr-boxplot-chart\n * ariaLabel=\"Response time by region\"\n * [groups]=\"[\n * { label: 'EU', values: [112, 98, 130, 141, 104, 99, 260] },\n * { label: 'US', stats: { min: 80, q1: 101, median: 118, q3: 134, max: 170, outliers: [240] } }\n * ]\"\n * />\n * ```\n *\n * From `values`, the chart works out the quartiles by LINEAR INTERPOLATION — type 7 of\n * Hyndman and Fan, the default of R's and NumPy's `quantile()` and what Excel's\n * `QUARTILE.INC` computes — and Tukey's whiskers: each reaches the farthest value within\n * 1.5 interquartile ranges of the box, and every value beyond is an outlier. A summary\n * worked out elsewhere goes in `stats` and is drawn exactly as given.\n *\n * The value axis is fitted to every number drawn, outliers included, with no zero forced\n * in — a box plot has no baseline — and snapped outward to a readable step. The groups\n * share the drawing's width in equal slots under their names, in reading order: left to\n * right, and right to left under RTL, as the bar chart's columns are, so the first group\n * stands beside the value axis either way.\n *\n * The drawing is one named `role=\"img\"` and takes no tab stop; the tooltip, with the five\n * numbers and the outliers past them, is pointer only. `dataTable` renders every group's\n * numbers as a table only assistive technology reaches.\n *\n * @see https://ngwr.dev/charts/boxplot-chart\n */\n@Component({\n selector: 'wr-boxplot-chart',\n templateUrl: './boxplot-chart.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-boxplot-chart' },\n imports: [WrChartTable],\n})\nexport class WrBoxplotChart {\n /**\n * One entry per box, in reading order: each with its raw `values` or a `stats` summary\n * worked out elsewhere. A group with neither, or with nothing finite to summarise,\n * keeps its slot and its name and draws no box.\n */\n readonly groups = input<readonly WrBoxplotGroup[]>([]);\n\n /**\n * Accessible name of the chart. The numbers are nowhere in text unless `dataTable`\n * puts them there, so say what the chart shows. Falls back to `boxplotChart.label`\n * (\"Box plot\").\n */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'boxplotChart.label', 'Box plot');\n\n /**\n * What the groups are — a region, a release. Drawn under the group names only when\n * given; either way it heads the group column of the data table, which falls back to\n * `boxplotChart.group` (\"Group\").\n */\n readonly xLabel = input<string | null>(null);\n\n /** What the values measure, with their unit. Drawn above the value axis only when given. */\n readonly yLabel = input<string | null>(null);\n\n protected readonly xName = useI18nText(this.xLabel, 'boxplotChart.group', 'Group');\n\n private readonly upperName = readI18nText('boxplotChart.upperWhisker', 'Upper whisker');\n private readonly q3Name = readI18nText('boxplotChart.q3', 'Q3');\n private readonly medianName = readI18nText('boxplotChart.median', 'Median');\n private readonly q1Name = readI18nText('boxplotChart.q1', 'Q1');\n private readonly lowerName = readI18nText('boxplotChart.lowerWhisker', 'Lower whisker');\n private readonly outliersName = readI18nText('boxplotChart.outliers', 'Outliers');\n\n /**\n * Writes every number the chart shows: the axis ticks, the tooltip and the data table.\n * `null` uses `Intl.NumberFormat` in `LOCALE_ID`, with compact ticks (`1.2K`, `3.4M`)\n * unless the full numbers are shorter.\n */\n readonly valueFormat = input<((value: number) => string) | null>(null);\n\n /** The figures in full and the axis' compact ticks, in `LOCALE_ID` unless `valueFormat` is given. */\n private readonly numbers = useChartNumbers(this.valueFormat);\n\n private readonly locale = inject(LOCALE_ID);\n\n /** How many outliers the tooltip leaves unwritten, in the reader's own digits: a count, never a value to format. */\n private readonly counts = new Intl.NumberFormat(this.locale);\n\n /** The tooltip's tail for the outliers past the first few it writes out. */\n private readonly moreOutliers = useI18nFormatter('boxplotChart.moreOutliers', '+{{count}} more');\n\n /**\n * A group's outliers in one data table cell, as the locale lists them. A narrow\n * CONJUNCTION list, because a unit list separates them with bare spaces in several\n * locales, and a space is the digit grouping of Russian and French: `9 000 12 000`.\n */\n private readonly list = new Intl.ListFormat(this.locale, { type: 'conjunction', style: 'narrow' });\n\n /** The colour of every group with no `color` of its own. Any CSS colour. @default 'var(--wr-color-primary)' */\n readonly color = input<string>('var(--wr-color-primary)');\n\n /**\n * The plot's height in px, at least 80. Under 160 the value axis aims for fewer ticks,\n * so their labels keep clear of one another. @default 240\n */\n readonly height = input(240, { transform: (v: unknown): number => Math.max(80, coerceNumberProperty(v, 240)) });\n\n /** Show the gridlines and the value axis' tick labels. @default true */\n readonly showGrid = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Show a tooltip with the hovered group's five numbers — the whiskers' ends, the\n * quartiles and the median — and its outliers' values, the lowest three, then how many\n * more there are. Pointer only. @default true\n */\n readonly tooltip = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Render every group's numbers as a table only assistive technology reaches, beside the\n * drawing: a row per group, a column for each of the five numbers from the lower\n * whisker up and, when a group has any, one listing its outliers. The drawing is one\n * named image, so without it the numbers are nowhere a screen reader can walk.\n * @default false\n */\n readonly dataTable = input(false, { transform: coerceBooleanProperty });\n\n private readonly groupEls = viewChildren<ElementRef<HTMLElement>>('group');\n\n /** Every group with its colour and its summary, in order. */\n private readonly resolvedGroups = computed(() =>\n this.groups().map((group, index) => ({\n index,\n label: group.label,\n color: group.color ?? this.color(),\n stats: summarise(group),\n }))\n );\n\n /**\n * The value axis, from `chartAxis` over every number drawn — whisker ends, quartiles,\n * medians and outliers alike, so a summary given out of order still lands inside it —\n * with no zero forced in and both ends kept off the data (`symmetric`). A single value\n * is centred with a step either side; with nothing to draw, the 0 to 1 frame.\n *\n * It aims for four gaps, and for fewer on a short plot: a gap per 40px of `height`, so\n * the tick labels, a line of text each, never stand on one another — at the 80px\n * floor, four gaps put five labels in 64px of drawing.\n */\n protected readonly axis = computed(() => {\n let min = Number.POSITIVE_INFINITY;\n let max = Number.NEGATIVE_INFINITY;\n for (const { stats } of this.resolvedGroups()) {\n if (!stats) continue;\n for (const value of [stats.min, stats.q1, stats.median, stats.q3, stats.max, ...stats.outliers]) {\n if (value < min) min = value;\n if (value > max) max = value;\n }\n }\n const tickCount = Math.min(TICK_COUNT, Math.max(2, Math.floor(this.height() / TICK_ROOM)));\n return chartAxis(min, max, { symmetric: true, tickCount });\n });\n\n /** The groups as drawn: an equal slot each across the drawing, and their marks placed on the axis. */\n protected readonly drawnGroups = computed<readonly DrawnGroup[]>(() => {\n const groups = this.resolvedGroups();\n const { min, max } = this.axis();\n const top = (value: number): number => percent(((max - value) / (max - min)) * 100);\n const slot = groups.length > 0 ? 100 / groups.length : 100;\n return groups.map(group => {\n const s = group.stats;\n let marks: DrawnBox | null = null;\n if (s) {\n const outliers = s.outliers.map(value => ({ value, top: top(value) }));\n const all = [s.max, s.q3, s.median, s.q1, s.min, ...s.outliers].map(top);\n marks = {\n upper: span(top(s.max), top(s.q3)),\n lower: span(top(s.q1), top(s.min)),\n box: span(top(s.q3), top(s.q1)),\n max: top(s.max),\n median: top(s.median),\n min: top(s.min),\n outliers,\n extent: { top: Math.min(...all), bottom: Math.max(...all) },\n };\n }\n return { ...group, start: percent(group.index * slot), slot: percent(slot), marks };\n });\n });\n\n /** The value axis' ticks, top to bottom: each value's label and its gridline's distance from the top, in percent. */\n protected readonly yTicks = computed(() => {\n const { min, max, step, ticks } = this.axis();\n const labels = this.numbers.ticks(ticks, step);\n return ticks.map((value, i) => ({ label: labels[i], top: percent(((max - value) / (max - min)) * 100) }));\n });\n\n /**\n * One tooltip for the group under the pointer: its name and colour as the heading, then\n * the five numbers top to bottom, the way the box is drawn, and its outliers when it has\n * any — their VALUES, as the data table's column of the same name lists them: the lowest\n * three a row each under the one label, so a long figure never shares a line with\n * another and pushes past the chip, then a row counting the rest. It points at the top\n * of everything the group draws, so the chip covers none of its marks.\n */\n protected readonly tip = useChartTooltip(this.tooltip, index => {\n const group = this.drawnGroups()[index];\n const anchor = this.groupEls()[index]?.nativeElement.querySelector('.wr-boxplot-chart__extent') ?? null;\n if (!group?.stats || !anchor) return null;\n const { stats } = group;\n const rows: WrChartTooltipRow[] = [\n { label: this.upperName(), value: this.numbers.value(stats.max) },\n { label: this.q3Name(), value: this.numbers.value(stats.q3) },\n { label: this.medianName(), value: this.numbers.value(stats.median) },\n { label: this.q1Name(), value: this.numbers.value(stats.q1) },\n { label: this.lowerName(), value: this.numbers.value(stats.min) },\n ];\n if (stats.outliers.length > 0) {\n const shown = stats.outliers.slice(0, TOOLTIP_OUTLIERS).map(value => this.numbers.value(value));\n const rest = stats.outliers.length - shown.length;\n if (rest > 0) shown.push(this.moreOutliers({ count: this.counts.format(rest) }));\n shown.forEach((value, i) => rows.push({ label: i === 0 ? this.outliersName() : '', value }));\n }\n return { datum: { label: group.label, value: '', color: group.color, rows }, anchor };\n });\n\n /** The group the tooltip is reading, washed in the drawing. Never one with nothing drawn. */\n protected readonly activeGroup = computed(() => {\n const index = this.tip.active();\n return index !== null && this.drawnGroups()[index]?.marks ? index : null;\n });\n\n /**\n * The figures for `dataTable`: the chart's name as the caption, a row per group headed\n * by its name, and its five numbers ascending, as a five-number summary reads, written\n * as the tooltip writes them. The outliers column appears once any group has an\n * outlier, and lists that group's ascending. A group with nothing to draw has a row of\n * empty cells.\n */\n protected readonly tableData = computed<WrChartTableData>(() => {\n const groups = this.resolvedGroups();\n const withOutliers = groups.some(({ stats }) => (stats?.outliers.length ?? 0) > 0);\n const columns = [this.lowerName(), this.q1Name(), this.medianName(), this.q3Name(), this.upperName()];\n if (withOutliers) columns.push(this.outliersName());\n const value = (v: number): string => this.numbers.value(v);\n return {\n caption: this.resolvedAriaLabel(),\n corner: this.xName(),\n columns,\n groups: [\n {\n rows: groups.map(({ label, stats }) => {\n if (!stats) return { header: label, cells: columns.map(() => '') };\n const cells = [stats.min, stats.q1, stats.median, stats.q3, stats.max].map(value);\n if (withOutliers) cells.push(this.list.format(stats.outliers.map(value)));\n return { header: label, cells };\n }),\n },\n ],\n };\n });\n\n constructor() {\n // A summary is drawn as given, so one whose numbers are out of order draws a whisker\n // inside its box, and one with a number that is not finite draws nothing at all —\n // both of which read on screen as data, not as a mistake.\n if (isDevMode()) {\n const warned = new Set<string>();\n effect(() => {\n for (const group of this.groups()) {\n const stats = group.stats;\n if (!stats) continue;\n const five = [stats.min, stats.q1, stats.median, stats.q3, stats.max];\n const problem = !five.every(v => Number.isFinite(v))\n ? 'has a number that is not finite, so it draws nothing'\n : five.some((v, i) => i > 0 && v < five[i - 1])\n ? 'is not in order (min ≤ q1 ≤ median ≤ q3 ≤ max), and is drawn as given'\n : null;\n const message = problem && `the stats of \"${group.label}\" ${problem}.`;\n if (!message || warned.has(message)) continue;\n warned.add(message);\n // eslint-disable-next-line no-console -- dev-mode validation\n console.warn(`[NGWR] <wr-boxplot-chart>: ${message}`);\n }\n });\n }\n }\n\n /**\n * The pointer entered a group's slot. A group with nothing drawn reads as leaving, so a\n * chip open on its neighbour closes after the usual grace rather than at once.\n */\n protected onEnter(index: number, event: MouseEvent): void {\n if (this.drawnGroups()[index]?.marks) this.tip.enter(index);\n else this.tip.leave(event);\n }\n}\n\nexport type { WrBoxplotGroup, WrBoxplotStats } from './types';\n","@let active = activeGroup();\n<!-- Two columns: the value axis' ticks at inline start and the drawing beside them, with\n the axis' name above and the group names under the drawing only, so their\n percentages are the drawing's. -->\n<div class=\"wr-boxplot-chart__body\">\n @if (yLabel()) {\n <div class=\"wr-boxplot-chart__y-title\">{{ yLabel() }}</div>\n }\n\n @if (showGrid()) {\n <!-- In flow, so the column is exactly as wide as the longest label; each one hands\n the stylesheet the y of its own gridline. Hidden, as the drawing is one image:\n its name is what is announced, and the numbers are the data table's. -->\n <div class=\"wr-boxplot-chart__y-axis\" aria-hidden=\"true\">\n @for (tick of yTicks(); track $index) {\n <span class=\"wr-boxplot-chart__y-tick\" [style.--wr-boxplot-chart-y]=\"tick.top\">{{ tick.label }}</span>\n }\n </div>\n }\n\n <div class=\"wr-boxplot-chart__plot\" role=\"img\" [attr.aria-label]=\"resolvedAriaLabel()\" [style.height.px]=\"height()\">\n <!-- Every mark is an element placed by percentage of this box, its width in px or a\n share of its slot: a box keeps its width however tall the plot is, which an SVG\n stretched to the plot would not. Hidden as well as presentational, as the\n scatter's drawing is: `img` already makes it so. -->\n <div class=\"wr-boxplot-chart__drawing\" aria-hidden=\"true\">\n @if (showGrid()) {\n @for (tick of yTicks(); track $index) {\n <span class=\"wr-boxplot-chart__grid-line\" [style.--wr-boxplot-chart-y]=\"tick.top\"></span>\n }\n }\n\n <!-- By position, not by label: two groups may share one. Each slot is the hover\n target for its group, top to bottom, so the pointer need not find a 2px\n whisker. It carries the group's numbers in `data-*`, beside the placement. -->\n @for (g of drawnGroups(); track g.index) {\n <div\n #group\n class=\"wr-boxplot-chart__group\"\n [class.wr-boxplot-chart__group--active]=\"active === g.index\"\n [class.wr-boxplot-chart__group--empty]=\"!g.marks\"\n [style.--wr-boxplot-chart-slot-start]=\"g.start\"\n [style.--wr-boxplot-chart-slot-width]=\"g.slot\"\n [style.--wr-boxplot-chart-group-color]=\"g.color\"\n [attr.data-min]=\"g.stats?.min\"\n [attr.data-q1]=\"g.stats?.q1\"\n [attr.data-median]=\"g.stats?.median\"\n [attr.data-q3]=\"g.stats?.q3\"\n [attr.data-max]=\"g.stats?.max\"\n (mouseenter)=\"onEnter(g.index, $event)\"\n (mouseleave)=\"tip.leave($event)\"\n >\n @if (g.marks; as m) {\n <span\n class=\"wr-boxplot-chart__whisker wr-boxplot-chart__whisker--upper\"\n [style.--wr-boxplot-chart-top]=\"m.upper.top\"\n [style.--wr-boxplot-chart-bottom]=\"m.upper.bottom\"\n ></span>\n <span\n class=\"wr-boxplot-chart__whisker wr-boxplot-chart__whisker--lower\"\n [style.--wr-boxplot-chart-top]=\"m.lower.top\"\n [style.--wr-boxplot-chart-bottom]=\"m.lower.bottom\"\n ></span>\n <span\n class=\"wr-boxplot-chart__cap wr-boxplot-chart__cap--upper\"\n [style.--wr-boxplot-chart-y]=\"m.max\"\n ></span>\n <span\n class=\"wr-boxplot-chart__cap wr-boxplot-chart__cap--lower\"\n [style.--wr-boxplot-chart-y]=\"m.min\"\n ></span>\n <span\n class=\"wr-boxplot-chart__box\"\n [style.--wr-boxplot-chart-top]=\"m.box.top\"\n [style.--wr-boxplot-chart-bottom]=\"m.box.bottom\"\n ></span>\n <span class=\"wr-boxplot-chart__median\" [style.--wr-boxplot-chart-y]=\"m.median\"></span>\n @for (o of m.outliers; track $index) {\n <span\n class=\"wr-boxplot-chart__outlier\"\n [style.--wr-boxplot-chart-y]=\"o.top\"\n [attr.data-value]=\"o.value\"\n ></span>\n }\n <!-- Paints nothing: the span from the topmost mark to the lowest, outliers\n included, which the tooltip points at so its chip covers none of them. -->\n <span\n class=\"wr-boxplot-chart__extent\"\n [style.--wr-boxplot-chart-top]=\"m.extent.top\"\n [style.--wr-boxplot-chart-bottom]=\"m.extent.bottom\"\n ></span>\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Each name is centred under its slot and ellipsised past it; the tooltip and the\n data table carry it whole. -->\n <div class=\"wr-boxplot-chart__x-axis\">\n @for (g of drawnGroups(); track g.index) {\n <span\n class=\"wr-boxplot-chart__x-label\"\n [style.--wr-boxplot-chart-slot-start]=\"g.start\"\n [style.--wr-boxplot-chart-slot-width]=\"g.slot\"\n >{{ g.label }}</span\n >\n }\n </div>\n\n @if (xLabel()) {\n <div class=\"wr-boxplot-chart__x-title\">{{ xLabel() }}</div>\n }\n</div>\n\n@if (dataTable()) {\n <!-- The figures for a screen reader, beside the plot's `img` and never inside it:\n `img` makes everything it holds presentational. Clipped to nothing by its own\n stylesheet, so it takes no room and draws nothing. -->\n <wr-chart-table [data]=\"tableData()\" />\n}\n"],"mappings":";;;;;;;;;;;;AAUA,MAAM,QAAQ;AAcd,SAAgB,SAAS,QAA2B,GAAS;CAC3D,MAAM,YAAY,OAAO,SAAS,KAAK;CACvC,MAAM,QAAQ,KAAK,MAAM,QAAQ;CACjC,MAAM,QAAQ,KAAK,KAAK,QAAQ;CAChC,OAAO,OAAO,UAAU,WAAW,UAAU,OAAO,SAAS,OAAO;AACtE;AAgBA,SAAgB,aAAa,QAAyB;CACpD,MAAM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plot-chart/internal/stats.ts","../../../projects/lib/charts/boxplot-chart/boxplot-chart.ts","../../../projects/lib/charts/boxplot-chart/boxplot-chart.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrBoxplotStats } from '../types';\n\n/** How far past the box, in interquartile ranges, a value may lie and still be reached by a whisker: Tukey's. */\nconst FENCE = 1.5;\n\n/**\n * The `p` quantile of `sorted`, which is ascending and not empty, by LINEAR\n * INTERPOLATION between the two closest ranks — Hyndman and Fan's type 7, the default\n * of R's `quantile()` and NumPy's `quantile()` and what Excel's `QUARTILE.INC` computes.\n *\n * The quantile sits at the zero-based position `(n − 1) · p`: on a value where that\n * position is whole, and that share of the way between the two values either side\n * where it is not. So 1, 2, 3, 4 has its first quartile at position 0.75, three\n * quarters of the way from 1 to 2: 1.75.\n *\n * @internal\n */\nexport function quantile(sorted: readonly number[], p: number): number {\n const position = (sorted.length - 1) * p;\n const below = Math.floor(position);\n const above = Math.ceil(position);\n return sorted[below] + (position - below) * (sorted[above] - sorted[below]);\n}\n\n/**\n * The summary a box plot draws for `values`: the quartiles by {@link quantile}, the\n * whiskers to the farthest value within 1.5 IQR of the box (Tukey's fences, inclusive),\n * and every value strictly past them as an outlier, ascending. Values that are not\n * finite numbers are left out; with none left, there is nothing to draw: `null`.\n *\n * A whisker never reaches INTO the box. Interpolated quartiles can sit past every value\n * on their side of the fence — 0, 100, 100, 100 has its first quartile at 75 and its\n * lowest value within the fence at 100 — so a whisker end on the wrong side of its\n * quartile is held at the quartile, as matplotlib holds it, and the whisker has no\n * length.\n *\n * @internal\n */\nexport function boxplotStats(values: readonly number[]): Required<WrBoxplotStats> | null {\n const sorted = values.filter(value => Number.isFinite(value)).sort((a, b) => a - b);\n if (sorted.length === 0) return null;\n\n const q1 = quantile(sorted, 0.25);\n const median = quantile(sorted, 0.5);\n const q3 = quantile(sorted, 0.75);\n const reach = FENCE * (q3 - q1);\n const low = q1 - reach;\n const high = q3 + reach;\n\n const inside = sorted.filter(value => value >= low && value <= high);\n // Never empty — the first value at or above the first quartile lies within the fences\n // for any count — so the fallbacks are there for the type checker alone.\n const min = Math.min(q1, inside[0] ?? q1);\n const max = Math.max(q3, inside.at(-1) ?? q3);\n const outliers = sorted.filter(value => value < low || value > high);\n\n return { min, q1, median, q3, max, outliers };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n type ElementRef,\n LOCALE_ID,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n isDevMode,\n viewChildren,\n} from '@angular/core';\n\nimport { WrChartTable, type WrChartTableData, chartAxis, useChartNumbers } from 'ngwr/charts/core';\nimport { readI18nText, useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { type WrChartTooltipRow, useChartTooltip } from 'ngwr/popover';\nimport { wrCheckStyles } from 'ngwr/utils';\n\nimport { boxplotStats } from './internal/stats';\nimport type { WrBoxplotGroup, WrBoxplotStats } from './types';\n\n/** How many gaps the value axis aims for: `chartAxis`'s own default, on a plot tall enough for them. */\nconst TICK_COUNT = 4;\n\n/** How much plot height, in px, each gap of the value axis asks for: two and a half lines of tick label. */\nconst TICK_ROOM = 40;\n\n/**\n * How many of a group's outliers its tooltip writes out, the lowest first, a row each;\n * past that one more row counts the rest, so a group with dozens keeps a chip that fits\n * on the screen.\n */\nconst TOOLTIP_OUTLIERS = 3;\n\n/** A percentage to three decimals, so an inline style stays short. */\nconst percent = (value: number): number => Math.round(value * 1000) / 1000;\n\n/** A group's summary as the chart reads it: every number finite, the outliers ascending. */\ntype Summary = Required<WrBoxplotStats>;\n\n/** Where one group's marks sit, each as a percentage of the drawing's height from its top. */\ninterface DrawnBox {\n /** The upper whisker, from its end down to the box. */\n readonly upper: { readonly top: number; readonly bottom: number };\n /** The lower whisker, from the box down to its end. */\n readonly lower: { readonly top: number; readonly bottom: number };\n /** The box, from the third quartile down to the first. */\n readonly box: { readonly top: number; readonly bottom: number };\n readonly max: number;\n readonly median: number;\n readonly min: number;\n readonly outliers: readonly { readonly value: number; readonly top: number }[];\n /** Everything the group draws, outliers included: what the tooltip points at. */\n readonly extent: { readonly top: number; readonly bottom: number };\n}\n\n/** One group as the chart draws it: its data, its slot across the drawing and its marks. */\ninterface DrawnGroup {\n /** Its position in `groups`. */\n readonly index: number;\n readonly label: string;\n readonly color: string;\n /** Its summary, or `null` when it has nothing to draw. */\n readonly stats: Summary | null;\n /**\n * Where its slot starts, as a percentage of the drawing's width from its inline start:\n * the left, or the right under RTL.\n */\n readonly start: number;\n /** How wide its slot is, as a percentage of the drawing's width. */\n readonly slot: number;\n readonly marks: DrawnBox | null;\n}\n\n/** A span between two heights, top first whichever order they arrive in. */\nconst span = (a: number, b: number): { readonly top: number; readonly bottom: number } => ({\n top: Math.min(a, b),\n bottom: Math.max(a, b),\n});\n\n/**\n * The summary a group draws: its `stats` as given, when every one of the five numbers is\n * finite, else the summary of its `values`, else nothing.\n */\nfunction summarise(group: WrBoxplotGroup): Summary | null {\n const given = group.stats;\n if (given) {\n const { min, q1, median, q3, max } = given;\n if (![min, q1, median, q3, max].every(value => Number.isFinite(value))) return null;\n const outliers = (given.outliers ?? []).filter(value => Number.isFinite(value)).sort((a, b) => a - b);\n return { min, q1, median, q3, max, outliers };\n }\n return group.values ? boxplotStats(group.values) : null;\n}\n\n/**\n * Box-and-whisker plots of several groups side by side, on one value axis: a box from the\n * first quartile to the third with a line at the median, a whisker either side, and a dot\n * per outlier. No SVG and no dependency: every mark is an HTML element placed by\n * percentage, so a box keeps its width however tall the plot is.\n *\n * @example\n * ```html\n * <wr-boxplot-chart\n * ariaLabel=\"Response time by region\"\n * [groups]=\"[\n * { label: 'EU', values: [112, 98, 130, 141, 104, 99, 260] },\n * { label: 'US', stats: { min: 80, q1: 101, median: 118, q3: 134, max: 170, outliers: [240] } }\n * ]\"\n * />\n * ```\n *\n * From `values`, the chart works out the quartiles by LINEAR INTERPOLATION — type 7 of\n * Hyndman and Fan, the default of R's and NumPy's `quantile()` and what Excel's\n * `QUARTILE.INC` computes — and Tukey's whiskers: each reaches the farthest value within\n * 1.5 interquartile ranges of the box, and every value beyond is an outlier. A summary\n * worked out elsewhere goes in `stats` and is drawn exactly as given.\n *\n * The value axis is fitted to every number drawn, outliers included, with no zero forced\n * in — a box plot has no baseline — and snapped outward to a readable step. The groups\n * share the drawing's width in equal slots under their names, in reading order: left to\n * right, and right to left under RTL, as the bar chart's columns are, so the first group\n * stands beside the value axis either way.\n *\n * The drawing is one named `role=\"img\"` and takes no tab stop; the tooltip, with the five\n * numbers and the outliers past them, is pointer only. `dataTable` renders every group's\n * numbers as a table only assistive technology reaches.\n *\n * @see https://ngwr.dev/charts/boxplot-chart\n */\n@Component({\n selector: 'wr-boxplot-chart',\n templateUrl: './boxplot-chart.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-boxplot-chart' },\n imports: [WrChartTable],\n})\nexport class WrBoxplotChart {\n /**\n * One entry per box, in reading order: each with its raw `values` or a `stats` summary\n * worked out elsewhere. A group with neither, or with nothing finite to summarise,\n * keeps its slot and its name and draws no box.\n */\n readonly groups = input<readonly WrBoxplotGroup[]>([]);\n\n /**\n * Accessible name of the chart. The numbers are nowhere in text unless `dataTable`\n * puts them there, so say what the chart shows. Falls back to `boxplotChart.label`\n * (\"Box plot\").\n */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'boxplotChart.label', 'Box plot');\n\n /**\n * What the groups are — a region, a release. Drawn under the group names only when\n * given; either way it heads the group column of the data table, which falls back to\n * `boxplotChart.group` (\"Group\").\n */\n readonly xLabel = input<string | null>(null);\n\n /** What the values measure, with their unit. Drawn above the value axis only when given. */\n readonly yLabel = input<string | null>(null);\n\n protected readonly xName = useI18nText(this.xLabel, 'boxplotChart.group', 'Group');\n\n private readonly upperName = readI18nText('boxplotChart.upperWhisker', 'Upper whisker');\n private readonly q3Name = readI18nText('boxplotChart.q3', 'Q3');\n private readonly medianName = readI18nText('boxplotChart.median', 'Median');\n private readonly q1Name = readI18nText('boxplotChart.q1', 'Q1');\n private readonly lowerName = readI18nText('boxplotChart.lowerWhisker', 'Lower whisker');\n private readonly outliersName = readI18nText('boxplotChart.outliers', 'Outliers');\n\n /**\n * Writes every number the chart shows: the axis ticks, the tooltip and the data table.\n * `null` uses `Intl.NumberFormat` in `LOCALE_ID`, with compact ticks (`1.2K`, `3.4M`)\n * unless the full numbers are shorter.\n */\n readonly valueFormat = input<((value: number) => string) | null>(null);\n\n /** The figures in full and the axis' compact ticks, in `LOCALE_ID` unless `valueFormat` is given. */\n private readonly numbers = useChartNumbers(this.valueFormat);\n\n private readonly locale = inject(LOCALE_ID);\n\n /** How many outliers the tooltip leaves unwritten, in the reader's own digits: a count, never a value to format. */\n private readonly counts = new Intl.NumberFormat(this.locale);\n\n /** The tooltip's tail for the outliers past the first few it writes out. */\n private readonly moreOutliers = useI18nFormatter('boxplotChart.moreOutliers', '+{{count}} more');\n\n /**\n * A group's outliers in one data table cell, as the locale lists them. A narrow\n * CONJUNCTION list, because a unit list separates them with bare spaces in several\n * locales, and a space is the digit grouping of Russian and French: `9 000 12 000`.\n */\n private readonly list = new Intl.ListFormat(this.locale, { type: 'conjunction', style: 'narrow' });\n\n /** The colour of every group with no `color` of its own. Any CSS colour. @default 'var(--wr-color-primary)' */\n readonly color = input<string>('var(--wr-color-primary)');\n\n /**\n * The plot's height in px, at least 80. Under 160 the value axis aims for fewer ticks,\n * so their labels keep clear of one another. @default 240\n */\n readonly height = input(240, { transform: (v: unknown): number => Math.max(80, coerceNumberProperty(v, 240)) });\n\n /** Show the gridlines and the value axis' tick labels. @default true */\n readonly showGrid = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Show a tooltip with the hovered group's five numbers — the whiskers' ends, the\n * quartiles and the median — and its outliers' values, the lowest three, then how many\n * more there are. Pointer only. @default true\n */\n readonly tooltip = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Render every group's numbers as a table only assistive technology reaches, beside the\n * drawing: a row per group, a column for each of the five numbers from the lower\n * whisker up and, when a group has any, one listing its outliers. The drawing is one\n * named image, so without it the numbers are nowhere a screen reader can walk.\n * @default false\n */\n readonly dataTable = input(false, { transform: coerceBooleanProperty });\n\n private readonly groupEls = viewChildren<ElementRef<HTMLElement>>('group');\n\n /** Every group with its colour and its summary, in order. */\n private readonly resolvedGroups = computed(() =>\n this.groups().map((group, index) => ({\n index,\n label: group.label,\n color: group.color ?? this.color(),\n stats: summarise(group),\n }))\n );\n\n /**\n * The value axis, from `chartAxis` over every number drawn — whisker ends, quartiles,\n * medians and outliers alike, so a summary given out of order still lands inside it —\n * with no zero forced in and both ends kept off the data (`symmetric`). A single value\n * is centred with a step either side; with nothing to draw, the 0 to 1 frame.\n *\n * It aims for four gaps, and for fewer on a short plot: a gap per 40px of `height`, so\n * the tick labels, a line of text each, never stand on one another — at the 80px\n * floor, four gaps put five labels in 64px of drawing.\n */\n protected readonly axis = computed(() => {\n let min = Number.POSITIVE_INFINITY;\n let max = Number.NEGATIVE_INFINITY;\n for (const { stats } of this.resolvedGroups()) {\n if (!stats) continue;\n for (const value of [stats.min, stats.q1, stats.median, stats.q3, stats.max, ...stats.outliers]) {\n if (value < min) min = value;\n if (value > max) max = value;\n }\n }\n const tickCount = Math.min(TICK_COUNT, Math.max(2, Math.floor(this.height() / TICK_ROOM)));\n return chartAxis(min, max, { symmetric: true, tickCount });\n });\n\n /** The groups as drawn: an equal slot each across the drawing, and their marks placed on the axis. */\n protected readonly drawnGroups = computed<readonly DrawnGroup[]>(() => {\n const groups = this.resolvedGroups();\n const { min, max } = this.axis();\n const top = (value: number): number => percent(((max - value) / (max - min)) * 100);\n const slot = groups.length > 0 ? 100 / groups.length : 100;\n return groups.map(group => {\n const s = group.stats;\n let marks: DrawnBox | null = null;\n if (s) {\n const outliers = s.outliers.map(value => ({ value, top: top(value) }));\n const all = [s.max, s.q3, s.median, s.q1, s.min, ...s.outliers].map(top);\n marks = {\n upper: span(top(s.max), top(s.q3)),\n lower: span(top(s.q1), top(s.min)),\n box: span(top(s.q3), top(s.q1)),\n max: top(s.max),\n median: top(s.median),\n min: top(s.min),\n outliers,\n extent: { top: Math.min(...all), bottom: Math.max(...all) },\n };\n }\n return { ...group, start: percent(group.index * slot), slot: percent(slot), marks };\n });\n });\n\n /** The value axis' ticks, top to bottom: each value's label and its gridline's distance from the top, in percent. */\n protected readonly yTicks = computed(() => {\n const { min, max, step, ticks } = this.axis();\n const labels = this.numbers.ticks(ticks, step);\n return ticks.map((value, i) => ({ label: labels[i], top: percent(((max - value) / (max - min)) * 100) }));\n });\n\n /**\n * One tooltip for the group under the pointer: its name and colour as the heading, then\n * the five numbers top to bottom, the way the box is drawn, and its outliers when it has\n * any — their VALUES, as the data table's column of the same name lists them: the lowest\n * three a row each under the one label, so a long figure never shares a line with\n * another and pushes past the chip, then a row counting the rest. It points at the top\n * of everything the group draws, so the chip covers none of its marks.\n */\n protected readonly tip = useChartTooltip(this.tooltip, index => {\n const group = this.drawnGroups()[index];\n const anchor = this.groupEls()[index]?.nativeElement.querySelector('.wr-boxplot-chart__extent') ?? null;\n if (!group?.stats || !anchor) return null;\n const { stats } = group;\n const rows: WrChartTooltipRow[] = [\n { label: this.upperName(), value: this.numbers.value(stats.max) },\n { label: this.q3Name(), value: this.numbers.value(stats.q3) },\n { label: this.medianName(), value: this.numbers.value(stats.median) },\n { label: this.q1Name(), value: this.numbers.value(stats.q1) },\n { label: this.lowerName(), value: this.numbers.value(stats.min) },\n ];\n if (stats.outliers.length > 0) {\n const shown = stats.outliers.slice(0, TOOLTIP_OUTLIERS).map(value => this.numbers.value(value));\n const rest = stats.outliers.length - shown.length;\n if (rest > 0) shown.push(this.moreOutliers({ count: this.counts.format(rest) }));\n shown.forEach((value, i) => rows.push({ label: i === 0 ? this.outliersName() : '', value }));\n }\n return { datum: { label: group.label, value: '', color: group.color, rows }, anchor };\n });\n\n /** The group the tooltip is reading, washed in the drawing. Never one with nothing drawn. */\n protected readonly activeGroup = computed(() => {\n const index = this.tip.active();\n return index !== null && this.drawnGroups()[index]?.marks ? index : null;\n });\n\n /**\n * The figures for `dataTable`: the chart's name as the caption, a row per group headed\n * by its name, and its five numbers ascending, as a five-number summary reads, written\n * as the tooltip writes them. The outliers column appears once any group has an\n * outlier, and lists that group's ascending. A group with nothing to draw has a row of\n * empty cells.\n */\n protected readonly tableData = computed<WrChartTableData>(() => {\n const groups = this.resolvedGroups();\n const withOutliers = groups.some(({ stats }) => (stats?.outliers.length ?? 0) > 0);\n const columns = [this.lowerName(), this.q1Name(), this.medianName(), this.q3Name(), this.upperName()];\n if (withOutliers) columns.push(this.outliersName());\n const value = (v: number): string => this.numbers.value(v);\n return {\n caption: this.resolvedAriaLabel(),\n corner: this.xName(),\n columns,\n groups: [\n {\n rows: groups.map(({ label, stats }) => {\n if (!stats) return { header: label, cells: columns.map(() => '') };\n const cells = [stats.min, stats.q1, stats.median, stats.q3, stats.max].map(value);\n if (withOutliers) cells.push(this.list.format(stats.outliers.map(value)));\n return { header: label, cells };\n }),\n },\n ],\n };\n });\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('charts/boxplot-chart');\n // A summary is drawn as given, so one whose numbers are out of order draws a whisker\n // inside its box, and one with a number that is not finite draws nothing at all —\n // both of which read on screen as data, not as a mistake.\n if (isDevMode()) {\n const warned = new Set<string>();\n effect(() => {\n for (const group of this.groups()) {\n const stats = group.stats;\n if (!stats) continue;\n const five = [stats.min, stats.q1, stats.median, stats.q3, stats.max];\n const problem = !five.every(v => Number.isFinite(v))\n ? 'has a number that is not finite, so it draws nothing'\n : five.some((v, i) => i > 0 && v < five[i - 1])\n ? 'is not in order (min ≤ q1 ≤ median ≤ q3 ≤ max), and is drawn as given'\n : null;\n const message = problem && `the stats of \"${group.label}\" ${problem}.`;\n if (!message || warned.has(message)) continue;\n warned.add(message);\n // eslint-disable-next-line no-console -- dev-mode validation\n console.warn(`[NGWR] <wr-boxplot-chart>: ${message}`);\n }\n });\n }\n }\n\n /**\n * The pointer entered a group's slot. A group with nothing drawn reads as leaving, so a\n * chip open on its neighbour closes after the usual grace rather than at once.\n */\n protected onEnter(index: number, event: MouseEvent): void {\n if (this.drawnGroups()[index]?.marks) this.tip.enter(index);\n else this.tip.leave(event);\n }\n}\n\nexport type { WrBoxplotGroup, WrBoxplotStats } from './types';\n","@let active = activeGroup();\n<!-- Two columns: the value axis' ticks at inline start and the drawing beside them, with\n the axis' name above and the group names under the drawing only, so their\n percentages are the drawing's. -->\n<div class=\"wr-boxplot-chart__body\">\n @if (yLabel()) {\n <div class=\"wr-boxplot-chart__y-title\">{{ yLabel() }}</div>\n }\n\n @if (showGrid()) {\n <!-- In flow, so the column is exactly as wide as the longest label; each one hands\n the stylesheet the y of its own gridline. Hidden, as the drawing is one image:\n its name is what is announced, and the numbers are the data table's. -->\n <div class=\"wr-boxplot-chart__y-axis\" aria-hidden=\"true\">\n @for (tick of yTicks(); track $index) {\n <span class=\"wr-boxplot-chart__y-tick\" [style.--wr-boxplot-chart-y]=\"tick.top\">{{ tick.label }}</span>\n }\n </div>\n }\n\n <div class=\"wr-boxplot-chart__plot\" role=\"img\" [attr.aria-label]=\"resolvedAriaLabel()\" [style.height.px]=\"height()\">\n <!-- Every mark is an element placed by percentage of this box, its width in px or a\n share of its slot: a box keeps its width however tall the plot is, which an SVG\n stretched to the plot would not. Hidden as well as presentational, as the\n scatter's drawing is: `img` already makes it so. -->\n <div class=\"wr-boxplot-chart__drawing\" aria-hidden=\"true\">\n @if (showGrid()) {\n @for (tick of yTicks(); track $index) {\n <span class=\"wr-boxplot-chart__grid-line\" [style.--wr-boxplot-chart-y]=\"tick.top\"></span>\n }\n }\n\n <!-- By position, not by label: two groups may share one. Each slot is the hover\n target for its group, top to bottom, so the pointer need not find a 2px\n whisker. It carries the group's numbers in `data-*`, beside the placement. -->\n @for (g of drawnGroups(); track g.index) {\n <div\n #group\n class=\"wr-boxplot-chart__group\"\n [class.wr-boxplot-chart__group--active]=\"active === g.index\"\n [class.wr-boxplot-chart__group--empty]=\"!g.marks\"\n [style.--wr-boxplot-chart-slot-start]=\"g.start\"\n [style.--wr-boxplot-chart-slot-width]=\"g.slot\"\n [style.--wr-boxplot-chart-group-color]=\"g.color\"\n [attr.data-min]=\"g.stats?.min\"\n [attr.data-q1]=\"g.stats?.q1\"\n [attr.data-median]=\"g.stats?.median\"\n [attr.data-q3]=\"g.stats?.q3\"\n [attr.data-max]=\"g.stats?.max\"\n (mouseenter)=\"onEnter(g.index, $event)\"\n (mouseleave)=\"tip.leave($event)\"\n >\n @if (g.marks; as m) {\n <span\n class=\"wr-boxplot-chart__whisker wr-boxplot-chart__whisker--upper\"\n [style.--wr-boxplot-chart-top]=\"m.upper.top\"\n [style.--wr-boxplot-chart-bottom]=\"m.upper.bottom\"\n ></span>\n <span\n class=\"wr-boxplot-chart__whisker wr-boxplot-chart__whisker--lower\"\n [style.--wr-boxplot-chart-top]=\"m.lower.top\"\n [style.--wr-boxplot-chart-bottom]=\"m.lower.bottom\"\n ></span>\n <span\n class=\"wr-boxplot-chart__cap wr-boxplot-chart__cap--upper\"\n [style.--wr-boxplot-chart-y]=\"m.max\"\n ></span>\n <span\n class=\"wr-boxplot-chart__cap wr-boxplot-chart__cap--lower\"\n [style.--wr-boxplot-chart-y]=\"m.min\"\n ></span>\n <span\n class=\"wr-boxplot-chart__box\"\n [style.--wr-boxplot-chart-top]=\"m.box.top\"\n [style.--wr-boxplot-chart-bottom]=\"m.box.bottom\"\n ></span>\n <span class=\"wr-boxplot-chart__median\" [style.--wr-boxplot-chart-y]=\"m.median\"></span>\n @for (o of m.outliers; track $index) {\n <span\n class=\"wr-boxplot-chart__outlier\"\n [style.--wr-boxplot-chart-y]=\"o.top\"\n [attr.data-value]=\"o.value\"\n ></span>\n }\n <!-- Paints nothing: the span from the topmost mark to the lowest, outliers\n included, which the tooltip points at so its chip covers none of them. -->\n <span\n class=\"wr-boxplot-chart__extent\"\n [style.--wr-boxplot-chart-top]=\"m.extent.top\"\n [style.--wr-boxplot-chart-bottom]=\"m.extent.bottom\"\n ></span>\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Each name is centred under its slot and ellipsised past it; the tooltip and the\n data table carry it whole. -->\n <div class=\"wr-boxplot-chart__x-axis\">\n @for (g of drawnGroups(); track g.index) {\n <span\n class=\"wr-boxplot-chart__x-label\"\n [style.--wr-boxplot-chart-slot-start]=\"g.start\"\n [style.--wr-boxplot-chart-slot-width]=\"g.slot\"\n >{{ g.label }}</span\n >\n }\n </div>\n\n @if (xLabel()) {\n <div class=\"wr-boxplot-chart__x-title\">{{ xLabel() }}</div>\n }\n</div>\n\n@if (dataTable()) {\n <!-- The figures for a screen reader, beside the plot's `img` and never inside it:\n `img` makes everything it holds presentational. Clipped to nothing by its own\n stylesheet, so it takes no room and draws nothing. -->\n <wr-chart-table [data]=\"tableData()\" />\n}\n"],"mappings":";;;;;;;;;;;;;AAUA,MAAM,QAAQ;AAcd,SAAgB,SAAS,QAA2B,GAAS;CAC3D,MAAM,YAAY,OAAO,SAAS,KAAK;CACvC,MAAM,QAAQ,KAAK,MAAM,QAAQ;CACjC,MAAM,QAAQ,KAAK,KAAK,QAAQ;CAChC,OAAO,OAAO,UAAU,WAAW,UAAU,OAAO,SAAS,OAAO;AACtE;AAgBA,SAAgB,aAAa,QAAyB;CACpD,MAAM,SAAS,OAAO,QAAO,UAAS,OAAO,SAAS,KAAK,CAAC,CAAC,CAAC,MAAM,GAAG,MAAM,IAAI,CAAC;CAClF,IAAI,OAAO,WAAW,GAAG,OAAO;CAEhC,MAAM,KAAK,SAAS,QAAQ,GAAI;CAChC,MAAM,SAAS,SAAS,QAAQ,EAAG;CACnC,MAAM,KAAK,SAAS,QAAQ,GAAI;CAChC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AA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,SAAO,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
@@ -1,8 +1,8 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import { Component, DestroyRef, ElementRef, ViewEncapsulation, afterNextRender, afterRenderEffect, computed, inject, input, signal, untracked, viewChild } from "@angular/core";
3
3
  import { coerceBooleanProperty, coerceNumberProperty } from "@angular/cdk/coercion";
4
+ import { clamp, round, wrCheckStyles } from "ngwr/utils";
4
5
  import { readI18nText, useI18nFormatter, useI18nText } from "ngwr/i18n";
5
- import { clamp, round } from "ngwr/utils";
6
6
  import { chartAxis, useChartNumbers } from "ngwr/charts/core";
7
7
  import { useChartTooltip } from "ngwr/popover";
8
8
  /**
@@ -60,6 +60,7 @@ var WrBulletChart = class WrBulletChart {
60
60
  measured = signal(null, ...ngDevMode ? [{ debugName: "measured" }] : /* istanbul ignore next */ []);
61
61
  trackWidth = 0;
62
62
  constructor() {
63
+ if (typeof ngDevMode === "undefined" || ngDevMode) wrCheckStyles("charts/bullet-chart");
63
64
  const destroyRef = inject(DestroyRef);
64
65
  afterNextRender(() => {
65
66
  const track = this.track()?.nativeElement;