@ids-group-ltd/ids-design-system 0.13.4 → 0.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/CHANGELOG.md +584 -0
  2. package/components.md +100 -52
  3. package/design-system.md +2 -0
  4. package/docs/agent/INDEX.md +3 -2
  5. package/docs/agent/charts/column-series-component.md +1 -1
  6. package/docs/agent/charts/ds-bar-chart.md +2 -1
  7. package/docs/agent/charts/ds-chart.md +3 -1
  8. package/docs/agent/charts/ds-config.md +3 -1
  9. package/docs/agent/charts/ds-line-chart.md +3 -3
  10. package/docs/agent/charts/ds-pie-chart.md +4 -3
  11. package/docs/agent/charts/line-series-component.md +1 -1
  12. package/docs/agent/feedback/ds-alert.md +1 -0
  13. package/docs/agent/feedback/ds-badge.md +1 -1
  14. package/docs/agent/feedback/ds-banner.md +1 -0
  15. package/docs/agent/feedback/ds-skeleton.md +2 -2
  16. package/docs/agent/feedback/ds-tag.md +1 -1
  17. package/docs/agent/forms/ds-autocomplete.md +2 -2
  18. package/docs/agent/forms/ds-button.md +1 -1
  19. package/docs/agent/forms/ds-color-picker.md +1 -1
  20. package/docs/agent/forms/ds-date-picker.md +2 -2
  21. package/docs/agent/forms/ds-filter-bar.md +1 -1
  22. package/docs/agent/forms/ds-icon-button.md +1 -1
  23. package/docs/agent/forms/ds-input.md +1 -1
  24. package/docs/agent/forms/ds-multi-select.md +2 -2
  25. package/docs/agent/forms/ds-otp-input.md +1 -1
  26. package/docs/agent/forms/ds-search.md +3 -3
  27. package/docs/agent/forms/ds-split-button.md +1 -1
  28. package/docs/agent/forms/ds-switch.md +4 -2
  29. package/docs/agent/forms/ds-textarea.md +2 -1
  30. package/docs/agent/foundations/tokens.md +1 -1
  31. package/docs/agent/navigation/ds-app-layout.md +2 -2
  32. package/docs/agent/navigation/ds-auth-layout.md +4 -4
  33. package/docs/agent/navigation/ds-page-header.md +1 -1
  34. package/docs/agent/navigation/ds-pagination.md +2 -2
  35. package/docs/agent/platform/ds-config.md +3 -3
  36. package/docs/agent/platform/ds-intl.md +33 -0
  37. package/docs/agent/surfaces/ds-accordion.md +2 -2
  38. package/docs/agent/tables/ds-cell-template.md +1 -1
  39. package/docs/agent/tables/ds-table.md +5 -4
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +9 -5
  41. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
  42. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +21 -10
  43. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
  44. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +9 -5
  45. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
  46. package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs +8 -8
  47. package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs.map +1 -1
  48. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +13 -8
  49. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
  50. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs +5 -3
  51. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs.map +1 -1
  52. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs +5 -10
  53. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs.map +1 -1
  54. package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +12 -8
  55. package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -1
  56. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +21 -10
  57. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
  58. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +56 -32
  59. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
  60. package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs +2 -2
  61. package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs.map +1 -1
  62. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +7 -6
  63. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -1
  64. package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +4 -3
  65. package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -1
  66. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +4 -4
  67. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
  68. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-data-table.mjs +15 -3
  69. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-data-table.mjs.map +1 -1
  70. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +5 -3
  71. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
  72. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +45 -39
  73. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
  74. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +414 -105
  75. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
  76. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +9 -5
  77. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
  78. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +22 -18
  79. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
  80. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +16 -9
  81. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
  82. package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +4 -2
  83. package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -1
  84. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +7 -4
  85. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
  86. package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +12 -6
  87. package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -1
  88. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +2 -2
  89. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
  90. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +13 -7
  91. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -1
  92. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +40 -42
  93. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
  94. package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs +13 -9
  95. package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -1
  96. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +3 -3
  97. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -1
  98. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +5 -4
  99. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
  100. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +27 -23
  101. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
  102. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +62 -13
  103. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
  104. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +15 -10
  105. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
  106. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +5 -4
  107. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
  108. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +13 -7
  109. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
  110. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +2 -2
  111. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -1
  112. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +22 -13
  113. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
  114. package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs +12 -11
  115. package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs.map +1 -1
  116. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +55 -29
  117. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
  118. package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +41 -12
  119. package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -1
  120. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +13 -6
  121. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
  122. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +4 -3
  123. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
  124. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +4 -2
  125. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -1
  126. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +5 -3
  127. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
  128. package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs +37 -4
  129. package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs.map +1 -1
  130. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +8 -7
  131. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
  132. package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs +5 -3
  133. package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs.map +1 -1
  134. package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs +9 -6
  135. package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs.map +1 -1
  136. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +6 -4
  137. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -1
  138. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +20 -5
  139. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
  140. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +18 -15
  141. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -1
  142. package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +9 -6
  143. package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -1
  144. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +47 -38
  145. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  146. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +5 -3
  147. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -1
  148. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +9 -5
  149. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -1
  150. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +26 -4
  151. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
  152. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +12 -10
  153. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
  154. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +8 -6
  155. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
  156. package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs +5 -3
  157. package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs.map +1 -1
  158. package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs +14 -15
  159. package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs.map +1 -1
  160. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +345 -66
  161. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  162. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +361 -6
  163. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  164. package/fesm2022/ids-group-ltd-ids-design-system.mjs +1 -1
  165. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  166. package/migrations/0.10.0.json +1 -1
  167. package/migrations/0.10.1.json +1 -1
  168. package/migrations/0.12.2.json +4 -1
  169. package/migrations/0.13.3.json +32 -10
  170. package/migrations/0.13.4.json +1630 -132
  171. package/migrations/0.14.0.json +615 -0
  172. package/migrations/0.14.1.json +856 -0
  173. package/migrations/0.5.0.json +10 -4
  174. package/migrations/0.7.0.json +5 -2
  175. package/migrations/0.9.0.json +5 -2
  176. package/migrations/README.md +7 -2
  177. package/package.json +1 -1
  178. package/schematics/check-overrides/index.cjs +56 -0
  179. package/schematics/check-overrides/scan.cjs +74 -0
  180. package/schematics/check-overrides/schema.json +19 -0
  181. package/schematics/check-overrides/surface.json +2304 -0
  182. package/schematics/collection.json +5 -0
  183. package/styles/_chart-frame.scss +4 -4
  184. package/styles/_chart-interactive.scss +33 -0
  185. package/styles/_chart-motion.scss +17 -10
  186. package/styles/_field-box.scss +12 -0
  187. package/styles/_overlay-motion.scss +20 -10
  188. package/styles/_skeleton-shimmer.scss +4 -1
  189. package/styles/_tokens-charts.scss +1 -1
  190. package/styles/_tokens.scss +1 -1
  191. package/types/ids-group-ltd-ids-design-system-components-accordion.d.ts +11 -2
  192. package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +4 -0
  193. package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +5 -2
  194. package/types/ids-group-ltd-ids-design-system-components-auth-layout.d.ts +5 -5
  195. package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +7 -4
  196. package/types/ids-group-ltd-ids-design-system-components-avatar-group.d.ts +2 -0
  197. package/types/ids-group-ltd-ids-design-system-components-avatar.d.ts +5 -3
  198. package/types/ids-group-ltd-ids-design-system-components-badge.d.ts +6 -2
  199. package/types/ids-group-ltd-ids-design-system-components-banner.d.ts +4 -0
  200. package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +20 -14
  201. package/types/ids-group-ltd-ids-design-system-components-breadcrumbs.d.ts +2 -0
  202. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +2 -2
  203. package/types/ids-group-ltd-ids-design-system-components-chart-data-table.d.ts +5 -0
  204. package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +2 -0
  205. package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +11 -6
  206. package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +155 -36
  207. package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +6 -2
  208. package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +11 -8
  209. package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +9 -3
  210. package/types/ids-group-ltd-ids-design-system-components-description-list.d.ts +2 -0
  211. package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +2 -0
  212. package/types/ids-group-ltd-ids-design-system-components-dropzone.d.ts +3 -0
  213. package/types/ids-group-ltd-ids-design-system-components-filter-bar.d.ts +9 -4
  214. package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +13 -13
  215. package/types/ids-group-ltd-ids-design-system-components-heatmap-chart.d.ts +7 -5
  216. package/types/ids-group-ltd-ids-design-system-components-input.d.ts +2 -0
  217. package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +17 -11
  218. package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +6 -0
  219. package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +11 -6
  220. package/types/ids-group-ltd-ids-design-system-components-number-stepper.d.ts +2 -0
  221. package/types/ids-group-ltd-ids-design-system-components-otp-input.d.ts +6 -2
  222. package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +17 -10
  223. package/types/ids-group-ltd-ids-design-system-components-password-rules.d.ts +2 -0
  224. package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +25 -14
  225. package/types/ids-group-ltd-ids-design-system-components-scatter-chart.d.ts +15 -6
  226. package/types/ids-group-ltd-ids-design-system-components-search.d.ts +9 -3
  227. package/types/ids-group-ltd-ids-design-system-components-select.d.ts +3 -2
  228. package/types/ids-group-ltd-ids-design-system-components-sidenav-footer.d.ts +2 -0
  229. package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +3 -1
  230. package/types/ids-group-ltd-ids-design-system-components-skeleton.d.ts +6 -1
  231. package/types/ids-group-ltd-ids-design-system-components-slider.d.ts +2 -0
  232. package/types/ids-group-ltd-ids-design-system-components-spinner.d.ts +6 -4
  233. package/types/ids-group-ltd-ids-design-system-components-split-button.d.ts +5 -2
  234. package/types/ids-group-ltd-ids-design-system-components-stepper.d.ts +2 -0
  235. package/types/ids-group-ltd-ids-design-system-components-switch.d.ts +10 -1
  236. package/types/ids-group-ltd-ids-design-system-components-table-export.d.ts +1 -0
  237. package/types/ids-group-ltd-ids-design-system-components-table.d.ts +44 -28
  238. package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +2 -0
  239. package/types/ids-group-ltd-ids-design-system-components-tag.d.ts +6 -2
  240. package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +15 -0
  241. package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +3 -0
  242. package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +3 -0
  243. package/types/ids-group-ltd-ids-design-system-components-w3w.d.ts +2 -0
  244. package/types/ids-group-ltd-ids-design-system-components-waterfall-chart.d.ts +7 -5
  245. package/types/ids-group-ltd-ids-design-system-components.d.ts +83 -17
  246. package/types/ids-group-ltd-ids-design-system-core.d.ts +420 -14
  247. package/types/ids-group-ltd-ids-design-system.d.ts +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-pie-chart.mjs","sources":["../../../src/lib/components/pie-chart/pie-chart.math.ts","../../../src/lib/components/pie-chart/pie-chart.component.ts","../../../src/lib/components/pie-chart/pie-chart.component.html","../../../src/lib/components/pie-chart/ids-group-ltd-ids-design-system-components-pie-chart.ts"],"sourcesContent":["import type { PieChartSlice } from './pie-chart.types';\n\nconst FULL_TURN = Math.PI * 2;\nconst FULL_TURN_EPSILON = 1e-9;\n\nexport const DEFAULT_INNER_RADIUS = 0.68;\n\n/** Valid over [0, 1): zero is a solid pie, and one would leave no ring to draw, so it falls back\n * along with every other unusable value. */\nexport function holeFraction(innerRadius: number): number {\n return Number.isFinite(innerRadius) && innerRadius >= 0 && innerRadius < 1\n ? round(innerRadius)\n : DEFAULT_INNER_RADIUS;\n}\n\n/** The slices a legend can carry, with everything past `limit` summed into one. The kept slices stay\n * in the order given — a ring is read against its legend top to bottom, so reordering by value\n * would move every other slice to make room for the grouping. The remainder takes the neutral\n * eighth palette slot, which is what that slot is for. */\nexport function groupSmallest(\n slices: readonly PieChartSlice[],\n limit: number | null,\n otherLabel: string,\n): PieChartSlice[] {\n if (limit === null || !Number.isInteger(limit) || limit < 2) {\n return [...slices];\n }\n if (slices.length <= limit) {\n return [...slices];\n }\n const ranked = [...slices]\n .map((slice, index) => ({ index, value: positiveValues([slice.value])[0] }))\n .sort((a, b) => b.value - a.value || a.index - b.index);\n const kept = new Set(ranked.slice(0, limit - 1).map((entry) => entry.index));\n const remainder = slices\n .filter((unusedSlice, index) => !kept.has(index))\n .reduce((sum, slice) => sum + positiveValues([slice.value])[0], 0);\n\n return [\n ...slices.filter((unusedSlice, index) => kept.has(index)),\n { id: 'ds-pie-other', label: otherLabel, value: remainder, slot: 8 },\n ];\n}\n\nexport interface PieArc {\n readonly startAngle: number;\n readonly endAngle: number;\n}\n\n/** A ring is a part-to-whole picture, so anything that is not a positive share\n * becomes zero. Non-finite values go in the same pass: one NaN reaches every\n * other slice through the total, and a `d` attribute holding NaN draws nothing\n * at all rather than failing loudly. */\nexport function positiveValues(values: readonly number[]): number[] {\n return values.map((value) =>\n Number.isFinite(value) && value > 0 ? value : 0,\n );\n}\n\nexport function resolveTotal(values: readonly number[]): number {\n return positiveValues(values).reduce((sum, value) => sum + value, 0);\n}\n\nexport function sliceArcs(values: readonly number[]): PieArc[] {\n const positive = positiveValues(values);\n const total = resolveTotal(positive);\n if (total <= 0) {\n return positive.map(() => ({ startAngle: 0, endAngle: 0 }));\n }\n let cursor = 0;\n\n return positive.map((value) => {\n const startAngle = cursor;\n cursor += (value / total) * FULL_TURN;\n\n return { startAngle, endAngle: cursor };\n });\n}\n\nexport function resolveInnerRadius(\n outerRadius: number,\n innerRadius: number,\n): number {\n if (!Number.isFinite(outerRadius) || outerRadius <= 0) {\n return 0;\n }\n\n return outerRadius * holeFraction(innerRadius);\n}\n\nexport function paletteIndex(\n slot: number | undefined,\n index: number,\n paletteLength: number,\n): number {\n if (paletteLength <= 0) {\n return 0;\n }\n if (slot !== undefined && Number.isInteger(slot) && slot > 0) {\n return (slot - 1) % paletteLength;\n }\n\n return index % paletteLength;\n}\n\n/** One `\"x y\"` pair for a path. Angles run clockwise from 12 o'clock, where a\n * reader expects a ring to start; SVG's y axis points down, so that is\n * (sin, -cos) rather than the (cos, sin) of the maths convention. */\nexport function ringPoint(\n centerX: number,\n centerY: number,\n radius: number,\n angle: number,\n): string {\n const { x, y } = ringCoords(centerX, centerY, radius, angle);\n\n return `${x} ${y}`;\n}\n\n/** The same point as numbers, for PLACING something rather than drawing a path. */\nexport function ringCoords(\n centerX: number,\n centerY: number,\n radius: number,\n angle: number,\n): { x: number; y: number } {\n return {\n x: round(centerX + radius * Math.sin(angle)),\n y: round(centerY - radius * Math.cos(angle)),\n };\n}\n\nexport function arcPath(\n centerX: number,\n centerY: number,\n outerRadius: number,\n innerRadius: number,\n startAngle: number,\n endAngle: number,\n): string {\n const finite = [\n centerX,\n centerY,\n outerRadius,\n innerRadius,\n startAngle,\n endAngle,\n ].every((value) => Number.isFinite(value));\n if (!finite || outerRadius <= 0) {\n return '';\n }\n const inner = Math.min(Math.max(innerRadius, 0), outerRadius);\n const sweep = endAngle - startAngle;\n if (sweep <= 0) {\n return '';\n }\n if (sweep >= FULL_TURN - FULL_TURN_EPSILON) {\n return fullRingPath(centerX, centerY, outerRadius, inner);\n }\n const largeArcFlag = sweep > Math.PI ? 1 : 0;\n const outerRadii = `${round(outerRadius)} ${round(outerRadius)}`;\n const outerArc =\n `M ${ringPoint(centerX, centerY, outerRadius, startAngle)}` +\n ` A ${outerRadii} 0 ${largeArcFlag} 1 ${ringPoint(centerX, centerY, outerRadius, endAngle)}`;\n if (inner === 0) {\n return `${outerArc} L ${round(centerX)} ${round(centerY)} Z`;\n }\n const innerRadii = `${round(inner)} ${round(inner)}`;\n\n return (\n `${outerArc} L ${ringPoint(centerX, centerY, inner, endAngle)}` +\n ` A ${innerRadii} 0 ${largeArcFlag} 0 ${ringPoint(centerX, centerY, inner, startAngle)} Z`\n );\n}\n\nfunction fullRingPath(\n centerX: number,\n centerY: number,\n outerRadius: number,\n innerRadius: number,\n): string {\n const outer = circlePath(centerX, centerY, outerRadius, 1);\n if (innerRadius <= 0) {\n return outer;\n }\n\n // The hole is cut by winding the inner circle the other way, which the default\n // nonzero fill rule then cancels against the outer one.\n return `${outer} ${circlePath(centerX, centerY, innerRadius, 0)}`;\n}\n\n/** A single arc of a full turn ends where it starts and SVG draws nothing for\n * it, so a closed circle is two half-turns. */\nfunction circlePath(\n centerX: number,\n centerY: number,\n radius: number,\n sweepFlag: 0 | 1,\n): string {\n const top = ringPoint(centerX, centerY, radius, 0);\n const bottom = ringPoint(centerX, centerY, radius, Math.PI);\n const radii = `${round(radius)} ${round(radius)}`;\n\n return `M ${top} A ${radii} 0 1 ${sweepFlag} ${bottom} A ${radii} 0 1 ${sweepFlag} ${top} Z`;\n}\n\nfunction round(value: number): number {\n return Math.round(value * 1000) / 1000;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChild,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport {\n CHART_SERIES_COLORS,\n describeSeries,\n focusMark,\n largestRemainder,\n markAt,\n nextRovingIndex,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport type {\n ChartDataTable,\n ChartFrame,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport {\n ChartTooltipDirective,\n chartActiveMark,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartItemTooltipTrigger,\n ChartTooltipContext,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport {\n DEFAULT_INNER_RADIUS,\n arcPath,\n groupSmallest,\n holeFraction,\n paletteIndex,\n positiveValues,\n resolveInnerRadius,\n resolveTotal,\n ringCoords,\n sliceArcs,\n} from './pie-chart.math';\nimport type { PieChartSlice } from './pie-chart.types';\nimport { ChartDataTableComponent } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport type { ChartDataRow } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport { resolveChartDefaults } from '@ids-group-ltd/ids-design-system/components';\n\nconst RING_VIEW_BOX_SIZE = 100;\nconst RING_CENTER = RING_VIEW_BOX_SIZE / 2;\nconst RING_OUTER_RADIUS = RING_VIEW_BOX_SIZE / 2;\n\n@Component({\n selector: 'ds-pie-chart',\n standalone: true,\n imports: [\n SkeletonComponent,\n ChartTooltipDirective,\n IconComponent,\n ChartDataTableComponent,\n ],\n templateUrl: './pie-chart.component.html',\n styleUrl: './pie-chart.component.scss',\n host: { '[class.framed]': \"frameResolved() === 'auto'\" },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PieChartComponent {\n /** One slice per entry. A non-positive or non-finite value counts as zero — a ring is a\n * part-to-whole picture and has no way to draw a negative share. */\n readonly data = input.required<readonly PieChartSlice[]>();\n\n /** Printed inside the ring. Null prints the sum through `valueFormat`. */\n readonly centerValue = input<string | null>(null);\n\n /** Caption under the centre value. */\n readonly centerLabel = input<string | null>(null);\n\n /** Logical placement, so a right-to-left page needs no second value. */\n readonly legend = input<'end' | 'bottom' | 'none'>('end');\n\n /** Longest legend to draw. Past it the smallest slices are summed into one, so a long tail does\n * not become a legend nobody reads. Off by default: grouping changes what the chart says, and\n * that is the consumer's call. Values below 2 are ignored — one slice is not a pie. */\n readonly maxSlices = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n\n /** Names the grouped slice. */\n readonly otherLabel = input<string>('Other');\n\n /** The hole, as a fraction of the outer radius. Zero draws a solid pie and takes the centre\n * content away with the hole that held it. */\n readonly innerRadius = input(DEFAULT_INNER_RADIUS, {\n transform: numberAttribute,\n });\n\n /** Whether the chart draws its own bordered, padded box. `'auto'`, the default, draws it;\n * `'none'` leaves the chart bare, for one placed inside a card the page has already drawn.\n * Unset falls back to `DS_CONFIG.chart.frame`, then `'auto'` — whether charts live inside cards\n * is one decision per app rather than per plot. */\n readonly frame = input<ChartFrame | null>(null);\n\n /** How long the tooltip stays after the pointer leaves the mark, in milliseconds. Zero, the\n * default, takes it away at once: a panel that outlives the pointer sits over the plot the\n * reader has moved on to.\n *\n * Raise it only for a panel a reader has to REACH — one carrying a link, a figure, or anything\n * selectable — which is WCAG 1.4.13's hoverable clause. The panel is portaled to the body, so\n * crossing the gap to it at an ordinary pointer speed needs about 140. Unset falls back to\n * `DS_CONFIG.chart.tooltipLingerMs`, then 0. */\n readonly tooltipLingerMs = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n /** Printed above the plot as the chart's visible title, and reused as the annex table's\n * caption. */\n readonly caption = input<string | null>(null);\n\n /** Accessible name. Generated from the data when omitted. */\n readonly summary = input<string | null>(null);\n\n /** The label-and-value table under the plot: `'toggle'` puts it behind a disclosure,\n * `'visible'` opens it, `'none'` renders none. It is the non-visual route to the numbers, so\n * `'none'` belongs only where the same data is already in a table on the page.\n * Unset falls back to `DS_CONFIG.chart.dataTable`, then `'none'`. */\n readonly dataTable = input<ChartDataTable | null>(null);\n\n /** Prints each slice's share of the ring — in the legend, on the tooltip and in the data table.\n * On by default, unlike every other chart, because a ring IS parts of one whole: the share is a\n * real quantity here whatever the data, not a claim the consumer has to make. Off drops all\n * three, for a ring whose slices are already labelled in percent. */\n readonly partOfWhole = input(true, { transform: booleanAttribute });\n\n /** Draws skeleton marks in place of the data, at the same count, so the chart does not resize\n * when the data lands. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** Shown in place of the plot when `data` is empty. Unset falls back to\n * `DS_CONFIG.chart.emptyText`, then `'No data'`. */\n readonly emptyText = input<string | null>(null);\n\n /** Shows `errorText` in place of the plot. Separate from `loading` and from an empty `data`,\n * because \"the request failed\" and \"there is nothing to show\" read the same to a reader and\n * mean opposite things. */\n readonly error = input(false, { transform: booleanAttribute });\n\n /** The message the error state prints. Unset falls back to `DS_CONFIG.chart.errorText`, then\n * `'Could not load the data'`. */\n readonly errorText = input<string | null>(null);\n /** Formats every value the chart prints, the annex table and the generated description\n * included. Unset falls back to `DS_CONFIG.chart.valueFormat`, then the browser's locale\n * grouping with a K/M/B suffix past four digits. */\n readonly valueFormat = input<ChartValueFormat | null>(null);\n\n private readonly defaults = resolveChartDefaults(this);\n readonly frameResolved = this.defaults.frame;\n readonly dataTableResolved = this.defaults.dataTable;\n readonly emptyTextResolved = this.defaults.emptyText;\n readonly errorTextResolved = this.defaults.errorText;\n readonly valueFormatResolved = this.defaults.valueFormat;\n\n /** Turns on the click affordance — the pointer cursor and any hover tint.\n * The click output fires whether or not this is set, so a consumer that\n * binds the output and forgets the flag still receives every click. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** The slice that was clicked, or activated with Enter or Space. Fires whether or not\n * `interactive` is set. */\n readonly sliceClicked = output<PieChartSlice>();\n\n /** Holds the hovered mark and its tooltip in place when it is clicked, until Escape or a press\n * outside releases it. Off by default: a click is already the drill-down hook, and a mark left\n * lit after the pointer has gone needs a reader who knows why it is lit. `sliceClicked` fires\n * either way — pinning is a state, not a handler. */\n readonly pinOnClick = input(false, { transform: booleanAttribute });\n\n /** Dims every OTHER mark while one is hovered or focused, so the reader's eye is held on the\n * one under the pointer. Off by default: the dimming costs the separation BETWEEN the dimmed\n * marks — measured 2026-09-13, the worst pair of three dimmed series falls from dE 14.8 at full\n * opacity to 2.1 at `--ds-chart-dim-opacity`'s default 0.3 — so it buys loudness for one mark\n * and pays for it with the rest of the chart. */\n readonly dimOthers = input(false, { transform: booleanAttribute });\n\n /** Accepted for parity with the other four charts and deliberately without effect here: a ring\n * arrives as ONE object, because arcs share their edges and fading them one at a time lets the\n * background through every seam. There is nothing to stagger. */\n readonly staggerMs = input(0, { transform: numberAttribute });\n\n /** Whether a hovered or focused slice opens a tooltip. `'axis'` is not offered — a ring\n * has no axis to group readings under. */\n readonly tooltip = input<ChartItemTooltipTrigger>('item');\n\n protected readonly tooltipTemplate =\n contentChild<TemplateRef<{ $implicit: ChartTooltipContext }>>(\n 'dsChartTooltip',\n );\n\n private readonly tooltipLingerResolved = this.defaults.tooltipLingerMs;\n\n protected readonly activeMark = chartActiveMark(() =>\n this.tooltipLingerResolved(),\n );\n\n protected onMarkClick(\n payload: PieChartSlice,\n index: number,\n event: Event,\n ): void {\n this.sliceClicked.emit(payload);\n if (this.pinOnClick()) {\n this.activeMark.pin(index, event);\n }\n }\n /** One tab stop per chart, not one per slice: WCAG 2.1.1's Understanding is explicit that not\n * every mouse-operable control has to be separately focusable. */\n protected readonly rovingIndex = signal(0);\n\n protected readonly tabStopIndex = computed(() =>\n Math.min(this.rovingIndex(), Math.max(0, this.slices().length - 1)),\n );\n\n protected onMarkFocus(index: number, event: FocusEvent): void {\n this.rovingIndex.set(index);\n this.activeMark.enter(index, event);\n }\n\n /** A legend item stands for its arc, so it opens the arc's tooltip over the ARC and dims the\n * other slices — the same state hovering the arc itself produces. */\n protected onLegendEnter(index: number, event: Event): void {\n this.activeMark.enter(index, event, this.arcAt(event, index));\n }\n\n protected onLegendFocus(index: number, event: FocusEvent): void {\n this.rovingIndex.set(index);\n this.onLegendEnter(index, event);\n }\n\n protected onLegendClick(\n slice: PieChartSlice,\n index: number,\n event: Event,\n ): void {\n this.sliceClicked.emit(slice);\n if (this.pinOnClick()) {\n this.activeMark.pin(index, event, this.arcAt(event, index));\n }\n }\n\n private arcAt(event: Event, index: number): Element | null {\n return markAt(\n (event.currentTarget as Element).closest('.chart'),\n index,\n '.slice',\n );\n }\n\n protected isDimmed(index: number): boolean {\n return (\n this.dimOthers() &&\n this.activeMark.index() !== -1 &&\n this.activeMark.index() !== index\n );\n }\n\n protected onMarkNavigation(\n event: KeyboardEvent,\n index: number,\n scope: string,\n ): void {\n const next = nextRovingIndex(event.key, index, this.slices().length);\n if (next === null) {\n return;\n }\n event.preventDefault();\n this.rovingIndex.set(next);\n focusMark((event.currentTarget as Element).closest(scope), next);\n }\n\n protected readonly tooltipContext = computed<ChartTooltipContext | null>(\n () => {\n const entry = this.slices()[this.activeMark.index()];\n if (this.tooltip() === 'none' || !entry) {\n return null;\n }\n\n return {\n category: '',\n entries: [\n {\n label: entry.slice.label,\n value: entry.slice.value,\n formatted: this.partOfWhole()\n ? `${entry.formattedValue} · ${entry.formattedPercent}`\n : entry.formattedValue,\n color: entry.color,\n },\n ],\n };\n },\n );\n\n protected readonly viewBox = `0 0 ${RING_VIEW_BOX_SIZE} ${RING_VIEW_BOX_SIZE}`;\n\n protected readonly total = computed(() =>\n resolveTotal(this.data().map((slice) => slice.value)),\n );\n\n protected readonly visibleSlices = computed(() =>\n groupSmallest(this.data(), this.maxSlices(), this.otherLabel()),\n );\n\n protected readonly dataTableColumns = computed<readonly string[]>(() =>\n this.partOfWhole()\n ? ['Label', 'Value', 'Share of total']\n : ['Label', 'Value'],\n );\n\n protected readonly dataTableRows = computed<readonly ChartDataRow[]>(() =>\n this.slices().map((entry) => ({\n key: entry.slice.id,\n cells: this.partOfWhole()\n ? [entry.slice.label, entry.formattedValue, entry.formattedPercent]\n : [entry.slice.label, entry.formattedValue],\n })),\n );\n\n protected readonly slices = computed(() => {\n const data = this.visibleSlices();\n const values = data.map((slice) => slice.value);\n const arcs = sliceArcs(values);\n const percents = largestRemainder(positiveValues(values));\n const innerRadius = resolveInnerRadius(\n RING_OUTER_RADIUS,\n this.innerRadius(),\n );\n const format = (value: number) =>\n this.valueFormatResolved()(value, 'tooltip');\n\n const midRadius = (RING_OUTER_RADIUS + innerRadius) / 2;\n\n return data.map((slice, index) => ({\n slice,\n // Halfway along the arc and halfway through the ring: the one point that is inside a slice\n // whatever its sweep, which the bounding box of a curved wedge is not.\n center: ringCoords(\n RING_CENTER,\n RING_CENTER,\n midRadius,\n (arcs[index].startAngle + arcs[index].endAngle) / 2,\n ),\n path: arcPath(\n RING_CENTER,\n RING_CENTER,\n RING_OUTER_RADIUS,\n innerRadius,\n arcs[index].startAngle,\n arcs[index].endAngle,\n ),\n color:\n CHART_SERIES_COLORS[\n paletteIndex(slice.slot, index, CHART_SERIES_COLORS.length)\n ],\n formattedValue: format(slice.value),\n formattedPercent: `${percents[index]}%`,\n }));\n });\n\n protected readonly resolvedCenterValue = computed(\n () =>\n this.centerValue() ?? this.valueFormatResolved()(this.total(), 'tooltip'),\n );\n\n protected readonly accessibleName = computed(\n () =>\n this.summary() ??\n describeSeries(\n this.caption() ?? 'Chart',\n this.data().map((slice) => ({\n label: slice.label,\n value: slice.value,\n })),\n (value) => this.valueFormatResolved()(value, 'tooltip'),\n this.dataTableResolved() !== 'none',\n ),\n );\n\n protected readonly hole = computed(() => holeFraction(this.innerRadius()));\n\n protected entryLabel(entry: {\n slice: PieChartSlice;\n formattedValue: string;\n formattedPercent: string;\n }) {\n return this.partOfWhole()\n ? `${entry.slice.label}, ${entry.formattedValue}, ${entry.formattedPercent}`\n : `${entry.slice.label}, ${entry.formattedValue}`;\n }\n\n protected onSliceKey(slice: PieChartSlice, event: Event): void {\n // Only the legend item's own key opens it: a key pressed on a control inside belongs to that\n // control.\n if (!this.interactive() || event.target !== event.currentTarget) {\n return;\n }\n event.preventDefault();\n this.sliceClicked.emit(slice);\n }\n\n // Both focusable would double the tab order; the legend items already carry the route.\n // Without this the ring is unreachable at `legend=\"none\"`.\n protected readonly ringCarriesTheRoute = computed(\n () => this.interactive() && this.legend() === 'none',\n );\n\n protected readonly isEmpty = computed(() => this.data().length === 0);\n\n /** Placeholder legend rows while loading. Follows the real slice count so the\n * chart does not resize when the data lands; falls back to three when `data`\n * is still empty. */\n protected readonly skeletonRows = computed(() =>\n Array.from({ length: Math.max(this.data().length, 3) }),\n );\n}\n","<figure\n class=\"pie-chart\"\n [style.--_pie-chart-hole-fraction]=\"hole()\">\n @if (activeMark.pinned()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"activeMark.release()\">\n Unpin\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p\n class=\"empty-text is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n </div>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\"\n [class.legend-bottom]=\"legend() === 'bottom'\">\n <ds-skeleton\n circle\n width=\"var(--_pie-chart-size)\"\n height=\"var(--_pie-chart-size)\" />\n\n @if (legend() !== 'none') {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonRows(); track $index) {\n <ds-skeleton height=\"var(--_pie-chart-legend-row-height)\" />\n }\n </div>\n }\n </div>\n } @else if (isEmpty()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p class=\"empty-text\">\n {{ emptyTextResolved() }}\n </p>\n </div>\n } @else {\n <div\n class=\"chart\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [class.legend-bottom]=\"legend() === 'bottom'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipPreferBelow]=\"activeMark.pinned()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <div\n class=\"ring\"\n [class.ring-outline]=\"total() === 0\">\n <svg\n class=\"ring-svg\"\n animate.enter=\"mark-enter\"\n [class.dims-others]=\"dimOthers()\"\n [attr.aria-hidden]=\"ringCarriesTheRoute() ? null : true\"\n [attr.viewBox]=\"viewBox\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <path\n class=\"slice\"\n [class.interactive]=\"interactive()\"\n [class.is-pinned]=\"\n activeMark.pinned() && activeMark.index() === index\n \"\n [class.is-dimmed]=\"isDimmed(index)\"\n [class.focusable]=\"ringCarriesTheRoute()\"\n [attr.d]=\"entry.path\"\n [style.fill]=\"entry.color\"\n [attr.role]=\"ringCarriesTheRoute() ? 'button' : null\"\n [attr.tabindex]=\"\n ringCarriesTheRoute()\n ? index === tabStopIndex()\n ? 0\n : -1\n : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"\n ringCarriesTheRoute() ? entryLabel(entry) : null\n \"\n (pointerenter)=\"activeMark.enter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index, '.ring-svg')\"\n (click)=\"onMarkClick(entry.slice, index, $event)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n </path>\n\n @if (activeMark.pinned() && activeMark.index() === index) {\n <foreignObject\n class=\"pin-marker\"\n width=\"14\"\n height=\"14\"\n [attr.x]=\"entry.center.x - 7\"\n [attr.y]=\"entry.center.y - 7\">\n <ds-icon\n name=\"pin\"\n [size]=\"14\" />\n </foreignObject>\n }\n }\n </svg>\n\n @if (hole() > 0) {\n <div class=\"center\">\n <span class=\"center-value\">\n {{ resolvedCenterValue() }}\n </span>\n\n @if (centerLabel()) {\n <span class=\"center-label\">\n {{ centerLabel() }}\n </span>\n }\n </div>\n }\n </div>\n\n @if (legend() !== 'none') {\n <ul class=\"legend\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <li\n class=\"legend-item\"\n [class.interactive]=\"interactive()\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === tabStopIndex() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"interactive() ? entryLabel(entry) : null\"\n (pointerenter)=\"onLegendEnter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onLegendFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index, '.legend')\"\n (click)=\"onLegendClick(entry.slice, index, $event)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n <span\n class=\"swatch\"\n animate.enter=\"mark-enter\"\n [style.background]=\"entry.color\">\n </span>\n\n <span class=\"legend-label\">\n {{ entry.slice.label }}\n </span>\n\n <span class=\"legend-value\">\n {{ entry.formattedValue }}\n </span>\n\n @if (partOfWhole()) {\n <span class=\"legend-percent\">\n {{ entry.formattedPercent }}\n </span>\n }\n </li>\n }\n </ul>\n }\n </div>\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEA,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC;AAC7B,MAAM,iBAAiB,GAAG,IAAI;AAEvB,MAAM,oBAAoB,GAAG,IAAI;AAExC;AAC6C;AACvC,SAAU,YAAY,CAAC,WAAmB,EAAA;AAC9C,IAAA,OAAO,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,WAAW,IAAI,CAAC,IAAI,WAAW,GAAG;AACvE,UAAE,KAAK,CAAC,WAAW;UACjB,oBAAoB;AAC1B;AAEA;;;AAG2D;SAC3C,aAAa,CAC3B,MAAgC,EAChC,KAAoB,EACpB,UAAkB,EAAA;AAElB,IAAA,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE;AAC3D,QAAA,OAAO,CAAC,GAAG,MAAM,CAAC;IACpB;AACA,IAAA,IAAI,MAAM,CAAC,MAAM,IAAI,KAAK,EAAE;AAC1B,QAAA,OAAO,CAAC,GAAG,MAAM,CAAC;IACpB;AACA,IAAA,MAAM,MAAM,GAAG,CAAC,GAAG,MAAM;SACtB,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1E,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,C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AAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACb,uBAAuB,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,SAAA,EAAA,MAAA,EAAA,WAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAQd,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAf7B,SAAS;+BACE,cAAc,EAAA,UAAA,EACZ,IAAI,EAAA,OAAA,EACP;wBACP,iBAAiB;wBACjB,qBAAqB;wBACrB,aAAa;wBACb,uBAAuB;AACxB,qBAAA,EAAA,IAAA,EAGK,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,EAAA,aAAA,EACzC,iBAAiB,CAAC,QAAQ,EAAA,eAAA,EACxB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,yxMAAA,EAAA,MAAA,EAAA,CAAA,k9RAAA,CAAA,EAAA;k1EAgI3C,gBAAgB,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEtMtB;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-pie-chart.mjs","sources":["../../../src/lib/components/pie-chart/pie-chart.math.ts","../../../src/lib/components/pie-chart/pie-chart.component.ts","../../../src/lib/components/pie-chart/pie-chart.component.html","../../../src/lib/components/pie-chart/ids-group-ltd-ids-design-system-components-pie-chart.ts"],"sourcesContent":["import type { PieChartSlice } from './pie-chart.types';\n\nconst FULL_TURN = Math.PI * 2;\nconst FULL_TURN_EPSILON = 1e-9;\n\nexport const DEFAULT_INNER_RADIUS = 0.68;\n\n/** Valid over [0, 1): zero is a solid pie, and one would leave no ring to draw, so it falls back\n * along with every other unusable value. */\nexport function holeFraction(innerRadius: number): number {\n return Number.isFinite(innerRadius) && innerRadius >= 0 && innerRadius < 1\n ? round(innerRadius)\n : DEFAULT_INNER_RADIUS;\n}\n\n/** The slices a legend can carry, with everything past `limit` summed into one. The kept slices stay\n * in the order given — a ring is read against its legend top to bottom, so reordering by value\n * would move every other slice to make room for the grouping. The remainder takes the neutral\n * eighth palette slot, which is what that slot is for. */\nexport function groupSmallest(\n slices: readonly PieChartSlice[],\n limit: number | null,\n otherLabel: string,\n): PieChartSlice[] {\n if (limit === null || !Number.isInteger(limit) || limit < 2) {\n return [...slices];\n }\n if (slices.length <= limit) {\n return [...slices];\n }\n const ranked = [...slices]\n .map((slice, index) => ({ index, value: positiveValues([slice.value])[0] }))\n .sort((a, b) => b.value - a.value || a.index - b.index);\n const kept = new Set(ranked.slice(0, limit - 1).map((entry) => entry.index));\n const remainder = slices\n .filter((unusedSlice, index) => !kept.has(index))\n .reduce((sum, slice) => sum + positiveValues([slice.value])[0], 0);\n\n return [\n ...slices.filter((unusedSlice, index) => kept.has(index)),\n { id: 'ds-pie-other', label: otherLabel, value: remainder, slot: 8 },\n ];\n}\n\nexport interface PieArc {\n readonly startAngle: number;\n readonly endAngle: number;\n}\n\n/** A ring is a part-to-whole picture, so anything that is not a positive share\n * becomes zero. Non-finite values go in the same pass: one NaN reaches every\n * other slice through the total, and a `d` attribute holding NaN draws nothing\n * at all rather than failing loudly. */\nexport function positiveValues(values: readonly number[]): number[] {\n return values.map((value) =>\n Number.isFinite(value) && value > 0 ? value : 0,\n );\n}\n\nexport function resolveTotal(values: readonly number[]): number {\n return positiveValues(values).reduce((sum, value) => sum + value, 0);\n}\n\nexport function sliceArcs(values: readonly number[]): PieArc[] {\n const positive = positiveValues(values);\n const total = resolveTotal(positive);\n if (total <= 0) {\n return positive.map(() => ({ startAngle: 0, endAngle: 0 }));\n }\n let cursor = 0;\n\n return positive.map((value) => {\n const startAngle = cursor;\n cursor += (value / total) * FULL_TURN;\n\n return { startAngle, endAngle: cursor };\n });\n}\n\nexport function resolveInnerRadius(\n outerRadius: number,\n innerRadius: number,\n): number {\n if (!Number.isFinite(outerRadius) || outerRadius <= 0) {\n return 0;\n }\n\n return outerRadius * holeFraction(innerRadius);\n}\n\nexport function paletteIndex(\n slot: number | undefined,\n index: number,\n paletteLength: number,\n): number {\n if (paletteLength <= 0) {\n return 0;\n }\n if (slot !== undefined && Number.isInteger(slot) && slot > 0) {\n return (slot - 1) % paletteLength;\n }\n\n return index % paletteLength;\n}\n\n/** One `\"x y\"` pair for a path. Angles run clockwise from 12 o'clock, where a\n * reader expects a ring to start; SVG's y axis points down, so that is\n * (sin, -cos) rather than the (cos, sin) of the maths convention. */\nexport function ringPoint(\n centerX: number,\n centerY: number,\n radius: number,\n angle: number,\n): string {\n const { x, y } = ringCoords(centerX, centerY, radius, angle);\n\n return `${x} ${y}`;\n}\n\n/** The same point as numbers, for PLACING something rather than drawing a path. */\nexport function ringCoords(\n centerX: number,\n centerY: number,\n radius: number,\n angle: number,\n): { x: number; y: number } {\n return {\n x: round(centerX + radius * Math.sin(angle)),\n y: round(centerY - radius * Math.cos(angle)),\n };\n}\n\nexport function arcPath(\n centerX: number,\n centerY: number,\n outerRadius: number,\n innerRadius: number,\n startAngle: number,\n endAngle: number,\n): string {\n const finite = [\n centerX,\n centerY,\n outerRadius,\n innerRadius,\n startAngle,\n endAngle,\n ].every((value) => Number.isFinite(value));\n if (!finite || outerRadius <= 0) {\n return '';\n }\n const inner = Math.min(Math.max(innerRadius, 0), outerRadius);\n const sweep = endAngle - startAngle;\n if (sweep <= 0) {\n return '';\n }\n if (sweep >= FULL_TURN - FULL_TURN_EPSILON) {\n return fullRingPath(centerX, centerY, outerRadius, inner);\n }\n const largeArcFlag = sweep > Math.PI ? 1 : 0;\n const outerRadii = `${round(outerRadius)} ${round(outerRadius)}`;\n const outerArc =\n `M ${ringPoint(centerX, centerY, outerRadius, startAngle)}` +\n ` A ${outerRadii} 0 ${largeArcFlag} 1 ${ringPoint(centerX, centerY, outerRadius, endAngle)}`;\n if (inner === 0) {\n return `${outerArc} L ${round(centerX)} ${round(centerY)} Z`;\n }\n const innerRadii = `${round(inner)} ${round(inner)}`;\n\n return (\n `${outerArc} L ${ringPoint(centerX, centerY, inner, endAngle)}` +\n ` A ${innerRadii} 0 ${largeArcFlag} 0 ${ringPoint(centerX, centerY, inner, startAngle)} Z`\n );\n}\n\nfunction fullRingPath(\n centerX: number,\n centerY: number,\n outerRadius: number,\n innerRadius: number,\n): string {\n const outer = circlePath(centerX, centerY, outerRadius, 1);\n if (innerRadius <= 0) {\n return outer;\n }\n\n // The hole is cut by winding the inner circle the other way, which the default\n // nonzero fill rule then cancels against the outer one.\n return `${outer} ${circlePath(centerX, centerY, innerRadius, 0)}`;\n}\n\n/** A single arc of a full turn ends where it starts and SVG draws nothing for\n * it, so a closed circle is two half-turns. */\nfunction circlePath(\n centerX: number,\n centerY: number,\n radius: number,\n sweepFlag: 0 | 1,\n): string {\n const top = ringPoint(centerX, centerY, radius, 0);\n const bottom = ringPoint(centerX, centerY, radius, Math.PI);\n const radii = `${round(radius)} ${round(radius)}`;\n\n return `M ${top} A ${radii} 0 1 ${sweepFlag} ${bottom} A ${radii} 0 1 ${sweepFlag} ${top} Z`;\n}\n\nfunction round(value: number): number {\n return Math.round(value * 1000) / 1000;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport {\n CHART_SERIES_COLORS,\n describeSeries,\n formatWholePercent,\n largestRemainder,\n markAt,\n rovingMarks,\n chartRenderGate,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartDataTable,\n ChartFrame,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport {\n ChartTooltipDirective,\n chartActiveMark,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartItemTooltipTrigger,\n ChartTooltipContext,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport {\n DEFAULT_INNER_RADIUS,\n arcPath,\n groupSmallest,\n holeFraction,\n paletteIndex,\n positiveValues,\n resolveInnerRadius,\n resolveTotal,\n ringCoords,\n sliceArcs,\n} from './pie-chart.math';\nimport type { PieChartSlice } from './pie-chart.types';\nimport { ChartDataTableComponent } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport type { ChartDataRow } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport { resolveChartDefaults } from '@ids-group-ltd/ids-design-system/components';\n\nconst RING_VIEW_BOX_SIZE = 100;\nconst RING_CENTER = RING_VIEW_BOX_SIZE / 2;\nconst RING_OUTER_RADIUS = RING_VIEW_BOX_SIZE / 2;\n\n@Component({\n selector: 'ds-pie-chart',\n standalone: true,\n imports: [\n SkeletonComponent,\n ChartTooltipDirective,\n IconComponent,\n ChartDataTableComponent,\n ],\n templateUrl: './pie-chart.component.html',\n styleUrl: './pie-chart.component.scss',\n host: { '[class.framed]': \"frameResolved() === 'auto'\" },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PieChartComponent {\n protected readonly renderReady = chartRenderGate();\n\n /** One slice per entry. A non-positive or non-finite value counts as zero — a ring is a\n * part-to-whole picture and has no way to draw a negative share. */\n readonly data = input.required<readonly PieChartSlice[]>();\n\n /** Printed inside the ring. Null prints the sum through `valueFormat`. */\n readonly centerValue = input<string | null>(null);\n\n /** Caption under the centre value. */\n readonly centerLabel = input<string | null>(null);\n\n /** Logical placement, so a right-to-left page needs no second value. */\n readonly legend = input<'end' | 'bottom' | 'none'>('end');\n\n /** Longest legend to draw. Past it the smallest slices are summed into one, so a long tail does\n * not become a legend nobody reads. Off by default: grouping changes what the chart says, and\n * that is the consumer's call. Values below 2 are ignored — one slice is not a pie. */\n readonly maxSlices = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n\n /** Names the grouped slice. Unset falls back to `DS_INTL.chart.other`. */\n readonly otherLabel = input<string | null>(null);\n\n readonly otherLabelResolved = computed(\n () => this.otherLabel() ?? this.intl().chart.other,\n );\n\n /** The hole, as a fraction of the outer radius. Zero draws a solid pie and takes the centre\n * content away with the hole that held it. */\n readonly innerRadius = input(DEFAULT_INNER_RADIUS, {\n transform: numberAttribute,\n });\n\n /** Whether the chart draws its own bordered, padded box. `'auto'`, the default, draws it;\n * `'none'` leaves the chart bare, for one placed inside a card the page has already drawn.\n * Unset falls back to `DS_CONFIG.chart.frame`, then `'auto'` — whether charts live inside cards\n * is one decision per app rather than per plot. */\n readonly frame = input<ChartFrame | null>(null);\n\n /** How long the tooltip stays after the pointer leaves the mark, in milliseconds. Zero, the\n * default, takes it away at once: a panel that outlives the pointer sits over the plot the\n * reader has moved on to.\n *\n * Raise it only for a panel a reader has to REACH — one carrying a link, a figure, or anything\n * selectable — which is WCAG 1.4.13's hoverable clause. The panel is portaled to the body, so\n * crossing the gap to it at an ordinary pointer speed needs about 140. Unset falls back to\n * `DS_CONFIG.chart.tooltipLingerMs`, then 0. */\n readonly tooltipLingerMs = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n /** Printed above the plot as the chart's visible title, and reused as the annex table's\n * caption. */\n readonly caption = input<string | null>(null);\n\n /** Accessible name. Generated from the data when omitted. */\n readonly summary = input<string | null>(null);\n\n /** The label-and-value table under the plot: `'toggle'` puts it behind a disclosure,\n * `'visible'` opens it, `'none'` renders none. It is the non-visual route to the numbers, so\n * `'none'` belongs only where the same data is already in a table on the page.\n * Unset falls back to `DS_CONFIG.chart.dataTable`, then `'none'`. */\n readonly dataTable = input<ChartDataTable | null>(null);\n\n /** Prints each slice's share of the ring — in the legend, on the tooltip and in the data table.\n * On by default, unlike every other chart, because a ring IS parts of one whole: the share is a\n * real quantity here whatever the data, not a claim the consumer has to make. Off drops all\n * three, for a ring whose slices are already labelled in percent. */\n readonly partOfWhole = input(true, { transform: booleanAttribute });\n\n /** Draws skeleton marks in place of the data, at the same count, so the chart does not resize\n * when the data lands. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** Shown in place of the plot when `data` is empty. Unset falls back to\n * `DS_INTL.chart.empty`. */\n readonly emptyText = input<string | null>(null);\n\n /** Shows `errorText` in place of the plot. Separate from `loading` and from an empty `data`,\n * because \"the request failed\" and \"there is nothing to show\" read the same to a reader and\n * mean opposite things. */\n readonly error = input(false, { transform: booleanAttribute });\n\n /** The message the error state prints. Unset falls back to `DS_INTL.chart.error`. */\n readonly errorText = input<string | null>(null);\n /** Formats every value the chart prints, the annex table and the generated description\n * included. Unset falls back to `DS_CONFIG.chart.valueFormat`, then `DS_CONFIG.locale` /\n * `LOCALE_ID`. */\n readonly valueFormat = input<ChartValueFormat | null>(null);\n\n private readonly defaults = resolveChartDefaults(this);\n protected readonly intl = inject(DS_INTL);\n readonly frameResolved = this.defaults.frame;\n readonly dataTableResolved = this.defaults.dataTable;\n readonly emptyTextResolved = this.defaults.emptyText;\n readonly errorTextResolved = this.defaults.errorText;\n readonly valueFormatResolved = this.defaults.valueFormat;\n\n /** Turns on the click affordance — the pointer cursor and any hover tint.\n * The click output fires whether or not this is set, so a consumer that\n * binds the output and forgets the flag still receives every click. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** The slice that was clicked, or activated with Enter or Space. Fires whether or not\n * `interactive` is set. */\n readonly sliceClicked = output<PieChartSlice>();\n\n /** Holds the hovered mark and its tooltip in place when it is clicked, until Escape or a press\n * outside releases it. Off by default: a click is already the drill-down hook, and a mark left\n * lit after the pointer has gone needs a reader who knows why it is lit. `sliceClicked` fires\n * either way — pinning is a state, not a handler. */\n readonly pinOnClick = input(false, { transform: booleanAttribute });\n\n /** Dims every OTHER mark while one is hovered or focused, so the reader's eye is held on the\n * one under the pointer. Off by default: the dimming costs the separation BETWEEN the dimmed\n * marks — measured 2026-09-13, the worst pair of three dimmed series falls from dE 14.8 at full\n * opacity to 2.1 at `--ds-chart-dim-opacity`'s default 0.3 — so it buys loudness for one mark\n * and pays for it with the rest of the chart. */\n readonly dimOthers = input(false, { transform: booleanAttribute });\n\n /** Accepted for parity with the other four charts and deliberately without effect here: a ring\n * arrives as ONE object, because arcs share their edges and fading them one at a time lets the\n * background through every seam. There is nothing to stagger. */\n readonly staggerMs = input(0, { transform: numberAttribute });\n\n /** Whether a hovered or focused slice opens a tooltip. `'axis'` is not offered — a ring\n * has no axis to group readings under. */\n readonly tooltip = input<ChartItemTooltipTrigger>('item');\n\n protected readonly tooltipTemplate =\n contentChild<TemplateRef<{ $implicit: ChartTooltipContext }>>(\n 'dsChartTooltip',\n );\n\n private readonly tooltipLingerResolved = this.defaults.tooltipLingerMs;\n\n protected readonly activeMark = chartActiveMark(() =>\n this.tooltipLingerResolved(),\n );\n\n protected onMarkClick(\n payload: PieChartSlice,\n index: number,\n event: Event,\n ): void {\n this.sliceClicked.emit(payload);\n if (this.pinOnClick()) {\n this.activeMark.pin(index, event);\n }\n }\n protected readonly roving = rovingMarks(() => this.slices().length);\n\n protected onMarkFocus(index: number, event: FocusEvent): void {\n this.roving.focus(index);\n this.activeMark.enter(index, event);\n }\n\n private readonly legendHighlight = signal(-1);\n\n /** A legend item stands for its arc, so it opens the arc's tooltip over the ARC and dims the\n * other slices — the same state hovering the arc itself produces. */\n protected onLegendEnter(index: number, event: Event): void {\n this.legendHighlight.set(index);\n this.activeMark.enter(index, event, this.arcAt(event, index));\n }\n\n protected onLegendLeave(): void {\n this.legendHighlight.set(-1);\n this.activeMark.leave();\n }\n\n protected onLegendFocus(index: number, event: FocusEvent): void {\n this.roving.focus(index);\n this.onLegendEnter(index, event);\n }\n\n protected onLegendClick(\n slice: PieChartSlice,\n index: number,\n event: Event,\n ): void {\n this.sliceClicked.emit(slice);\n if (this.pinOnClick()) {\n this.activeMark.pin(index, event, this.arcAt(event, index));\n }\n }\n\n private arcAt(event: Event, index: number): Element | null {\n return markAt(\n (event.currentTarget as Element).closest('.chart'),\n index,\n '.slice',\n );\n }\n\n protected isDimmed(index: number): boolean {\n // Naming a slice in the legend fades the rest whether or not `dimOthers` is set, the way every\n // chart legend singles out its series; `dimOthers` governs what a pointer over the ring does.\n const legendHighlight = this.legendHighlight();\n if (legendHighlight !== -1) {\n return legendHighlight !== index;\n }\n\n return (\n this.dimOthers() &&\n this.activeMark.index() !== -1 &&\n this.activeMark.index() !== index\n );\n }\n\n protected onMarkNavigation(\n event: KeyboardEvent,\n index: number,\n scope: string,\n ): void {\n this.roving.navigate(\n event,\n index,\n (event.currentTarget as Element).closest(scope),\n );\n }\n\n protected readonly tooltipContext = computed<ChartTooltipContext | null>(\n () => {\n const entry = this.slices()[this.activeMark.index()];\n if (this.tooltip() === 'none' || !entry) {\n return null;\n }\n\n return {\n category: '',\n entries: [\n {\n label: entry.slice.label,\n value: entry.slice.value,\n formatted: this.partOfWhole()\n ? `${entry.formattedValue} · ${entry.formattedPercent}`\n : entry.formattedValue,\n color: entry.color,\n },\n ],\n };\n },\n );\n\n protected readonly viewBox = `0 0 ${RING_VIEW_BOX_SIZE} ${RING_VIEW_BOX_SIZE}`;\n\n protected readonly total = computed(() =>\n resolveTotal(this.data().map((slice) => slice.value)),\n );\n\n protected readonly visibleSlices = computed(() =>\n groupSmallest(this.data(), this.maxSlices(), this.otherLabelResolved()),\n );\n\n protected readonly dataTableColumns = computed<readonly string[]>(() =>\n this.partOfWhole()\n ? [\n this.intl().chart.labelColumn,\n this.intl().chart.valueColumn,\n this.intl().chart.shareColumn,\n ]\n : [this.intl().chart.labelColumn, this.intl().chart.valueColumn],\n );\n\n protected readonly dataTableRows = computed<readonly ChartDataRow[]>(() =>\n this.slices().map((entry) => ({\n key: entry.slice.id,\n cells: this.partOfWhole()\n ? [entry.slice.label, entry.formattedValue, entry.formattedPercent]\n : [entry.slice.label, entry.formattedValue],\n })),\n );\n\n protected readonly slices = computed(() => {\n const data = this.visibleSlices();\n const values = data.map((slice) => slice.value);\n const arcs = sliceArcs(values);\n const percents = largestRemainder(positiveValues(values));\n const innerRadius = resolveInnerRadius(\n RING_OUTER_RADIUS,\n this.innerRadius(),\n );\n const format = (value: number) =>\n this.valueFormatResolved()(value, 'tooltip');\n\n const midRadius = (RING_OUTER_RADIUS + innerRadius) / 2;\n\n return data.map((slice, index) => ({\n slice,\n // Halfway along the arc and halfway through the ring: the one point that is inside a slice\n // whatever its sweep, which the bounding box of a curved wedge is not.\n center: ringCoords(\n RING_CENTER,\n RING_CENTER,\n midRadius,\n (arcs[index].startAngle + arcs[index].endAngle) / 2,\n ),\n path: arcPath(\n RING_CENTER,\n RING_CENTER,\n RING_OUTER_RADIUS,\n innerRadius,\n arcs[index].startAngle,\n arcs[index].endAngle,\n ),\n color:\n CHART_SERIES_COLORS[\n paletteIndex(slice.slot, index, CHART_SERIES_COLORS.length)\n ],\n formattedValue: format(slice.value),\n formattedPercent: formatWholePercent(\n percents[index],\n this.defaults.locale,\n ),\n }));\n });\n\n /** The held slice's centre as a share of the ring box. The badge is HTML over the ring rather\n * than a `foreignObject` inside it: inside, the viewBox scale grows the badge with the ring and\n * the grid that centres the glyph does not lay out. */\n protected readonly pinnedEntry = computed(() => {\n const entry = this.activeMark.pinned()\n ? this.slices()[this.activeMark.index()]\n : undefined;\n\n return entry\n ? {\n center: {\n x: (entry.center.x / RING_VIEW_BOX_SIZE) * 100,\n y: (entry.center.y / RING_VIEW_BOX_SIZE) * 100,\n },\n }\n : null;\n });\n\n protected readonly resolvedCenterValue = computed(\n () =>\n this.centerValue() ?? this.valueFormatResolved()(this.total(), 'tooltip'),\n );\n\n protected readonly accessibleName = computed(\n () =>\n this.summary() ??\n describeSeries(\n this.intl().chart,\n this.caption() ?? this.intl().chart.title,\n this.data().map((slice) => ({\n label: slice.label,\n value: slice.value,\n })),\n (value) => this.valueFormatResolved()(value, 'tooltip'),\n this.dataTableResolved() !== 'none',\n ),\n );\n\n protected readonly hole = computed(() => holeFraction(this.innerRadius()));\n\n protected entryLabel(entry: {\n slice: PieChartSlice;\n formattedValue: string;\n formattedPercent: string;\n }) {\n return this.partOfWhole()\n ? `${entry.slice.label}, ${entry.formattedValue}, ${entry.formattedPercent}`\n : `${entry.slice.label}, ${entry.formattedValue}`;\n }\n\n protected onSliceKey(slice: PieChartSlice, event: Event): void {\n // Only the legend item's own key opens it: a key pressed on a control inside belongs to that\n // control.\n if (!this.interactive() || event.target !== event.currentTarget) {\n return;\n }\n event.preventDefault();\n this.sliceClicked.emit(slice);\n }\n\n // Both focusable would double the tab order; the legend items already carry the route.\n // Without this the ring is unreachable at `legend=\"none\"`.\n protected readonly ringCarriesTheRoute = computed(\n () => this.interactive() && this.legend() === 'none',\n );\n\n protected readonly isEmpty = computed(() => this.data().length === 0);\n\n /** Placeholder legend rows while loading. Follows the real slice count so the\n * chart does not resize when the data lands; falls back to three when `data`\n * is still empty. */\n protected readonly skeletonRows = computed(() =>\n Array.from({ length: Math.max(this.data().length, 3) }),\n );\n}\n","<figure\n class=\"pie-chart\"\n [style.--_pie-chart-hole-fraction]=\"hole()\">\n @if (activeMark.pinned()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"activeMark.release()\">\n {{ intl().chart.unpin }}\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p\n class=\"empty-text is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n </div>\n } @else if (loading() || !renderReady()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\"\n [class.legend-bottom]=\"legend() === 'bottom'\">\n <ds-skeleton circle\n width=\"var(--_pie-chart-size)\"\n height=\"var(--_pie-chart-size)\"\n [shimmer]=\"loading()\" />\n\n @if (legend() !== 'none') {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonRows(); track $index) {\n <ds-skeleton height=\"var(--_pie-chart-legend-row-height)\" [shimmer]=\"loading()\" />\n }\n </div>\n }\n </div>\n } @else if (isEmpty()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p class=\"empty-text\">\n {{ emptyTextResolved() }}\n </p>\n </div>\n } @else {\n <div\n class=\"chart\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [class.legend-bottom]=\"legend() === 'bottom'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipPinned]=\"activeMark.pinned()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <div\n class=\"ring\"\n [class.ring-outline]=\"total() === 0\">\n <svg\n class=\"ring-svg\"\n [class.dims-others]=\"dimOthers()\"\n [attr.aria-hidden]=\"ringCarriesTheRoute() ? null : true\"\n [attr.viewBox]=\"viewBox\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <path\n class=\"slice\"\n [class.interactive]=\"interactive()\"\n [class.is-pinned]=\"\n activeMark.pinned() && activeMark.index() === index\n \"\n [class.is-dimmed]=\"isDimmed(index)\"\n [class.focusable]=\"ringCarriesTheRoute()\"\n [attr.d]=\"entry.path\"\n [style.fill]=\"entry.color\"\n [attr.role]=\"ringCarriesTheRoute() ? 'button' : null\"\n [attr.tabindex]=\"\n ringCarriesTheRoute()\n ? index === roving.tabStop()\n ? 0\n : -1\n : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"\n ringCarriesTheRoute() ? entryLabel(entry) : null\n \"\n (pointerenter)=\"activeMark.enter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index, '.ring-svg')\"\n (click)=\"onMarkClick(entry.slice, index, $event)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n </path>\n }\n </svg>\n\n @if (hole() > 0) {\n <div class=\"center\">\n <span class=\"center-value\">\n {{ resolvedCenterValue() }}\n </span>\n\n @if (centerLabel()) {\n <span class=\"center-label\">\n {{ centerLabel() }}\n </span>\n }\n </div>\n }\n\n @if (pinnedEntry(); as entry) {\n <span\n class=\"pin-marker\"\n [style.left.%]=\"entry.center.x\"\n [style.top.%]=\"entry.center.y\">\n <ds-icon\n name=\"pin\"\n [size]=\"14\" />\n </span>\n }\n </div>\n\n @if (legend() !== 'none') {\n <ul class=\"legend\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <li\n class=\"legend-item\"\n [class.interactive]=\"interactive()\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === roving.tabStop() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"interactive() ? entryLabel(entry) : null\"\n (pointerenter)=\"onLegendEnter(index, $event)\"\n (pointerleave)=\"onLegendLeave()\"\n (focus)=\"onLegendFocus(index, $event)\"\n (blur)=\"onLegendLeave()\"\n (keydown)=\"onMarkNavigation($event, index, '.legend')\"\n (click)=\"onLegendClick(entry.slice, index, $event)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n <span\n class=\"swatch\"\n [style.background]=\"entry.color\">\n </span>\n\n <span class=\"legend-label\">\n {{ entry.slice.label }}\n </span>\n\n <span class=\"legend-value\">\n {{ entry.formattedValue }}\n </span>\n\n @if (partOfWhole()) {\n <span class=\"legend-percent\">\n {{ entry.formattedPercent }}\n </span>\n }\n </li>\n }\n </ul>\n }\n </div>\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEA,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC;AAC7B,MAAM,iBAAiB,GAAG,IAAI;AAEvB,MAAM,oBAAoB,GAAG,IAAI;AAExC;AAC6C;AACvC,SAAU,YAAY,CAAC,WAAmB,EAAA;AAC9C,IAAA,OAAO,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,WAAW,IAAI,CAAC,IAAI,WAAW,GAAG;AACvE,UAAE,KAAK,CAAC,WAAW;UACjB,oBAAoB;AAC1B;AAEA;;;AAG2D;SAC3C,aAAa,CAC3B,MAAgC,EAChC,KAAoB,EACpB,UAAkB,EAAA;AAElB,IAAA,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE;AAC3D,QAAA,OAAO,CAAC,GAAG,MAAM,CAAC;IACpB;AACA,IAAA,IAAI,MAAM,CAAC,MAAM,IAAI,KAAK,EAAE;AAC1B,QAAA,OAAO,CAAC,GAAG,MAAM,CAAC;IACpB;AACA,IAAA,MAAM,MAAM,GAAG,CAAC,GAAG,MAAM;SACtB,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1E,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;AACzD,IAAA,MAAM,IA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A,MAAA,EAAA,WAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAQd,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAf7B,SAAS;+BACE,cAAc,EAAA,UAAA,EACZ,IAAI,EAAA,OAAA,EACP;wBACP,iBAAiB;wBACjB,qBAAqB;wBACrB,aAAa;wBACb,uBAAuB;AACxB,qBAAA,EAAA,IAAA,EAGK,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,EAAA,aAAA,EACzC,iBAAiB,CAAC,QAAQ,EAAA,eAAA,EACxB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,ioMAAA,EAAA,MAAA,EAAA,CAAA,00TAAA,CAAA,EAAA;k1EAsI3C,gBAAgB,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE/MtB;;AAEG;;;;"}
@@ -1,9 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, numberAttribute, booleanAttribute, output, computed, signal, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
- import { resolveChartDefaults, decimationTarget, needsDecimating, lttbDecimate, minMaxDecimate, niceDomain, CHART_SERIES_COLORS, linearScale, tickValues } from '@ids-group-ltd/ids-design-system/components';
2
+ import { input, numberAttribute, booleanAttribute, output, inject, computed, signal, ElementRef, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
+ import { chartRenderGate, resolveChartDefaults, decimationTarget, needsDecimating, lttbDecimate, minMaxDecimate, niceDomain, CHART_SERIES_COLORS, linearScale, tickValues, listenForMarkFocus, markOf } from '@ids-group-ltd/ids-design-system/components';
4
4
  import { ChartLegendComponent } from '@ids-group-ltd/ids-design-system/components/chart-legend';
5
5
  import { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';
6
6
  import { chartActiveMark, ChartTooltipDirective } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';
7
+ import { DS_INTL } from '@ids-group-ltd/ids-design-system/core';
7
8
  import { ChartDataTableComponent } from '@ids-group-ltd/ids-design-system/components/chart-data-table';
8
9
 
9
10
  const SCATTER_VIEW_WIDTH = 640;
@@ -62,6 +63,7 @@ const EDGE_GUTTER = 12;
62
63
  * rather than leaving the reader to count points that are not there.
63
64
  */
64
65
  class ScatterChartComponent {
66
+ renderReady = chartRenderGate();
65
67
  /** One entry per series, each carrying its own readings. Both scales are continuous, so a
66
68
  * point holds its position on each rather than an index into a list of categories. */
67
69
  data = input([], ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
@@ -94,10 +96,10 @@ class ScatterChartComponent {
94
96
  /** Separate from empty data: "the request failed" and "there is nothing to show" read the same
95
97
  * and mean opposite things. */
96
98
  error = input(false, { ...(ngDevMode ? { debugName: "error" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
97
- /** Shown when no series carries a reading. Unset falls back to `DS_CONFIG.chart.emptyText`. */
99
+ /** Shown when no series carries a reading. Unset falls back to `DS_INTL.chart.empty`. */
98
100
  emptyText = input(null, ...(ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []));
99
101
  /** Shown in place of the plot while `error` is set. Unset falls back to
100
- * `DS_CONFIG.chart.errorText`. */
102
+ * `DS_INTL.chart.error`. */
101
103
  errorText = input(null, ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
102
104
  /** Formats every number the chart prints - both axes' ticks, the accessible name and the annex
103
105
  * table. Unset falls back to `DS_CONFIG.chart.valueFormat`. */
@@ -111,6 +113,7 @@ class ScatterChartComponent {
111
113
  /** The clicked reading, with the series it belongs to. Fires on click and on Enter or Space. */
112
114
  pointClicked = output();
113
115
  defaults = resolveChartDefaults(this);
116
+ intl = inject(DS_INTL);
114
117
  frameResolved = this.defaults.frame;
115
118
  dataTableResolved = this.defaults.dataTable;
116
119
  emptyTextResolved = this.defaults.emptyText;
@@ -201,6 +204,8 @@ class ScatterChartComponent {
201
204
  plotBottom = this.plot.top + this.plot.height;
202
205
  plotRight = this.plot.left + this.plot.width;
203
206
  multiSeries = computed(() => this.data().length > 1, ...(ngDevMode ? [{ debugName: "multiSeries" }] : /* istanbul ignore next */ []));
207
+ /** The series named in the legend under the pointer, which fades the rest. */
208
+ highlightedSeries = signal(null, ...(ngDevMode ? [{ debugName: "highlightedSeries" }] : /* istanbul ignore next */ []));
204
209
  legendItems = computed(() => this.series().map((entry) => ({
205
210
  id: entry.series.id,
206
211
  label: entry.series.label,
@@ -211,15 +216,16 @@ class ScatterChartComponent {
211
216
  if (given) {
212
217
  return given;
213
218
  }
219
+ const words = this.intl().chart;
214
220
  const format = this.valueFormatResolved();
215
221
  const { xMin, xMax, yMin, yMax } = this.domains();
216
222
  const counted = this.series().reduce((total, entry) => total + entry.points.length, 0);
217
- const axes = `${this.xLabel() ?? 'x'} from ${format(xMin, 'tooltip')} to ${format(xMax, 'tooltip')}, ${this.yLabel() ?? 'y'} from ${format(yMin, 'tooltip')} to ${format(yMax, 'tooltip')}`;
223
+ const axes = `${words.scatterAxis(this.xLabel() ?? 'x', format(xMin, 'tooltip'), format(xMax, 'tooltip'))}, ${words.scatterAxis(this.yLabel() ?? 'y', format(yMin, 'tooltip'), format(yMax, 'tooltip'))}`;
218
224
  const dropped = this.droppedCount();
219
- return `${this.caption() ?? 'Scatter chart'}: ${counted} readings drawn, ${axes}.${dropped > 0 ? ` ${dropped} further readings were thinned out to keep the plot drawable; the data table lists every one.` : ''}`;
225
+ return words.scatterSummary(this.caption() ?? words.scatterTitle, counted, axes, dropped);
220
226
  }, ...(ngDevMode ? [{ debugName: "accessibleName" }] : /* istanbul ignore next */ []));
221
227
  dataTableColumns = computed(() => [
222
- 'Series',
228
+ this.intl().chart.seriesColumn,
223
229
  this.xLabel() ?? 'x',
224
230
  this.yLabel() ?? 'y',
225
231
  ], ...(ngDevMode ? [{ debugName: "dataTableColumns" }] : /* istanbul ignore next */ []));
@@ -249,8 +255,31 @@ class ScatterChartComponent {
249
255
  skeletonHeight = `${SCATTER_VIEW_HEIGHT}`;
250
256
  /** Flattened so one index addresses a mark, which is what `chartActiveMark` counts. */
251
257
  flatMarks = computed(() => this.series().flatMap((entry) => entry.points.map((mark) => ({ entry, mark }))), ...(ngDevMode ? [{ debugName: "flatMarks" }] : /* istanbul ignore next */ []));
252
- markIndex(seriesKey, pointKey) {
253
- return this.flatMarks().findIndex((held) => held.entry.key === seriesKey && held.mark.key === pointKey);
258
+ /** Where each series starts in `flatMarks`, so a point carries its flat index without a search
259
+ * and the series' one listener reads it back. */
260
+ seriesStart = computed(() => {
261
+ const starts = new Map();
262
+ let next = 0;
263
+ for (const entry of this.series()) {
264
+ starts.set(entry.key, next);
265
+ next += entry.points.length;
266
+ }
267
+ return starts;
268
+ }, ...(ngDevMode ? [{ debugName: "seriesStart" }] : /* istanbul ignore next */ []));
269
+ constructor() {
270
+ listenForMarkFocus(inject(ElementRef), (event, hit) => this.activeMark.enter(hit.index, event, undefined, hit.element));
271
+ }
272
+ onPointOver(event) {
273
+ const hit = markOf(event);
274
+ if (hit) {
275
+ this.activeMark.enter(hit.index, event, undefined, hit.element);
276
+ }
277
+ }
278
+ onPointActivate(event) {
279
+ const held = this.flatMarks()[markOf(event)?.index ?? -1];
280
+ if (held) {
281
+ this.onPointClick(held.entry.series, held.mark.point);
282
+ }
254
283
  }
255
284
  tooltipContext = computed(() => {
256
285
  const held = this.flatMarks()[this.activeMark.index()];
@@ -278,7 +307,7 @@ class ScatterChartComponent {
278
307
  return `${series.label}, ${this.xLabel() ?? 'x'} ${format(point.x, 'tooltip')}, ${this.yLabel() ?? 'y'} ${format(point.y, 'tooltip')}`;
279
308
  }
280
309
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ScatterChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
281
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ScatterChartComponent, isStandalone: true, selector: "ds-scatter-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, xLabel: { classPropertyName: "xLabel", publicName: "xLabel", isSignal: true, isRequired: false, transformFunction: null }, yLabel: { classPropertyName: "yLabel", publicName: "yLabel", isSignal: true, isRequired: false, transformFunction: null }, decimator: { classPropertyName: "decimator", publicName: "decimator", isSignal: true, isRequired: false, transformFunction: null }, tickCount: { classPropertyName: "tickCount", publicName: "tickCount", 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 }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, frame: { classPropertyName: "frame", publicName: "frame", isSignal: true, isRequired: false, transformFunction: null }, dataTable: { classPropertyName: "dataTable", publicName: "dataTable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", 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 }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, dimOthers: { classPropertyName: "dimOthers", publicName: "dimOthers", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pointClicked: "pointClicked" }, host: { properties: { "class.framed": "frameResolved() === 'auto'" } }, exportAs: ["dsScatterChart"], ngImport: i0, template: "<figure class=\"scatter-chart\">\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 <ds-skeleton\n class=\"skeleton\"\n width=\"100%\"\n [height]=\"skeletonHeight + 'px'\" />\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <svg\n class=\"canvas\"\n [attr.viewBox]=\"viewBox\"\n [class.dims-others]=\"dimOthers()\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\">\n @for (tick of yTicks(); track tick.value) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plot.left\"\n [attr.x2]=\"plotRight\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n\n <text\n class=\"axis-label\"\n text-anchor=\"end\"\n [attr.x]=\"plot.left - 8\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (tick of xTicks(); track tick.value) {\n <text\n class=\"axis-label is-horizontal\"\n text-anchor=\"middle\"\n [attr.x]=\"tick.x\"\n [attr.y]=\"plotBottom + 18\">\n {{ tick.label }}\n </text>\n }\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot.left\"\n [attr.x2]=\"plotRight\"\n [attr.y1]=\"plotBottom\"\n [attr.y2]=\"plotBottom\" />\n\n @for (entry of series(); track entry.key) {\n <g [style.--_scatter-series-color]=\"entry.color\">\n @for (mark of entry.points; track mark.key) {\n <circle\n class=\"point\"\n animate.enter=\"mark-enter\"\n [class.interactive]=\"interactive()\"\n [attr.cx]=\"mark.cx\"\n [attr.cy]=\"mark.cy\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"interactive() ? 0 : null\"\n [attr.aria-label]=\"\n interactive() ? pointLabel(entry.series, mark.point) : null\n \"\n (pointerenter)=\"\n activeMark.enter(markIndex(entry.key, mark.key), $event)\n \"\n (focus)=\"activeMark.enter(markIndex(entry.key, mark.key), $event)\"\n (click)=\"onPointClick(entry.series, mark.point)\"\n (keydown.enter)=\"onPointClick(entry.series, mark.point)\"\n (keydown.space)=\"onPointClick(entry.series, mark.point)\" />\n }\n </g>\n }\n\n @if (yLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [attr.transform]=\"\n 'rotate(-90) translate(' + -(plot.top + plot.height / 2) + ', 12)'\n \">\n {{ yLabel() }}\n </text>\n }\n\n @if (xLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [attr.x]=\"plot.left + plot.width / 2\"\n [attr.y]=\"plotBottom + 32\">\n {{ xLabel() }}\n </text>\n }\n </svg>\n\n <!-- On its face, not only in the accessible name: a decimated chart that stays quiet leaves the\n reader counting points that were never drawn. -->\n @if (droppedCount() > 0) {\n <p\n class=\"thinned\"\n role=\"status\">\n {{ droppedCount() }} readings thinned out to keep the plot drawable -\n every one is in the data table.\n </p>\n }\n\n @if (multiSeries()) {\n <ds-chart-legend [items]=\"legendItems()\" />\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 (toggled)=\"tableOpen.set($event)\" />\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}}.point.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}.point.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{-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)}@media not (forced-colors:active){.point: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)}.scatter-chart{--_scatter-chart-grid-line-color: var(--ds-scatter-chart-grid-line-color, var(--ds-chart-grid-line-color));--_scatter-chart-axis-line-color: var(--ds-scatter-chart-axis-line-color, var(--ds-chart-axis-line-color));--_scatter-chart-axis-label-color: var(--ds-scatter-chart-axis-label-color, var(--ds-chart-axis-label-color));--_scatter-chart-axis-font-size: var(--ds-scatter-chart-axis-font-size, var(--ds-chart-axis-font-size));--_scatter-chart-dot-radius: var(--ds-scatter-chart-dot-radius, var(--ds-chart-dot-radius));--_scatter-chart-dot-opacity: var(--ds-scatter-chart-dot-opacity, .72);--_scatter-chart-focus-color: var(--ds-scatter-chart-focus-color, var(--focus-ring-color));--_scatter-chart-focus-width: var(--ds-scatter-chart-focus-width, var(--focus-ring-width));--ds-chart-focus-ring-color: var(--_scatter-chart-focus-color);--focus-ring-color: var(--_scatter-chart-focus-color);--focus-ring-width: var(--_scatter-chart-focus-width);margin:0}.empty{display:grid;place-items:center;min-block-size:240px;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)}.canvas{display:block;inline-size:100%;block-size:auto}.grid-line{stroke:var(--_scatter-chart-grid-line-color);stroke-width:1}.axis-line{stroke:var(--_scatter-chart-axis-line-color);stroke-width:1}.axis-label,.axis-title{fill:var(--_scatter-chart-axis-label-color);font-size:var(--_scatter-chart-axis-font-size)}.axis-label{dominant-baseline:middle}.axis-label.is-horizontal{dominant-baseline:auto}.axis-title{font-weight:var(--font-weight-bold)}.point{r:var(--_scatter-chart-dot-radius);fill:var(--_scatter-series-color);fill-opacity:var(--_scatter-chart-dot-opacity)}.point.interactive{cursor:pointer}.canvas .point{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill-opacity var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.canvas .point.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.canvas.dims-others:not(:has(.point.is-pinned)):has(.point.interactive:hover) .point.interactive:not(:hover),.canvas.dims-others:not(:has(.point.is-pinned)):has(.point.interactive:focus-visible) .point.interactive:not(:focus-visible),.canvas.dims-others:has(.point.is-pinned) .point:not(.is-pinned){opacity:var(--ds-chart-dim-opacity)}@media not (forced-colors:active){.point.interactive:focus-visible{outline:none}}.point.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))}.thinned{margin-block:var(--space-2) 0;color:var(--text-secondary);font-size:var(--font-size-xs)}\n"], dependencies: [{ kind: "component", type: ChartLegendComponent, selector: "ds-chart-legend", inputs: ["items", "hidden", "toggleable", "mode", "highlighted"], outputs: ["hiddenChange", "highlightedChange"] }, { kind: "directive", type: ChartTooltipDirective, selector: "[dsChartTooltip]", inputs: ["dsChartTooltip", "dsChartTooltipOrigin", "dsChartTooltipTemplate", "dsChartTooltipExtraGap", "dsChartTooltipPreferBelow"] }, { kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline"] }, { kind: "component", type: ChartDataTableComponent, selector: "ds-chart-data-table", inputs: ["columns", "rows", "caption", "open", "rowHeader"], outputs: ["toggled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
310
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ScatterChartComponent, isStandalone: true, selector: "ds-scatter-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, xLabel: { classPropertyName: "xLabel", publicName: "xLabel", isSignal: true, isRequired: false, transformFunction: null }, yLabel: { classPropertyName: "yLabel", publicName: "yLabel", isSignal: true, isRequired: false, transformFunction: null }, decimator: { classPropertyName: "decimator", publicName: "decimator", isSignal: true, isRequired: false, transformFunction: null }, tickCount: { classPropertyName: "tickCount", publicName: "tickCount", 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 }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, frame: { classPropertyName: "frame", publicName: "frame", isSignal: true, isRequired: false, transformFunction: null }, dataTable: { classPropertyName: "dataTable", publicName: "dataTable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", 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 }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, dimOthers: { classPropertyName: "dimOthers", publicName: "dimOthers", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pointClicked: "pointClicked" }, host: { properties: { "class.framed": "frameResolved() === 'auto'" } }, exportAs: ["dsScatterChart"], ngImport: i0, template: "<figure class=\"scatter-chart\">\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() || !renderReady()) {\n <ds-skeleton class=\"skeleton\"\n width=\"100%\"\n [shimmer]=\"loading()\"\n [height]=\"skeletonHeight + 'px'\" />\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <svg\n class=\"canvas\"\n [attr.viewBox]=\"viewBox\"\n [class.dims-others]=\"dimOthers()\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\">\n @for (tick of yTicks(); track tick.value) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plot.left\"\n [attr.x2]=\"plotRight\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n\n <text\n class=\"axis-label\"\n text-anchor=\"end\"\n [attr.x]=\"plot.left - 8\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (tick of xTicks(); track tick.value) {\n <text\n class=\"axis-label is-horizontal\"\n text-anchor=\"middle\"\n [attr.x]=\"tick.x\"\n [attr.y]=\"plotBottom + 18\">\n {{ tick.label }}\n </text>\n }\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot.left\"\n [attr.x2]=\"plotRight\"\n [attr.y1]=\"plotBottom\"\n [attr.y2]=\"plotBottom\" />\n\n @for (entry of series(); track entry.key) {\n @let start = seriesStart().get(entry.key) ?? 0;\n\n <g\n [class.is-dimmed]=\"\n highlightedSeries() !== null &&\n highlightedSeries() !== entry.series.id\n \"\n [style.--_scatter-series-color]=\"entry.color\"\n (pointerover)=\"onPointOver($event)\"\n (click)=\"onPointActivate($event)\"\n (keydown.enter)=\"onPointActivate($event)\"\n (keydown.space)=\"onPointActivate($event)\">\n @for (mark of entry.points; track mark.key; let index = $index) {\n <circle\n class=\"point\"\n [class.interactive]=\"interactive()\"\n [attr.cx]=\"mark.cx\"\n [attr.cy]=\"mark.cy\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"interactive() ? 0 : null\"\n [attr.data-mark-index]=\"start + index\"\n [attr.aria-label]=\"\n interactive() ? pointLabel(entry.series, mark.point) : null\n \" />\n }\n </g>\n }\n\n @if (yLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [attr.transform]=\"\n 'rotate(-90) translate(' + -(plot.top + plot.height / 2) + ', 12)'\n \">\n {{ yLabel() }}\n </text>\n }\n\n @if (xLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [attr.x]=\"plot.left + plot.width / 2\"\n [attr.y]=\"plotBottom + 32\">\n {{ xLabel() }}\n </text>\n }\n </svg>\n\n <!-- On its face, not only in the accessible name: a decimated chart that stays quiet leaves the\n reader counting points that were never drawn. -->\n @if (droppedCount() > 0) {\n <p\n class=\"thinned\"\n role=\"status\">\n {{ intl().chart.scatterThinned(droppedCount()) }}\n </p>\n }\n\n @if (multiSeries()) {\n <ds-chart-legend\n [items]=\"legendItems()\"\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 (toggled)=\"tableOpen.set($event)\" />\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}}.point{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)) backwards}.point.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{-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)}@media not (forced-colors:active){.point: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)}.scatter-chart{--_scatter-chart-grid-line-color: var(--ds-scatter-chart-grid-line-color, var(--ds-chart-grid-line-color));--_scatter-chart-axis-line-color: var(--ds-scatter-chart-axis-line-color, var(--ds-chart-axis-line-color));--_scatter-chart-axis-label-color: var(--ds-scatter-chart-axis-label-color, var(--ds-chart-axis-label-color));--_scatter-chart-axis-font-size: var(--ds-scatter-chart-axis-font-size, var(--ds-chart-axis-font-size));--_scatter-chart-dot-radius: var(--ds-scatter-chart-dot-radius, var(--ds-chart-dot-radius));--_scatter-chart-dot-opacity: var(--ds-scatter-chart-dot-opacity, .72);--_scatter-chart-focus-color: var(--ds-scatter-chart-focus-color, var(--focus-ring-color));--_scatter-chart-focus-width: var(--ds-scatter-chart-focus-width, var(--focus-ring-width));--ds-chart-focus-ring-color: var(--_scatter-chart-focus-color);--focus-ring-color: var(--_scatter-chart-focus-color);--focus-ring-width: var(--_scatter-chart-focus-width);margin:0}.empty{display:grid;place-items:center;min-block-size:240px;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)}.canvas{display:block;inline-size:100%;block-size:auto}.grid-line{stroke:var(--_scatter-chart-grid-line-color);stroke-width:1}.axis-line{stroke:var(--_scatter-chart-axis-line-color);stroke-width:1}.axis-label,.axis-title{fill:var(--_scatter-chart-axis-label-color);font-size:var(--_scatter-chart-axis-font-size)}.axis-label{dominant-baseline:middle}.axis-label.is-horizontal{dominant-baseline:auto}.axis-title{font-weight:var(--font-weight-bold)}.point{r:var(--_scatter-chart-dot-radius);fill:var(--_scatter-series-color);fill-opacity:var(--_scatter-chart-dot-opacity)}.point.interactive{cursor:pointer}.canvas .point{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill-opacity var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.canvas .point.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.canvas.dims-others:not(:has(.point.is-pinned)):has(.point.interactive:hover) .point.interactive:not(:hover),.canvas.dims-others:not(:has(.point.is-pinned)):has(.point.interactive:focus-visible) .point.interactive:not(:focus-visible),.canvas.dims-others:has(.point.is-pinned) .point:not(.is-pinned){opacity:var(--ds-chart-dim-opacity)}@media not (forced-colors:active){.point.interactive:focus-visible{outline:none}}.point.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))}.thinned{margin-block:var(--space-2) 0;color:var(--text-secondary);font-size:var(--font-size-xs)}g.is-dimmed{opacity:var(--ds-chart-dim-opacity);transition:opacity var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}\n"], dependencies: [{ kind: "component", type: ChartLegendComponent, selector: "ds-chart-legend", inputs: ["items", "hidden", "toggleable", "mode", "highlighted"], outputs: ["hiddenChange", "highlightedChange"] }, { kind: "directive", type: ChartTooltipDirective, selector: "[dsChartTooltip]", inputs: ["dsChartTooltip", "dsChartTooltipOrigin", "dsChartTooltipTemplate", "dsChartTooltipExtraGap", "dsChartTooltipPinned"] }, { kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline", "shimmer"] }, { kind: "component", type: ChartDataTableComponent, selector: "ds-chart-data-table", inputs: ["columns", "rows", "caption", "open", "rowHeader"], outputs: ["toggled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
282
311
  }
283
312
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ScatterChartComponent, decorators: [{
284
313
  type: Component,
@@ -289,8 +318,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
289
318
  ChartDataTableComponent,
290
319
  ], host: {
291
320
  '[class.framed]': "frameResolved() === 'auto'",
292
- }, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<figure class=\"scatter-chart\">\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 <ds-skeleton\n class=\"skeleton\"\n width=\"100%\"\n [height]=\"skeletonHeight + 'px'\" />\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <svg\n class=\"canvas\"\n [attr.viewBox]=\"viewBox\"\n [class.dims-others]=\"dimOthers()\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\">\n @for (tick of yTicks(); track tick.value) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plot.left\"\n [attr.x2]=\"plotRight\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n\n <text\n class=\"axis-label\"\n text-anchor=\"end\"\n [attr.x]=\"plot.left - 8\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (tick of xTicks(); track tick.value) {\n <text\n class=\"axis-label is-horizontal\"\n text-anchor=\"middle\"\n [attr.x]=\"tick.x\"\n [attr.y]=\"plotBottom + 18\">\n {{ tick.label }}\n </text>\n }\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot.left\"\n [attr.x2]=\"plotRight\"\n [attr.y1]=\"plotBottom\"\n [attr.y2]=\"plotBottom\" />\n\n @for (entry of series(); track entry.key) {\n <g [style.--_scatter-series-color]=\"entry.color\">\n @for (mark of entry.points; track mark.key) {\n <circle\n class=\"point\"\n animate.enter=\"mark-enter\"\n [class.interactive]=\"interactive()\"\n [attr.cx]=\"mark.cx\"\n [attr.cy]=\"mark.cy\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"interactive() ? 0 : null\"\n [attr.aria-label]=\"\n interactive() ? pointLabel(entry.series, mark.point) : null\n \"\n (pointerenter)=\"\n activeMark.enter(markIndex(entry.key, mark.key), $event)\n \"\n (focus)=\"activeMark.enter(markIndex(entry.key, mark.key), $event)\"\n (click)=\"onPointClick(entry.series, mark.point)\"\n (keydown.enter)=\"onPointClick(entry.series, mark.point)\"\n (keydown.space)=\"onPointClick(entry.series, mark.point)\" />\n }\n </g>\n }\n\n @if (yLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [attr.transform]=\"\n 'rotate(-90) translate(' + -(plot.top + plot.height / 2) + ', 12)'\n \">\n {{ yLabel() }}\n </text>\n }\n\n @if (xLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [attr.x]=\"plot.left + plot.width / 2\"\n [attr.y]=\"plotBottom + 32\">\n {{ xLabel() }}\n </text>\n }\n </svg>\n\n <!-- On its face, not only in the accessible name: a decimated chart that stays quiet leaves the\n reader counting points that were never drawn. -->\n @if (droppedCount() > 0) {\n <p\n class=\"thinned\"\n role=\"status\">\n {{ droppedCount() }} readings thinned out to keep the plot drawable -\n every one is in the data table.\n </p>\n }\n\n @if (multiSeries()) {\n <ds-chart-legend [items]=\"legendItems()\" />\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 (toggled)=\"tableOpen.set($event)\" />\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}}.point.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}.point.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{-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)}@media not (forced-colors:active){.point: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)}.scatter-chart{--_scatter-chart-grid-line-color: var(--ds-scatter-chart-grid-line-color, var(--ds-chart-grid-line-color));--_scatter-chart-axis-line-color: var(--ds-scatter-chart-axis-line-color, var(--ds-chart-axis-line-color));--_scatter-chart-axis-label-color: var(--ds-scatter-chart-axis-label-color, var(--ds-chart-axis-label-color));--_scatter-chart-axis-font-size: var(--ds-scatter-chart-axis-font-size, var(--ds-chart-axis-font-size));--_scatter-chart-dot-radius: var(--ds-scatter-chart-dot-radius, var(--ds-chart-dot-radius));--_scatter-chart-dot-opacity: var(--ds-scatter-chart-dot-opacity, .72);--_scatter-chart-focus-color: var(--ds-scatter-chart-focus-color, var(--focus-ring-color));--_scatter-chart-focus-width: var(--ds-scatter-chart-focus-width, var(--focus-ring-width));--ds-chart-focus-ring-color: var(--_scatter-chart-focus-color);--focus-ring-color: var(--_scatter-chart-focus-color);--focus-ring-width: var(--_scatter-chart-focus-width);margin:0}.empty{display:grid;place-items:center;min-block-size:240px;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)}.canvas{display:block;inline-size:100%;block-size:auto}.grid-line{stroke:var(--_scatter-chart-grid-line-color);stroke-width:1}.axis-line{stroke:var(--_scatter-chart-axis-line-color);stroke-width:1}.axis-label,.axis-title{fill:var(--_scatter-chart-axis-label-color);font-size:var(--_scatter-chart-axis-font-size)}.axis-label{dominant-baseline:middle}.axis-label.is-horizontal{dominant-baseline:auto}.axis-title{font-weight:var(--font-weight-bold)}.point{r:var(--_scatter-chart-dot-radius);fill:var(--_scatter-series-color);fill-opacity:var(--_scatter-chart-dot-opacity)}.point.interactive{cursor:pointer}.canvas .point{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill-opacity var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.canvas .point.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.canvas.dims-others:not(:has(.point.is-pinned)):has(.point.interactive:hover) .point.interactive:not(:hover),.canvas.dims-others:not(:has(.point.is-pinned)):has(.point.interactive:focus-visible) .point.interactive:not(:focus-visible),.canvas.dims-others:has(.point.is-pinned) .point:not(.is-pinned){opacity:var(--ds-chart-dim-opacity)}@media not (forced-colors:active){.point.interactive:focus-visible{outline:none}}.point.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))}.thinned{margin-block:var(--space-2) 0;color:var(--text-secondary);font-size:var(--font-size-xs)}\n"] }]
293
- }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], xLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "xLabel", required: false }] }], yLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "yLabel", required: false }] }], decimator: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimator", required: false }] }], tickCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "tickCount", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], summary: [{ type: i0.Input, args: [{ isSignal: true, alias: "summary", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], frame: [{ type: i0.Input, args: [{ isSignal: true, alias: "frame", required: false }] }], dataTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], valueFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormat", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], dimOthers: [{ type: i0.Input, args: [{ isSignal: true, alias: "dimOthers", required: false }] }], pointClicked: [{ type: i0.Output, args: ["pointClicked"] }] } });
321
+ }, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<figure class=\"scatter-chart\">\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() || !renderReady()) {\n <ds-skeleton class=\"skeleton\"\n width=\"100%\"\n [shimmer]=\"loading()\"\n [height]=\"skeletonHeight + 'px'\" />\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <svg\n class=\"canvas\"\n [attr.viewBox]=\"viewBox\"\n [class.dims-others]=\"dimOthers()\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\">\n @for (tick of yTicks(); track tick.value) {\n <line\n class=\"grid-line\"\n [attr.x1]=\"plot.left\"\n [attr.x2]=\"plotRight\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\" />\n\n <text\n class=\"axis-label\"\n text-anchor=\"end\"\n [attr.x]=\"plot.left - 8\"\n [attr.y]=\"tick.y\">\n {{ tick.label }}\n </text>\n }\n\n @for (tick of xTicks(); track tick.value) {\n <text\n class=\"axis-label is-horizontal\"\n text-anchor=\"middle\"\n [attr.x]=\"tick.x\"\n [attr.y]=\"plotBottom + 18\">\n {{ tick.label }}\n </text>\n }\n\n <line\n class=\"axis-line\"\n [attr.x1]=\"plot.left\"\n [attr.x2]=\"plotRight\"\n [attr.y1]=\"plotBottom\"\n [attr.y2]=\"plotBottom\" />\n\n @for (entry of series(); track entry.key) {\n @let start = seriesStart().get(entry.key) ?? 0;\n\n <g\n [class.is-dimmed]=\"\n highlightedSeries() !== null &&\n highlightedSeries() !== entry.series.id\n \"\n [style.--_scatter-series-color]=\"entry.color\"\n (pointerover)=\"onPointOver($event)\"\n (click)=\"onPointActivate($event)\"\n (keydown.enter)=\"onPointActivate($event)\"\n (keydown.space)=\"onPointActivate($event)\">\n @for (mark of entry.points; track mark.key; let index = $index) {\n <circle\n class=\"point\"\n [class.interactive]=\"interactive()\"\n [attr.cx]=\"mark.cx\"\n [attr.cy]=\"mark.cy\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"interactive() ? 0 : null\"\n [attr.data-mark-index]=\"start + index\"\n [attr.aria-label]=\"\n interactive() ? pointLabel(entry.series, mark.point) : null\n \" />\n }\n </g>\n }\n\n @if (yLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [attr.transform]=\"\n 'rotate(-90) translate(' + -(plot.top + plot.height / 2) + ', 12)'\n \">\n {{ yLabel() }}\n </text>\n }\n\n @if (xLabel()) {\n <text\n class=\"axis-title\"\n text-anchor=\"middle\"\n [attr.x]=\"plot.left + plot.width / 2\"\n [attr.y]=\"plotBottom + 32\">\n {{ xLabel() }}\n </text>\n }\n </svg>\n\n <!-- On its face, not only in the accessible name: a decimated chart that stays quiet leaves the\n reader counting points that were never drawn. -->\n @if (droppedCount() > 0) {\n <p\n class=\"thinned\"\n role=\"status\">\n {{ intl().chart.scatterThinned(droppedCount()) }}\n </p>\n }\n\n @if (multiSeries()) {\n <ds-chart-legend\n [items]=\"legendItems()\"\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 (toggled)=\"tableOpen.set($event)\" />\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}}.point{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)) backwards}.point.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{-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)}@media not (forced-colors:active){.point: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)}.scatter-chart{--_scatter-chart-grid-line-color: var(--ds-scatter-chart-grid-line-color, var(--ds-chart-grid-line-color));--_scatter-chart-axis-line-color: var(--ds-scatter-chart-axis-line-color, var(--ds-chart-axis-line-color));--_scatter-chart-axis-label-color: var(--ds-scatter-chart-axis-label-color, var(--ds-chart-axis-label-color));--_scatter-chart-axis-font-size: var(--ds-scatter-chart-axis-font-size, var(--ds-chart-axis-font-size));--_scatter-chart-dot-radius: var(--ds-scatter-chart-dot-radius, var(--ds-chart-dot-radius));--_scatter-chart-dot-opacity: var(--ds-scatter-chart-dot-opacity, .72);--_scatter-chart-focus-color: var(--ds-scatter-chart-focus-color, var(--focus-ring-color));--_scatter-chart-focus-width: var(--ds-scatter-chart-focus-width, var(--focus-ring-width));--ds-chart-focus-ring-color: var(--_scatter-chart-focus-color);--focus-ring-color: var(--_scatter-chart-focus-color);--focus-ring-width: var(--_scatter-chart-focus-width);margin:0}.empty{display:grid;place-items:center;min-block-size:240px;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)}.canvas{display:block;inline-size:100%;block-size:auto}.grid-line{stroke:var(--_scatter-chart-grid-line-color);stroke-width:1}.axis-line{stroke:var(--_scatter-chart-axis-line-color);stroke-width:1}.axis-label,.axis-title{fill:var(--_scatter-chart-axis-label-color);font-size:var(--_scatter-chart-axis-font-size)}.axis-label{dominant-baseline:middle}.axis-label.is-horizontal{dominant-baseline:auto}.axis-title{font-weight:var(--font-weight-bold)}.point{r:var(--_scatter-chart-dot-radius);fill:var(--_scatter-series-color);fill-opacity:var(--_scatter-chart-dot-opacity)}.point.interactive{cursor:pointer}.canvas .point{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill-opacity var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.canvas .point.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.canvas.dims-others:not(:has(.point.is-pinned)):has(.point.interactive:hover) .point.interactive:not(:hover),.canvas.dims-others:not(:has(.point.is-pinned)):has(.point.interactive:focus-visible) .point.interactive:not(:focus-visible),.canvas.dims-others:has(.point.is-pinned) .point:not(.is-pinned){opacity:var(--ds-chart-dim-opacity)}@media not (forced-colors:active){.point.interactive:focus-visible{outline:none}}.point.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))}.thinned{margin-block:var(--space-2) 0;color:var(--text-secondary);font-size:var(--font-size-xs)}g.is-dimmed{opacity:var(--ds-chart-dim-opacity);transition:opacity var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}\n"] }]
322
+ }], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], xLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "xLabel", required: false }] }], yLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "yLabel", required: false }] }], decimator: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimator", required: false }] }], tickCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "tickCount", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], summary: [{ type: i0.Input, args: [{ isSignal: true, alias: "summary", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], frame: [{ type: i0.Input, args: [{ isSignal: true, alias: "frame", required: false }] }], dataTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], valueFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormat", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], dimOthers: [{ type: i0.Input, args: [{ isSignal: true, alias: "dimOthers", required: false }] }], pointClicked: [{ type: i0.Output, args: ["pointClicked"] }] } });
294
323
 
295
324
  /**
296
325
  * Generated bundle index. Do not edit.