@ids-group-ltd/ids-design-system 0.13.3 → 0.14.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 (312) hide show
  1. package/CHANGELOG.md +1104 -14
  2. package/components.md +567 -34
  3. package/design-system.md +9 -0
  4. package/docs/agent/INDEX.md +57 -15
  5. package/docs/agent/charts/chart-colour-which-palette-a-chart-takes.md +1 -1
  6. package/docs/agent/charts/column-series-component.md +8 -0
  7. package/docs/agent/charts/ds-bar-chart.md +6 -1
  8. package/docs/agent/charts/ds-chart-data-table.md +10 -0
  9. package/docs/agent/charts/ds-chart.md +10 -0
  10. package/docs/agent/charts/ds-column-chart.md +5 -1
  11. package/docs/agent/charts/ds-funnel-chart.md +5 -1
  12. package/docs/agent/charts/ds-heatmap-chart.md +20 -0
  13. package/docs/agent/charts/ds-line-chart.md +8 -4
  14. package/docs/agent/charts/{ds-donut-chart.md → ds-pie-chart.md} +10 -6
  15. package/docs/agent/charts/ds-scatter-chart.md +20 -0
  16. package/docs/agent/charts/ds-waterfall-chart.md +20 -0
  17. package/docs/agent/charts/line-series-component.md +8 -0
  18. package/docs/agent/charts/reference-label-component.md +8 -0
  19. package/docs/agent/charts/reference-line-component.md +8 -0
  20. package/docs/agent/charts/series-annotation-component.md +10 -0
  21. package/docs/agent/feedback/ds-alert.md +4 -0
  22. package/docs/agent/feedback/ds-avatar-group.md +4 -0
  23. package/docs/agent/feedback/ds-avatar.md +4 -0
  24. package/docs/agent/feedback/ds-badge.md +4 -0
  25. package/docs/agent/feedback/ds-banner.md +5 -1
  26. package/docs/agent/feedback/ds-bar.md +4 -0
  27. package/docs/agent/feedback/ds-description-item.md +8 -0
  28. package/docs/agent/feedback/ds-description-list.md +8 -0
  29. package/docs/agent/feedback/ds-empty-state.md +4 -0
  30. package/docs/agent/feedback/ds-list-item.md +8 -0
  31. package/docs/agent/feedback/ds-list.md +8 -0
  32. package/docs/agent/feedback/ds-loading-overlay.md +8 -0
  33. package/docs/agent/feedback/ds-skeleton.md +4 -0
  34. package/docs/agent/feedback/ds-spinner.md +4 -0
  35. package/docs/agent/feedback/ds-stat.md +4 -0
  36. package/docs/agent/feedback/ds-status-dot.md +4 -0
  37. package/docs/agent/feedback/ds-tag.md +4 -0
  38. package/docs/agent/feedback/ds-timeline-item.md +8 -0
  39. package/docs/agent/feedback/ds-toast-region.md +8 -0
  40. package/docs/agent/feedback/ds-toast.md +4 -0
  41. package/docs/agent/feedback/ds-tree.md +8 -0
  42. package/docs/agent/forms/ds-autocomplete.md +4 -0
  43. package/docs/agent/forms/ds-button-group.md +8 -0
  44. package/docs/agent/forms/ds-button.md +6 -2
  45. package/docs/agent/forms/ds-checkbox.md +4 -0
  46. package/docs/agent/forms/ds-color-picker.md +8 -0
  47. package/docs/agent/forms/ds-date-picker.md +5 -1
  48. package/docs/agent/forms/ds-dropzone.md +4 -0
  49. package/docs/agent/forms/ds-field-group.md +8 -0
  50. package/docs/agent/forms/ds-filter-bar.md +8 -0
  51. package/docs/agent/forms/ds-icon-button.md +4 -0
  52. package/docs/agent/forms/ds-input.md +13 -1
  53. package/docs/agent/forms/ds-multi-select.md +4 -0
  54. package/docs/agent/forms/ds-number-stepper.md +4 -0
  55. package/docs/agent/forms/ds-otp-input.md +8 -0
  56. package/docs/agent/forms/ds-password-rules.md +8 -0
  57. package/docs/agent/forms/ds-radio-group.md +8 -0
  58. package/docs/agent/forms/ds-radio.md +4 -0
  59. package/docs/agent/forms/ds-search.md +5 -1
  60. package/docs/agent/forms/ds-segmented.md +8 -0
  61. package/docs/agent/forms/ds-select.md +4 -0
  62. package/docs/agent/forms/ds-slider.md +8 -0
  63. package/docs/agent/forms/ds-split-button.md +8 -0
  64. package/docs/agent/forms/ds-switch.md +7 -1
  65. package/docs/agent/forms/ds-textarea.md +6 -1
  66. package/docs/agent/forms/ds-time-picker.md +8 -0
  67. package/docs/agent/forms/ds-toggle-button.md +8 -0
  68. package/docs/agent/forms/filter-item-directive.md +8 -0
  69. package/docs/agent/forms/the-picker-family-ds-select-ds-multi-select-ds-autocomplete.md +4 -0
  70. package/docs/agent/navigation/ds-app-layout.md +6 -2
  71. package/docs/agent/navigation/ds-auth-layout.md +5 -1
  72. package/docs/agent/navigation/ds-breadcrumbs.md +4 -0
  73. package/docs/agent/navigation/ds-container.md +8 -0
  74. package/docs/agent/navigation/ds-divider.md +4 -0
  75. package/docs/agent/navigation/ds-inline.md +8 -0
  76. package/docs/agent/navigation/ds-page-footer.md +4 -0
  77. package/docs/agent/navigation/ds-page-header.md +5 -1
  78. package/docs/agent/navigation/ds-pagination.md +5 -1
  79. package/docs/agent/navigation/ds-sidenav-footer.md +8 -0
  80. package/docs/agent/navigation/ds-sidenav-group.md +4 -0
  81. package/docs/agent/navigation/ds-sidenav-item.md +4 -0
  82. package/docs/agent/navigation/ds-sidenav.md +4 -0
  83. package/docs/agent/navigation/ds-stack.md +8 -0
  84. package/docs/agent/navigation/ds-stepper.md +4 -0
  85. package/docs/agent/navigation/ds-tab.md +8 -0
  86. package/docs/agent/navigation/ds-tabs.md +5 -1
  87. package/docs/agent/overlays/ds-bottom-sheet.md +4 -0
  88. package/docs/agent/overlays/ds-drawer.md +4 -0
  89. package/docs/agent/overlays/ds-menu.md +4 -0
  90. package/docs/agent/overlays/ds-modal-card.md +4 -0
  91. package/docs/agent/overlays/ds-modal.md +4 -0
  92. package/docs/agent/overlays/ds-popover.md +4 -0
  93. package/docs/agent/overlays/ds-tooltip-panel.md +8 -0
  94. package/docs/agent/overlays/ds-tooltip.md +4 -0
  95. package/docs/agent/platform/ds-config.md +2 -1
  96. package/docs/agent/surfaces/ds-accordion-item.md +8 -0
  97. package/docs/agent/surfaces/ds-accordion.md +4 -0
  98. package/docs/agent/surfaces/ds-card.md +6 -2
  99. package/docs/agent/tables/ds-cell-template.md +8 -0
  100. package/docs/agent/tables/ds-table-columns.md +8 -0
  101. package/docs/agent/tables/ds-table-export.md +8 -0
  102. package/docs/agent/tables/ds-table.md +12 -4
  103. package/docs/agent/tables/header-filter-directive.md +8 -0
  104. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +4 -4
  105. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
  106. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +10 -8
  107. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
  108. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +19 -19
  109. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
  110. package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs +2 -2
  111. package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs.map +1 -1
  112. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +7 -6
  113. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
  114. package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +2 -2
  115. package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -1
  116. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +9 -6
  117. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
  118. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +140 -43
  119. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
  120. package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs +2 -2
  121. package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs.map +1 -1
  122. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +3 -3
  123. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -1
  124. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +7 -3
  125. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
  126. package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs +2 -2
  127. package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs.map +1 -1
  128. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-data-table.mjs +42 -0
  129. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-data-table.mjs.map +1 -0
  130. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +2 -2
  131. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
  132. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +39 -14
  133. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
  134. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +727 -93
  135. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
  136. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +2 -2
  137. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
  138. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +8 -6
  139. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
  140. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +29 -12
  141. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
  142. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +5 -3
  143. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
  144. package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +4 -4
  145. package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -1
  146. package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +23 -16
  147. package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -1
  148. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +2 -2
  149. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
  150. package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +2 -2
  151. package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
  152. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +1 -1
  153. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -1
  154. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +25 -24
  155. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
  156. package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs +217 -0
  157. package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -0
  158. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +2 -2
  159. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
  160. package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs +2 -2
  161. package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs.map +1 -1
  162. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +183 -501
  163. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
  164. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +2 -2
  165. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -1
  166. package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs +2 -2
  167. package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs.map +1 -1
  168. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +2 -2
  169. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
  170. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +44 -8
  171. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
  172. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +7 -5
  173. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
  174. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +2 -2
  175. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
  176. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +2 -2
  177. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
  178. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +2 -2
  179. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -1
  180. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +22 -3
  181. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
  182. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +382 -0
  183. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -0
  184. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +5 -3
  185. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
  186. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +2 -2
  187. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
  188. package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +322 -0
  189. package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -0
  190. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +6 -2
  191. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
  192. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +9 -4
  193. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
  194. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +7 -5
  195. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
  196. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +2 -2
  197. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -1
  198. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +2 -2
  199. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
  200. package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs +23 -4
  201. package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs.map +1 -1
  202. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +2 -2
  203. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
  204. package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs +2 -2
  205. package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs.map +1 -1
  206. package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +2 -2
  207. package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -1
  208. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +20 -5
  209. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
  210. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +6 -6
  211. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -1
  212. package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +4 -1
  213. package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -1
  214. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +36 -28
  215. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  216. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +2 -2
  217. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -1
  218. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +2 -2
  219. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -1
  220. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +23 -2
  221. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
  222. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +5 -3
  223. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
  224. package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +2 -2
  225. package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -1
  226. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +34 -21
  227. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
  228. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +2 -2
  229. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
  230. package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs +252 -0
  231. package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs.map +1 -0
  232. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +361 -17
  233. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  234. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +2 -3
  235. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  236. package/fesm2022/ids-group-ltd-ids-design-system.mjs +7 -3
  237. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  238. package/migrations/0.10.0.json +2 -2
  239. package/migrations/0.10.1.json +3 -3
  240. package/migrations/0.10.2.json +8 -28
  241. package/migrations/0.11.0.json +3 -3
  242. package/migrations/0.11.1.json +15 -15
  243. package/migrations/0.11.2.json +9 -9
  244. package/migrations/0.11.3.json +1 -1
  245. package/migrations/0.11.4.json +8 -8
  246. package/migrations/0.12.1.json +1 -1
  247. package/migrations/0.12.2.json +5 -2
  248. package/migrations/0.12.3.json +3 -3
  249. package/migrations/0.13.0.json +24 -32
  250. package/migrations/0.13.1.json +5 -5
  251. package/migrations/0.13.3.json +32 -10
  252. package/migrations/0.13.4.json +2492 -0
  253. package/migrations/0.14.0.json +591 -0
  254. package/migrations/0.5.0.json +11 -5
  255. package/migrations/0.7.0.json +5 -2
  256. package/migrations/0.8.0.json +4 -3
  257. package/migrations/0.9.0.json +6 -3
  258. package/migrations/README.md +7 -2
  259. package/package.json +41 -9
  260. package/styles/_chart-frame.scss +19 -6
  261. package/styles/_chart-motion.scss +17 -10
  262. package/styles/_check-box.scss +12 -12
  263. package/styles/_dropdown-overlay.scss +14 -10
  264. package/styles/_field-box.scss +3 -3
  265. package/styles/_field-label.scss +7 -7
  266. package/styles/_overlay-motion.scss +15 -7
  267. package/styles/_skeleton-shimmer.scss +4 -1
  268. package/styles/_table-controls.scss +3 -3
  269. package/styles/_tokens-charts.scss +40 -7
  270. package/styles/_tokens.scss +3 -3
  271. package/styles/_typography.scss +101 -101
  272. package/themes/dark/_theme.scss +13 -0
  273. package/types/ids-group-ltd-ids-design-system-components-accordion.d.ts +3 -3
  274. package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +5 -4
  275. package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +17 -17
  276. package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +3 -1
  277. package/types/ids-group-ltd-ids-design-system-components-banner.d.ts +4 -2
  278. package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +40 -9
  279. package/types/ids-group-ltd-ids-design-system-components-bottom-sheet.d.ts +1 -1
  280. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +8 -4
  281. package/types/ids-group-ltd-ids-design-system-components-chart-data-table.d.ts +34 -0
  282. package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +15 -3
  283. package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +345 -60
  284. package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +3 -1
  285. package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +8 -2
  286. package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +9 -7
  287. package/types/ids-group-ltd-ids-design-system-components-dropzone.d.ts +4 -4
  288. package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +8 -7
  289. package/types/ids-group-ltd-ids-design-system-components-heatmap-chart.d.ts +124 -0
  290. package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +88 -139
  291. package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +4 -0
  292. package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +3 -1
  293. package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +18 -1
  294. package/types/{ids-group-ltd-ids-design-system-components-donut-chart.d.ts → ids-group-ltd-ids-design-system-components-pie-chart.d.ts} +25 -23
  295. package/types/ids-group-ltd-ids-design-system-components-popover.d.ts +3 -1
  296. package/types/ids-group-ltd-ids-design-system-components-scatter-chart.d.ts +189 -0
  297. package/types/ids-group-ltd-ids-design-system-components-search.d.ts +2 -0
  298. package/types/ids-group-ltd-ids-design-system-components-segmented.d.ts +5 -1
  299. package/types/ids-group-ltd-ids-design-system-components-select.d.ts +3 -1
  300. package/types/ids-group-ltd-ids-design-system-components-skeleton.d.ts +1 -0
  301. package/types/ids-group-ltd-ids-design-system-components-switch.d.ts +10 -1
  302. package/types/ids-group-ltd-ids-design-system-components-table-export.d.ts +3 -0
  303. package/types/ids-group-ltd-ids-design-system-components-table.d.ts +44 -33
  304. package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +13 -0
  305. package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +3 -1
  306. package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +5 -2
  307. package/types/ids-group-ltd-ids-design-system-components-waterfall-chart.d.ts +116 -0
  308. package/types/ids-group-ltd-ids-design-system-components.d.ts +142 -6
  309. package/types/ids-group-ltd-ids-design-system-core.d.ts +42 -10
  310. package/types/ids-group-ltd-ids-design-system.d.ts +14 -10
  311. package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs +0 -382
  312. package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs.map +0 -1
@@ -1,34 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, output, signal, numberAttribute, computed, model, inject, ElementRef, contentChild, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
- import { tickValues, niceDomain, roundStepAtLeast, pointScale, linearScale, defaultChartFormat, CHART_SERIES_COLORS, staggerDelay, lineSegments, areaPath, polylinePoints, nextRovingIndex, focusMark, describeSeries } from '@ids-group-ltd/ids-design-system/components';
2
+ import { input, booleanAttribute, output, numberAttribute, computed, model, signal, contentChild, viewChild, inject, ElementRef, afterNextRender, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
+ import { resolveChartDefaults, CHART_SERIES_COLORS, formatPercent, describeSeries } from '@ids-group-ltd/ids-design-system/components';
4
4
  import { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';
5
- import { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';
6
- import { ChartTooltipDirective } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';
5
+ import { stackOffsets, ChartComponent, chartViewHeight, CHART_DEFAULT_VALUE_SPACE, LineSeriesComponent, SeriesAnnotationComponent } from '@ids-group-ltd/ids-design-system/components/chart';
7
6
  import { ChartLegendComponent } from '@ids-group-ltd/ids-design-system/components/chart-legend';
7
+ import { ChartDataTableComponent } from '@ids-group-ltd/ids-design-system/components/chart-data-table';
8
8
 
9
- const LINE_CHART_VIEW_WIDTH = 640;
10
- const LINE_CHART_VIEW_HEIGHT = 320;
11
9
  const LINE_CHART_DEFAULT_TICK_COUNT = 5;
12
- const LINE_CHART_AXIS_LABEL_GAP = 8;
13
- const AXIS_GUTTER = 46;
14
- const BARE_EDGE_GUTTER = 12;
15
- const PLOT_TOP = 14;
16
- const CATEGORY_GUTTER = 30;
17
- const CATEGORY_LABEL_OFFSET = 18;
18
- const STACKED_PLOT_GAP = 34;
19
- const MAX_CATEGORY_LABELS = 12;
20
- const TICK_DECIMALS = 6;
21
- function roundTo(value, decimals) {
22
- if (!Number.isFinite(value)) {
23
- return 0;
24
- }
25
- return Number(value.toFixed(decimals));
26
- }
27
- function normalizeTickCount(tickCount) {
28
- return Number.isFinite(tickCount) && tickCount >= 1
29
- ? Math.floor(tickCount)
30
- : LINE_CHART_DEFAULT_TICK_COUNT;
31
- }
32
10
  /** One reading per category, however long the series actually was. A series longer
33
11
  * than `categories` loses its tail and a shorter one ends early: a line that stops
34
12
  * short is a defect the reader can see, while a thrown error takes down the page
@@ -46,9 +24,9 @@ function alignSeriesValues(data, categoryCount, gaps) {
46
24
  }
47
25
  return aligned;
48
26
  }
49
- /** Largest finite reading across the given series, or zero. Never negative: the
50
- * tick helpers only describe axes that start at zero, and a negative domain there
51
- * is a division waiting to happen. */
27
+ /** Largest finite reading across the given series, or zero. Never negative: this
28
+ * feeds the ceiling handed to `ds-chart`, which raises its domain and never lowers
29
+ * it, so a negative here would pin an axis below its own data. */
52
30
  function domainMaxOf(valueGroups) {
53
31
  let max = 0;
54
32
  for (const values of valueGroups) {
@@ -60,123 +38,6 @@ function domainMaxOf(valueGroups) {
60
38
  }
61
39
  return max;
62
40
  }
63
- function nicedAxis(domainMax, tickCount) {
64
- return {
65
- max: niceDomain(0, domainMax, tickCount).max,
66
- ticks: tickValues(0, domainMax, tickCount),
67
- };
68
- }
69
- /** Both y axes, as the four modes define them. `'rounded'` and `'exact'` share the
70
- * primary's gridlines and differ only in the step they divide the secondary domain
71
- * by: `'rounded'` snaps the step up to a round number and overshoots the data,
72
- * `'exact'` takes the domain itself and lands on it. `'independent'` and
73
- * `'stacked'` nice each axis on its own — stacked plots sit one above the other,
74
- * so there is nothing to align. */
75
- function axisLayout(primaryDomainMax, secondaryDomainMax, mode, tickCount) {
76
- const count = normalizeTickCount(tickCount);
77
- const primary = nicedAxis(primaryDomainMax, count);
78
- if (secondaryDomainMax === null) {
79
- return { primary, secondary: null, alignedTicks: true };
80
- }
81
- const intervals = primary.ticks.length - 1;
82
- const canAlign = (mode === 'rounded' || mode === 'exact') &&
83
- intervals >= 1 &&
84
- Number.isFinite(secondaryDomainMax) &&
85
- secondaryDomainMax > 0;
86
- if (!canAlign) {
87
- return {
88
- primary,
89
- secondary: nicedAxis(secondaryDomainMax, count),
90
- alignedTicks: false,
91
- };
92
- }
93
- const step = mode === 'rounded'
94
- ? roundStepAtLeast(secondaryDomainMax / intervals)
95
- : secondaryDomainMax / intervals;
96
- if (step <= 0) {
97
- return { primary, secondary: { max: 0, ticks: [0] }, alignedTicks: true };
98
- }
99
- const ticks = [];
100
- for (let index = 0; index <= intervals; index++) {
101
- ticks.push(roundTo(step * index, TICK_DECIMALS));
102
- }
103
- return {
104
- primary,
105
- secondary: { max: roundTo(step * intervals, TICK_DECIMALS), ticks },
106
- alignedTicks: true,
107
- };
108
- }
109
- function chartLayout(mode, hasSecondaryAxis) {
110
- const stacked = mode === 'stacked' && hasSecondaryAxis;
111
- const left = AXIS_GUTTER;
112
- const right = hasSecondaryAxis && !stacked ? AXIS_GUTTER : BARE_EDGE_GUTTER;
113
- const width = LINE_CHART_VIEW_WIDTH - left - right;
114
- const plotBottom = LINE_CHART_VIEW_HEIGHT - CATEGORY_GUTTER;
115
- const categoryLabelY = plotBottom + CATEGORY_LABEL_OFFSET;
116
- if (!stacked) {
117
- const plot = {
118
- left,
119
- top: PLOT_TOP,
120
- width,
121
- height: plotBottom - PLOT_TOP,
122
- };
123
- return {
124
- primaryPlot: plot,
125
- secondaryPlot: plot,
126
- categoryLabelY,
127
- stacked: false,
128
- };
129
- }
130
- const height = (plotBottom - PLOT_TOP - STACKED_PLOT_GAP) / 2;
131
- return {
132
- primaryPlot: { left, top: PLOT_TOP, width, height },
133
- secondaryPlot: {
134
- left,
135
- top: PLOT_TOP + height + STACKED_PLOT_GAP,
136
- width,
137
- height,
138
- },
139
- categoryLabelY,
140
- stacked: true,
141
- };
142
- }
143
- function categoryCenters(count, plot) {
144
- const total = Number.isFinite(count) && count > 0 ? Math.floor(count) : 0;
145
- const scale = pointScale(total, plot.width);
146
- const centers = [];
147
- for (let index = 0; index < total; index++) {
148
- centers.push(plot.left + scale.position(index));
149
- }
150
- return centers;
151
- }
152
- /** The y a reading sits at, always inside the plot. The clamp is what keeps a
153
- * negative reading — which no zero-based axis can place — off the category labels
154
- * below, and the finite test is what stops an unplottable one becoming `NaN`. */
155
- function valueY(value, axisMax, plot) {
156
- const baseline = plot.top + plot.height;
157
- const y = baseline - linearScale(0, axisMax, plot.height)(value);
158
- if (!Number.isFinite(y)) {
159
- return baseline;
160
- }
161
- return Math.min(Math.max(y, plot.top), baseline);
162
- }
163
- function seriesPoints(values, axisMax, plot, centers) {
164
- return values.map((value, index) => {
165
- const x = centers[index];
166
- if (value === null || !Number.isFinite(value) || !Number.isFinite(x)) {
167
- return null;
168
- }
169
- return { categoryIndex: index, x, y: valueY(value, axisMax, plot), value };
170
- });
171
- }
172
- /** Show every nth category label. Every label at 60 categories is a grey smear, and
173
- * the axis stops saying anything at all. */
174
- function categoryLabelStride(count, maxLabels = MAX_CATEGORY_LABELS) {
175
- if (!Number.isFinite(count) || count <= 0 || maxLabels < 1) {
176
- return 1;
177
- }
178
- return Math.max(1, Math.ceil(count / maxLabels));
179
- }
180
41
  function paletteIndexFor(slot, index, paletteSize) {
181
42
  if (!Number.isFinite(paletteSize) || paletteSize < 1) {
182
43
  return 0;
@@ -187,11 +48,8 @@ function paletteIndexFor(slot, index, paletteSize) {
187
48
  return ((chosen % paletteSize) + paletteSize) % paletteSize;
188
49
  }
189
50
 
190
- // Long enough to cross the gap between the plot and its panel at an ordinary pointer speed.
191
- // View units between a reading and the label above it, and the margin inside which a label
192
- // anchors to its own edge instead of centring. Both in the 640x320 viewBox.
193
- const ANNOTATION_GAP = 12;
194
- const ANNOTATION_EDGE_GUARD = 48;
51
+ /** Matches `--ds-line-chart-plot-height`, for the frame before the first style read and for SSR. */
52
+ const DEFAULT_PLOT_HEIGHT = 240;
195
53
  // One dash per palette slot, in the same order the colours are. Slot 1 stays solid so a
196
54
  // single-series chart is unchanged by turning patterns on.
197
55
  const SERIES_DASH_ARRAYS = [
@@ -204,9 +62,6 @@ const SERIES_DASH_ARRAYS = [
204
62
  '4 2',
205
63
  '14 5',
206
64
  ];
207
- function baselineOf(plot) {
208
- return plot.top + plot.height;
209
- }
210
65
  class LineChartComponent {
211
66
  /** X labels. Every series' `data` is read against this length. */
212
67
  categories = input.required(...(ngDevMode ? [{ debugName: "categories" }] : /* istanbul ignore next */ []));
@@ -214,9 +69,12 @@ class LineChartComponent {
214
69
  * loses its tail and a shorter one ends early. */
215
70
  series = input.required(...(ngDevMode ? [{ debugName: "series" }] : /* istanbul ignore next */ []));
216
71
  /** How a secondary axis relates to the primary one. */
217
- yAxisMode = input('rounded', ...(ngDevMode ? [{ debugName: "yAxisMode" }] : /* istanbul ignore next */ []));
72
+ yAxisMode = input('aligned', ...(ngDevMode ? [{ debugName: "yAxisMode" }] : /* istanbul ignore next */ []));
218
73
  /** Draws a dot at every reading. Off, the dots appear on hover and on focus only. */
219
74
  showMarkers = input(true, { ...(ngDevMode ? { debugName: "showMarkers" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
75
+ /** Lays the lines and their markers on a band of the surface colour. Off where the plot holds
76
+ * nothing for them to cross and the band only separates them from the gridlines. */
77
+ outline = input(true, { ...(ngDevMode ? { debugName: "outline" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
220
78
  /** Labels pinned over their readings, for the points that have to read without a pointer. They
221
79
  * are drawn, not announced: the data table already carries every reading, and repeating one in
222
80
  * the plot makes a screen reader say it twice. */
@@ -235,7 +93,6 @@ class LineChartComponent {
235
93
  * crosshair left standing after the pointer has gone needs a reader who knows why. `pointClicked`
236
94
  * fires either way — pinning is a state, not a handler. */
237
95
  pinOnClick = input(false, { ...(ngDevMode ? { debugName: "pinOnClick" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
238
- pinnedCategory = signal(false, ...(ngDevMode ? [{ debugName: "pinnedCategory" }] : /* istanbul ignore next */ []));
239
96
  /** Dims every OTHER mark while one is hovered or focused, so the reader's eye is held on the
240
97
  * one under the pointer. Off by default: the dimming costs the separation BETWEEN the dimmed
241
98
  * marks — measured 2026-09-13, the worst pair of three dimmed series falls from dE 14.8 at full
@@ -245,6 +102,18 @@ class LineChartComponent {
245
102
  /** What a `null` reading draws. The default refuses to assert that a missing
246
103
  * reading is a zero. */
247
104
  gaps = input('break', ...(ngDevMode ? [{ debugName: "gaps" }] : /* istanbul ignore next */ []));
105
+ /** How the line joins its readings. `'linear'` by default, which asserts nothing the data does
106
+ * not say; a curve is a claim about what happened BETWEEN two readings. */
107
+ curve = input('linear', ...(ngDevMode ? [{ debugName: "curve" }] : /* istanbul ignore next */ []));
108
+ /** How several series share the value axis. Stacking runs per AXIS, so a series on the secondary
109
+ * axis never piles onto one measured against the primary. */
110
+ stack = input('none', ...(ngDevMode ? [{ debugName: "stack" }] : /* istanbul ignore next */ []));
111
+ /** Names the first axis's unit beside it. On a plot carrying two scales the colour says which
112
+ * line reads which axis and this says what the numbers ARE - and a reader who has neither is
113
+ * left comparing two quantities that may not be comparable at all. */
114
+ yAxisLabel = input(null, ...(ngDevMode ? [{ debugName: "yAxisLabel" }] : /* istanbul ignore next */ []));
115
+ /** `yAxisLabel` for the second axis. */
116
+ secondaryAxisLabel = input(null, ...(ngDevMode ? [{ debugName: "secondaryAxisLabel" }] : /* istanbul ignore next */ []));
248
117
  /** How many value-axis ticks to aim for. A hint, not a count: ticks snap to a round step, so
249
118
  * the axis may carry one more or one fewer. */
250
119
  tickCount = input(LINE_CHART_DEFAULT_TICK_COUNT, { ...(ngDevMode ? { debugName: "tickCount" } : /* istanbul ignore next */ {}), transform: numberAttribute });
@@ -301,12 +170,12 @@ class LineChartComponent {
301
170
  * included. Unset falls back to `DS_CONFIG.chart.valueFormat`, then the browser's locale
302
171
  * grouping with a K/M/B suffix past four digits. */
303
172
  valueFormat = input(null, ...(ngDevMode ? [{ debugName: "valueFormat" }] : /* istanbul ignore next */ []));
304
- frameResolved = resolveWithConfig(this.frame, (config) => config.chart?.frame, 'auto');
305
- dataTableResolved = resolveWithConfig(this.dataTable, (config) => config.chart?.dataTable, 'none');
306
- emptyTextResolved = resolveWithConfig(this.emptyText, (config) => config.chart?.emptyText, 'No data');
307
- errorTextResolved = resolveWithConfig(this.errorText, (config) => config.chart?.errorText, 'Could not load the data');
308
- valueFormatResolved = resolveWithConfig(this.valueFormat, (config) => config.chart?.valueFormat, defaultChartFormat);
309
- viewBox = `0 0 ${LINE_CHART_VIEW_WIDTH} ${LINE_CHART_VIEW_HEIGHT}`;
173
+ defaults = resolveChartDefaults(this);
174
+ frameResolved = this.defaults.frame;
175
+ dataTableResolved = this.defaults.dataTable;
176
+ emptyTextResolved = this.defaults.emptyText;
177
+ errorTextResolved = this.defaults.errorText;
178
+ valueFormatResolved = this.defaults.valueFormat;
310
179
  resolvedSeries = computed(() => {
311
180
  const categoryCount = this.categories().length;
312
181
  const gaps = this.gaps();
@@ -316,6 +185,7 @@ class LineChartComponent {
316
185
  return {
317
186
  series,
318
187
  values: alignSeriesValues(series.data, categoryCount, gaps),
188
+ lowerValues: null,
319
189
  onSecondaryAxis: series.axis === 'secondary',
320
190
  color: CHART_SERIES_COLORS[slot],
321
191
  dash: patterns ? SERIES_DASH_ARRAYS[slot] : null,
@@ -349,209 +219,63 @@ class LineChartComponent {
349
219
  * all; `40` is the documented non-zero step. The total is capped, so a long list of series does
350
220
  * not crawl in. */
351
221
  staggerMs = input(0, { ...(ngDevMode ? { debugName: "staggerMs" } : /* istanbul ignore next */ {}), transform: numberAttribute });
352
- markStagger(index) {
353
- return `${staggerDelay(index, this.staggerMs())}ms`;
354
- }
355
222
  highlightedSeries = signal(null, ...(ngDevMode ? [{ debugName: "highlightedSeries" }] : /* istanbul ignore next */ []));
223
+ /** Every series with its band's own span, stacked per axis. Hiding a series does NOT re-pile the
224
+ * rest, for the same reason `rescaleOnHide` defaults off: switching one off must not move the
225
+ * ones still drawn. A `null` stays a hole in the line and contributes nothing to the pile. */
226
+ stackedSeries = computed(() => {
227
+ const mode = this.stack();
228
+ const entries = this.resolvedSeries();
229
+ if (mode === 'none') {
230
+ return entries;
231
+ }
232
+ const spans = new Map();
233
+ for (const secondary of [false, true]) {
234
+ const onThisAxis = entries.filter((entry) => entry.onSecondaryAxis === secondary);
235
+ const offsets = stackOffsets(onThisAxis.map((entry) => entry.values.map((value) => value ?? 0)), mode);
236
+ onThisAxis.forEach((entry, index) => spans.set(entry, [...offsets[index]]));
237
+ }
238
+ return entries.map((entry) => {
239
+ const span = spans.get(entry);
240
+ if (!span) {
241
+ return entry;
242
+ }
243
+ return {
244
+ ...entry,
245
+ values: entry.values.map((value, category) => value === null ? null : span[category].to),
246
+ lowerValues: entry.values.map((value, category) => value === null ? null : span[category].from),
247
+ };
248
+ });
249
+ }, ...(ngDevMode ? [{ debugName: "stackedSeries" }] : /* istanbul ignore next */ []));
356
250
  visibleSeries = computed(() => {
357
251
  const hidden = this.hiddenSeries();
358
- return this.resolvedSeries().filter((entry) => !hidden.includes(entry.series.id));
252
+ return this.stackedSeries().filter((entry) => !hidden.includes(entry.series.id));
359
253
  }, ...(ngDevMode ? [{ debugName: "visibleSeries" }] : /* istanbul ignore next */ []));
360
254
  legendItems = computed(() => this.resolvedSeries().map((entry) => ({
361
255
  id: entry.series.id,
362
256
  label: entry.series.label,
363
257
  color: entry.color,
364
258
  })), ...(ngDevMode ? [{ debugName: "legendItems" }] : /* istanbul ignore next */ []));
365
- isDimmed(seriesId) {
366
- const highlighted = this.highlightedSeries();
367
- return this.dimOthers() && highlighted !== null && highlighted !== seriesId;
368
- }
369
- hasSecondaryAxis = computed(() => this.visibleSeries().some((entry) => entry.onSecondaryAxis), ...(ngDevMode ? [{ debugName: "hasSecondaryAxis" }] : /* istanbul ignore next */ []));
370
- layout = computed(() => chartLayout(this.yAxisMode(), this.hasSecondaryAxis()), ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
371
- axes = computed(() => {
372
- // The axis is scaled from every series unless `rescaleOnHide` says otherwise, so switching one
373
- // off does not move the gridlines under the ones still drawn.
374
- const entries = this.rescaleOnHide()
375
- ? this.visibleSeries()
376
- : this.resolvedSeries();
377
- const valuesOn = (secondary) => entries
378
- .filter((entry) => entry.onSecondaryAxis === secondary)
379
- .map((entry) => entry.values);
380
- // The pin raises the axis, never lowers it: a maximum under the data would push readings off
381
- // the top of the plot, and a chart that hides a value is worse than one with headroom.
382
- const pinned = (asked, derived) => asked !== null && Number.isFinite(asked) && asked > derived
383
- ? asked
384
- : derived;
385
- return axisLayout(pinned(this.max(), domainMaxOf(valuesOn(false))), this.hasSecondaryAxis()
386
- ? pinned(this.maxSecondary(), domainMaxOf(valuesOn(true)))
387
- : null, this.yAxisMode(), this.tickCount());
388
- }, ...(ngDevMode ? [{ debugName: "axes" }] : /* istanbul ignore next */ []));
389
- categoryPositions = computed(() => categoryCenters(this.categories().length, this.layout().primaryPlot), ...(ngDevMode ? [{ debugName: "categoryPositions" }] : /* istanbul ignore next */ []));
390
- plottedSeries = computed(() => {
391
- const axes = this.axes();
392
- const centers = this.categoryPositions();
393
- return this.visibleSeries().map((entry) => {
394
- const plot = this.plotFor(entry.onSecondaryAxis);
395
- const axisMax = entry.onSecondaryAxis && axes.secondary
396
- ? axes.secondary.max
397
- : axes.primary.max;
398
- const segments = lineSegments(seriesPoints(entry.values, axisMax, plot, centers));
399
- const baselineY = plot.top + plot.height;
400
- return {
401
- ...entry,
402
- polylines: segments
403
- .map((segment) => polylinePoints(segment))
404
- .filter((points) => points.length > 0),
405
- areaPaths: entry.series.area
406
- ? segments
407
- .map((segment) => areaPath(segment, baselineY))
408
- .filter((path) => path.length > 0)
409
- : [],
410
- markers: segments.flat(),
411
- };
412
- });
413
- }, ...(ngDevMode ? [{ debugName: "plottedSeries" }] : /* istanbul ignore next */ []));
414
- /** Annotations resolved onto the markers the plot already computed, so a label sits exactly on
415
- * its reading and moves with it. One whose series is hidden or whose reading is missing has no
416
- * marker and is dropped — a hidden series must not leave its label floating over the plot. */
417
- placedAnnotations = computed(() => {
418
- const plotted = this.plottedSeries();
419
- return this.annotations().flatMap((annotation) => {
420
- const entry = annotation.seriesId
421
- ? plotted.find((candidate) => candidate.series.id === annotation.seriesId)
422
- : plotted[0];
423
- const marker = entry?.markers.find((candidate) => candidate.categoryIndex === annotation.categoryIndex);
424
- if (!entry || !marker) {
425
- return [];
426
- }
427
- // Anchored away from the plot edges, because a centred label at the first or last category
428
- // hangs half outside the viewBox and is clipped rather than merely tight.
429
- const anchor = marker.x < ANNOTATION_EDGE_GUARD
430
- ? 'start'
431
- : marker.x > LINE_CHART_VIEW_WIDTH - ANNOTATION_EDGE_GUARD
432
- ? 'end'
433
- : 'middle';
434
- return [
435
- {
436
- key: `${entry.series.id}:${annotation.categoryIndex}`,
437
- label: annotation.label,
438
- x: marker.x,
439
- // Above the reading, and below it where there is no room — a peak sits at the top of
440
- // the plot, which is exactly where a label clamped upward lands on its own marker.
441
- y: marker.y - ANNOTATION_GAP >= ANNOTATION_GAP
442
- ? marker.y - ANNOTATION_GAP
443
- : marker.y + ANNOTATION_GAP,
444
- anchor,
445
- },
446
- ];
447
- });
448
- }, ...(ngDevMode ? [{ debugName: "placedAnnotations" }] : /* istanbul ignore next */ []));
449
- primaryTicks = computed(() => this.ticksFor(this.axes().primary.ticks, this.axes().primary.max, false), ...(ngDevMode ? [{ debugName: "primaryTicks" }] : /* istanbul ignore next */ []));
450
- secondaryTicks = computed(() => {
451
- const secondary = this.axes().secondary;
452
- return secondary ? this.ticksFor(secondary.ticks, secondary.max, true) : [];
453
- }, ...(ngDevMode ? [{ debugName: "secondaryTicks" }] : /* istanbul ignore next */ []));
454
- /** Drawn only when the two axes do not share the primary's gridlines, and only
455
- * when the axis has more than the single tick a degenerate domain leaves. */
456
- showSecondaryGridlines = computed(() => !this.axes().alignedTicks && this.secondaryTicks().length > 1, ...(ngDevMode ? [{ debugName: "showSecondaryGridlines" }] : /* istanbul ignore next */ []));
457
- stacked = computed(() => this.layout().stacked, ...(ngDevMode ? [{ debugName: "stacked" }] : /* istanbul ignore next */ []));
458
- categoryLabelY = computed(() => this.layout().categoryLabelY, ...(ngDevMode ? [{ debugName: "categoryLabelY" }] : /* istanbul ignore next */ []));
459
- /** The category under the pointer, or -1. */
460
- host = inject(ElementRef);
461
- activeCategory = signal(-1, ...(ngDevMode ? [{ debugName: "activeCategory" }] : /* istanbul ignore next */ []));
462
- categoryBands = computed(() => pointScale(this.categories().length, this.layout().primaryPlot.width), ...(ngDevMode ? [{ debugName: "categoryBands" }] : /* istanbul ignore next */ []));
463
- // The band is a slot CENTRED on its reading, so it starts half a step before it. At the two ends
464
- // half of that slot is outside the plot, and clamping is what keeps the band off the axis labels
465
- // rather than letting it hang past them.
466
- activeBandX = computed(() => {
467
- const plot = this.layout().primaryPlot;
468
- const scale = this.categoryBands();
469
- const center = plot.left + scale.position(this.activeCategory());
470
- return Math.max(center - scale.step / 2, plot.left);
471
- }, ...(ngDevMode ? [{ debugName: "activeBandX" }] : /* istanbul ignore next */ []));
472
- activeBandWidth = computed(() => {
473
- const plot = this.layout().primaryPlot;
474
- const scale = this.categoryBands();
475
- const center = plot.left + scale.position(this.activeCategory());
476
- const start = Math.max(center - scale.step / 2, plot.left);
477
- const end = Math.min(center + scale.step / 2, plot.left + plot.width);
478
- return Math.max(end - start, 0);
479
- }, ...(ngDevMode ? [{ debugName: "activeBandWidth" }] : /* istanbul ignore next */ []));
480
- activeCategoryX = computed(() => this.activeBandX() + this.activeBandWidth() / 2, ...(ngDevMode ? [{ debugName: "activeCategoryX" }] : /* istanbul ignore next */ []));
481
- onPlotPointer(event) {
482
- const canvas = event.currentTarget;
483
- const screen = canvas.getScreenCTM();
484
- if (!screen) {
485
- return;
486
- }
487
- // Client pixels are not viewBox units — the plot scales to the card's width.
488
- const point = new DOMPoint(event.clientX, event.clientY).matrixTransform(screen.inverse());
489
- const plot = this.layout().primaryPlot;
490
- if (this.pinnedCategory()) {
491
- return;
492
- }
493
- this.cancelCategoryClear();
494
- const category = this.categoryBands().indexAt(point.x - plot.left);
495
- this.activeCategory.set(category);
496
- this.tooltipOrigin.set(this.tooltipAnchor() === 'pointer'
497
- ? { x: event.clientX, y: event.clientY }
498
- : this.readingAnchor(screen, category));
499
- }
500
- /** The highest reading in the category, mapped back into client pixels. Anchoring there rather
501
- * than at the cursor keeps the panel still while the pointer travels within one band, and puts
502
- * it over the readings it names instead of over the finger. */
503
- readingAnchor(screen, category) {
504
- const tops = this.plottedSeries().flatMap((entry) => entry.markers
505
- .filter((marker) => marker.categoryIndex === category)
506
- .map((marker) => marker.y));
507
- const y = tops.length ? Math.min(...tops) : this.layout().primaryPlot.top;
508
- const point = new DOMPoint(this.plotLeft() + this.categoryBands().position(category), y).matrixTransform(screen);
509
- return { x: point.x, y: point.y };
510
- }
511
- clearActiveCategory() {
512
- if (this.pinnedCategory()) {
513
- return;
514
- }
515
- // Same grace the element-mark charts get from `chartActiveMark`: the panel is portaled out of
516
- // the plot, so leaving the plot fires before the pointer can reach it. Clearing at once made
517
- // the panel unreachable, and — because the pane takes pointer events now — put the plot and the
518
- // panel in a loop where each closed the other.
519
- this.cancelCategoryClear();
520
- this.pendingCategoryClear = setTimeout(() => {
521
- this.pendingCategoryClear = null;
522
- this.activeCategory.set(-1);
523
- this.tooltipOrigin.set(null);
524
- }, Math.max(this.tooltipLingerResolved(), 0));
525
- }
526
- /** The panel is portaled to the body, so the plot never sees the pointer arrive on it. This is
527
- * the other half of the grace period: reaching the panel keeps it open, and leaving the panel for
528
- * anything that is not the plot starts the clear the plot can no longer start itself. */
529
- onPointerAnywhere(event) {
530
- if (!(event.target instanceof Element) || this.pinnedCategory()) {
531
- return;
532
- }
533
- if (event.target.closest('.ds-chart-tooltip-pane')) {
534
- this.cancelCategoryClear();
535
- return;
259
+ /** A normalized stack draws shares, not readings, so the axis has to say so - the value a tooltip
260
+ * or the annex table prints stays the reading, which is what `valueFormat` goes on formatting. */
261
+ axisFormat = computed(() => this.stack() === 'normalized'
262
+ ? (value) => formatPercent(value, 1)
263
+ : this.valueFormatResolved(), ...(ngDevMode ? [{ debugName: "axisFormat" }] : /* istanbul ignore next */ []));
264
+ /** Each axis takes the colour of the series measured against it, but only where two scales share
265
+ * one plot: on a single-scale chart it would restate the marks' own colour in the furniture,
266
+ * and under `'split'` the two plots are already apart. The chart knows its own series colours,
267
+ * so this is derived rather than asked for. */
268
+ axisTint = computed(() => {
269
+ if (!this.hasSecondaryAxis() || this.yAxisMode() === 'split') {
270
+ return { primary: null, secondary: null };
536
271
  }
537
- if (this.activeCategory() !== -1 &&
538
- !this.host.nativeElement.contains(event.target)) {
539
- this.clearActiveCategory();
540
- }
541
- }
542
- cancelCategoryClear() {
543
- if (this.pendingCategoryClear !== null) {
544
- clearTimeout(this.pendingCategoryClear);
545
- this.pendingCategoryClear = null;
546
- }
547
- }
548
- tooltipLingerResolved = resolveWithConfig(this.tooltipLingerMs, (config) => config.chart?.tooltipLingerMs, 0);
549
- pendingCategoryClear = null;
550
- releaseCategoryPin() {
551
- this.pinnedCategory.set(false);
552
- this.activeCategory.set(-1);
553
- this.tooltipOrigin.set(null);
554
- }
272
+ const find = (onSecondaryAxis) => this.visibleSeries().find((entry) => entry.onSecondaryAxis === onSecondaryAxis)?.color ?? null;
273
+ return { primary: find(false), secondary: find(true) };
274
+ }, ...(ngDevMode ? [{ debugName: "axisTint" }] : /* istanbul ignore next */ []));
275
+ primaryAxisFill = computed(() => this.axisTint().primary, ...(ngDevMode ? [{ debugName: "primaryAxisFill" }] : /* istanbul ignore next */ []));
276
+ secondaryAxisFill = computed(() => this.axisTint().secondary, ...(ngDevMode ? [{ debugName: "secondaryAxisFill" }] : /* istanbul ignore next */ []));
277
+ stacksSeries = computed(() => this.stack() !== 'none', ...(ngDevMode ? [{ debugName: "stacksSeries" }] : /* istanbul ignore next */ []));
278
+ tooltipLingerResolved = this.defaults.tooltipLingerMs;
555
279
  /** Whether the plot opens a tooltip, and for what. `'axis'` names every series at the
556
280
  * category under the pointer, which is the reading a multi-series line is compared on;
557
281
  * `'item'` names only the marker itself. */
@@ -561,109 +285,14 @@ class LineChartComponent {
561
285
  * so the panel stays put while the pointer moves within one band. `'pointer'` follows the
562
286
  * cursor. */
563
287
  tooltipAnchor = input('point', ...(ngDevMode ? [{ debugName: "tooltipAnchor" }] : /* istanbul ignore next */ []));
564
- tooltipOrigin = signal(null, ...(ngDevMode ? [{ debugName: "tooltipOrigin" }] : /* istanbul ignore next */ []));
565
- /** The series focus is on, or -1 for the whole category. A pointer answers for every
566
- * series at once; a focused marker answers for its own. */
567
- activeSeries = signal(-1, ...(ngDevMode ? [{ debugName: "activeSeries" }] : /* istanbul ignore next */ []));
568
- /** One tab stop PER SERIES, keyed by series id — each line is a strand the reader walks with
569
- * the arrows. WCAG 2.1.1's Understanding is explicit that not every mouse-operable control has
570
- * to be separately focusable, which is what keeps a 12-category, 2-series plot from being
571
- * twenty-four stops in the page's tab order. */
572
- rovingByCategory = signal(new Map(), ...(ngDevMode ? [{ debugName: "rovingByCategory" }] : /* istanbul ignore next */ []));
573
- isTabStop(seriesId, categoryIndex) {
574
- return (this.rovingByCategory().get(seriesId) ?? 0) === categoryIndex;
575
- }
576
- onMarkerFocus(seriesIndex, categoryIndex, event) {
577
- if (event.currentTarget instanceof Element) {
578
- this.tooltipOrigin.set(event.currentTarget);
579
- }
580
- this.activeSeries.set(seriesIndex);
581
- this.activeCategory.set(categoryIndex);
582
- this.setRoving(seriesIndex, categoryIndex);
583
- }
584
- onMarkerNavigation(event, seriesIndex, categoryIndex) {
585
- const markers = this.plottedSeries()[seriesIndex]?.markers ?? [];
586
- const positions = markers.map((marker) => marker.categoryIndex);
587
- const current = positions.indexOf(categoryIndex);
588
- const next = nextRovingIndex(event.key, current, positions.length);
589
- if (next === null) {
590
- return;
591
- }
592
- event.preventDefault();
593
- const nextCategory = positions[next];
594
- this.setRoving(seriesIndex, nextCategory);
595
- focusMark(event.currentTarget.closest('svg'), nextCategory, `[data-series-index="${seriesIndex}"]`);
596
- }
597
- setRoving(seriesIndex, categoryIndex) {
598
- const seriesId = this.plottedSeries()[seriesIndex]?.series.id;
599
- if (seriesId === undefined) {
600
- return;
601
- }
602
- const next = new Map(this.rovingByCategory());
603
- next.set(seriesId, categoryIndex);
604
- this.rovingByCategory.set(next);
605
- }
606
- onMarkerBlur() {
607
- this.activeSeries.set(-1);
608
- this.clearActiveCategory();
609
- }
610
- tooltipContext = computed(() => {
611
- const categoryIndex = this.activeCategory();
612
- const categories = this.categories();
613
- if (this.tooltip() === 'none' ||
614
- categoryIndex < 0 ||
615
- categoryIndex >= categories.length) {
616
- return null;
617
- }
618
- const format = this.valueFormatResolved();
619
- const focusedSeries = this.activeSeries();
620
- const perSeries = this.tooltip() === 'item' || focusedSeries >= 0
621
- ? this.visibleSeries().slice(Math.max(focusedSeries, 0), Math.max(focusedSeries, 0) + 1)
622
- : this.visibleSeries();
623
- return {
624
- category: categories[categoryIndex],
625
- entries: perSeries
626
- .map((entry) => ({ entry, value: entry.values[categoryIndex] }))
627
- .filter((reading) => typeof reading.value === 'number' &&
628
- Number.isFinite(reading.value))
629
- .map(({ entry, value }) => ({
630
- label: entry.series.label,
631
- value,
632
- formatted: format(value, 'tooltip'),
633
- color: entry.color,
634
- })),
635
- };
636
- }, ...(ngDevMode ? [{ debugName: "tooltipContext" }] : /* istanbul ignore next */ []));
637
- plotLeft = computed(() => this.layout().primaryPlot.left, ...(ngDevMode ? [{ debugName: "plotLeft" }] : /* istanbul ignore next */ []));
638
- plotRight = computed(() => this.layout().primaryPlot.left + this.layout().primaryPlot.width, ...(ngDevMode ? [{ debugName: "plotRight" }] : /* istanbul ignore next */ []));
639
- primaryTopY = computed(() => this.layout().primaryPlot.top, ...(ngDevMode ? [{ debugName: "primaryTopY" }] : /* istanbul ignore next */ []));
640
- secondaryTopY = computed(() => this.layout().secondaryPlot.top, ...(ngDevMode ? [{ debugName: "secondaryTopY" }] : /* istanbul ignore next */ []));
641
- primaryBaselineY = computed(() => baselineOf(this.layout().primaryPlot), ...(ngDevMode ? [{ debugName: "primaryBaselineY" }] : /* istanbul ignore next */ []));
642
- secondaryBaselineY = computed(() => baselineOf(this.layout().secondaryPlot), ...(ngDevMode ? [{ debugName: "secondaryBaselineY" }] : /* istanbul ignore next */ []));
643
- /** Where the crosshair stops. Under `'stacked'` the two plots sit one above the other over one
644
- * category axis, so a crosshair that ends at the upper plot's baseline leaves the lower plot —
645
- * the same category, the same pointer — with nothing marked at all. */
646
- cursorBottomY = computed(() => this.stacked() ? this.secondaryBaselineY() : this.primaryBaselineY(), ...(ngDevMode ? [{ debugName: "cursorBottomY" }] : /* istanbul ignore next */ []));
647
- primaryLabelX = computed(() => this.layout().primaryPlot.left - LINE_CHART_AXIS_LABEL_GAP, ...(ngDevMode ? [{ debugName: "primaryLabelX" }] : /* istanbul ignore next */ []));
648
- secondaryLabelX = computed(() => {
649
- const layout = this.layout();
650
- return layout.stacked
651
- ? layout.secondaryPlot.left - LINE_CHART_AXIS_LABEL_GAP
652
- : layout.primaryPlot.left +
653
- layout.primaryPlot.width +
654
- LINE_CHART_AXIS_LABEL_GAP;
655
- }, ...(ngDevMode ? [{ debugName: "secondaryLabelX" }] : /* istanbul ignore next */ []));
656
- secondaryLabelAnchor = computed(() => this.layout().stacked ? 'end' : 'start', ...(ngDevMode ? [{ debugName: "secondaryLabelAnchor" }] : /* istanbul ignore next */ []));
657
- categoryLabels = computed(() => {
658
- const categories = this.categories();
659
- const centers = this.categoryPositions();
660
- const stride = categoryLabelStride(categories.length);
661
- const labels = [];
662
- for (let index = 0; index < categories.length; index += stride) {
663
- labels.push({ x: centers[index], text: categories[index] });
664
- }
665
- return labels;
666
- }, ...(ngDevMode ? [{ debugName: "categoryLabels" }] : /* istanbul ignore next */ []));
288
+ dataTableColumns = computed(() => [
289
+ 'Category',
290
+ ...this.resolvedSeries().map((entry) => entry.series.label),
291
+ ], ...(ngDevMode ? [{ debugName: "dataTableColumns" }] : /* istanbul ignore next */ []));
292
+ dataTableRows = computed(() => this.tableRows().map((row) => ({
293
+ key: row.category,
294
+ cells: [row.category, ...row.cells],
295
+ })), ...(ngDevMode ? [{ debugName: "dataTableRows" }] : /* istanbul ignore next */ []));
667
296
  tableRows = computed(() => {
668
297
  const format = this.valueFormatResolved();
669
298
  return this.categories().map((category, index) => ({
@@ -692,39 +321,100 @@ class LineChartComponent {
692
321
  : ' Full values in the table below.';
693
322
  // The plot's own text is inside an `aria-hidden` svg, so an annotation a sighted reader takes
694
323
  // as the point of the chart would otherwise reach nobody else.
695
- const notes = this.placedAnnotations().map((note) => note.label);
324
+ const notes = this.markAnnotations().map((note) => note.label);
696
325
  const noted = notes.length ? ` Noted: ${notes.join('; ')}.` : '';
697
326
  return sentences.length === 0
698
327
  ? describeSeries(title, [], format, this.dataTableResolved() !== 'none')
699
328
  : `${title}. ${sentences.join(' ')}${noted}${pointer}`;
700
329
  }, ...(ngDevMode ? [{ debugName: "accessibleName" }] : /* istanbul ignore next */ []));
701
- pointOf(entry, marker) {
702
- return {
703
- series: entry.series,
704
- categoryIndex: marker.categoryIndex,
705
- category: this.categories()[marker.categoryIndex] ?? '',
706
- value: marker.value,
707
- };
330
+ plot = viewChild(ChartComponent, ...(ngDevMode ? [{ debugName: "plot" }] : /* istanbul ignore next */ []));
331
+ /** Whether the category cursor is held. Read off the container, which owns the pin now that it
332
+ * owns the cursor. */
333
+ pinnedCategory = computed(() => this.plot()?.cursorPinned() ?? false, ...(ngDevMode ? [{ debugName: "pinnedCategory" }] : /* istanbul ignore next */ []));
334
+ releaseCategoryPin() {
335
+ this.plot()?.releaseCursor();
708
336
  }
709
- markerLabel(entry, marker) {
710
- const point = this.pointOf(entry, marker);
711
- return `${entry.series.label}, ${point.category}, ${this.valueFormatResolved()(marker.value, 'tooltip')}`;
337
+ /** What the series mark draws: the stacked values, the hidden series already filtered out. */
338
+ markSeries = computed(() => this.visibleSeries().map((entry) => ({
339
+ id: entry.series.id,
340
+ label: entry.series.label,
341
+ data: entry.values,
342
+ axis: entry.onSecondaryAxis
343
+ ? 'secondary'
344
+ : 'primary',
345
+ area: entry.series.area,
346
+ lower: entry.lowerValues ?? undefined,
347
+ color: entry.color,
348
+ })), ...(ngDevMode ? [{ debugName: "markSeries" }] : /* istanbul ignore next */ []));
349
+ dashPatterns = computed(() => this.visibleSeries().map((entry) => entry.dash ?? ''), ...(ngDevMode ? [{ debugName: "dashPatterns" }] : /* istanbul ignore next */ []));
350
+ /** The reading each label names, which is what the mark needs: it draws against the scales and
351
+ * never sees the series list. One whose series is hidden or whose reading is missing is
352
+ * dropped rather than left floating over the plot. */
353
+ markAnnotations = computed(() => this.annotations().flatMap((annotation) => {
354
+ const visible = this.visibleSeries();
355
+ const entry = annotation.seriesId
356
+ ? visible.find((candidate) => candidate.series.id === annotation.seriesId)
357
+ : visible[0];
358
+ const value = entry?.values[annotation.categoryIndex];
359
+ if (!entry || typeof value !== 'number') {
360
+ return [];
361
+ }
362
+ return [
363
+ {
364
+ categoryIndex: annotation.categoryIndex,
365
+ value,
366
+ label: annotation.label,
367
+ axis: entry.onSecondaryAxis
368
+ ? 'secondary'
369
+ : 'primary',
370
+ },
371
+ ];
372
+ }), ...(ngDevMode ? [{ debugName: "markAnnotations" }] : /* istanbul ignore next */ []));
373
+ markAnchor = computed(() => this.tooltipAnchor() === 'pointer'
374
+ ? 'pointer'
375
+ : 'reading', ...(ngDevMode ? [{ debugName: "markAnchor" }] : /* istanbul ignore next */ []));
376
+ hasSecondaryAxis = computed(() => this.visibleSeries().some((entry) => entry.onSecondaryAxis), ...(ngDevMode ? [{ debugName: "hasSecondaryAxis" }] : /* istanbul ignore next */ []));
377
+ /** The ceiling handed to the container, which raises its own domain to it and never lowers.
378
+ * Unless `rescaleOnHide` says otherwise it is the maximum across EVERY series, so switching
379
+ * one off does not move the gridlines under the ones still drawn. */
380
+ axisMax = computed(() => this.rescaleOnHide() ? this.max() : this.ceilingOf(false, this.max()), ...(ngDevMode ? [{ debugName: "axisMax" }] : /* istanbul ignore next */ []));
381
+ axisMaxSecondary = computed(() => this.rescaleOnHide()
382
+ ? this.maxSecondary()
383
+ : this.ceilingOf(true, this.maxSecondary()), ...(ngDevMode ? [{ debugName: "axisMaxSecondary" }] : /* istanbul ignore next */ []));
384
+ ceilingOf(onSecondaryAxis, asked) {
385
+ const derived = domainMaxOf(this.stackedSeries()
386
+ .filter((entry) => entry.onSecondaryAxis === onSecondaryAxis)
387
+ .map((entry) => entry.values));
388
+ return asked !== null && Number.isFinite(asked) && asked > derived
389
+ ? asked
390
+ : derived;
712
391
  }
713
- onMarkerKey(entry, marker, event) {
714
- if (!this.interactive() || event.target !== event.currentTarget) {
392
+ /** `--ds-line-chart-plot-height` reaches an SVG coordinate space only as a number, so it is read
393
+ * back off the host rather than applied as CSS. */
394
+ plotHeight = signal(DEFAULT_PLOT_HEIGHT, ...(ngDevMode ? [{ debugName: "plotHeight" }] : /* istanbul ignore next */ []));
395
+ /** Every state occupies the box the plot would have, so nothing on the page moves when the data
396
+ * lands, the request fails or the last series is switched off. */
397
+ viewHeightPx = computed(() => `${chartViewHeight(this.plotHeight(), CHART_DEFAULT_VALUE_SPACE)}px`, ...(ngDevMode ? [{ debugName: "viewHeightPx" }] : /* istanbul ignore next */ []));
398
+ onPointClicked(reading) {
399
+ const series = this.series().find((candidate) => candidate.id === reading.series.id);
400
+ if (!series) {
715
401
  return;
716
402
  }
717
- event.preventDefault();
718
- this.onMarkerClick(entry, marker);
403
+ this.pointClicked.emit({
404
+ series,
405
+ categoryIndex: reading.categoryIndex,
406
+ category: this.categories()[reading.categoryIndex] ?? '',
407
+ value: reading.value,
408
+ });
719
409
  }
720
- /** The pin hangs off the MARKER, not off the plot: the marker is already focusable and already
721
- * answers Enter and Space, so the keyboard gets the pin for free. A click handler on the plot
722
- * would have no keyboard route at all. A second activation of the pinned category releases it. */
723
- onMarkerClick(entry, marker) {
724
- this.pointClicked.emit(this.pointOf(entry, marker));
725
- if (this.pinOnClick()) {
726
- this.pinnedCategory.set(!this.pinnedCategory());
727
- }
410
+ constructor() {
411
+ const host = inject(ElementRef);
412
+ afterNextRender(() => {
413
+ const parsed = Number.parseFloat(getComputedStyle(host.nativeElement).getPropertyValue('--_line-chart-plot-height'));
414
+ if (Number.isFinite(parsed) && parsed > 0) {
415
+ this.plotHeight.set(parsed);
416
+ }
417
+ });
728
418
  }
729
419
  isEmpty = computed(() => this.series().length === 0 || this.categories().length === 0, ...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
730
420
  showLegend = computed(() => this.series().length > 1, ...(ngDevMode ? [{ debugName: "showLegend" }] : /* istanbul ignore next */ []));
@@ -733,31 +423,23 @@ class LineChartComponent {
733
423
  * chart does not resize when the data lands; falls back to three when `series`
734
424
  * is still empty. */
735
425
  skeletonSeries = computed(() => Array.from({ length: Math.max(this.series().length, 3) }), ...(ngDevMode ? [{ debugName: "skeletonSeries" }] : /* istanbul ignore next */ []));
736
- plotFor(onSecondaryAxis) {
737
- const layout = this.layout();
738
- return onSecondaryAxis && layout.stacked
739
- ? layout.secondaryPlot
740
- : layout.primaryPlot;
741
- }
742
- ticksFor(ticks, axisMax, onSecondaryAxis) {
743
- const plot = this.plotFor(onSecondaryAxis);
744
- const format = this.valueFormatResolved();
745
- return ticks.map((value) => ({
746
- y: valueY(value, axisMax, plot),
747
- label: format(value, 'tick'),
748
- }));
749
- }
750
426
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: LineChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
751
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: LineChartComponent, isStandalone: true, selector: "ds-line-chart", inputs: { categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: true, transformFunction: null }, series: { classPropertyName: "series", publicName: "series", isSignal: true, isRequired: true, transformFunction: null }, yAxisMode: { classPropertyName: "yAxisMode", publicName: "yAxisMode", isSignal: true, isRequired: false, transformFunction: null }, showMarkers: { classPropertyName: "showMarkers", publicName: "showMarkers", isSignal: true, isRequired: false, transformFunction: null }, annotations: { classPropertyName: "annotations", publicName: "annotations", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, pinOnClick: { classPropertyName: "pinOnClick", publicName: "pinOnClick", isSignal: true, isRequired: false, transformFunction: null }, dimOthers: { classPropertyName: "dimOthers", publicName: "dimOthers", isSignal: true, isRequired: false, transformFunction: null }, gaps: { classPropertyName: "gaps", publicName: "gaps", isSignal: true, isRequired: false, transformFunction: null }, tickCount: { classPropertyName: "tickCount", publicName: "tickCount", isSignal: true, isRequired: false, transformFunction: null }, frame: { classPropertyName: "frame", publicName: "frame", isSignal: true, isRequired: false, transformFunction: null }, tooltipLingerMs: { classPropertyName: "tooltipLingerMs", publicName: "tooltipLingerMs", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, summary: { classPropertyName: "summary", publicName: "summary", isSignal: true, isRequired: false, transformFunction: null }, dataTable: { classPropertyName: "dataTable", publicName: "dataTable", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, maxSecondary: { classPropertyName: "maxSecondary", publicName: "maxSecondary", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, valueFormat: { classPropertyName: "valueFormat", publicName: "valueFormat", isSignal: true, isRequired: false, transformFunction: null }, hiddenSeries: { classPropertyName: "hiddenSeries", publicName: "hiddenSeries", isSignal: true, isRequired: false, transformFunction: null }, rescaleOnHide: { classPropertyName: "rescaleOnHide", publicName: "rescaleOnHide", isSignal: true, isRequired: false, transformFunction: null }, legendFilters: { classPropertyName: "legendFilters", publicName: "legendFilters", isSignal: true, isRequired: false, transformFunction: null }, legendMode: { classPropertyName: "legendMode", publicName: "legendMode", isSignal: true, isRequired: false, transformFunction: null }, noVisibleSeriesText: { classPropertyName: "noVisibleSeriesText", publicName: "noVisibleSeriesText", isSignal: true, isRequired: false, transformFunction: null }, patterns: { classPropertyName: "patterns", publicName: "patterns", isSignal: true, isRequired: false, transformFunction: null }, staggerMs: { classPropertyName: "staggerMs", publicName: "staggerMs", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, tooltipAnchor: { classPropertyName: "tooltipAnchor", publicName: "tooltipAnchor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pointClicked: "pointClicked", hiddenSeries: "hiddenSeriesChange" }, host: { listeners: { "document:keydown.escape": "releaseCategoryPin()", "document:pointerover": "onPointerAnywhere($event)" }, properties: { "class.framed": "frameResolved() === 'auto'" } }, queries: [{ propertyName: "tooltipTemplate", first: true, predicate: ["dsChartTooltip"], descendants: true, isSignal: true }], ngImport: i0, template: "<figure class=\"line-chart\">\n @if (pinnedCategory()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"releaseCategoryPin()\">\n Unpin\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n <ds-skeleton height=\"var(--_line-chart-plot-height)\" />\n\n @if (skeletonSeries().length > 1) {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonSeries(); track $index) {\n <ds-skeleton\n width=\"var(--space-16)\"\n height=\"var(--space-3)\" />\n }\n </div>\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else if (noVisibleSeries()) {\n <p\n class=\"empty\"\n role=\"status\">\n {{ noVisibleSeriesText() }}\n </p>\n\n <ds-chart-legend\n [items]=\"legendItems()\"\n [toggleable]=\"legendFilters()\"\n [mode]=\"legendMode()\"\n [(hidden)]=\"hiddenSeries\"\n [(highlighted)]=\"highlightedSeries\" />\n } @else {\n <div\n class=\"plot\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipPreferBelow]=\"pinnedCategory()\"\n [dsChartTooltipOrigin]=\"tooltipOrigin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <svg\n class=\"canvas\"\n preserveAspectRatio=\"xMidYMid meet\"\n [attr.aria-hidden]=\"interactive() ? null : true\"\n [attr.viewBox]=\"viewBox\"\n (pointermove)=\"onPlotPointer($event)\"\n (pointerdown)=\"onPlotPointer($event)\"\n (pointerleave)=\"clearActiveCategory()\">\n @if (activeCategory() >= 0) {\n <g\n class=\"cursor\"\n animate.enter=\"cursor-in\"\n animate.leave=\"cursor-out\"\n [style.transform]=\"'translateX(' + activeBandX() + 'px)'\">\n <rect\n class=\"category-band\"\n aria-hidden=\"true\"\n x=\"0\"\n [attr.y]=\"primaryTopY()\"\n [attr.width]=\"activeBandWidth()\"\n [attr.height]=\"cursorBottomY() - primaryTopY()\" />\n\n <line\n class=\"cursor-line\"\n aria-hidden=\"true\"\n [attr.x1]=\"activeBandWidth() / 2\"\n [attr.x2]=\"activeBandWidth() / 2\"\n [attr.y1]=\"primaryTopY()\"\n [attr.y2]=\"cursorBottomY()\" />\n </g>\n }\n\n @for (tick of primaryTicks(); track $index) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n }\n\n @if (showSecondaryGridlines()) {\n @for (tick of secondaryTicks(); track $index) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\"\n [class.secondary]=\"!stacked()\" />\n }\n }\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"primaryBaselineY()\"\n [attr.y2]=\"primaryBaselineY()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotLeft()\"\n [attr.y1]=\"primaryTopY()\"\n [attr.y2]=\"primaryBaselineY()\" />\n\n @if (stacked()) {\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"secondaryBaselineY()\"\n [attr.y2]=\"secondaryBaselineY()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotLeft()\"\n [attr.y1]=\"secondaryTopY()\"\n [attr.y2]=\"secondaryBaselineY()\" />\n }\n\n @for (\n entry of plottedSeries();\n track entry.series.id;\n let seriesIndex = $index\n ) {\n @for (path of entry.areaPaths; track $index) {\n <path\n class=\"series-area\"\n animate.enter=\"mark-enter\"\n animate.leave=\"mark-leave\"\n [style.--_chart-mark-stagger]=\"markStagger(seriesIndex)\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [attr.d]=\"path\"\n [attr.fill]=\"entry.color\" />\n }\n }\n\n @for (\n entry of plottedSeries();\n track entry.series.id;\n let seriesIndex = $index\n ) {\n @for (points of entry.polylines; track $index) {\n <polyline\n class=\"series-line\"\n animate.enter=\"mark-enter\"\n animate.leave=\"mark-leave\"\n [attr.stroke-dasharray]=\"entry.dash\"\n [style.--_chart-mark-stagger]=\"markStagger(seriesIndex)\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [attr.points]=\"points\"\n [attr.stroke]=\"entry.color\" />\n }\n }\n\n @if (showMarkers() || interactive()) {\n @for (\n entry of plottedSeries();\n track entry.series.id;\n let seriesIndex = $index\n ) {\n @for (marker of entry.markers; track marker.categoryIndex) {\n <circle\n class=\"series-marker\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [class.ghost]=\"!showMarkers()\"\n [class.interactive]=\"interactive()\"\n [class.is-active]=\"marker.categoryIndex === activeCategory()\"\n [attr.cx]=\"marker.x\"\n [attr.cy]=\"marker.y\"\n [attr.fill]=\"entry.color\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.data-series-index]=\"seriesIndex\"\n [attr.data-mark-index]=\"marker.categoryIndex\"\n [attr.tabindex]=\"\n interactive()\n ? isTabStop(entry.series.id, marker.categoryIndex)\n ? 0\n : -1\n : null\n \"\n [attr.aria-label]=\"\n interactive() ? markerLabel(entry, marker) : null\n \"\n (focus)=\"\n onMarkerFocus(seriesIndex, marker.categoryIndex, $event)\n \"\n (blur)=\"onMarkerBlur()\"\n (keydown)=\"\n onMarkerNavigation($event, seriesIndex, marker.categoryIndex)\n \"\n (click)=\"onMarkerClick(entry, marker)\"\n (keydown.enter)=\"onMarkerKey(entry, marker, $event)\"\n (keydown.space)=\"onMarkerKey(entry, marker, $event)\" />\n }\n }\n }\n\n @for (note of placedAnnotations(); track note.key) {\n <text\n class=\"annotation\"\n aria-hidden=\"true\"\n [attr.x]=\"note.x\"\n [attr.y]=\"note.y\"\n [attr.text-anchor]=\"note.anchor\">\n {{ note.label }}\n </text>\n }\n\n @for (tick of primaryTicks(); track $index) {\n <text\n class=\"axis-label\"\n text-anchor=\"end\"\n [attr.x]=\"primaryLabelX()\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (tick of secondaryTicks(); track $index) {\n <text\n class=\"axis-label\"\n [attr.text-anchor]=\"secondaryLabelAnchor()\"\n [attr.x]=\"secondaryLabelX()\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (label of categoryLabels(); track $index) {\n <text\n class=\"category-label\"\n text-anchor=\"middle\"\n [attr.x]=\"label.x\"\n [attr.y]=\"categoryLabelY()\">\n {{ label.text }}\n </text>\n }\n </svg>\n </div>\n\n @if (showLegend()) {\n <ds-chart-legend\n [items]=\"legendItems()\"\n [toggleable]=\"legendFilters()\"\n [mode]=\"legendMode()\"\n [(hidden)]=\"hiddenSeries\"\n [(highlighted)]=\"highlightedSeries\" />\n }\n\n @if (dataTableResolved() !== 'none') {\n <details\n class=\"data-table\"\n [open]=\"dataTableResolved() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Category\n </th>\n\n @for (entry of resolvedSeries(); track entry.series.id) {\n <th scope=\"col\">\n {{ entry.series.label }}\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (row of tableRows(); track $index) {\n <tr>\n <th scope=\"row\">\n {{ row.category }}\n </th>\n\n @for (cell of row.cells; track $index) {\n <td>\n {{ cell }}\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </details>\n }\n }\n</figure>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}@keyframes ds-chart-mark-grow-y{0%{opacity:0;transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{opacity:0;transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-exit{to{opacity:0}}.series-line.mark-enter{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms)) both}.series-line.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.series-area.mark-enter{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms)) both}.series-area.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.series-marker.mark-enter{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms)) both}.series-marker.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}:host{display:block;-webkit-user-select:none;user-select:none}:host(.framed){padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color);border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table,.stage-table,figcaption{-webkit-user-select:text;user-select:text}@media not (forced-colors:active){.series-marker:focus{outline:none}}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.line-chart{--_line-chart-grid-line-color: var(--ds-line-chart-grid-line-color, var(--ds-chart-grid-line-color));--_line-chart-axis-line-color: var(--ds-line-chart-axis-line-color, var(--ds-chart-axis-line-color));--_line-chart-axis-label-color: var(--ds-line-chart-axis-label-color, var(--ds-chart-axis-label-color));--_line-chart-axis-font-size: var(--ds-line-chart-axis-font-size, var(--ds-chart-axis-font-size));--_line-chart-annotation-color: var(--ds-line-chart-annotation-color, var(--text-primary));--_line-chart-annotation-font-size: var(--ds-line-chart-annotation-font-size, var(--ds-chart-axis-font-size));--_line-chart-annotation-weight: var(--ds-line-chart-annotation-weight, var(--font-weight-bold));--_line-chart-annotation-halo-color: var(--ds-line-chart-annotation-halo-color, var(--surface-default));--_line-chart-annotation-halo-width: var(--ds-line-chart-annotation-halo-width, 3px);--_line-chart-line-width: var(--ds-line-chart-line-width, var(--ds-chart-line-width));--_line-chart-dot-radius: var(--ds-line-chart-dot-radius, var(--ds-chart-dot-radius));--_line-chart-dot-radius-active: var(--ds-line-chart-dot-radius-active, var(--ds-chart-dot-radius-active));--_line-chart-hover-bg-color: var(--ds-line-chart-hover-bg-color, var(--ds-chart-hover-bg-color));--_line-chart-cursor-line-color: var(--ds-line-chart-cursor-line-color, var(--ds-chart-cursor-line-color));--_line-chart-line-width-bold: var( --ds-line-chart-line-width-bold, var(--ds-chart-line-width-bold) );--_line-chart-focus-color: var(--ds-line-chart-focus-color, var(--focus-ring-color));--_line-chart-focus-width: var(--ds-line-chart-focus-width, var(--focus-ring-width));--_line-chart-area-opacity: var(--ds-line-chart-area-opacity, .16);--_line-chart-plot-height: var(--ds-line-chart-plot-height, 240px);--_line-chart-swatch-size: var(--ds-line-chart-swatch-size, 10px);margin:0}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:600}.empty{display:grid;place-items:center;min-block-size:var(--_line-chart-plot-height);margin:0;color:var(--text-secondary);text-align:center;border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}.empty{aspect-ratio:640/320;inline-size:100%}.canvas{display:block;inline-size:100%;block-size:auto}.grid-line{stroke:var(--_line-chart-grid-line-color);stroke-width:1}.grid-line.secondary{stroke-dasharray:4 4}.axis-line{stroke:var(--_line-chart-axis-line-color);stroke-width:1}.axis-label,.category-label{fill:var(--_line-chart-axis-label-color);font-size:var(--_line-chart-axis-font-size)}.annotation{fill:var(--_line-chart-annotation-color);font-size:var(--_line-chart-annotation-font-size);font-weight:var(--_line-chart-annotation-weight);paint-order:stroke;stroke:var(--_line-chart-annotation-halo-color);stroke-width:var(--_line-chart-annotation-halo-width);stroke-linejoin:round}.axis-label{dominant-baseline:middle}.series-area{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.series-area.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.series-line{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),stroke var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing),stroke-width var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.series-line.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.series-marker{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing),r var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.series-marker.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.series-area{fill-opacity:var(--_line-chart-area-opacity);stroke:none}.series-line{fill:none;stroke-width:var(--_line-chart-line-width);stroke-linecap:round;stroke-linejoin:round}.plot:has(.series-line.is-dimmed) .series-line:not(.is-dimmed){stroke-width:var(--_line-chart-line-width-bold)}.series-marker{r:var(--_line-chart-dot-radius)}.cursor.cursor-in{animation:ds-chart-mark-fade-in var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing) both}.cursor.cursor-out{animation:ds-chart-mark-exit var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing) both}.category-band{fill:var(--_line-chart-hover-bg-color)}.cursor-line{stroke:var(--_line-chart-cursor-line-color);stroke-width:1}.series-marker.is-active{r:var(--_line-chart-dot-radius-active)}.series-marker.ghost.is-active{fill-opacity:1}.series-marker.interactive{cursor:pointer;stroke:transparent;stroke-width:24px;vector-effect:non-scaling-stroke}@media(hover:none)and (pointer:coarse){.series-marker.interactive{stroke-width:44px}}.series-marker.ghost{fill-opacity:0}.series-marker.ghost:hover,.series-marker.ghost:focus-visible{fill-opacity:1}@media not (forced-colors:active){.series-marker.interactive:focus-visible{outline:none}}.series-marker.interactive:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 var(--focus-ring-width) var(--ds-chart-focus-halo-color));r:var(--_line-chart-dot-radius-active)}.legend{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin:var(--space-3) 0 0;padding:0;list-style:none}.legend-item{display:inline-flex;gap:var(--space-2);align-items:center;color:var(--text-secondary);font-size:var(--font-size-xs)}.legend-swatch{flex:none;inline-size:var(--_line-chart-swatch-size);block-size:var(--_line-chart-swatch-size);border-radius:var(--radius-pill)}.skeleton{display:grid}.skeleton-legend{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin-block-start:var(--space-3)}.empty.is-error{color:var(--error)}@media(forced-colors:active){.axis-line,.grid-line{stroke:CanvasText}.axis-label,.category-label{fill:CanvasText}:focus-visible{stroke:Highlight;filter:none}}:host{position:relative}.pin-reset{position:absolute;inset-block-start:var(--space-2);inset-inline:0;z-index:1;justify-self:center;margin-inline:auto;display:inline-flex;align-items:center;gap:var(--space-1);min-block-size:var(--space-12);inline-size:fit-content;padding:var(--space-1) var(--space-3);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-secondary);font-size:var(--font-size-xs);line-height:1;box-shadow:var(--shadow-1);cursor:pointer}.pin-reset:hover{color:var(--text-primary);border-color:var(--border-strong)}\n"], dependencies: [{ kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline"] }, { kind: "directive", type: ChartTooltipDirective, selector: "[dsChartTooltip]", inputs: ["dsChartTooltip", "dsChartTooltipOrigin", "dsChartTooltipTemplate", "dsChartTooltipExtraGap", "dsChartTooltipPreferBelow"] }, { kind: "component", type: ChartLegendComponent, selector: "ds-chart-legend", inputs: ["items", "hidden", "toggleable", "mode", "highlighted"], outputs: ["hiddenChange", "highlightedChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
427
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: LineChartComponent, isStandalone: true, selector: "ds-line-chart", inputs: { categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: true, transformFunction: null }, series: { classPropertyName: "series", publicName: "series", isSignal: true, isRequired: true, transformFunction: null }, yAxisMode: { classPropertyName: "yAxisMode", publicName: "yAxisMode", isSignal: true, isRequired: false, transformFunction: null }, showMarkers: { classPropertyName: "showMarkers", publicName: "showMarkers", isSignal: true, isRequired: false, transformFunction: null }, outline: { classPropertyName: "outline", publicName: "outline", isSignal: true, isRequired: false, transformFunction: null }, annotations: { classPropertyName: "annotations", publicName: "annotations", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, pinOnClick: { classPropertyName: "pinOnClick", publicName: "pinOnClick", isSignal: true, isRequired: false, transformFunction: null }, dimOthers: { classPropertyName: "dimOthers", publicName: "dimOthers", isSignal: true, isRequired: false, transformFunction: null }, gaps: { classPropertyName: "gaps", publicName: "gaps", isSignal: true, isRequired: false, transformFunction: null }, curve: { classPropertyName: "curve", publicName: "curve", isSignal: true, isRequired: false, transformFunction: null }, stack: { classPropertyName: "stack", publicName: "stack", isSignal: true, isRequired: false, transformFunction: null }, yAxisLabel: { classPropertyName: "yAxisLabel", publicName: "yAxisLabel", isSignal: true, isRequired: false, transformFunction: null }, secondaryAxisLabel: { classPropertyName: "secondaryAxisLabel", publicName: "secondaryAxisLabel", isSignal: true, isRequired: false, transformFunction: null }, tickCount: { classPropertyName: "tickCount", publicName: "tickCount", isSignal: true, isRequired: false, transformFunction: null }, frame: { classPropertyName: "frame", publicName: "frame", isSignal: true, isRequired: false, transformFunction: null }, tooltipLingerMs: { classPropertyName: "tooltipLingerMs", publicName: "tooltipLingerMs", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, summary: { classPropertyName: "summary", publicName: "summary", isSignal: true, isRequired: false, transformFunction: null }, dataTable: { classPropertyName: "dataTable", publicName: "dataTable", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, maxSecondary: { classPropertyName: "maxSecondary", publicName: "maxSecondary", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, valueFormat: { classPropertyName: "valueFormat", publicName: "valueFormat", isSignal: true, isRequired: false, transformFunction: null }, hiddenSeries: { classPropertyName: "hiddenSeries", publicName: "hiddenSeries", isSignal: true, isRequired: false, transformFunction: null }, rescaleOnHide: { classPropertyName: "rescaleOnHide", publicName: "rescaleOnHide", isSignal: true, isRequired: false, transformFunction: null }, legendFilters: { classPropertyName: "legendFilters", publicName: "legendFilters", isSignal: true, isRequired: false, transformFunction: null }, legendMode: { classPropertyName: "legendMode", publicName: "legendMode", isSignal: true, isRequired: false, transformFunction: null }, noVisibleSeriesText: { classPropertyName: "noVisibleSeriesText", publicName: "noVisibleSeriesText", isSignal: true, isRequired: false, transformFunction: null }, patterns: { classPropertyName: "patterns", publicName: "patterns", isSignal: true, isRequired: false, transformFunction: null }, staggerMs: { classPropertyName: "staggerMs", publicName: "staggerMs", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, tooltipAnchor: { classPropertyName: "tooltipAnchor", publicName: "tooltipAnchor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pointClicked: "pointClicked", hiddenSeries: "hiddenSeriesChange" }, host: { properties: { "class.framed": "frameResolved() === 'auto'", "style.--_line-chart-view-height": "viewHeightPx()" } }, queries: [{ propertyName: "tooltipTemplate", first: true, predicate: ["dsChartTooltip"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "plot", first: true, predicate: ChartComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<figure class=\"line-chart\">\n @if (pinnedCategory()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"releaseCategoryPin()\">\n Unpin\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n <ds-skeleton height=\"var(--_line-chart-skeleton-height)\" />\n\n @if (skeletonSeries().length > 1) {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonSeries(); track $index) {\n <ds-skeleton\n width=\"var(--space-16)\"\n height=\"var(--space-3)\" />\n }\n </div>\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else if (noVisibleSeries()) {\n <p\n class=\"empty\"\n role=\"status\">\n {{ noVisibleSeriesText() }}\n </p>\n\n <ds-chart-legend\n [items]=\"legendItems()\"\n [toggleable]=\"legendFilters()\"\n [mode]=\"legendMode()\"\n [(hidden)]=\"hiddenSeries\"\n [(highlighted)]=\"highlightedSeries\" />\n } @else {\n <ds-chart\n frame=\"none\"\n cursor=\"category\"\n [tooltipTemplate]=\"tooltipTemplate() ?? null\"\n [categories]=\"categories()\"\n [tickCount]=\"tickCount()\"\n [valueFormat]=\"axisFormat()\"\n [interactive]=\"interactive()\"\n [summary]=\"accessibleName()\"\n [max]=\"axisMax()\"\n [maxSecondary]=\"axisMaxSecondary()\"\n [secondaryAxisMode]=\"yAxisMode()\"\n [axisLabel]=\"yAxisLabel()\"\n [secondaryAxisLabel]=\"secondaryAxisLabel()\"\n [axisColor]=\"primaryAxisFill()\"\n [secondaryAxisColor]=\"secondaryAxisFill()\"\n [cursorPin]=\"pinOnClick()\"\n [tooltipLingerMs]=\"tooltipLingerMs()\"\n [plotHeight]=\"plotHeight()\">\n <svg:g\n #mark=\"dsLineSeries\"\n dsLineSeries\n [data]=\"markSeries()\"\n [showMarkers]=\"showMarkers()\"\n [outline]=\"outline()\"\n [interactive]=\"interactive()\"\n [pinOnClick]=\"pinOnClick()\"\n [dimOthers]=\"dimOthers()\"\n [highlighted]=\"highlightedSeries()\"\n [patterns]=\"dashPatterns()\"\n [stacked]=\"stacksSeries()\"\n [staggerMs]=\"staggerMs()\"\n [gaps]=\"gaps()\"\n [curve]=\"curve()\"\n [tooltip]=\"tooltip()\"\n [tooltipAnchor]=\"markAnchor()\"\n [tooltipLingerMs]=\"tooltipLingerResolved()\"\n [valueFormat]=\"valueFormatResolved()\"\n (pointClicked)=\"onPointClicked($event)\" />\n\n <svg:g\n dsSeriesAnnotation\n [annotations]=\"markAnnotations()\" />\n </ds-chart>\n\n @if (showLegend()) {\n <ds-chart-legend\n [items]=\"legendItems()\"\n [toggleable]=\"legendFilters()\"\n [mode]=\"legendMode()\"\n [(hidden)]=\"hiddenSeries\"\n [(highlighted)]=\"highlightedSeries\" />\n }\n\n @if (dataTableResolved() !== 'none') {\n <ds-chart-data-table\n [columns]=\"dataTableColumns()\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\" />\n }\n }\n</figure>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:block;-webkit-user-select:none;user-select:none}:host(.framed){padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color);border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table,.stage-table{-webkit-user-select:text;user-select:text}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:var(--font-weight-semibold);-webkit-user-select:text;user-select:text}.empty.is-error,.empty-text.is-error{color:var(--error)}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}:host{--_line-chart-plot-height: var(--ds-line-chart-plot-height, 240px);--_line-chart-skeleton-height: var(--ds-line-chart-placeholder-height, var(--_line-chart-plot-height));--_line-chart-message-height: var(--ds-line-chart-placeholder-height, var(--_line-chart-view-height))}.line-chart{--_line-chart-grid-line-color: var(--ds-line-chart-grid-line-color, var(--ds-chart-grid-line-color));--_line-chart-axis-line-color: var(--ds-line-chart-axis-line-color, var(--ds-chart-axis-line-color));--_line-chart-axis-label-color: var(--ds-line-chart-axis-label-color, var(--ds-chart-axis-label-color));--_line-chart-axis-font-size: var(--ds-line-chart-axis-font-size, var(--ds-chart-axis-font-size));--_line-chart-annotation-color: var(--ds-line-chart-annotation-color, var(--text-primary));--_line-chart-annotation-font-size: var(--ds-line-chart-annotation-font-size, var(--ds-chart-axis-font-size));--_line-chart-annotation-font-weight: var(--ds-line-chart-annotation-font-weight, var(--font-weight-bold));--_line-chart-annotation-halo-color: var(--ds-line-chart-annotation-halo-color, var(--surface-default));--_line-chart-annotation-halo-width: var(--ds-line-chart-annotation-halo-width, 3px);--_line-chart-line-width: var(--ds-line-chart-line-width, var(--ds-chart-line-width));--_line-chart-dot-radius: var(--ds-line-chart-dot-radius, var(--ds-chart-dot-radius));--_line-chart-dot-radius-active: var(--ds-line-chart-dot-radius-active, var(--ds-chart-dot-radius-active));--_line-chart-hover-bg-color: var(--ds-line-chart-hover-bg-color, var(--ds-chart-hover-bg-color));--_line-chart-cursor-line-color: var(--ds-line-chart-cursor-line-color, var(--ds-chart-cursor-line-color));--_line-chart-line-width-bold: var( --ds-line-chart-line-width-bold, var(--ds-chart-line-width-bold) );--_line-chart-focus-color: var(--ds-line-chart-focus-color, var(--focus-ring-color));--_line-chart-focus-width: var(--ds-line-chart-focus-width, var(--focus-ring-width));--_line-chart-area-opacity: var(--ds-line-chart-area-opacity, .16);--_line-chart-swatch-size: var(--ds-line-chart-swatch-size, 10px);margin:0}.empty{display:grid;place-items:center;min-block-size:var(--_line-chart-message-height);margin:0;color:var(--text-secondary);text-align:center;border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}ds-chart{--ds-chart-grid-line-color: var(--_line-chart-grid-line-color);--ds-chart-axis-line-color: var(--_line-chart-axis-line-color);--ds-chart-axis-label-color: var(--_line-chart-axis-label-color);--ds-chart-axis-font-size: var(--_line-chart-axis-font-size);--ds-chart-hover-bg-color: var(--_line-chart-hover-bg-color);--ds-chart-cursor-line-color: var(--_line-chart-cursor-line-color);--ds-chart-line-width: var(--_line-chart-line-width);--ds-chart-line-width-bold: var(--_line-chart-line-width-bold);--ds-chart-dot-radius: var(--_line-chart-dot-radius);--ds-chart-dot-radius-active: var(--_line-chart-dot-radius-active);--ds-chart-area-opacity: var(--_line-chart-area-opacity);--ds-chart-annotation-color: var(--_line-chart-annotation-color);--ds-chart-annotation-font-size: var(--_line-chart-annotation-font-size);--ds-chart-annotation-font-weight: var(--_line-chart-annotation-font-weight);--ds-chart-annotation-halo-color: var(--_line-chart-annotation-halo-color);--ds-chart-annotation-halo-width: var(--_line-chart-annotation-halo-width);--ds-chart-focus-ring-color: var(--_line-chart-focus-color);--focus-ring-width: var(--_line-chart-focus-width)}ds-chart-legend{--ds-chart-legend-swatch-size: var(--_line-chart-swatch-size)}.skeleton{display:grid}.skeleton-legend{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin-block-start:var(--space-3)}@media(forced-colors:active){.axis-line,.grid-line{stroke:CanvasText}.axis-label,.category-label{fill:CanvasText}:focus-visible{stroke:Highlight;filter:none}}:host{position:relative}.pin-reset{position:absolute;inset-block-end:var(--space-2);inset-inline:0;z-index:1;justify-self:center;margin-inline:auto;display:inline-flex;align-items:center;gap:var(--space-1);min-block-size:var(--space-12);inline-size:fit-content;padding:var(--space-1) var(--space-3);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-secondary);font-size:var(--font-size-xs);line-height:1;box-shadow:var(--shadow-1);cursor:pointer}.pin-reset:hover{color:var(--text-primary);border-color:var(--border-strong)}\n"], dependencies: [{ kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline"] }, { kind: "component", type: ChartComponent, selector: "ds-chart", inputs: ["categories", "tickCount", "min", "max", "cursor", "cursorPin", "tooltipLingerMs", "maxSecondary", "plotHeight", "axisGutter", "valueSpace", "caption", "interactive", "summary", "frame", "loading", "emptyText", "error", "errorText", "valueFormat", "secondaryAxisMode", "axisColor", "secondaryAxisColor", "axisLabel", "secondaryAxisLabel", "tooltipTemplate", "tooltipExtraGap"], exportAs: ["dsChart"] }, { kind: "component", type: LineSeriesComponent, selector: "g[dsLineSeries]", inputs: ["data", "showMarkers", "outline", "interactive", "pinOnClick", "dimOthers", "highlighted", "patterns", "stacked", "staggerMs", "gaps", "curve", "tooltip", "tooltipAnchor", "tooltipLingerMs", "valueFormat"], outputs: ["pointClicked"], exportAs: ["dsLineSeries"] }, { kind: "component", type: SeriesAnnotationComponent, selector: "g[dsSeriesAnnotation]", inputs: ["annotations"] }, { kind: "component", type: ChartLegendComponent, selector: "ds-chart-legend", inputs: ["items", "hidden", "toggleable", "mode", "highlighted"], outputs: ["hiddenChange", "highlightedChange"] }, { kind: "component", type: ChartDataTableComponent, selector: "ds-chart-data-table", inputs: ["columns", "rows", "caption", "open", "rowHeader"], outputs: ["toggled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
752
428
  }
753
429
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: LineChartComponent, decorators: [{
754
430
  type: Component,
755
- args: [{ selector: 'ds-line-chart', standalone: true, imports: [SkeletonComponent, ChartTooltipDirective, ChartLegendComponent], host: {
431
+ args: [{ selector: 'ds-line-chart', standalone: true, imports: [
432
+ SkeletonComponent,
433
+ ChartComponent,
434
+ LineSeriesComponent,
435
+ SeriesAnnotationComponent,
436
+ ChartLegendComponent,
437
+ ChartDataTableComponent,
438
+ ], host: {
756
439
  '[class.framed]': "frameResolved() === 'auto'",
757
- '(document:keydown.escape)': 'releaseCategoryPin()',
758
- '(document:pointerover)': 'onPointerAnywhere($event)',
759
- }, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<figure class=\"line-chart\">\n @if (pinnedCategory()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"releaseCategoryPin()\">\n Unpin\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n <ds-skeleton height=\"var(--_line-chart-plot-height)\" />\n\n @if (skeletonSeries().length > 1) {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonSeries(); track $index) {\n <ds-skeleton\n width=\"var(--space-16)\"\n height=\"var(--space-3)\" />\n }\n </div>\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else if (noVisibleSeries()) {\n <p\n class=\"empty\"\n role=\"status\">\n {{ noVisibleSeriesText() }}\n </p>\n\n <ds-chart-legend\n [items]=\"legendItems()\"\n [toggleable]=\"legendFilters()\"\n [mode]=\"legendMode()\"\n [(hidden)]=\"hiddenSeries\"\n [(highlighted)]=\"highlightedSeries\" />\n } @else {\n <div\n class=\"plot\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipPreferBelow]=\"pinnedCategory()\"\n [dsChartTooltipOrigin]=\"tooltipOrigin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <svg\n class=\"canvas\"\n preserveAspectRatio=\"xMidYMid meet\"\n [attr.aria-hidden]=\"interactive() ? null : true\"\n [attr.viewBox]=\"viewBox\"\n (pointermove)=\"onPlotPointer($event)\"\n (pointerdown)=\"onPlotPointer($event)\"\n (pointerleave)=\"clearActiveCategory()\">\n @if (activeCategory() >= 0) {\n <g\n class=\"cursor\"\n animate.enter=\"cursor-in\"\n animate.leave=\"cursor-out\"\n [style.transform]=\"'translateX(' + activeBandX() + 'px)'\">\n <rect\n class=\"category-band\"\n aria-hidden=\"true\"\n x=\"0\"\n [attr.y]=\"primaryTopY()\"\n [attr.width]=\"activeBandWidth()\"\n [attr.height]=\"cursorBottomY() - primaryTopY()\" />\n\n <line\n class=\"cursor-line\"\n aria-hidden=\"true\"\n [attr.x1]=\"activeBandWidth() / 2\"\n [attr.x2]=\"activeBandWidth() / 2\"\n [attr.y1]=\"primaryTopY()\"\n [attr.y2]=\"cursorBottomY()\" />\n </g>\n }\n\n @for (tick of primaryTicks(); track $index) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n }\n\n @if (showSecondaryGridlines()) {\n @for (tick of secondaryTicks(); track $index) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\"\n [class.secondary]=\"!stacked()\" />\n }\n }\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"primaryBaselineY()\"\n [attr.y2]=\"primaryBaselineY()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotLeft()\"\n [attr.y1]=\"primaryTopY()\"\n [attr.y2]=\"primaryBaselineY()\" />\n\n @if (stacked()) {\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotRight()\"\n [attr.y1]=\"secondaryBaselineY()\"\n [attr.y2]=\"secondaryBaselineY()\" />\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plotLeft()\"\n [attr.x2]=\"plotLeft()\"\n [attr.y1]=\"secondaryTopY()\"\n [attr.y2]=\"secondaryBaselineY()\" />\n }\n\n @for (\n entry of plottedSeries();\n track entry.series.id;\n let seriesIndex = $index\n ) {\n @for (path of entry.areaPaths; track $index) {\n <path\n class=\"series-area\"\n animate.enter=\"mark-enter\"\n animate.leave=\"mark-leave\"\n [style.--_chart-mark-stagger]=\"markStagger(seriesIndex)\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [attr.d]=\"path\"\n [attr.fill]=\"entry.color\" />\n }\n }\n\n @for (\n entry of plottedSeries();\n track entry.series.id;\n let seriesIndex = $index\n ) {\n @for (points of entry.polylines; track $index) {\n <polyline\n class=\"series-line\"\n animate.enter=\"mark-enter\"\n animate.leave=\"mark-leave\"\n [attr.stroke-dasharray]=\"entry.dash\"\n [style.--_chart-mark-stagger]=\"markStagger(seriesIndex)\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [attr.points]=\"points\"\n [attr.stroke]=\"entry.color\" />\n }\n }\n\n @if (showMarkers() || interactive()) {\n @for (\n entry of plottedSeries();\n track entry.series.id;\n let seriesIndex = $index\n ) {\n @for (marker of entry.markers; track marker.categoryIndex) {\n <circle\n class=\"series-marker\"\n [class.is-dimmed]=\"isDimmed(entry.series.id)\"\n [class.ghost]=\"!showMarkers()\"\n [class.interactive]=\"interactive()\"\n [class.is-active]=\"marker.categoryIndex === activeCategory()\"\n [attr.cx]=\"marker.x\"\n [attr.cy]=\"marker.y\"\n [attr.fill]=\"entry.color\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.data-series-index]=\"seriesIndex\"\n [attr.data-mark-index]=\"marker.categoryIndex\"\n [attr.tabindex]=\"\n interactive()\n ? isTabStop(entry.series.id, marker.categoryIndex)\n ? 0\n : -1\n : null\n \"\n [attr.aria-label]=\"\n interactive() ? markerLabel(entry, marker) : null\n \"\n (focus)=\"\n onMarkerFocus(seriesIndex, marker.categoryIndex, $event)\n \"\n (blur)=\"onMarkerBlur()\"\n (keydown)=\"\n onMarkerNavigation($event, seriesIndex, marker.categoryIndex)\n \"\n (click)=\"onMarkerClick(entry, marker)\"\n (keydown.enter)=\"onMarkerKey(entry, marker, $event)\"\n (keydown.space)=\"onMarkerKey(entry, marker, $event)\" />\n }\n }\n }\n\n @for (note of placedAnnotations(); track note.key) {\n <text\n class=\"annotation\"\n aria-hidden=\"true\"\n [attr.x]=\"note.x\"\n [attr.y]=\"note.y\"\n [attr.text-anchor]=\"note.anchor\">\n {{ note.label }}\n </text>\n }\n\n @for (tick of primaryTicks(); track $index) {\n <text\n class=\"axis-label\"\n text-anchor=\"end\"\n [attr.x]=\"primaryLabelX()\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (tick of secondaryTicks(); track $index) {\n <text\n class=\"axis-label\"\n [attr.text-anchor]=\"secondaryLabelAnchor()\"\n [attr.x]=\"secondaryLabelX()\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (label of categoryLabels(); track $index) {\n <text\n class=\"category-label\"\n text-anchor=\"middle\"\n [attr.x]=\"label.x\"\n [attr.y]=\"categoryLabelY()\">\n {{ label.text }}\n </text>\n }\n </svg>\n </div>\n\n @if (showLegend()) {\n <ds-chart-legend\n [items]=\"legendItems()\"\n [toggleable]=\"legendFilters()\"\n [mode]=\"legendMode()\"\n [(hidden)]=\"hiddenSeries\"\n [(highlighted)]=\"highlightedSeries\" />\n }\n\n @if (dataTableResolved() !== 'none') {\n <details\n class=\"data-table\"\n [open]=\"dataTableResolved() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Category\n </th>\n\n @for (entry of resolvedSeries(); track entry.series.id) {\n <th scope=\"col\">\n {{ entry.series.label }}\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (row of tableRows(); track $index) {\n <tr>\n <th scope=\"row\">\n {{ row.category }}\n </th>\n\n @for (cell of row.cells; track $index) {\n <td>\n {{ cell }}\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </details>\n }\n }\n</figure>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}@keyframes ds-chart-mark-grow-y{0%{opacity:0;transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{opacity:0;transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-exit{to{opacity:0}}.series-line.mark-enter{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms)) both}.series-line.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.series-area.mark-enter{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms)) both}.series-area.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.series-marker.mark-enter{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms)) both}.series-marker.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}:host{display:block;-webkit-user-select:none;user-select:none}:host(.framed){padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color);border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table,.stage-table,figcaption{-webkit-user-select:text;user-select:text}@media not (forced-colors:active){.series-marker:focus{outline:none}}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.line-chart{--_line-chart-grid-line-color: var(--ds-line-chart-grid-line-color, var(--ds-chart-grid-line-color));--_line-chart-axis-line-color: var(--ds-line-chart-axis-line-color, var(--ds-chart-axis-line-color));--_line-chart-axis-label-color: var(--ds-line-chart-axis-label-color, var(--ds-chart-axis-label-color));--_line-chart-axis-font-size: var(--ds-line-chart-axis-font-size, var(--ds-chart-axis-font-size));--_line-chart-annotation-color: var(--ds-line-chart-annotation-color, var(--text-primary));--_line-chart-annotation-font-size: var(--ds-line-chart-annotation-font-size, var(--ds-chart-axis-font-size));--_line-chart-annotation-weight: var(--ds-line-chart-annotation-weight, var(--font-weight-bold));--_line-chart-annotation-halo-color: var(--ds-line-chart-annotation-halo-color, var(--surface-default));--_line-chart-annotation-halo-width: var(--ds-line-chart-annotation-halo-width, 3px);--_line-chart-line-width: var(--ds-line-chart-line-width, var(--ds-chart-line-width));--_line-chart-dot-radius: var(--ds-line-chart-dot-radius, var(--ds-chart-dot-radius));--_line-chart-dot-radius-active: var(--ds-line-chart-dot-radius-active, var(--ds-chart-dot-radius-active));--_line-chart-hover-bg-color: var(--ds-line-chart-hover-bg-color, var(--ds-chart-hover-bg-color));--_line-chart-cursor-line-color: var(--ds-line-chart-cursor-line-color, var(--ds-chart-cursor-line-color));--_line-chart-line-width-bold: var( --ds-line-chart-line-width-bold, var(--ds-chart-line-width-bold) );--_line-chart-focus-color: var(--ds-line-chart-focus-color, var(--focus-ring-color));--_line-chart-focus-width: var(--ds-line-chart-focus-width, var(--focus-ring-width));--_line-chart-area-opacity: var(--ds-line-chart-area-opacity, .16);--_line-chart-plot-height: var(--ds-line-chart-plot-height, 240px);--_line-chart-swatch-size: var(--ds-line-chart-swatch-size, 10px);margin:0}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:600}.empty{display:grid;place-items:center;min-block-size:var(--_line-chart-plot-height);margin:0;color:var(--text-secondary);text-align:center;border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}.empty{aspect-ratio:640/320;inline-size:100%}.canvas{display:block;inline-size:100%;block-size:auto}.grid-line{stroke:var(--_line-chart-grid-line-color);stroke-width:1}.grid-line.secondary{stroke-dasharray:4 4}.axis-line{stroke:var(--_line-chart-axis-line-color);stroke-width:1}.axis-label,.category-label{fill:var(--_line-chart-axis-label-color);font-size:var(--_line-chart-axis-font-size)}.annotation{fill:var(--_line-chart-annotation-color);font-size:var(--_line-chart-annotation-font-size);font-weight:var(--_line-chart-annotation-weight);paint-order:stroke;stroke:var(--_line-chart-annotation-halo-color);stroke-width:var(--_line-chart-annotation-halo-width);stroke-linejoin:round}.axis-label{dominant-baseline:middle}.series-area{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.series-area.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.series-line{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),stroke var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing),stroke-width var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.series-line.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.series-marker{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing),r var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing)}.series-marker.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.series-area{fill-opacity:var(--_line-chart-area-opacity);stroke:none}.series-line{fill:none;stroke-width:var(--_line-chart-line-width);stroke-linecap:round;stroke-linejoin:round}.plot:has(.series-line.is-dimmed) .series-line:not(.is-dimmed){stroke-width:var(--_line-chart-line-width-bold)}.series-marker{r:var(--_line-chart-dot-radius)}.cursor.cursor-in{animation:ds-chart-mark-fade-in var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing) both}.cursor.cursor-out{animation:ds-chart-mark-exit var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing) both}.category-band{fill:var(--_line-chart-hover-bg-color)}.cursor-line{stroke:var(--_line-chart-cursor-line-color);stroke-width:1}.series-marker.is-active{r:var(--_line-chart-dot-radius-active)}.series-marker.ghost.is-active{fill-opacity:1}.series-marker.interactive{cursor:pointer;stroke:transparent;stroke-width:24px;vector-effect:non-scaling-stroke}@media(hover:none)and (pointer:coarse){.series-marker.interactive{stroke-width:44px}}.series-marker.ghost{fill-opacity:0}.series-marker.ghost:hover,.series-marker.ghost:focus-visible{fill-opacity:1}@media not (forced-colors:active){.series-marker.interactive:focus-visible{outline:none}}.series-marker.interactive:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 var(--focus-ring-width) var(--ds-chart-focus-halo-color));r:var(--_line-chart-dot-radius-active)}.legend{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin:var(--space-3) 0 0;padding:0;list-style:none}.legend-item{display:inline-flex;gap:var(--space-2);align-items:center;color:var(--text-secondary);font-size:var(--font-size-xs)}.legend-swatch{flex:none;inline-size:var(--_line-chart-swatch-size);block-size:var(--_line-chart-swatch-size);border-radius:var(--radius-pill)}.skeleton{display:grid}.skeleton-legend{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin-block-start:var(--space-3)}.empty.is-error{color:var(--error)}@media(forced-colors:active){.axis-line,.grid-line{stroke:CanvasText}.axis-label,.category-label{fill:CanvasText}:focus-visible{stroke:Highlight;filter:none}}:host{position:relative}.pin-reset{position:absolute;inset-block-start:var(--space-2);inset-inline:0;z-index:1;justify-self:center;margin-inline:auto;display:inline-flex;align-items:center;gap:var(--space-1);min-block-size:var(--space-12);inline-size:fit-content;padding:var(--space-1) var(--space-3);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-secondary);font-size:var(--font-size-xs);line-height:1;box-shadow:var(--shadow-1);cursor:pointer}.pin-reset:hover{color:var(--text-primary);border-color:var(--border-strong)}\n"] }]
760
- }], propDecorators: { categories: [{ type: i0.Input, args: [{ isSignal: true, alias: "categories", required: true }] }], series: [{ type: i0.Input, args: [{ isSignal: true, alias: "series", required: true }] }], yAxisMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "yAxisMode", required: false }] }], showMarkers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMarkers", required: false }] }], annotations: [{ type: i0.Input, args: [{ isSignal: true, alias: "annotations", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], pointClicked: [{ type: i0.Output, args: ["pointClicked"] }], pinOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinOnClick", required: false }] }], dimOthers: [{ type: i0.Input, args: [{ isSignal: true, alias: "dimOthers", required: false }] }], gaps: [{ type: i0.Input, args: [{ isSignal: true, alias: "gaps", required: false }] }], tickCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "tickCount", required: false }] }], frame: [{ type: i0.Input, args: [{ isSignal: true, alias: "frame", required: false }] }], tooltipLingerMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipLingerMs", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], summary: [{ type: i0.Input, args: [{ isSignal: true, alias: "summary", required: false }] }], dataTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTable", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], maxSecondary: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSecondary", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], valueFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormat", required: false }] }], hiddenSeries: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenSeries", required: false }] }, { type: i0.Output, args: ["hiddenSeriesChange"] }], rescaleOnHide: [{ type: i0.Input, args: [{ isSignal: true, alias: "rescaleOnHide", required: false }] }], legendFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendFilters", required: false }] }], legendMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendMode", required: false }] }], noVisibleSeriesText: [{ type: i0.Input, args: [{ isSignal: true, alias: "noVisibleSeriesText", required: false }] }], patterns: [{ type: i0.Input, args: [{ isSignal: true, alias: "patterns", required: false }] }], staggerMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "staggerMs", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], tooltipTemplate: [{ type: i0.ContentChild, args: ['dsChartTooltip', { isSignal: true }] }], tooltipAnchor: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipAnchor", required: false }] }] } });
440
+ '[style.--_line-chart-view-height]': 'viewHeightPx()',
441
+ }, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<figure class=\"line-chart\">\n @if (pinnedCategory()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"releaseCategoryPin()\">\n Unpin\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n <ds-skeleton height=\"var(--_line-chart-skeleton-height)\" />\n\n @if (skeletonSeries().length > 1) {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonSeries(); track $index) {\n <ds-skeleton\n width=\"var(--space-16)\"\n height=\"var(--space-3)\" />\n }\n </div>\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else if (noVisibleSeries()) {\n <p\n class=\"empty\"\n role=\"status\">\n {{ noVisibleSeriesText() }}\n </p>\n\n <ds-chart-legend\n [items]=\"legendItems()\"\n [toggleable]=\"legendFilters()\"\n [mode]=\"legendMode()\"\n [(hidden)]=\"hiddenSeries\"\n [(highlighted)]=\"highlightedSeries\" />\n } @else {\n <ds-chart\n frame=\"none\"\n cursor=\"category\"\n [tooltipTemplate]=\"tooltipTemplate() ?? null\"\n [categories]=\"categories()\"\n [tickCount]=\"tickCount()\"\n [valueFormat]=\"axisFormat()\"\n [interactive]=\"interactive()\"\n [summary]=\"accessibleName()\"\n [max]=\"axisMax()\"\n [maxSecondary]=\"axisMaxSecondary()\"\n [secondaryAxisMode]=\"yAxisMode()\"\n [axisLabel]=\"yAxisLabel()\"\n [secondaryAxisLabel]=\"secondaryAxisLabel()\"\n [axisColor]=\"primaryAxisFill()\"\n [secondaryAxisColor]=\"secondaryAxisFill()\"\n [cursorPin]=\"pinOnClick()\"\n [tooltipLingerMs]=\"tooltipLingerMs()\"\n [plotHeight]=\"plotHeight()\">\n <svg:g\n #mark=\"dsLineSeries\"\n dsLineSeries\n [data]=\"markSeries()\"\n [showMarkers]=\"showMarkers()\"\n [outline]=\"outline()\"\n [interactive]=\"interactive()\"\n [pinOnClick]=\"pinOnClick()\"\n [dimOthers]=\"dimOthers()\"\n [highlighted]=\"highlightedSeries()\"\n [patterns]=\"dashPatterns()\"\n [stacked]=\"stacksSeries()\"\n [staggerMs]=\"staggerMs()\"\n [gaps]=\"gaps()\"\n [curve]=\"curve()\"\n [tooltip]=\"tooltip()\"\n [tooltipAnchor]=\"markAnchor()\"\n [tooltipLingerMs]=\"tooltipLingerResolved()\"\n [valueFormat]=\"valueFormatResolved()\"\n (pointClicked)=\"onPointClicked($event)\" />\n\n <svg:g\n dsSeriesAnnotation\n [annotations]=\"markAnnotations()\" />\n </ds-chart>\n\n @if (showLegend()) {\n <ds-chart-legend\n [items]=\"legendItems()\"\n [toggleable]=\"legendFilters()\"\n [mode]=\"legendMode()\"\n [(hidden)]=\"hiddenSeries\"\n [(highlighted)]=\"highlightedSeries\" />\n }\n\n @if (dataTableResolved() !== 'none') {\n <ds-chart-data-table\n [columns]=\"dataTableColumns()\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\" />\n }\n }\n</figure>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:block;-webkit-user-select:none;user-select:none}:host(.framed){padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color);border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table,.stage-table{-webkit-user-select:text;user-select:text}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:var(--font-weight-semibold);-webkit-user-select:text;user-select:text}.empty.is-error,.empty-text.is-error{color:var(--error)}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}:host{--_line-chart-plot-height: var(--ds-line-chart-plot-height, 240px);--_line-chart-skeleton-height: var(--ds-line-chart-placeholder-height, var(--_line-chart-plot-height));--_line-chart-message-height: var(--ds-line-chart-placeholder-height, var(--_line-chart-view-height))}.line-chart{--_line-chart-grid-line-color: var(--ds-line-chart-grid-line-color, var(--ds-chart-grid-line-color));--_line-chart-axis-line-color: var(--ds-line-chart-axis-line-color, var(--ds-chart-axis-line-color));--_line-chart-axis-label-color: var(--ds-line-chart-axis-label-color, var(--ds-chart-axis-label-color));--_line-chart-axis-font-size: var(--ds-line-chart-axis-font-size, var(--ds-chart-axis-font-size));--_line-chart-annotation-color: var(--ds-line-chart-annotation-color, var(--text-primary));--_line-chart-annotation-font-size: var(--ds-line-chart-annotation-font-size, var(--ds-chart-axis-font-size));--_line-chart-annotation-font-weight: var(--ds-line-chart-annotation-font-weight, var(--font-weight-bold));--_line-chart-annotation-halo-color: var(--ds-line-chart-annotation-halo-color, var(--surface-default));--_line-chart-annotation-halo-width: var(--ds-line-chart-annotation-halo-width, 3px);--_line-chart-line-width: var(--ds-line-chart-line-width, var(--ds-chart-line-width));--_line-chart-dot-radius: var(--ds-line-chart-dot-radius, var(--ds-chart-dot-radius));--_line-chart-dot-radius-active: var(--ds-line-chart-dot-radius-active, var(--ds-chart-dot-radius-active));--_line-chart-hover-bg-color: var(--ds-line-chart-hover-bg-color, var(--ds-chart-hover-bg-color));--_line-chart-cursor-line-color: var(--ds-line-chart-cursor-line-color, var(--ds-chart-cursor-line-color));--_line-chart-line-width-bold: var( --ds-line-chart-line-width-bold, var(--ds-chart-line-width-bold) );--_line-chart-focus-color: var(--ds-line-chart-focus-color, var(--focus-ring-color));--_line-chart-focus-width: var(--ds-line-chart-focus-width, var(--focus-ring-width));--_line-chart-area-opacity: var(--ds-line-chart-area-opacity, .16);--_line-chart-swatch-size: var(--ds-line-chart-swatch-size, 10px);margin:0}.empty{display:grid;place-items:center;min-block-size:var(--_line-chart-message-height);margin:0;color:var(--text-secondary);text-align:center;border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}ds-chart{--ds-chart-grid-line-color: var(--_line-chart-grid-line-color);--ds-chart-axis-line-color: var(--_line-chart-axis-line-color);--ds-chart-axis-label-color: var(--_line-chart-axis-label-color);--ds-chart-axis-font-size: var(--_line-chart-axis-font-size);--ds-chart-hover-bg-color: var(--_line-chart-hover-bg-color);--ds-chart-cursor-line-color: var(--_line-chart-cursor-line-color);--ds-chart-line-width: var(--_line-chart-line-width);--ds-chart-line-width-bold: var(--_line-chart-line-width-bold);--ds-chart-dot-radius: var(--_line-chart-dot-radius);--ds-chart-dot-radius-active: var(--_line-chart-dot-radius-active);--ds-chart-area-opacity: var(--_line-chart-area-opacity);--ds-chart-annotation-color: var(--_line-chart-annotation-color);--ds-chart-annotation-font-size: var(--_line-chart-annotation-font-size);--ds-chart-annotation-font-weight: var(--_line-chart-annotation-font-weight);--ds-chart-annotation-halo-color: var(--_line-chart-annotation-halo-color);--ds-chart-annotation-halo-width: var(--_line-chart-annotation-halo-width);--ds-chart-focus-ring-color: var(--_line-chart-focus-color);--focus-ring-width: var(--_line-chart-focus-width)}ds-chart-legend{--ds-chart-legend-swatch-size: var(--_line-chart-swatch-size)}.skeleton{display:grid}.skeleton-legend{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);margin-block-start:var(--space-3)}@media(forced-colors:active){.axis-line,.grid-line{stroke:CanvasText}.axis-label,.category-label{fill:CanvasText}:focus-visible{stroke:Highlight;filter:none}}:host{position:relative}.pin-reset{position:absolute;inset-block-end:var(--space-2);inset-inline:0;z-index:1;justify-self:center;margin-inline:auto;display:inline-flex;align-items:center;gap:var(--space-1);min-block-size:var(--space-12);inline-size:fit-content;padding:var(--space-1) var(--space-3);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-secondary);font-size:var(--font-size-xs);line-height:1;box-shadow:var(--shadow-1);cursor:pointer}.pin-reset:hover{color:var(--text-primary);border-color:var(--border-strong)}\n"] }]
442
+ }], ctorParameters: () => [], propDecorators: { categories: [{ type: i0.Input, args: [{ isSignal: true, alias: "categories", required: true }] }], series: [{ type: i0.Input, args: [{ isSignal: true, alias: "series", required: true }] }], yAxisMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "yAxisMode", required: false }] }], showMarkers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMarkers", required: false }] }], outline: [{ type: i0.Input, args: [{ isSignal: true, alias: "outline", required: false }] }], annotations: [{ type: i0.Input, args: [{ isSignal: true, alias: "annotations", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], pointClicked: [{ type: i0.Output, args: ["pointClicked"] }], pinOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinOnClick", required: false }] }], dimOthers: [{ type: i0.Input, args: [{ isSignal: true, alias: "dimOthers", required: false }] }], gaps: [{ type: i0.Input, args: [{ isSignal: true, alias: "gaps", required: false }] }], curve: [{ type: i0.Input, args: [{ isSignal: true, alias: "curve", required: false }] }], stack: [{ type: i0.Input, args: [{ isSignal: true, alias: "stack", required: false }] }], yAxisLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "yAxisLabel", required: false }] }], secondaryAxisLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryAxisLabel", required: false }] }], tickCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "tickCount", required: false }] }], frame: [{ type: i0.Input, args: [{ isSignal: true, alias: "frame", required: false }] }], tooltipLingerMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipLingerMs", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], summary: [{ type: i0.Input, args: [{ isSignal: true, alias: "summary", required: false }] }], dataTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTable", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], maxSecondary: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSecondary", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], valueFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormat", required: false }] }], hiddenSeries: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenSeries", required: false }] }, { type: i0.Output, args: ["hiddenSeriesChange"] }], rescaleOnHide: [{ type: i0.Input, args: [{ isSignal: true, alias: "rescaleOnHide", required: false }] }], legendFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendFilters", required: false }] }], legendMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendMode", required: false }] }], noVisibleSeriesText: [{ type: i0.Input, args: [{ isSignal: true, alias: "noVisibleSeriesText", required: false }] }], patterns: [{ type: i0.Input, args: [{ isSignal: true, alias: "patterns", required: false }] }], staggerMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "staggerMs", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], tooltipTemplate: [{ type: i0.ContentChild, args: ['dsChartTooltip', { isSignal: true }] }], tooltipAnchor: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipAnchor", required: false }] }], plot: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ChartComponent), { isSignal: true }] }] } });
761
443
 
762
444
  /**
763
445
  * Generated bundle index. Do not edit.