origam 2.38.0 → 2.38.2

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 (228) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/src/assets/locales/en.json +1 -1
  3. package/dist/src/assets/locales/fr.json +2 -2
  4. package/dist/src/components/Alert/OrigamAlert.vue +739 -165
  5. package/dist/src/components/App/OrigamApp.vue +95 -19
  6. package/dist/src/components/App/OrigamAppBar.vue +751 -158
  7. package/dist/src/components/Audio/OrigamAudio.vue +1288 -346
  8. package/dist/src/components/Audio/OrigamAudioWaveform.vue +63 -7
  9. package/dist/src/components/Avatar/OrigamAvatar.vue +678 -126
  10. package/dist/src/components/Avatar/OrigamAvatarGroup.vue +700 -153
  11. package/dist/src/components/Badge/OrigamBadge.vue +548 -135
  12. package/dist/src/components/Blockquote/OrigamBlockquote.vue +698 -140
  13. package/dist/src/components/BottomNav/OrigamBottomNav.vue +864 -156
  14. package/dist/src/components/Bracket/OrigamBracket.vue +1013 -380
  15. package/dist/src/components/Bracket/OrigamBracketCompetitor.vue +674 -154
  16. package/dist/src/components/Bracket/OrigamBracketMatch.vue +663 -163
  17. package/dist/src/components/Bracket/OrigamBracketRound.vue +116 -34
  18. package/dist/src/components/Breadcrumb/OrigamBreadcrumb.vue +654 -119
  19. package/dist/src/components/Breadcrumb/OrigamBreadcrumbDivider.vue +292 -54
  20. package/dist/src/components/Breadcrumb/OrigamBreadcrumbItem.vue +657 -126
  21. package/dist/src/components/Btn/OrigamBtn.vue +928 -249
  22. package/dist/src/components/Btn/OrigamBtnGroup.vue +658 -141
  23. package/dist/src/components/Btn/OrigamBtnToggle.vue +578 -91
  24. package/dist/src/components/Calendar/OrigamCalendar.vue +1142 -484
  25. package/dist/src/components/Card/OrigamCard.vue +938 -194
  26. package/dist/src/components/Card/OrigamCardHeader.vue +593 -104
  27. package/dist/src/components/Card/OrigamCardText.vue +536 -84
  28. package/dist/src/components/Carousel/OrigamCarousel.vue +778 -202
  29. package/dist/src/components/Carousel/OrigamCarouselItem.vue +660 -109
  30. package/dist/src/components/Chart/OrigamChart.vue +942 -452
  31. package/dist/src/components/Chart/OrigamChartAxis.vue +111 -19
  32. package/dist/src/components/Chart/OrigamChartBoxPlot.vue +713 -297
  33. package/dist/src/components/Chart/OrigamChartBullet.vue +701 -286
  34. package/dist/src/components/Chart/OrigamChartCandlestick.vue +663 -243
  35. package/dist/src/components/Chart/OrigamChartCartesian.vue +1055 -487
  36. package/dist/src/components/Chart/OrigamChartGauge.vue +563 -164
  37. package/dist/src/components/Chart/OrigamChartHeatmap.vue +677 -251
  38. package/dist/src/components/Chart/OrigamChartHoneycomb.vue +700 -288
  39. package/dist/src/components/Chart/OrigamChartLegend.vue +108 -16
  40. package/dist/src/components/Chart/OrigamChartMap.vue +723 -299
  41. package/dist/src/components/Chart/OrigamChartPareto.vue +721 -276
  42. package/dist/src/components/Chart/OrigamChartPictorial.vue +777 -355
  43. package/dist/src/components/Chart/OrigamChartPolar.vue +603 -210
  44. package/dist/src/components/Chart/OrigamChartPolarBar.vue +674 -271
  45. package/dist/src/components/Chart/OrigamChartPyramid.vue +685 -250
  46. package/dist/src/components/Chart/OrigamChartRadar.vue +515 -165
  47. package/dist/src/components/Chart/OrigamChartRangeSelector.vue +50 -25
  48. package/dist/src/components/Chart/OrigamChartSankey.vue +913 -467
  49. package/dist/src/components/Chart/OrigamChartSparkline.vue +711 -268
  50. package/dist/src/components/Chart/OrigamChartStreamgraph.vue +810 -368
  51. package/dist/src/components/Chart/OrigamChartSunburst.vue +779 -368
  52. package/dist/src/components/Chart/OrigamChartTooltip.vue +78 -19
  53. package/dist/src/components/Chart/OrigamChartTreemap.vue +750 -288
  54. package/dist/src/components/Chart/OrigamChartVariwide.vue +679 -251
  55. package/dist/src/components/Chart/OrigamChartWordCloud.vue +674 -265
  56. package/dist/src/components/Checkbox/OrigamCheckbox.vue +781 -136
  57. package/dist/src/components/Checkbox/OrigamCheckboxBtn.vue +465 -81
  58. package/dist/src/components/Checkbox/OrigamCheckboxGroup.vue +824 -137
  59. package/dist/src/components/Chip/OrigamChip.vue +867 -202
  60. package/dist/src/components/Chip/OrigamChipGroup.vue +633 -121
  61. package/dist/src/components/ClientOnly/OrigamClientOnly.vue +30 -4
  62. package/dist/src/components/Clipboard/OrigamClipboard.vue +624 -105
  63. package/dist/src/components/Code/OrigamCode.vue +844 -206
  64. package/dist/src/components/CodeGroup/OrigamCodeGroup.vue +494 -83
  65. package/dist/src/components/ColorPicker/OrigamColorPicker.vue +777 -159
  66. package/dist/src/components/ColorPicker/OrigamColorPickerCanvas.vue +295 -181
  67. package/dist/src/components/ColorPicker/OrigamColorPickerEdit.vue +108 -45
  68. package/dist/src/components/ColorPicker/OrigamColorPickerPreview.vue +131 -46
  69. package/dist/src/components/ColorPicker/OrigamColorPickerSwatches.vue +128 -39
  70. package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +1123 -258
  71. package/dist/src/components/CommandPalette/OrigamCommandPalette.vue +415 -162
  72. package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +389 -145
  73. package/dist/src/components/ContextualMenu/OrigamContextualMenu.vue +852 -147
  74. package/dist/src/components/Counter/OrigamCounter.vue +588 -96
  75. package/dist/src/components/DataList/OrigamDataList.vue +619 -113
  76. package/dist/src/components/DataList/OrigamDataText.vue +295 -65
  77. package/dist/src/components/DataList/OrigamDataTitle.vue +295 -65
  78. package/dist/src/components/DataTable/OrigamDataTable.vue +934 -222
  79. package/dist/src/components/DataTable/OrigamDataTableColumnCell.vue +196 -51
  80. package/dist/src/components/DataTable/OrigamDataTableFooter.vue +319 -78
  81. package/dist/src/components/DataTable/OrigamDataTableGroupHeaderRow.vue +124 -44
  82. package/dist/src/components/DataTable/OrigamDataTableHeaderCell.vue +181 -70
  83. package/dist/src/components/DataTable/OrigamDataTableHeaders.vue +155 -46
  84. package/dist/src/components/DataTable/OrigamDataTableHeadersCell.vue +145 -27
  85. package/dist/src/components/DataTable/OrigamDataTableHeadersCellMobile.vue +126 -43
  86. package/dist/src/components/DataTable/OrigamDataTableRow.vue +151 -73
  87. package/dist/src/components/DataTable/OrigamDataTableRows.vue +261 -106
  88. package/dist/src/components/DatePicker/OrigamDatePicker.vue +1048 -261
  89. package/dist/src/components/DatePicker/OrigamDatePickerControls.vue +155 -51
  90. package/dist/src/components/DatePicker/OrigamDatePickerHeader.vue +147 -46
  91. package/dist/src/components/DatePicker/OrigamDatePickerMonth.vue +312 -134
  92. package/dist/src/components/DatePicker/OrigamDatePickerMonths.vue +151 -61
  93. package/dist/src/components/DatePicker/OrigamDatePickerYears.vue +154 -67
  94. package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +1147 -306
  95. package/dist/src/components/DefaultsProvider/OrigamDefaultsProvider.vue +74 -14
  96. package/dist/src/components/Dialog/OrigamDialog.vue +953 -196
  97. package/dist/src/components/Dialog/OrigamDialogConfirmation.vue +886 -148
  98. package/dist/src/components/Divider/OrigamDivider.vue +210 -50
  99. package/dist/src/components/Drawer/OrigamDrawer.vue +909 -207
  100. package/dist/src/components/EmptyState/OrigamEmptyState.vue +146 -35
  101. package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +746 -159
  102. package/dist/src/components/ExpansionPanel/OrigamExpansionPanelContent.vue +591 -95
  103. package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +663 -143
  104. package/dist/src/components/ExpansionPanel/OrigamExpansionPanels.vue +675 -134
  105. package/dist/src/components/Field/OrigamField.vue +1118 -306
  106. package/dist/src/components/FileField/OrigamFileField.vue +1188 -311
  107. package/dist/src/components/FileField/OrigamFileFieldDragNDropItem.vue +155 -36
  108. package/dist/src/components/FileField/OrigamFileFieldListItem.vue +155 -36
  109. package/dist/src/components/Form/OrigamForm.vue +197 -74
  110. package/dist/src/components/Grid/OrigamGrid.vue +707 -147
  111. package/dist/src/components/Grid/OrigamGridItem.vue +110 -37
  112. package/dist/src/components/Grids/OrigamCol.vue +593 -110
  113. package/dist/src/components/Grids/OrigamContainer.vue +461 -80
  114. package/dist/src/components/Grids/OrigamRow.vue +573 -112
  115. package/dist/src/components/Grids/OrigamSpacer.vue +54 -17
  116. package/dist/src/components/Icon/OrigamClassIcon.vue +573 -98
  117. package/dist/src/components/Icon/OrigamComponentIcon.vue +561 -101
  118. package/dist/src/components/Icon/OrigamIcon.vue +561 -98
  119. package/dist/src/components/Icon/OrigamLigatureIcon.vue +558 -98
  120. package/dist/src/components/Icon/OrigamSvgIcon.vue +593 -100
  121. package/dist/src/components/Img/OrigamImg.vue +869 -228
  122. package/dist/src/components/InfiniteScroll/OrigamInfiniteScroll.vue +319 -111
  123. package/dist/src/components/InfiniteScroll/OrigamInfiniteScrollIntersect.vue +80 -17
  124. package/dist/src/components/InlineEdit/OrigamInlineEdit.vue +476 -140
  125. package/dist/src/components/Input/OrigamInput.vue +747 -180
  126. package/dist/src/components/ItemGroup/OrigamItemGroup.vue +112 -36
  127. package/dist/src/components/ItemGroup/OrigamItemGroupItem.vue +80 -29
  128. package/dist/src/components/Kbd/OrigamKbd.vue +450 -75
  129. package/dist/src/components/Label/OrigamLabel.vue +584 -95
  130. package/dist/src/components/Layout/OrigamLayout.vue +563 -94
  131. package/dist/src/components/Lazy/OrigamLazy.vue +131 -34
  132. package/dist/src/components/List/OrigamList.vue +755 -170
  133. package/dist/src/components/List/OrigamListChildren.vue +59 -19
  134. package/dist/src/components/List/OrigamListGroup.vue +631 -134
  135. package/dist/src/components/List/OrigamListGroupActivator.vue +45 -17
  136. package/dist/src/components/List/OrigamListItem.vue +890 -224
  137. package/dist/src/components/List/OrigamListItemWrapper.vue +20 -10
  138. package/dist/src/components/List/OrigamListSubheader.vue +542 -93
  139. package/dist/src/components/Loader/OrigamLoader.vue +110 -25
  140. package/dist/src/components/Main/OrigamMain.vue +565 -96
  141. package/dist/src/components/Masonry/OrigamMasonry.vue +799 -187
  142. package/dist/src/components/Media/OrigamMediaController.vue +465 -182
  143. package/dist/src/components/Media/OrigamMediaScrubber.vue +389 -152
  144. package/dist/src/components/Media/OrigamMediaVolumeControl.vue +174 -44
  145. package/dist/src/components/Menu/OrigamMenu.vue +1079 -255
  146. package/dist/src/components/Messages/OrigamMessages.vue +606 -97
  147. package/dist/src/components/NumberField/OrigamNumberField.vue +1208 -333
  148. package/dist/src/components/NumberFormat/OrigamNumberFormat.vue +177 -57
  149. package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +1016 -272
  150. package/dist/src/components/Overlay/OrigamOverlay.vue +446 -158
  151. package/dist/src/components/Overlay/OrigamOverlayScrim.vue +122 -30
  152. package/dist/src/components/Pagination/OrigamPagination.vue +982 -313
  153. package/dist/src/components/Parallax/OrigamParallax.vue +800 -259
  154. package/dist/src/components/Parallax/OrigamParallaxElement.vue +694 -178
  155. package/dist/src/components/Parallax/OrigamParallaxLayer.vue +132 -47
  156. package/dist/src/components/PasswordField/OrigamPasswordField.vue +1098 -265
  157. package/dist/src/components/Picker/OrigamPicker.vue +655 -108
  158. package/dist/src/components/Picker/OrigamPickerTitle.vue +108 -26
  159. package/dist/src/components/Progress/OrigamProgress.vue +436 -70
  160. package/dist/src/components/Progress/OrigamProgressCircular.vue +399 -82
  161. package/dist/src/components/Progress/OrigamProgressLinear.vue +468 -115
  162. package/dist/src/components/QrCode/OrigamQrCode.vue +642 -126
  163. package/dist/src/components/Radio/OrigamRadio.vue +772 -132
  164. package/dist/src/components/Radio/OrigamRadioBtn.vue +446 -71
  165. package/dist/src/components/Radio/OrigamRadioGroup.vue +808 -135
  166. package/dist/src/components/RatingField/OrigamRatingField.vue +963 -194
  167. package/dist/src/components/RatingField/OrigamRatingFieldItem.vue +657 -106
  168. package/dist/src/components/Responsive/OrigamResponsive.vue +548 -91
  169. package/dist/src/components/Select/OrigamSelect.vue +1639 -567
  170. package/dist/src/components/SelectionControl/OrigamSelectionControl.vue +564 -151
  171. package/dist/src/components/SelectionControl/OrigamSelectionControlGroup.vue +178 -62
  172. package/dist/src/components/Sheet/OrigamSheet.vue +773 -199
  173. package/dist/src/components/Skeleton/OrigamSkeleton.vue +249 -46
  174. package/dist/src/components/Skeleton/OrigamSkeletonGroup.vue +66 -11
  175. package/dist/src/components/Slide/OrigamSlideGroup.vue +772 -257
  176. package/dist/src/components/SliderField/OrigamSliderField.vue +1157 -335
  177. package/dist/src/components/SliderField/OrigamSliderFieldTrack.vue +236 -112
  178. package/dist/src/components/Snackbar/OrigamSnackbar.vue +871 -214
  179. package/dist/src/components/Snackbar/OrigamSnackbarGroup.vue +218 -51
  180. package/dist/src/components/Snackbar/OrigamSnackbarItem.vue +175 -43
  181. package/dist/src/components/Stepper/OrigamStepper.vue +618 -126
  182. package/dist/src/components/Stepper/OrigamStepperItem.vue +98 -37
  183. package/dist/src/components/Switch/OrigamSwitch.vue +879 -156
  184. package/dist/src/components/Switch/OrigamSwitchTrack.vue +431 -78
  185. package/dist/src/components/SystemBar/OrigamSystemBar.vue +517 -87
  186. package/dist/src/components/Table/OrigamTable.vue +585 -124
  187. package/dist/src/components/Tabs/OrigamTab.vue +239 -73
  188. package/dist/src/components/Tabs/OrigamTabPanel.vue +125 -39
  189. package/dist/src/components/Tabs/OrigamTabPanels.vue +148 -57
  190. package/dist/src/components/Tabs/OrigamTabs.vue +381 -109
  191. package/dist/src/components/TextField/OrigamTextField.vue +1077 -258
  192. package/dist/src/components/TextMask/OrigamTextMask.vue +150 -43
  193. package/dist/src/components/TextareaField/OrigamTextareaField.vue +1162 -310
  194. package/dist/src/components/TextareaField/OrigamTextareaFieldRichToolbar.vue +77 -79
  195. package/dist/src/components/ThemeProvider/OrigamThemeProvider.vue +44 -9
  196. package/dist/src/components/Timeline/OrigamTimeline.vue +113 -43
  197. package/dist/src/components/Timeline/OrigamTimelineItem.vue +163 -76
  198. package/dist/src/components/Title/OrigamTitle.vue +505 -82
  199. package/dist/src/components/Toolbar/OrigamToolbar.vue +679 -142
  200. package/dist/src/components/Tooltip/OrigamTooltip.vue +288 -72
  201. package/dist/src/components/Transition/OrigamExpandX.vue +219 -106
  202. package/dist/src/components/Transition/OrigamExpandY.vue +219 -106
  203. package/dist/src/components/Transition/OrigamFade.vue +47 -9
  204. package/dist/src/components/Transition/OrigamReverseTranslatePicker.vue +52 -10
  205. package/dist/src/components/Transition/OrigamScaleRotate.vue +52 -10
  206. package/dist/src/components/Transition/OrigamSlideX.vue +52 -10
  207. package/dist/src/components/Transition/OrigamSlideY.vue +52 -10
  208. package/dist/src/components/Transition/OrigamSnack.vue +52 -10
  209. package/dist/src/components/Transition/OrigamTransition.vue +40 -12
  210. package/dist/src/components/Transition/OrigamTranslateBottom.vue +52 -10
  211. package/dist/src/components/Transition/OrigamTranslatePicker.vue +52 -10
  212. package/dist/src/components/Transition/OrigamTranslateScale.vue +209 -97
  213. package/dist/src/components/Transition/OrigamWindowXReverseTranslate.vue +40 -7
  214. package/dist/src/components/Transition/OrigamWindowXTranslate.vue +40 -7
  215. package/dist/src/components/Transition/OrigamWindowYReverseTranslate.vue +40 -7
  216. package/dist/src/components/Transition/OrigamWindowYTranslate.vue +40 -7
  217. package/dist/src/components/Treeview/OrigamTreeview.vue +258 -118
  218. package/dist/src/components/Treeview/OrigamTreeviewNode.vue +126 -88
  219. package/dist/src/components/Video/OrigamVideo.vue +1178 -331
  220. package/dist/src/components/VirtualScroll/OrigamVirtualScroll.vue +147 -55
  221. package/dist/src/components/VirtualScroll/OrigamVirtualScrollItem.vue +94 -19
  222. package/dist/src/components/Watermark/OrigamWatermark.vue +224 -124
  223. package/dist/src/components/Window/OrigamWindow.vue +745 -175
  224. package/dist/src/components/Window/OrigamWindowItem.vue +162 -69
  225. package/dist/src/composables/Commons/display.composable.cjs +2 -0
  226. package/dist/src/composables/Commons/display.composable.js +1 -1
  227. package/dist/src/interfaces/Pagination/pagination.interface.d.ts +1 -1
  228. package/package.json +8 -8
@@ -426,85 +426,507 @@ import { CHART_CARTESIAN_KIND } from "../../enums/Chart/chart-cartesian.enum";
426
426
  import { CHART_POLAR_KIND } from "../../enums/Chart/chart-polar.enum";
427
427
  import { CHART_PYRAMID_KIND } from "../../enums/Chart/chart-pyramid.enum";
428
428
  import { CHART_TYPE } from "../../enums/Chart/chart.enum";
429
- defineOptions({
430
- name: "OrigamChart"
431
- });
429
+ /*********************************************************
430
+ * Global
431
+ *
432
+ * @description
433
+ * Shell + dispatcher. Owns the public `<OrigamChart>` API
434
+ * (`type`, `series`, `categories`, …) and routes to one of
435
+ * four family components based on `props.type`:
436
+ *
437
+ * - cartesian (line/area/bar/column/scatter/spline/stepped-line)
438
+ * -> `<OrigamChartCartesian>`
439
+ * - polar (pie/donut) -> `<OrigamChartPolar>` (no axes, no grid)
440
+ * - radar -> `<OrigamChartRadar>` (rings + spokes + polygons)
441
+ * - gauge -> `<OrigamChartGauge>` (solid radial indicator)
442
+ *
443
+ * Family components are exported too, so consumers can skip
444
+ * the dispatcher and use a tightly-typed surface directly.
445
+ * The shell exists to:
446
+ * 1. preserve the legacy `<OrigamChart type="…">` API,
447
+ * 2. let consumers swap types at runtime without remounting,
448
+ * 3. centralise the "which family handles which type" mapping.
449
+ *
450
+ * `withDefaults` literals only, per CLAUDE.md.
451
+ ********************************************************/
452
+ defineOptions({ name: "OrigamChart" });
432
453
  const props = defineProps({
433
- type: { type: null, required: false, default: "line" },
434
- series: { type: Array, required: true },
435
- categories: { type: Array, required: false, default: () => [] },
436
- title: { type: String, required: false, default: void 0 },
437
- subtitle: { type: String, required: false, default: void 0 },
438
- showLegend: { type: Boolean, required: false, default: true },
439
- legendPosition: { type: null, required: false, default: "bottom" },
440
- showTooltip: { type: Boolean, required: false, default: true },
441
- showGrid: { type: Boolean, required: false, default: true },
442
- showAxis: { type: Boolean, required: false, default: true },
443
- animated: { type: Boolean, required: false, default: true },
444
- animationDuration: { type: Number, required: false, default: 600 },
445
- stacked: { type: Boolean, required: false, default: false },
446
- stacking: { type: null, required: false },
447
- donutHoleSize: { type: Number, required: false, default: 0.6 },
448
- colorScheme: { type: Array, required: false, default: () => [] },
449
- xAxisFormat: { type: Function, required: false, default: void 0 },
450
- yAxisFormat: { type: Function, required: false, default: void 0 },
451
- aspectRatio: { type: String, required: false, default: void 0 },
452
- smoothing: { type: null, required: false, default: "none" },
453
- yMin: { type: Number, required: false, default: void 0 },
454
- yMax: { type: Number, required: false, default: void 0 },
455
- gaugeMin: { type: Number, required: false, default: 0 },
456
- gaugeMax: { type: Number, required: false, default: 100 },
457
- gaugeUnit: { type: String, required: false, default: "" },
458
- plotBands: { type: Array, required: false },
459
- plotLines: { type: Array, required: false },
460
- annotations: { type: Array, required: false },
461
- drilldown: { type: Object, required: false },
462
- secondaryYAxis: { type: Object, required: false },
463
- id: { type: String, required: false },
464
- class: { type: [String, Array, Object], required: false },
465
- style: { type: [String, Array, Object, Boolean, null], required: false, skipCheck: true },
466
- height: { type: [Number, String], required: false, default: 300 },
467
- maxHeight: { type: [Number, String], required: false },
468
- maxWidth: { type: [Number, String], required: false },
469
- minHeight: { type: [Number, String], required: false },
470
- minWidth: { type: [Number, String], required: false },
471
- width: { type: [Number, String], required: false },
472
- margin: { type: [Boolean, Number, String], required: false },
473
- marginTop: { type: [Boolean, Number, String], required: false },
474
- marginLeft: { type: [Boolean, Number, String], required: false },
475
- marginBottom: { type: [Boolean, Number, String], required: false },
476
- marginRight: { type: [Boolean, Number, String], required: false },
477
- marginBlock: { type: [Boolean, Number, String], required: false },
478
- marginInline: { type: [Boolean, Number, String], required: false },
479
- marginInlineStart: { type: [Boolean, Number, String], required: false },
480
- marginInlineEnd: { type: [Boolean, Number, String], required: false },
481
- marginBlockStart: { type: [Boolean, Number, String], required: false },
482
- marginBlockEnd: { type: [Boolean, Number, String], required: false },
483
- padding: { type: [Boolean, Number, String], required: false },
484
- paddingTop: { type: [Boolean, Number, String], required: false },
485
- paddingLeft: { type: [Boolean, Number, String], required: false },
486
- paddingBottom: { type: [Boolean, Number, String], required: false },
487
- paddingRight: { type: [Boolean, Number, String], required: false },
488
- paddingBlock: { type: [Boolean, Number, String], required: false },
489
- paddingInline: { type: [Boolean, Number, String], required: false },
490
- paddingInlineStart: { type: [Boolean, Number, String], required: false },
491
- paddingInlineEnd: { type: [Boolean, Number, String], required: false },
492
- paddingBlockStart: { type: [Boolean, Number, String], required: false },
493
- paddingBlockEnd: { type: [Boolean, Number, String], required: false },
494
- rounded: { type: [Boolean, Number, String, null], required: false, skipCheck: true },
495
- roundedTopRight: { type: [Boolean, Number, String], required: false },
496
- roundedTopLeft: { type: [Boolean, Number, String], required: false },
497
- roundedBottomLeft: { type: [Boolean, Number, String], required: false },
498
- roundedBottomRight: { type: [Boolean, Number, String], required: false },
499
- roundedStartStart: { type: [Boolean, Number, String], required: false },
500
- roundedStartEnd: { type: [Boolean, Number, String], required: false },
501
- roundedEndStart: { type: [Boolean, Number, String], required: false },
502
- roundedEndEnd: { type: [Boolean, Number, String], required: false },
503
- elevation: { type: [Number, String], required: false },
504
- bgColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true }
454
+ type: {
455
+ type: null,
456
+ required: false,
457
+ default: "line"
458
+ },
459
+ series: {
460
+ type: Array,
461
+ required: true
462
+ },
463
+ categories: {
464
+ type: Array,
465
+ required: false,
466
+ default: () => []
467
+ },
468
+ title: {
469
+ type: String,
470
+ required: false,
471
+ default: undefined
472
+ },
473
+ subtitle: {
474
+ type: String,
475
+ required: false,
476
+ default: undefined
477
+ },
478
+ showLegend: {
479
+ type: Boolean,
480
+ required: false,
481
+ default: true
482
+ },
483
+ legendPosition: {
484
+ type: null,
485
+ required: false,
486
+ default: "bottom"
487
+ },
488
+ showTooltip: {
489
+ type: Boolean,
490
+ required: false,
491
+ default: true
492
+ },
493
+ showGrid: {
494
+ type: Boolean,
495
+ required: false,
496
+ default: true
497
+ },
498
+ showAxis: {
499
+ type: Boolean,
500
+ required: false,
501
+ default: true
502
+ },
503
+ animated: {
504
+ type: Boolean,
505
+ required: false,
506
+ default: true
507
+ },
508
+ animationDuration: {
509
+ type: Number,
510
+ required: false,
511
+ default: 600
512
+ },
513
+ stacked: {
514
+ type: Boolean,
515
+ required: false,
516
+ default: false
517
+ },
518
+ stacking: {
519
+ type: null,
520
+ required: false
521
+ },
522
+ donutHoleSize: {
523
+ type: Number,
524
+ required: false,
525
+ default: .6
526
+ },
527
+ colorScheme: {
528
+ type: Array,
529
+ required: false,
530
+ default: () => []
531
+ },
532
+ xAxisFormat: {
533
+ type: Function,
534
+ required: false,
535
+ default: undefined
536
+ },
537
+ yAxisFormat: {
538
+ type: Function,
539
+ required: false,
540
+ default: undefined
541
+ },
542
+ aspectRatio: {
543
+ type: String,
544
+ required: false,
545
+ default: undefined
546
+ },
547
+ smoothing: {
548
+ type: null,
549
+ required: false,
550
+ default: "none"
551
+ },
552
+ yMin: {
553
+ type: Number,
554
+ required: false,
555
+ default: undefined
556
+ },
557
+ yMax: {
558
+ type: Number,
559
+ required: false,
560
+ default: undefined
561
+ },
562
+ gaugeMin: {
563
+ type: Number,
564
+ required: false,
565
+ default: 0
566
+ },
567
+ gaugeMax: {
568
+ type: Number,
569
+ required: false,
570
+ default: 100
571
+ },
572
+ gaugeUnit: {
573
+ type: String,
574
+ required: false,
575
+ default: ""
576
+ },
577
+ plotBands: {
578
+ type: Array,
579
+ required: false
580
+ },
581
+ plotLines: {
582
+ type: Array,
583
+ required: false
584
+ },
585
+ annotations: {
586
+ type: Array,
587
+ required: false
588
+ },
589
+ drilldown: {
590
+ type: Object,
591
+ required: false
592
+ },
593
+ secondaryYAxis: {
594
+ type: Object,
595
+ required: false
596
+ },
597
+ id: {
598
+ type: String,
599
+ required: false
600
+ },
601
+ class: {
602
+ type: [
603
+ String,
604
+ Array,
605
+ Object
606
+ ],
607
+ required: false
608
+ },
609
+ style: {
610
+ type: [
611
+ String,
612
+ Array,
613
+ Object,
614
+ Boolean,
615
+ null
616
+ ],
617
+ required: false,
618
+ skipCheck: true
619
+ },
620
+ height: {
621
+ type: [Number, String],
622
+ required: false,
623
+ default: 300
624
+ },
625
+ maxHeight: {
626
+ type: [Number, String],
627
+ required: false
628
+ },
629
+ maxWidth: {
630
+ type: [Number, String],
631
+ required: false
632
+ },
633
+ minHeight: {
634
+ type: [Number, String],
635
+ required: false
636
+ },
637
+ minWidth: {
638
+ type: [Number, String],
639
+ required: false
640
+ },
641
+ width: {
642
+ type: [Number, String],
643
+ required: false
644
+ },
645
+ margin: {
646
+ type: [
647
+ Boolean,
648
+ Number,
649
+ String
650
+ ],
651
+ required: false
652
+ },
653
+ marginTop: {
654
+ type: [
655
+ Boolean,
656
+ Number,
657
+ String
658
+ ],
659
+ required: false
660
+ },
661
+ marginLeft: {
662
+ type: [
663
+ Boolean,
664
+ Number,
665
+ String
666
+ ],
667
+ required: false
668
+ },
669
+ marginBottom: {
670
+ type: [
671
+ Boolean,
672
+ Number,
673
+ String
674
+ ],
675
+ required: false
676
+ },
677
+ marginRight: {
678
+ type: [
679
+ Boolean,
680
+ Number,
681
+ String
682
+ ],
683
+ required: false
684
+ },
685
+ marginBlock: {
686
+ type: [
687
+ Boolean,
688
+ Number,
689
+ String
690
+ ],
691
+ required: false
692
+ },
693
+ marginInline: {
694
+ type: [
695
+ Boolean,
696
+ Number,
697
+ String
698
+ ],
699
+ required: false
700
+ },
701
+ marginInlineStart: {
702
+ type: [
703
+ Boolean,
704
+ Number,
705
+ String
706
+ ],
707
+ required: false
708
+ },
709
+ marginInlineEnd: {
710
+ type: [
711
+ Boolean,
712
+ Number,
713
+ String
714
+ ],
715
+ required: false
716
+ },
717
+ marginBlockStart: {
718
+ type: [
719
+ Boolean,
720
+ Number,
721
+ String
722
+ ],
723
+ required: false
724
+ },
725
+ marginBlockEnd: {
726
+ type: [
727
+ Boolean,
728
+ Number,
729
+ String
730
+ ],
731
+ required: false
732
+ },
733
+ padding: {
734
+ type: [
735
+ Boolean,
736
+ Number,
737
+ String
738
+ ],
739
+ required: false
740
+ },
741
+ paddingTop: {
742
+ type: [
743
+ Boolean,
744
+ Number,
745
+ String
746
+ ],
747
+ required: false
748
+ },
749
+ paddingLeft: {
750
+ type: [
751
+ Boolean,
752
+ Number,
753
+ String
754
+ ],
755
+ required: false
756
+ },
757
+ paddingBottom: {
758
+ type: [
759
+ Boolean,
760
+ Number,
761
+ String
762
+ ],
763
+ required: false
764
+ },
765
+ paddingRight: {
766
+ type: [
767
+ Boolean,
768
+ Number,
769
+ String
770
+ ],
771
+ required: false
772
+ },
773
+ paddingBlock: {
774
+ type: [
775
+ Boolean,
776
+ Number,
777
+ String
778
+ ],
779
+ required: false
780
+ },
781
+ paddingInline: {
782
+ type: [
783
+ Boolean,
784
+ Number,
785
+ String
786
+ ],
787
+ required: false
788
+ },
789
+ paddingInlineStart: {
790
+ type: [
791
+ Boolean,
792
+ Number,
793
+ String
794
+ ],
795
+ required: false
796
+ },
797
+ paddingInlineEnd: {
798
+ type: [
799
+ Boolean,
800
+ Number,
801
+ String
802
+ ],
803
+ required: false
804
+ },
805
+ paddingBlockStart: {
806
+ type: [
807
+ Boolean,
808
+ Number,
809
+ String
810
+ ],
811
+ required: false
812
+ },
813
+ paddingBlockEnd: {
814
+ type: [
815
+ Boolean,
816
+ Number,
817
+ String
818
+ ],
819
+ required: false
820
+ },
821
+ rounded: {
822
+ type: [
823
+ Boolean,
824
+ Number,
825
+ String,
826
+ null
827
+ ],
828
+ required: false,
829
+ skipCheck: true
830
+ },
831
+ roundedTopRight: {
832
+ type: [
833
+ Boolean,
834
+ Number,
835
+ String
836
+ ],
837
+ required: false
838
+ },
839
+ roundedTopLeft: {
840
+ type: [
841
+ Boolean,
842
+ Number,
843
+ String
844
+ ],
845
+ required: false
846
+ },
847
+ roundedBottomLeft: {
848
+ type: [
849
+ Boolean,
850
+ Number,
851
+ String
852
+ ],
853
+ required: false
854
+ },
855
+ roundedBottomRight: {
856
+ type: [
857
+ Boolean,
858
+ Number,
859
+ String
860
+ ],
861
+ required: false
862
+ },
863
+ roundedStartStart: {
864
+ type: [
865
+ Boolean,
866
+ Number,
867
+ String
868
+ ],
869
+ required: false
870
+ },
871
+ roundedStartEnd: {
872
+ type: [
873
+ Boolean,
874
+ Number,
875
+ String
876
+ ],
877
+ required: false
878
+ },
879
+ roundedEndStart: {
880
+ type: [
881
+ Boolean,
882
+ Number,
883
+ String
884
+ ],
885
+ required: false
886
+ },
887
+ roundedEndEnd: {
888
+ type: [
889
+ Boolean,
890
+ Number,
891
+ String
892
+ ],
893
+ required: false
894
+ },
895
+ elevation: {
896
+ type: [Number, String],
897
+ required: false
898
+ },
899
+ bgColor: {
900
+ type: [
901
+ String,
902
+ Object,
903
+ Boolean,
904
+ null
905
+ ],
906
+ required: false,
907
+ skipCheck: true
908
+ }
505
909
  });
506
- const emit = defineEmits(["point-click", "legend-click", "series-toggle"]);
910
+ const emit = defineEmits([
911
+ "point-click",
912
+ "legend-click",
913
+ "series-toggle"
914
+ ]);
915
+ /*
916
+ * `IChartSlots` carries a deliberate index signature — see the
917
+ * interface's own doc comment in `chart.interface.ts`.
918
+ * `<OrigamChart>` is a transparent passthrough
919
+ * (`v-for="(_, name) in $slots"`), so a narrower / empty shape
920
+ * would both misdescribe the component and fail to compile
921
+ * (TS7053 on the dynamic `#[name]` binding).
922
+ */
507
923
  defineSlots();
924
+ /*********************************************************
925
+ * Type routing — each `CHART_TYPE` value maps to exactly
926
+ * one family component. The arrays are derived from the
927
+ * enums so adding a new chart type only requires one edit
928
+ * to the enum.
929
+ ********************************************************/
508
930
  const CARTESIAN_TYPES = Object.values(CHART_CARTESIAN_KIND);
509
931
  const POLAR_TYPES = Object.values(CHART_POLAR_KIND);
510
932
  const PYRAMID_TYPES = Object.values(CHART_PYRAMID_KIND);
@@ -530,430 +952,498 @@ const isParetoType = computed(() => props.type === CHART_TYPE.PARETO);
530
952
  const isMapType = computed(() => props.type === CHART_TYPE.MAP);
531
953
  const isSparklineType = computed(() => props.type === CHART_TYPE.SPARKLINE);
532
954
  const dataCyAttr = computed(() => `origam-chart origam-chart--${props.type}`);
955
+ /*********************************************************
956
+ * Forwarded props — each family has a slightly narrower
957
+ * prop surface than the shell. We compose only the props
958
+ * that family understands, so Vue's prop validator stays
959
+ * happy and irrelevant props (e.g. `smoothing` on a gauge)
960
+ * are silently dropped.
961
+ ********************************************************/
962
+ /*********************************************************
963
+ * Surface props — forwarded to EVERY family.
964
+ *
965
+ * @description
966
+ * `OrigamChart` renders no DOM of its own: it dispatches to one family
967
+ * component per `type`. The per-family bags below are hand-curated, and
968
+ * the whole spacing / shape / surface axis was missing from all 21 of
969
+ * them — so `<origam-chart padding="8px" rounded="lg" elevation="md">`
970
+ * resolved to nothing, even though `IChartProps` declares the props AND
971
+ * every family already consumes them through `IChartBaseProps` (same
972
+ * `IDimensionProps` / `IMarginProps` / `IPaddingProps` / `IRoundedProps` /
973
+ * `IElevationProps` / `IBgColorProps` chain).
974
+ *
975
+ * Kept as ONE spread rather than 21 copies of 28 keys: the curated-list
976
+ * bug this fixes is exactly what a duplicated list re-creates on the next
977
+ * prop added (see the same failure in `useStateEffect`, three times).
978
+ *
979
+ * `height` stays declared per-family below — several families narrow or
980
+ * default it — so it is deliberately absent here.
981
+ ********************************************************/
533
982
  const surfaceProps = computed(() => ({
534
- id: props.id,
535
- class: props.class,
536
- style: props.style,
537
- width: props.width,
538
- maxHeight: props.maxHeight,
539
- maxWidth: props.maxWidth,
540
- minHeight: props.minHeight,
541
- minWidth: props.minWidth,
542
- bgColor: props.bgColor,
543
- elevation: props.elevation,
544
- padding: props.padding,
545
- paddingTop: props.paddingTop,
546
- paddingRight: props.paddingRight,
547
- paddingBottom: props.paddingBottom,
548
- paddingLeft: props.paddingLeft,
549
- paddingBlock: props.paddingBlock,
550
- paddingInline: props.paddingInline,
551
- paddingInlineStart: props.paddingInlineStart,
552
- paddingInlineEnd: props.paddingInlineEnd,
553
- paddingBlockStart: props.paddingBlockStart,
554
- paddingBlockEnd: props.paddingBlockEnd,
555
- margin: props.margin,
556
- marginTop: props.marginTop,
557
- marginRight: props.marginRight,
558
- marginBottom: props.marginBottom,
559
- marginLeft: props.marginLeft,
560
- marginBlock: props.marginBlock,
561
- marginInline: props.marginInline,
562
- marginInlineStart: props.marginInlineStart,
563
- marginInlineEnd: props.marginInlineEnd,
564
- marginBlockStart: props.marginBlockStart,
565
- marginBlockEnd: props.marginBlockEnd,
566
- rounded: props.rounded,
567
- roundedTopLeft: props.roundedTopLeft,
568
- roundedTopRight: props.roundedTopRight,
569
- roundedBottomLeft: props.roundedBottomLeft,
570
- roundedBottomRight: props.roundedBottomRight,
571
- roundedStartStart: props.roundedStartStart,
572
- roundedStartEnd: props.roundedStartEnd,
573
- roundedEndStart: props.roundedEndStart,
574
- roundedEndEnd: props.roundedEndEnd
983
+ id: props.id,
984
+ class: props.class,
985
+ style: props.style,
986
+ width: props.width,
987
+ maxHeight: props.maxHeight,
988
+ maxWidth: props.maxWidth,
989
+ minHeight: props.minHeight,
990
+ minWidth: props.minWidth,
991
+ bgColor: props.bgColor,
992
+ elevation: props.elevation,
993
+ padding: props.padding,
994
+ paddingTop: props.paddingTop,
995
+ paddingRight: props.paddingRight,
996
+ paddingBottom: props.paddingBottom,
997
+ paddingLeft: props.paddingLeft,
998
+ paddingBlock: props.paddingBlock,
999
+ paddingInline: props.paddingInline,
1000
+ paddingInlineStart: props.paddingInlineStart,
1001
+ paddingInlineEnd: props.paddingInlineEnd,
1002
+ paddingBlockStart: props.paddingBlockStart,
1003
+ paddingBlockEnd: props.paddingBlockEnd,
1004
+ margin: props.margin,
1005
+ marginTop: props.marginTop,
1006
+ marginRight: props.marginRight,
1007
+ marginBottom: props.marginBottom,
1008
+ marginLeft: props.marginLeft,
1009
+ marginBlock: props.marginBlock,
1010
+ marginInline: props.marginInline,
1011
+ marginInlineStart: props.marginInlineStart,
1012
+ marginInlineEnd: props.marginInlineEnd,
1013
+ marginBlockStart: props.marginBlockStart,
1014
+ marginBlockEnd: props.marginBlockEnd,
1015
+ rounded: props.rounded,
1016
+ roundedTopLeft: props.roundedTopLeft,
1017
+ roundedTopRight: props.roundedTopRight,
1018
+ roundedBottomLeft: props.roundedBottomLeft,
1019
+ roundedBottomRight: props.roundedBottomRight,
1020
+ roundedStartStart: props.roundedStartStart,
1021
+ roundedStartEnd: props.roundedStartEnd,
1022
+ roundedEndStart: props.roundedEndStart,
1023
+ roundedEndEnd: props.roundedEndEnd
575
1024
  }));
576
1025
  const cartesianProps = computed(() => ({
577
- ...surfaceProps.value,
578
- type: props.type,
579
- series: seriesWithVisibility.value,
580
- categories: props.categories,
581
- height: props.height,
582
- title: props.title,
583
- subtitle: props.subtitle,
584
- showLegend: props.showLegend,
585
- legendPosition: props.legendPosition,
586
- showTooltip: props.showTooltip,
587
- showGrid: props.showGrid,
588
- showAxis: props.showAxis,
589
- animated: props.animated,
590
- animationDuration: props.animationDuration,
591
- stacked: props.stacked,
592
- stacking: props.stacking,
593
- colorScheme: props.colorScheme,
594
- xAxisFormat: props.xAxisFormat,
595
- yAxisFormat: props.yAxisFormat,
596
- aspectRatio: props.aspectRatio,
597
- smoothing: props.smoothing,
598
- yMin: props.yMin,
599
- yMax: props.yMax,
600
- plotBands: props.plotBands,
601
- plotLines: props.plotLines,
602
- annotations: props.annotations,
603
- secondaryYAxis: props.secondaryYAxis,
604
- drilldown: props.drilldown
1026
+ ...surfaceProps.value,
1027
+ type: props.type,
1028
+ series: seriesWithVisibility.value,
1029
+ categories: props.categories,
1030
+ height: props.height,
1031
+ title: props.title,
1032
+ subtitle: props.subtitle,
1033
+ showLegend: props.showLegend,
1034
+ legendPosition: props.legendPosition,
1035
+ showTooltip: props.showTooltip,
1036
+ showGrid: props.showGrid,
1037
+ showAxis: props.showAxis,
1038
+ animated: props.animated,
1039
+ animationDuration: props.animationDuration,
1040
+ stacked: props.stacked,
1041
+ stacking: props.stacking,
1042
+ colorScheme: props.colorScheme,
1043
+ xAxisFormat: props.xAxisFormat,
1044
+ yAxisFormat: props.yAxisFormat,
1045
+ aspectRatio: props.aspectRatio,
1046
+ smoothing: props.smoothing,
1047
+ yMin: props.yMin,
1048
+ yMax: props.yMax,
1049
+ plotBands: props.plotBands,
1050
+ plotLines: props.plotLines,
1051
+ annotations: props.annotations,
1052
+ secondaryYAxis: props.secondaryYAxis,
1053
+ drilldown: props.drilldown
605
1054
  }));
606
1055
  const polarProps = computed(() => ({
607
- ...surfaceProps.value,
608
- type: props.type,
609
- series: seriesWithVisibility.value,
610
- categories: props.categories,
611
- height: props.height,
612
- title: props.title,
613
- subtitle: props.subtitle,
614
- showLegend: props.showLegend,
615
- legendPosition: props.legendPosition,
616
- showTooltip: props.showTooltip,
617
- animated: props.animated,
618
- animationDuration: props.animationDuration,
619
- donutHoleSize: props.donutHoleSize,
620
- colorScheme: props.colorScheme,
621
- xAxisFormat: props.xAxisFormat,
622
- yAxisFormat: props.yAxisFormat,
623
- aspectRatio: props.aspectRatio,
624
- drilldown: props.drilldown
1056
+ ...surfaceProps.value,
1057
+ type: props.type,
1058
+ series: seriesWithVisibility.value,
1059
+ categories: props.categories,
1060
+ height: props.height,
1061
+ title: props.title,
1062
+ subtitle: props.subtitle,
1063
+ showLegend: props.showLegend,
1064
+ legendPosition: props.legendPosition,
1065
+ showTooltip: props.showTooltip,
1066
+ animated: props.animated,
1067
+ animationDuration: props.animationDuration,
1068
+ donutHoleSize: props.donutHoleSize,
1069
+ colorScheme: props.colorScheme,
1070
+ xAxisFormat: props.xAxisFormat,
1071
+ yAxisFormat: props.yAxisFormat,
1072
+ aspectRatio: props.aspectRatio,
1073
+ drilldown: props.drilldown
625
1074
  }));
626
1075
  const radarProps = computed(() => ({
627
- ...surfaceProps.value,
628
- series: seriesWithVisibility.value,
629
- categories: props.categories,
630
- height: props.height,
631
- title: props.title,
632
- subtitle: props.subtitle,
633
- showLegend: props.showLegend,
634
- legendPosition: props.legendPosition,
635
- animated: props.animated,
636
- animationDuration: props.animationDuration,
637
- colorScheme: props.colorScheme,
638
- aspectRatio: props.aspectRatio
1076
+ ...surfaceProps.value,
1077
+ series: seriesWithVisibility.value,
1078
+ categories: props.categories,
1079
+ height: props.height,
1080
+ title: props.title,
1081
+ subtitle: props.subtitle,
1082
+ showLegend: props.showLegend,
1083
+ legendPosition: props.legendPosition,
1084
+ animated: props.animated,
1085
+ animationDuration: props.animationDuration,
1086
+ colorScheme: props.colorScheme,
1087
+ aspectRatio: props.aspectRatio
639
1088
  }));
640
1089
  const gaugeProps = computed(() => ({
641
- ...surfaceProps.value,
642
- series: seriesWithVisibility.value,
643
- categories: props.categories,
644
- height: props.height,
645
- title: props.title,
646
- subtitle: props.subtitle,
647
- showLegend: false,
648
- legendPosition: props.legendPosition,
649
- showTooltip: false,
650
- animated: props.animated,
651
- animationDuration: props.animationDuration,
652
- colorScheme: props.colorScheme,
653
- aspectRatio: props.aspectRatio,
654
- gaugeMin: props.gaugeMin,
655
- gaugeMax: props.gaugeMax,
656
- gaugeUnit: props.gaugeUnit
1090
+ ...surfaceProps.value,
1091
+ series: seriesWithVisibility.value,
1092
+ categories: props.categories,
1093
+ height: props.height,
1094
+ title: props.title,
1095
+ subtitle: props.subtitle,
1096
+ showLegend: false,
1097
+ legendPosition: props.legendPosition,
1098
+ showTooltip: false,
1099
+ animated: props.animated,
1100
+ animationDuration: props.animationDuration,
1101
+ colorScheme: props.colorScheme,
1102
+ aspectRatio: props.aspectRatio,
1103
+ gaugeMin: props.gaugeMin,
1104
+ gaugeMax: props.gaugeMax,
1105
+ gaugeUnit: props.gaugeUnit
657
1106
  }));
658
1107
  const pyramidProps = computed(() => ({
659
- ...surfaceProps.value,
660
- type: props.type,
661
- series: seriesWithVisibility.value,
662
- categories: props.categories,
663
- height: props.height,
664
- title: props.title,
665
- subtitle: props.subtitle,
666
- showLegend: props.showLegend,
667
- legendPosition: props.legendPosition,
668
- showTooltip: props.showTooltip,
669
- animated: props.animated,
670
- animationDuration: props.animationDuration,
671
- colorScheme: props.colorScheme,
672
- aspectRatio: props.aspectRatio,
673
- xAxisFormat: props.xAxisFormat,
674
- yAxisFormat: props.yAxisFormat
1108
+ ...surfaceProps.value,
1109
+ type: props.type,
1110
+ series: seriesWithVisibility.value,
1111
+ categories: props.categories,
1112
+ height: props.height,
1113
+ title: props.title,
1114
+ subtitle: props.subtitle,
1115
+ showLegend: props.showLegend,
1116
+ legendPosition: props.legendPosition,
1117
+ showTooltip: props.showTooltip,
1118
+ animated: props.animated,
1119
+ animationDuration: props.animationDuration,
1120
+ colorScheme: props.colorScheme,
1121
+ aspectRatio: props.aspectRatio,
1122
+ xAxisFormat: props.xAxisFormat,
1123
+ yAxisFormat: props.yAxisFormat
675
1124
  }));
676
1125
  const honeycombProps = computed(() => ({
677
- ...surfaceProps.value,
678
- series: seriesWithVisibility.value,
679
- height: props.height,
680
- title: props.title,
681
- subtitle: props.subtitle,
682
- showLegend: props.showLegend,
683
- legendPosition: props.legendPosition,
684
- showTooltip: props.showTooltip,
685
- animated: props.animated,
686
- animationDuration: props.animationDuration,
687
- colorScheme: props.colorScheme,
688
- aspectRatio: props.aspectRatio,
689
- xAxisFormat: props.xAxisFormat,
690
- yAxisFormat: props.yAxisFormat
1126
+ ...surfaceProps.value,
1127
+ series: seriesWithVisibility.value,
1128
+ height: props.height,
1129
+ title: props.title,
1130
+ subtitle: props.subtitle,
1131
+ showLegend: props.showLegend,
1132
+ legendPosition: props.legendPosition,
1133
+ showTooltip: props.showTooltip,
1134
+ animated: props.animated,
1135
+ animationDuration: props.animationDuration,
1136
+ colorScheme: props.colorScheme,
1137
+ aspectRatio: props.aspectRatio,
1138
+ xAxisFormat: props.xAxisFormat,
1139
+ yAxisFormat: props.yAxisFormat
691
1140
  }));
692
1141
  const treemapProps = computed(() => ({
693
- ...surfaceProps.value,
694
- series: seriesWithVisibility.value,
695
- height: props.height,
696
- title: props.title,
697
- subtitle: props.subtitle,
698
- showLegend: props.showLegend,
699
- legendPosition: props.legendPosition,
700
- showTooltip: props.showTooltip,
701
- animated: props.animated,
702
- animationDuration: props.animationDuration,
703
- colorScheme: props.colorScheme,
704
- aspectRatio: props.aspectRatio,
705
- yAxisFormat: props.yAxisFormat
1142
+ ...surfaceProps.value,
1143
+ series: seriesWithVisibility.value,
1144
+ height: props.height,
1145
+ title: props.title,
1146
+ subtitle: props.subtitle,
1147
+ showLegend: props.showLegend,
1148
+ legendPosition: props.legendPosition,
1149
+ showTooltip: props.showTooltip,
1150
+ animated: props.animated,
1151
+ animationDuration: props.animationDuration,
1152
+ colorScheme: props.colorScheme,
1153
+ aspectRatio: props.aspectRatio,
1154
+ yAxisFormat: props.yAxisFormat
706
1155
  }));
707
1156
  const sankeyProps = computed(() => ({
708
- ...surfaceProps.value,
709
- series: seriesWithVisibility.value,
710
- height: props.height,
711
- title: props.title,
712
- subtitle: props.subtitle,
713
- showLegend: props.showLegend,
714
- legendPosition: props.legendPosition,
715
- showTooltip: props.showTooltip,
716
- animated: props.animated,
717
- animationDuration: props.animationDuration,
718
- colorScheme: props.colorScheme,
719
- aspectRatio: props.aspectRatio,
720
- xAxisFormat: props.xAxisFormat,
721
- yAxisFormat: props.yAxisFormat
1157
+ ...surfaceProps.value,
1158
+ series: seriesWithVisibility.value,
1159
+ height: props.height,
1160
+ title: props.title,
1161
+ subtitle: props.subtitle,
1162
+ showLegend: props.showLegend,
1163
+ legendPosition: props.legendPosition,
1164
+ showTooltip: props.showTooltip,
1165
+ animated: props.animated,
1166
+ animationDuration: props.animationDuration,
1167
+ colorScheme: props.colorScheme,
1168
+ aspectRatio: props.aspectRatio,
1169
+ xAxisFormat: props.xAxisFormat,
1170
+ yAxisFormat: props.yAxisFormat
722
1171
  }));
723
1172
  const wordCloudProps = computed(() => ({
724
- ...surfaceProps.value,
725
- series: seriesWithVisibility.value,
726
- height: props.height,
727
- title: props.title,
728
- subtitle: props.subtitle,
729
- showLegend: props.showLegend,
730
- legendPosition: props.legendPosition,
731
- showTooltip: props.showTooltip,
732
- animated: props.animated,
733
- animationDuration: props.animationDuration,
734
- colorScheme: props.colorScheme,
735
- aspectRatio: props.aspectRatio,
736
- yAxisFormat: props.yAxisFormat
1173
+ ...surfaceProps.value,
1174
+ series: seriesWithVisibility.value,
1175
+ height: props.height,
1176
+ title: props.title,
1177
+ subtitle: props.subtitle,
1178
+ showLegend: props.showLegend,
1179
+ legendPosition: props.legendPosition,
1180
+ showTooltip: props.showTooltip,
1181
+ animated: props.animated,
1182
+ animationDuration: props.animationDuration,
1183
+ colorScheme: props.colorScheme,
1184
+ aspectRatio: props.aspectRatio,
1185
+ yAxisFormat: props.yAxisFormat
737
1186
  }));
738
1187
  const heatmapProps = computed(() => ({
739
- ...surfaceProps.value,
740
- series: seriesWithVisibility.value,
741
- height: props.height,
742
- title: props.title,
743
- subtitle: props.subtitle,
744
- showLegend: props.showLegend,
745
- legendPosition: props.legendPosition,
746
- showTooltip: props.showTooltip,
747
- showAxis: props.showAxis,
748
- animated: props.animated,
749
- animationDuration: props.animationDuration,
750
- colorScheme: props.colorScheme,
751
- aspectRatio: props.aspectRatio,
752
- xAxisFormat: props.xAxisFormat,
753
- yAxisFormat: props.yAxisFormat
1188
+ ...surfaceProps.value,
1189
+ series: seriesWithVisibility.value,
1190
+ height: props.height,
1191
+ title: props.title,
1192
+ subtitle: props.subtitle,
1193
+ showLegend: props.showLegend,
1194
+ legendPosition: props.legendPosition,
1195
+ showTooltip: props.showTooltip,
1196
+ showAxis: props.showAxis,
1197
+ animated: props.animated,
1198
+ animationDuration: props.animationDuration,
1199
+ colorScheme: props.colorScheme,
1200
+ aspectRatio: props.aspectRatio,
1201
+ xAxisFormat: props.xAxisFormat,
1202
+ yAxisFormat: props.yAxisFormat
754
1203
  }));
755
1204
  const sunburstProps = computed(() => ({
756
- ...surfaceProps.value,
757
- series: seriesWithVisibility.value,
758
- height: props.height,
759
- title: props.title,
760
- subtitle: props.subtitle,
761
- showLegend: props.showLegend,
762
- legendPosition: props.legendPosition,
763
- showTooltip: props.showTooltip,
764
- animated: props.animated,
765
- animationDuration: props.animationDuration,
766
- colorScheme: props.colorScheme,
767
- aspectRatio: props.aspectRatio,
768
- yAxisFormat: props.yAxisFormat
1205
+ ...surfaceProps.value,
1206
+ series: seriesWithVisibility.value,
1207
+ height: props.height,
1208
+ title: props.title,
1209
+ subtitle: props.subtitle,
1210
+ showLegend: props.showLegend,
1211
+ legendPosition: props.legendPosition,
1212
+ showTooltip: props.showTooltip,
1213
+ animated: props.animated,
1214
+ animationDuration: props.animationDuration,
1215
+ colorScheme: props.colorScheme,
1216
+ aspectRatio: props.aspectRatio,
1217
+ yAxisFormat: props.yAxisFormat
769
1218
  }));
770
1219
  const boxPlotProps = computed(() => ({
771
- ...surfaceProps.value,
772
- series: seriesWithVisibility.value,
773
- categories: props.categories,
774
- height: props.height,
775
- title: props.title,
776
- subtitle: props.subtitle,
777
- showLegend: props.showLegend,
778
- legendPosition: props.legendPosition,
779
- showTooltip: props.showTooltip,
780
- showAxis: props.showAxis,
781
- showGrid: props.showGrid,
782
- animated: props.animated,
783
- animationDuration: props.animationDuration,
784
- colorScheme: props.colorScheme,
785
- aspectRatio: props.aspectRatio,
786
- xAxisFormat: props.xAxisFormat,
787
- yAxisFormat: props.yAxisFormat,
788
- yMin: props.yMin,
789
- yMax: props.yMax
1220
+ ...surfaceProps.value,
1221
+ series: seriesWithVisibility.value,
1222
+ categories: props.categories,
1223
+ height: props.height,
1224
+ title: props.title,
1225
+ subtitle: props.subtitle,
1226
+ showLegend: props.showLegend,
1227
+ legendPosition: props.legendPosition,
1228
+ showTooltip: props.showTooltip,
1229
+ showAxis: props.showAxis,
1230
+ showGrid: props.showGrid,
1231
+ animated: props.animated,
1232
+ animationDuration: props.animationDuration,
1233
+ colorScheme: props.colorScheme,
1234
+ aspectRatio: props.aspectRatio,
1235
+ xAxisFormat: props.xAxisFormat,
1236
+ yAxisFormat: props.yAxisFormat,
1237
+ yMin: props.yMin,
1238
+ yMax: props.yMax
790
1239
  }));
791
1240
  const pictorialProps = computed(() => ({
792
- ...surfaceProps.value,
793
- series: seriesWithVisibility.value,
794
- categories: props.categories,
795
- height: props.height,
796
- title: props.title,
797
- subtitle: props.subtitle,
798
- showLegend: props.showLegend,
799
- legendPosition: props.legendPosition,
800
- showTooltip: props.showTooltip,
801
- showAxis: props.showAxis,
802
- animated: props.animated,
803
- animationDuration: props.animationDuration,
804
- colorScheme: props.colorScheme,
805
- aspectRatio: props.aspectRatio,
806
- xAxisFormat: props.xAxisFormat,
807
- yAxisFormat: props.yAxisFormat
1241
+ ...surfaceProps.value,
1242
+ series: seriesWithVisibility.value,
1243
+ categories: props.categories,
1244
+ height: props.height,
1245
+ title: props.title,
1246
+ subtitle: props.subtitle,
1247
+ showLegend: props.showLegend,
1248
+ legendPosition: props.legendPosition,
1249
+ showTooltip: props.showTooltip,
1250
+ showAxis: props.showAxis,
1251
+ animated: props.animated,
1252
+ animationDuration: props.animationDuration,
1253
+ colorScheme: props.colorScheme,
1254
+ aspectRatio: props.aspectRatio,
1255
+ xAxisFormat: props.xAxisFormat,
1256
+ yAxisFormat: props.yAxisFormat
808
1257
  }));
809
1258
  const candlestickProps = computed(() => ({
810
- ...surfaceProps.value,
811
- series: seriesWithVisibility.value,
812
- height: props.height,
813
- title: props.title,
814
- subtitle: props.subtitle,
815
- showLegend: props.showLegend,
816
- legendPosition: props.legendPosition,
817
- showTooltip: props.showTooltip,
818
- showAxis: props.showAxis,
819
- showGrid: props.showGrid,
820
- animated: props.animated,
821
- animationDuration: props.animationDuration,
822
- aspectRatio: props.aspectRatio,
823
- xAxisFormat: props.xAxisFormat,
824
- yAxisFormat: props.yAxisFormat,
825
- yMin: props.yMin,
826
- yMax: props.yMax
1259
+ ...surfaceProps.value,
1260
+ series: seriesWithVisibility.value,
1261
+ height: props.height,
1262
+ title: props.title,
1263
+ subtitle: props.subtitle,
1264
+ showLegend: props.showLegend,
1265
+ legendPosition: props.legendPosition,
1266
+ showTooltip: props.showTooltip,
1267
+ showAxis: props.showAxis,
1268
+ showGrid: props.showGrid,
1269
+ animated: props.animated,
1270
+ animationDuration: props.animationDuration,
1271
+ aspectRatio: props.aspectRatio,
1272
+ xAxisFormat: props.xAxisFormat,
1273
+ yAxisFormat: props.yAxisFormat,
1274
+ yMin: props.yMin,
1275
+ yMax: props.yMax
827
1276
  }));
828
1277
  const streamgraphProps = computed(() => ({
829
- ...surfaceProps.value,
830
- series: seriesWithVisibility.value,
831
- categories: props.categories,
832
- height: props.height,
833
- title: props.title,
834
- subtitle: props.subtitle,
835
- showLegend: props.showLegend,
836
- legendPosition: props.legendPosition,
837
- showTooltip: props.showTooltip,
838
- showAxis: props.showAxis,
839
- showGrid: props.showGrid,
840
- animated: props.animated,
841
- animationDuration: props.animationDuration,
842
- colorScheme: props.colorScheme,
843
- aspectRatio: props.aspectRatio,
844
- xAxisFormat: props.xAxisFormat,
845
- yAxisFormat: props.yAxisFormat
1278
+ ...surfaceProps.value,
1279
+ series: seriesWithVisibility.value,
1280
+ categories: props.categories,
1281
+ height: props.height,
1282
+ title: props.title,
1283
+ subtitle: props.subtitle,
1284
+ showLegend: props.showLegend,
1285
+ legendPosition: props.legendPosition,
1286
+ showTooltip: props.showTooltip,
1287
+ showAxis: props.showAxis,
1288
+ showGrid: props.showGrid,
1289
+ animated: props.animated,
1290
+ animationDuration: props.animationDuration,
1291
+ colorScheme: props.colorScheme,
1292
+ aspectRatio: props.aspectRatio,
1293
+ xAxisFormat: props.xAxisFormat,
1294
+ yAxisFormat: props.yAxisFormat
846
1295
  }));
847
1296
  const variwideProps = computed(() => ({
848
- ...surfaceProps.value,
849
- series: seriesWithVisibility.value,
850
- height: props.height,
851
- title: props.title,
852
- subtitle: props.subtitle,
853
- showLegend: props.showLegend,
854
- legendPosition: props.legendPosition,
855
- showTooltip: props.showTooltip,
856
- showAxis: props.showAxis,
857
- showGrid: props.showGrid,
858
- animated: props.animated,
859
- animationDuration: props.animationDuration,
860
- colorScheme: props.colorScheme,
861
- aspectRatio: props.aspectRatio,
862
- xAxisFormat: props.xAxisFormat,
863
- yAxisFormat: props.yAxisFormat,
864
- yMin: props.yMin,
865
- yMax: props.yMax
1297
+ ...surfaceProps.value,
1298
+ series: seriesWithVisibility.value,
1299
+ height: props.height,
1300
+ title: props.title,
1301
+ subtitle: props.subtitle,
1302
+ showLegend: props.showLegend,
1303
+ legendPosition: props.legendPosition,
1304
+ showTooltip: props.showTooltip,
1305
+ showAxis: props.showAxis,
1306
+ showGrid: props.showGrid,
1307
+ animated: props.animated,
1308
+ animationDuration: props.animationDuration,
1309
+ colorScheme: props.colorScheme,
1310
+ aspectRatio: props.aspectRatio,
1311
+ xAxisFormat: props.xAxisFormat,
1312
+ yAxisFormat: props.yAxisFormat,
1313
+ yMin: props.yMin,
1314
+ yMax: props.yMax
866
1315
  }));
867
1316
  const polarBarProps = computed(() => ({
868
- ...surfaceProps.value,
869
- series: seriesWithVisibility.value,
870
- categories: props.categories,
871
- height: props.height,
872
- title: props.title,
873
- subtitle: props.subtitle,
874
- showLegend: props.showLegend,
875
- legendPosition: props.legendPosition,
876
- showTooltip: props.showTooltip,
877
- animated: props.animated,
878
- animationDuration: props.animationDuration,
879
- colorScheme: props.colorScheme,
880
- aspectRatio: props.aspectRatio,
881
- xAxisFormat: props.xAxisFormat,
882
- yAxisFormat: props.yAxisFormat
1317
+ ...surfaceProps.value,
1318
+ series: seriesWithVisibility.value,
1319
+ categories: props.categories,
1320
+ height: props.height,
1321
+ title: props.title,
1322
+ subtitle: props.subtitle,
1323
+ showLegend: props.showLegend,
1324
+ legendPosition: props.legendPosition,
1325
+ showTooltip: props.showTooltip,
1326
+ animated: props.animated,
1327
+ animationDuration: props.animationDuration,
1328
+ colorScheme: props.colorScheme,
1329
+ aspectRatio: props.aspectRatio,
1330
+ xAxisFormat: props.xAxisFormat,
1331
+ yAxisFormat: props.yAxisFormat
883
1332
  }));
884
1333
  const bulletProps = computed(() => ({
885
- ...surfaceProps.value,
886
- series: seriesWithVisibility.value,
887
- categories: props.categories,
888
- height: props.height,
889
- title: props.title,
890
- subtitle: props.subtitle,
891
- showLegend: props.showLegend,
892
- legendPosition: props.legendPosition,
893
- showTooltip: props.showTooltip,
894
- showAxis: props.showAxis,
895
- animated: props.animated,
896
- animationDuration: props.animationDuration,
897
- aspectRatio: props.aspectRatio,
898
- xAxisFormat: props.xAxisFormat,
899
- yAxisFormat: props.yAxisFormat
1334
+ ...surfaceProps.value,
1335
+ series: seriesWithVisibility.value,
1336
+ categories: props.categories,
1337
+ height: props.height,
1338
+ title: props.title,
1339
+ subtitle: props.subtitle,
1340
+ showLegend: props.showLegend,
1341
+ legendPosition: props.legendPosition,
1342
+ showTooltip: props.showTooltip,
1343
+ showAxis: props.showAxis,
1344
+ animated: props.animated,
1345
+ animationDuration: props.animationDuration,
1346
+ aspectRatio: props.aspectRatio,
1347
+ xAxisFormat: props.xAxisFormat,
1348
+ yAxisFormat: props.yAxisFormat
900
1349
  }));
901
1350
  const paretoProps = computed(() => ({
902
- ...surfaceProps.value,
903
- series: seriesWithVisibility.value,
904
- height: props.height,
905
- title: props.title,
906
- subtitle: props.subtitle,
907
- showLegend: props.showLegend,
908
- legendPosition: props.legendPosition,
909
- showTooltip: props.showTooltip,
910
- showAxis: props.showAxis,
911
- showGrid: props.showGrid,
912
- animated: props.animated,
913
- animationDuration: props.animationDuration,
914
- aspectRatio: props.aspectRatio,
915
- xAxisFormat: props.xAxisFormat,
916
- yAxisFormat: props.yAxisFormat
1351
+ ...surfaceProps.value,
1352
+ series: seriesWithVisibility.value,
1353
+ height: props.height,
1354
+ title: props.title,
1355
+ subtitle: props.subtitle,
1356
+ showLegend: props.showLegend,
1357
+ legendPosition: props.legendPosition,
1358
+ showTooltip: props.showTooltip,
1359
+ showAxis: props.showAxis,
1360
+ showGrid: props.showGrid,
1361
+ animated: props.animated,
1362
+ animationDuration: props.animationDuration,
1363
+ aspectRatio: props.aspectRatio,
1364
+ xAxisFormat: props.xAxisFormat,
1365
+ yAxisFormat: props.yAxisFormat
917
1366
  }));
918
1367
  const mapProps = computed(() => ({
919
- ...surfaceProps.value,
920
- series: seriesWithVisibility.value,
921
- height: props.height,
922
- title: props.title,
923
- subtitle: props.subtitle,
924
- showLegend: props.showLegend,
925
- legendPosition: props.legendPosition,
926
- showTooltip: props.showTooltip,
927
- animated: props.animated,
928
- animationDuration: props.animationDuration,
929
- aspectRatio: props.aspectRatio,
930
- yAxisFormat: props.yAxisFormat
1368
+ ...surfaceProps.value,
1369
+ series: seriesWithVisibility.value,
1370
+ height: props.height,
1371
+ title: props.title,
1372
+ subtitle: props.subtitle,
1373
+ showLegend: props.showLegend,
1374
+ legendPosition: props.legendPosition,
1375
+ showTooltip: props.showTooltip,
1376
+ animated: props.animated,
1377
+ animationDuration: props.animationDuration,
1378
+ aspectRatio: props.aspectRatio,
1379
+ yAxisFormat: props.yAxisFormat
931
1380
  }));
932
1381
  const sparklineProps = computed(() => ({
933
- ...surfaceProps.value,
934
- series: seriesWithVisibility.value,
935
- height: props.height,
936
- width: props.width,
937
- animated: props.animated,
938
- animationDuration: props.animationDuration,
939
- aspectRatio: props.aspectRatio
1382
+ ...surfaceProps.value,
1383
+ series: seriesWithVisibility.value,
1384
+ height: props.height,
1385
+ width: props.width,
1386
+ animated: props.animated,
1387
+ animationDuration: props.animationDuration,
1388
+ aspectRatio: props.aspectRatio
940
1389
  }));
1390
+ /*********************************************************
1391
+ * Emit forwarding — shell just relays.
1392
+ ********************************************************/
941
1393
  const onPointClick = (point, originalEvent) => {
942
- emit("point-click", point, originalEvent);
1394
+ emit("point-click", point, originalEvent);
943
1395
  };
944
1396
  const onLegendClick = (series, index) => {
945
- emit("legend-click", series, index);
1397
+ emit("legend-click", series, index);
946
1398
  };
947
- const hiddenSeries = ref(/* @__PURE__ */ new Set());
948
- const seriesWithVisibility = computed(
949
- () => props.series.map((s) => ({
950
- ...s,
951
- visible: !hiddenSeries.value.has(s.name)
952
- }))
953
- );
1399
+ /*
1400
+ * Legend toggle policy:
1401
+ *
1402
+ * - The legend must show ALL series at all times (struck-through
1403
+ * when hidden) so the user can re-enable a previously hidden
1404
+ * series — filtering them out of the legend would trap the
1405
+ * consumer in a dead-end.
1406
+ *
1407
+ * - The chart paths, however, must STOP rendering the hidden
1408
+ * series. `useChart` already gates path generation on
1409
+ * `series[i].visible !== false`; we just need to surface the
1410
+ * hidden state on each series via a cloned array.
1411
+ *
1412
+ * `hiddenSeries: Set<string>` is the source of truth. We rebuild
1413
+ * `seriesWithVisibility` on every toggle — each series gets a
1414
+ * fresh shallow clone with `visible` set so neither the consumer
1415
+ * fixture nor the chart engine has to deal with deep mutation
1416
+ * (which Vue 3 silently drops on plain module-level consts).
1417
+ */
1418
+ const hiddenSeries = ref(new Set());
1419
+ /*
1420
+ * For pie / donut, the consumer typically supplies the SAME data
1421
+ * shape as a line / bar chart: an array of series with N data
1422
+ * points keyed against `categories`. Naively passing that to the
1423
+ * polar engine gives a single series with N slices but a legend
1424
+ * full of SERIES names (e.g. "Sales 2025") — which is useless
1425
+ * because the slices represent CATEGORIES (Jan / Feb / Mar / …).
1426
+ *
1427
+ * We synthesise a series-per-category here so:
1428
+ * - the legend exposes one item per slice (categorical label),
1429
+ * - clicking a legend item toggles THAT slice's visibility,
1430
+ * - the polar engine receives a multi-series input it can
1431
+ * iterate as a flat slice list.
1432
+ *
1433
+ * When the consumer already passes the "pie shape" (single series,
1434
+ * data = slice values), we leave it untouched — the polar engine
1435
+ * detects this via the "single series with >1 data points" branch.
1436
+ *
1437
+ * Visibility is keyed by the synthesised series name (= category
1438
+ * label), so the `hiddenSeries` Set works uniformly across families.
1439
+ */
1440
+ const seriesWithVisibility = computed(() => props.series.map((s) => ({
1441
+ ...s,
1442
+ visible: !hiddenSeries.value.has(s.name)
1443
+ })));
954
1444
  const onSeriesToggle = (series, visible) => {
955
- if (visible) hiddenSeries.value.delete(series.name);
956
- else hiddenSeries.value.add(series.name);
957
- emit("series-toggle", series, visible);
1445
+ if (visible) hiddenSeries.value.delete(series.name);
1446
+ else hiddenSeries.value.add(series.name);
1447
+ emit("series-toggle", series, visible);
958
1448
  };
959
1449
  </script>