@primeui/vue-chart 1.0.0-beta.1 → 1.0.0-rc.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 (143) hide show
  1. package/LICENSE.md +35 -0
  2. package/README.md +64 -0
  3. package/dist/ChartCanvas.mjs +10 -10
  4. package/dist/ChartSvg.mjs +10 -10
  5. package/dist/RadarReference.spec.d.ts +1 -0
  6. package/dist/chunks/{chunk-QONZ3SCZ.mjs → chunk-2FGCWBQK.mjs} +1 -1
  7. package/dist/chunks/{chunk-4SLSYRNY.mjs → chunk-2VCCASMY.mjs} +5 -17
  8. package/dist/chunks/{chunk-IRGQNA5W.mjs → chunk-3ZXBNXFA.mjs} +10 -5
  9. package/dist/chunks/chunk-44BMQ7N2.mjs +86 -0
  10. package/dist/chunks/{chunk-CMJXLIEY.mjs → chunk-4B5OD4TC.mjs} +4 -13
  11. package/dist/chunks/{chunk-F7EK5D6J.mjs → chunk-4UH6LJNN.mjs} +4 -4
  12. package/dist/chunks/{chunk-YI3GLQYF.mjs → chunk-5CL32KCS.mjs} +6 -7
  13. package/dist/chunks/{chunk-GE2Y2FHS.mjs → chunk-6MD43V6R.mjs} +4 -4
  14. package/dist/chunks/{chunk-EKGCPOZJ.mjs → chunk-7OLUXDMR.mjs} +33 -18
  15. package/dist/chunks/{chunk-5ZLVNQ2L.mjs → chunk-7SY52FXI.mjs} +10 -6
  16. package/dist/chunks/{chunk-R4AZOPXC.mjs → chunk-AQK6S4DO.mjs} +1 -1
  17. package/dist/chunks/{chunk-UOMQNZMT.mjs → chunk-B7XC2DVN.mjs} +1 -1
  18. package/dist/chunks/{chunk-CRIB3I3L.mjs → chunk-BC6G3ODW.mjs} +1 -1
  19. package/dist/chunks/{chunk-YZQS2YBK.mjs → chunk-BVB7G6Y5.mjs} +12 -11
  20. package/dist/chunks/{chunk-GIDIMIWE.mjs → chunk-D2SPDSXY.mjs} +4 -4
  21. package/dist/chunks/{chunk-JVH4MDKX.mjs → chunk-D65PFBA5.mjs} +1 -1
  22. package/dist/chunks/{chunk-MGUGO3RV.mjs → chunk-DKLWPPME.mjs} +10 -0
  23. package/dist/chunks/{chunk-CGFPDWB4.mjs → chunk-DLRPM3GK.mjs} +1 -1
  24. package/dist/chunks/{chunk-3DINEX6C.mjs → chunk-DZIZEFTD.mjs} +1 -1
  25. package/dist/chunks/{chunk-LJZCE7LQ.mjs → chunk-EAHLFHB7.mjs} +58 -19
  26. package/dist/chunks/{chunk-IFZSHQDZ.mjs → chunk-EDDORION.mjs} +1 -1
  27. package/dist/chunks/{chunk-QOWKMWNO.mjs → chunk-F72RBTHC.mjs} +27 -5
  28. package/dist/chunks/{chunk-4Q3QUNX6.mjs → chunk-FGBZ3VPE.mjs} +2 -1
  29. package/dist/chunks/{chunk-L74BEYTD.mjs → chunk-FZ4TKLHE.mjs} +5 -5
  30. package/dist/chunks/{chunk-3XOLEGDL.mjs → chunk-G4V4FUNK.mjs} +5 -5
  31. package/dist/chunks/{chunk-DXKAPWMO.mjs → chunk-G5YSM76C.mjs} +1 -1
  32. package/dist/chunks/{chunk-3JA5JAHF.mjs → chunk-GRPL343U.mjs} +1 -1
  33. package/dist/chunks/{chunk-36DHPBYP.mjs → chunk-GV4YAVUN.mjs} +34 -9
  34. package/dist/chunks/{chunk-GV3CY6CQ.mjs → chunk-HXMG2ZBK.mjs} +1 -1
  35. package/dist/chunks/{chunk-3PJULFR5.mjs → chunk-IASQF4GU.mjs} +1 -3
  36. package/dist/chunks/{chunk-IUGMS7ND.mjs → chunk-IPEI6IAE.mjs} +1 -1
  37. package/dist/chunks/{chunk-WVNDZNMV.mjs → chunk-ISDQNEMO.mjs} +1 -1
  38. package/dist/chunks/{chunk-TRGN3ZMM.mjs → chunk-JEC4JJ5P.mjs} +4 -30
  39. package/dist/chunks/{chunk-BSROML7P.mjs → chunk-KCLMHDWJ.mjs} +2 -2
  40. package/dist/chunks/{chunk-I2BWSDNR.mjs → chunk-KX5GTFS3.mjs} +19 -6
  41. package/dist/chunks/{chunk-3X27K5XC.mjs → chunk-L7XUBIMC.mjs} +24 -51
  42. package/dist/chunks/{chunk-2NZ3PUWW.mjs → chunk-LLYJBFOE.mjs} +2 -2
  43. package/dist/chunks/{chunk-DDRSIMLE.mjs → chunk-LNS6I3ZJ.mjs} +4 -4
  44. package/dist/chunks/{chunk-CW2KYVYO.mjs → chunk-MCIY5P7K.mjs} +4 -4
  45. package/dist/chunks/{chunk-GLFXRR7N.mjs → chunk-MGNVYHQF.mjs} +53 -8
  46. package/dist/chunks/{chunk-2TOEQNJ6.mjs → chunk-MX74LV4I.mjs} +1 -1
  47. package/dist/chunks/{chunk-L73MEG22.mjs → chunk-NFVH44YP.mjs} +1 -3
  48. package/dist/chunks/{chunk-JPKNWLLP.mjs → chunk-NTTI64AJ.mjs} +8 -4
  49. package/dist/chunks/{chunk-5HLEKAY2.mjs → chunk-OHHN7X72.mjs} +1 -1
  50. package/dist/chunks/{chunk-LP2YESP6.mjs → chunk-OROBUJMJ.mjs} +1 -1
  51. package/dist/chunks/{chunk-6Z4MZIJI.mjs → chunk-P43UWADF.mjs} +6 -4
  52. package/dist/chunks/chunk-Q3I4EL3N.mjs +23 -0
  53. package/dist/chunks/{chunk-HVLFOABV.mjs → chunk-QDCXS7WS.mjs} +3 -8
  54. package/dist/chunks/{chunk-ZLD5VNMP.mjs → chunk-QQGC223F.mjs} +2 -2
  55. package/dist/chunks/{chunk-ADAGGXFG.mjs → chunk-QWUGZTCV.mjs} +5 -6
  56. package/dist/chunks/{chunk-OJHEN5FG.mjs → chunk-TAFKOHFX.mjs} +5 -6
  57. package/dist/chunks/{chunk-HH5FUUXX.mjs → chunk-TLB6ZOL3.mjs} +3 -1
  58. package/dist/chunks/{chunk-SGLTVJUA.mjs → chunk-UA2J3TWE.mjs} +4 -4
  59. package/dist/chunks/{chunk-AKMQHU5T.mjs → chunk-V4KRWSEE.mjs} +2 -2
  60. package/dist/chunks/{chunk-U6X3GVJ3.mjs → chunk-VADMTZLH.mjs} +1 -1
  61. package/dist/chunks/{chunk-PCBF6FSQ.mjs → chunk-WCUZUBQ5.mjs} +21 -20
  62. package/dist/chunks/{chunk-ON2FAZTD.mjs → chunk-WHAJ2YDA.mjs} +1 -1
  63. package/dist/chunks/{chunk-X4NWFK7L.mjs → chunk-WNIMDHP5.mjs} +2 -2
  64. package/dist/chunks/{chunk-TZ23VBFU.mjs → chunk-XSKNTD24.mjs} +1 -1
  65. package/dist/chunks/{chunk-HHZFGQN2.mjs → chunk-YPRGZNY6.mjs} +1 -1
  66. package/dist/chunks/{chunk-UOZFNTVQ.mjs → chunk-YUQRDFQI.mjs} +2 -2
  67. package/dist/components/charts/ChartBar.mjs +10 -9
  68. package/dist/components/charts/ChartCandlestick.mjs +8 -7
  69. package/dist/components/charts/ChartHeatmap.mjs +8 -7
  70. package/dist/components/charts/ChartLine.mjs +8 -7
  71. package/dist/components/charts/ChartPie.mjs +8 -7
  72. package/dist/components/charts/ChartPolar.mjs +8 -8
  73. package/dist/components/charts/ChartRadar.mjs +8 -8
  74. package/dist/components/charts/ChartScatter.mjs +8 -7
  75. package/dist/components/charts/ChartTreemap.mjs +7 -6
  76. package/dist/components/containers/ChartDecimation.mjs +3 -3
  77. package/dist/components/containers/ChartGroup.mjs +2 -2
  78. package/dist/components/containers/ChartOverlap.mjs +3 -3
  79. package/dist/components/containers/ChartRange.mjs +3 -3
  80. package/dist/components/containers/ChartStacked.mjs +3 -3
  81. package/dist/components/containers/ChartWaterfall.mjs +3 -3
  82. package/dist/components/customizations/ChartAccessibility.mjs +5 -5
  83. package/dist/components/customizations/ChartAccessibility.vue.d.ts +3 -0
  84. package/dist/components/customizations/ChartAnnotation.mjs +3 -3
  85. package/dist/components/customizations/ChartAxisGroup.mjs +1 -1
  86. package/dist/components/customizations/ChartBreadcrumb.mjs +4 -4
  87. package/dist/components/customizations/ChartCaption.mjs +5 -5
  88. package/dist/components/customizations/ChartColorLegend.mjs +5 -5
  89. package/dist/components/customizations/ChartColorLegend.vue.d.ts +2 -2
  90. package/dist/components/customizations/ChartDataLabels.mjs +5 -5
  91. package/dist/components/customizations/ChartDataLabels.vue.d.ts +2 -0
  92. package/dist/components/customizations/ChartExportMenu.mjs +5 -5
  93. package/dist/components/customizations/ChartHover.mjs +5 -5
  94. package/dist/components/customizations/ChartLegend.mjs +5 -5
  95. package/dist/components/customizations/ChartNavigator.mjs +6 -6
  96. package/dist/components/customizations/ChartReferenceBand.mjs +3 -3
  97. package/dist/components/customizations/ChartReferenceLine.mjs +3 -3
  98. package/dist/components/customizations/ChartResponsive.mjs +5 -5
  99. package/dist/components/customizations/ChartTitle.mjs +5 -5
  100. package/dist/components/customizations/ChartTooltip.mjs +5 -5
  101. package/dist/components/customizations/ChartXAxis.mjs +5 -5
  102. package/dist/components/customizations/ChartYAxis.mjs +5 -5
  103. package/dist/components/customizations/ChartZoom.mjs +5 -5
  104. package/dist/components/items/ChartItem.mjs +2 -2
  105. package/dist/components/items/ChartTreemapGroup.mjs +3 -3
  106. package/dist/components/renderers/CartesianRenderer.mjs +6 -5
  107. package/dist/components/renderers/LegendRenderer.mjs +2 -2
  108. package/dist/components/renderers/NavigatorRenderer.mjs +3 -3
  109. package/dist/components/renderers/RadialRenderer.mjs +5 -5
  110. package/dist/components/renderers/RectRenderer.mjs +6 -5
  111. package/dist/components/renderers/TooltipRenderer.mjs +3 -3
  112. package/dist/components/renderers/layers/BarLayerCanvas.mjs +6 -6
  113. package/dist/components/renderers/layers/BarLayerSvg.mjs +6 -6
  114. package/dist/components/renderers/layers/CandlestickLayer.mjs +6 -5
  115. package/dist/components/renderers/layers/HeatmapLayer.mjs +6 -5
  116. package/dist/components/renderers/layers/LineLayer.mjs +5 -5
  117. package/dist/components/renderers/layers/PieLayer.mjs +4 -3
  118. package/dist/components/renderers/layers/PolarLayer.mjs +4 -4
  119. package/dist/components/renderers/layers/RadarLayer.mjs +4 -4
  120. package/dist/components/renderers/layers/ScatterLayer.mjs +5 -5
  121. package/dist/composables/useCartesianFrame.d.ts +3 -0
  122. package/dist/composables/useResponsiveConfig.d.ts +1 -0
  123. package/dist/composables/useResponsiveConfig.spec.d.ts +1 -0
  124. package/dist/context/ChartContext.d.ts +2 -0
  125. package/dist/context/index.d.ts +2 -2
  126. package/dist/context/keys.d.ts +6 -0
  127. package/dist/index.d.ts +1 -1
  128. package/dist/index.mjs +61 -61
  129. package/dist/namespace.mjs +61 -61
  130. package/dist/release-date.d.ts +1 -1
  131. package/dist/types/axes.types.d.ts +1 -1
  132. package/dist/types/heatmap.types.d.ts +3 -8
  133. package/dist/types/index.d.ts +1 -1
  134. package/dist/types/line.types.d.ts +2 -2
  135. package/dist/types/scatter.types.d.ts +2 -0
  136. package/dist/types/treemap.types.d.ts +2 -0
  137. package/dist/utils/index.d.ts +1 -0
  138. package/dist/utils/ruleOverrides.d.ts +13 -0
  139. package/dist/utils/ruleOverrides.spec.d.ts +1 -0
  140. package/package.json +7 -11
  141. package/LICENSE +0 -23
  142. package/dist/chunks/chunk-4VWFG6HM.mjs +0 -86
  143. package/dist/chunks/chunk-ZH4A4L6W.mjs +0 -10
@@ -1,5 +1,6 @@
1
- import { useChartLayers, useCartesianLayout, provideCartesianFrame, useCartesianAnimation } from './chunk-I2BWSDNR.mjs';
2
- import { useChartMethods, useChartState, useChartHover } from './chunk-QOWKMWNO.mjs';
1
+ import { applyDataLabelRuleOverrides } from './chunk-Q3I4EL3N.mjs';
2
+ import { useChartLayers, useCartesianLayout, provideCartesianFrame, useCartesianAnimation } from './chunk-KX5GTFS3.mjs';
3
+ import { useChartMethods, useChartState, useChartHover } from './chunk-F72RBTHC.mjs';
3
4
  import { SYNC_BUS_KEY } from './chunk-H4HLHGUW.mjs';
4
5
  import { defineComponent, computed, inject, ref, onUnmounted, watch, shallowRef, toRef, h, openBlock, createElementBlock, Fragment, unref, createElementVNode, createCommentVNode, renderList, createBlock, resolveDynamicComponent } from 'vue';
5
6
  import { applyAxisOverrides, calculateCartesianArea, computeNaturalAxisWidths, needsAxisPadding, buildMarkerRenderItems, computeReferenceLines, computeReferenceBands, CanvasCompositor, normalizeDataLabelConfig, shallowEqual, AnimatedPropertyStore, renderCartesianFrame, safeRenderProp, resolveNearestHit, mergeAllNearestResults, buildZoomScales } from '@primeui/chart-core';
@@ -65,6 +66,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
65
66
  const hoverCtx = useChartHover();
66
67
  const features = computed(() => state.value.features);
67
68
  const hoverConfig = computed(() => features.value.get("hover")?.props);
69
+ const crosshairSnap = computed(() => features.value.get("tooltip")?.props?.snap);
68
70
  const effectiveAxes = computed(() => ({
69
71
  x: applyAxisOverrides(state.value.axes.x, props.ruleOverrides?.xAxis),
70
72
  y: applyAxisOverrides(state.value.axes.y, props.ruleOverrides?.yAxis)
@@ -182,11 +184,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
182
184
  }));
183
185
  });
184
186
  const sharedCompositor = new CanvasCompositor();
185
- const labelConfig = computed(() => {
186
- if (props.ruleOverrides?.dataLabels?.enabled === false) return null;
187
- const dlProps = features.value.get("dataLabels")?.props;
188
- return normalizeDataLabelConfig(dlProps, props.adaptiveDataLabelFontSize, props.adaptiveDataLabelRotation, methods.font) ?? null;
189
- });
187
+ const dataLabelProps = computed(() => applyDataLabelRuleOverrides(features.value, props.ruleOverrides).get("dataLabels")?.props);
188
+ const labelConfig = computed(() => normalizeDataLabelConfig(dataLabelProps.value, props.adaptiveDataLabelFontSize, props.adaptiveDataLabelRotation, methods.font) ?? null);
190
189
  let _prevMergedPA;
191
190
  const mergedPropertyAnimations = computed(() => {
192
191
  const f = state.value.features;
@@ -218,6 +217,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
218
217
  layoutData,
219
218
  labelConfig,
220
219
  hoverConfig,
220
+ crosshairSnap,
221
221
  zoomState: computed(() => props.zoomState ?? null),
222
222
  adaptiveDataLabelFontSize: computed(() => props.adaptiveDataLabelFontSize),
223
223
  adaptiveDataLabelRotation: computed(() => props.adaptiveDataLabelRotation),
@@ -243,8 +243,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
243
243
  const allMarkerOverlays = computed(() => Array.from(frame.handles.values()).flatMap((handle) => handle.markerOverlays?.value ?? []));
244
244
  const customDataLabelVNodes = computed(() => {
245
245
  if (methods.renderer !== "svg" || !layoutData.value) return [];
246
- const dlProps = features.value.get("dataLabels")?.props;
247
- const lc = normalizeDataLabelConfig(dlProps, props.adaptiveDataLabelFontSize, props.adaptiveDataLabelRotation, methods.font);
246
+ const lc = normalizeDataLabelConfig(dataLabelProps.value, props.adaptiveDataLabelFontSize, props.adaptiveDataLabelRotation, methods.font);
248
247
  if (!lc?.render) return [];
249
248
  const nodes = [];
250
249
  for (const handle of frame.handles.values()) {
@@ -395,10 +394,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
395
394
  const barResult = frame.handles.get("bar")?.findAllNearest?.(x, y) ?? null;
396
395
  const lineResult = frame.handles.get("line")?.findAllNearest?.(x, y) ?? null;
397
396
  const csResult = frame.handles.get("candlestick")?.findAllNearest?.(x, y) ?? null;
397
+ const scResult = frame.handles.get("scatter")?.findAllNearest?.(x, y) ?? null;
398
398
  return mergeAllNearestResults([
399
399
  barResult,
400
400
  lineResult,
401
- csResult
401
+ csResult,
402
+ scResult
402
403
  ], x, y);
403
404
  }
404
405
  function getPlotArea() {
@@ -419,7 +420,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
419
420
  }
420
421
  function getCrosshairContext() {
421
422
  const ld = layoutData.value;
422
- if (!ld) return null;
423
+ if (!ld || ld.sharedCategoryYScale) return null;
423
424
  const isHorizontal = ld.orientation === "horizontal";
424
425
  return {
425
426
  orientation: ld.orientation,
@@ -1,8 +1,8 @@
1
- import { PolarLayer_default } from './chunk-ADAGGXFG.mjs';
2
- import { RadialRenderer_default } from './chunk-5ZLVNQ2L.mjs';
3
- import { registerFamilyRenderer, registerChartLayer, useDatasetAnimationRegistration, useDatasetRegistration, useItemCollector } from './chunk-I2BWSDNR.mjs';
1
+ import { PolarLayer_default } from './chunk-QWUGZTCV.mjs';
2
+ import { RadialRenderer_default } from './chunk-7SY52FXI.mjs';
3
+ import { registerFamilyRenderer, registerChartLayer, useDatasetAnimationRegistration, useDatasetRegistration, useItemCollector } from './chunk-KX5GTFS3.mjs';
4
4
  import { STACKED_CONTEXT_KEY } from './chunk-L6N5IYAJ.mjs';
5
- import { useRendererHint, useChartMethods } from './chunk-QOWKMWNO.mjs';
5
+ import { useRendererHint, useChartMethods } from './chunk-F72RBTHC.mjs';
6
6
  import { defineComponent, useSlots, computed, inject, onMounted, watch, onUnmounted, renderSlot, createCommentVNode } from 'vue';
7
7
  import { resolveAccessor } from '@primeui/chart-core';
8
8
 
@@ -1,5 +1,5 @@
1
1
  import { AXIS_GROUP_REGISTRY_KEY } from './chunk-EHSDNH7K.mjs';
2
- import { useAxisComponentBase } from './chunk-I2BWSDNR.mjs';
2
+ import { useAxisComponentBase } from './chunk-KX5GTFS3.mjs';
3
3
  import { defineComponent, useSlots, computed, provide, renderSlot } from 'vue';
4
4
 
5
5
  var __default__ = { inheritAttrs: false };
@@ -6,6 +6,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  props: {
7
7
  render: { type: Function },
8
8
  label: {},
9
+ categories: {},
9
10
  range: {},
10
11
  labelStyle: {},
11
12
  bracket: { type: [Boolean, Object] },
@@ -47,6 +48,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
47
48
  def.range = props.range;
48
49
  return def;
49
50
  }
51
+ if (props.categories && props.categories.length > 0) {
52
+ def.categories = props.categories;
53
+ return def;
54
+ }
50
55
  const vals = categoryValues.value;
51
56
  const allNumeric = vals.length > 0 && vals.every((v) => typeof v === "number");
52
57
  if (allNumeric && vals.length >= 2) {
@@ -73,6 +78,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
73
78
  axisRegistry.addGroup(buildDefinition());
74
79
  }
75
80
  });
81
+ watch(() => [props.range, props.categories], () => {
82
+ if (mounted && axisRegistry) {
83
+ axisRegistry.addGroup(buildDefinition());
84
+ }
85
+ }, { deep: true });
76
86
  let mountTimerId;
77
87
  onMounted(() => {
78
88
  mountTimerId = setTimeout(() => {
@@ -1,4 +1,4 @@
1
- import { useCustomizationRegistration } from './chunk-ZLD5VNMP.mjs';
1
+ import { useCustomizationRegistration } from './chunk-QQGC223F.mjs';
2
2
  import { defineComponent, computed, renderSlot } from 'vue';
3
3
 
4
4
  var _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,4 +1,4 @@
1
- import { useCustomizationRegistration } from './chunk-ZLD5VNMP.mjs';
1
+ import { useCustomizationRegistration } from './chunk-QQGC223F.mjs';
2
2
  import { defineComponent, computed } from 'vue';
3
3
 
4
4
  var _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,9 +1,10 @@
1
1
  import { useControllerLifecycle } from './chunk-KNNYJD4D.mjs';
2
- import { useCartesianFrame, useCartesianFrameRegistration } from './chunk-I2BWSDNR.mjs';
3
- import { useChartMethods, useChartState, useChartHover } from './chunk-QOWKMWNO.mjs';
2
+ import { useCartesianFrame, useCartesianFrameRegistration } from './chunk-KX5GTFS3.mjs';
3
+ import { useChartMethods, useChartState, useChartHover } from './chunk-F72RBTHC.mjs';
4
4
  import { defineComponent, computed, unref, openBlock, createElementBlock, createCommentVNode, ref, watch } from 'vue';
5
5
  import { createScatterRendererCanvas } from '@primeui/chart-core/series/scatter/controller-canvas';
6
6
  import { createScatterRendererSvg } from '@primeui/chart-core/series/scatter/controller-svg';
7
+ import { formatTooltipValue } from '@primeui/chart-core';
7
8
 
8
9
  function useScatterRenderer(options) {
9
10
  const {
@@ -76,9 +77,13 @@ function useScatterRenderer(options) {
76
77
  function hitTest(x, y) {
77
78
  return controller.hitTest(x, y);
78
79
  }
80
+ function findNearest(x, y) {
81
+ return controller.findNearest(x, y);
82
+ }
79
83
  return {
80
84
  groupRef,
81
85
  hitTest,
86
+ findNearest,
82
87
  boostActive: computed(() => controller.boostActive),
83
88
  markerOverlays: markerOverlaysRef,
84
89
  applyPropertyAnimations,
@@ -92,12 +97,24 @@ function useScatterRenderer(options) {
92
97
  }
93
98
  };
94
99
  }
95
-
96
- // src/components/renderers/layers/ScatterLayer.vue
97
100
  var _hoisted_1 = ["clip-path"];
98
101
  var _sfc_main = /* @__PURE__ */ defineComponent({
99
102
  __name: "ScatterLayer",
100
103
  setup(__props) {
104
+ function fmtAxis(ld, axisKey, v) {
105
+ const tf = ld?.axisLayouts?.get(axisKey)?.props?.tickFormat;
106
+ return typeof tf === "function" ? tf(v) : formatTooltipValue(v);
107
+ }
108
+ function toCartesianScatterHit(scHit) {
109
+ return {
110
+ ...scHit,
111
+ value: scHit.yValue,
112
+ snapX: scHit.x,
113
+ snapY: scHit.y,
114
+ formattedValue: "",
115
+ cursorFormattedValue: ""
116
+ };
117
+ }
101
118
  const frame = useCartesianFrame();
102
119
  const methods = useChartMethods();
103
120
  const state = useChartState();
@@ -139,23 +156,45 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
139
156
  syncWithAnimatedScale: (categoryScale, valueScales, valueXScales) => scatter.syncWithAnimatedScale(categoryScale, valueScales, valueXScales),
140
157
  hitTest: (x, y) => {
141
158
  const scHit = scatter.hitTest(x, y);
159
+ return scHit ? toCartesianScatterHit(scHit) : null;
160
+ },
161
+ // Scatter is a 2D point cloud, so the crosshair snaps to the single nearest point
162
+ // anywhere in the plot area (unbounded findNearest, not the hit-radius hitTest) — that
163
+ // is what lets the crosshair follow the cursor everywhere, like line/bar.
164
+ findAllNearest: (x, y) => {
165
+ const scHit = scatter.findNearest(x, y);
142
166
  if (!scHit) return null;
167
+ const ld = frame.layoutData.value ?? null;
168
+ const primary = toCartesianScatterHit(scHit);
169
+ const snap = frame.crosshairSnap.value;
170
+ const lockX = snap === "xy" || snap === "x";
171
+ const lockY = snap === "xy" || snap === "y";
172
+ const horizontal = (ld?.orientation ?? "vertical") === "horizontal";
173
+ const vId = ld?.valueScales?.keys().next().value ?? "default";
174
+ const vKey = `${horizontal ? "x" : "y"}:${vId}`;
175
+ const vScale = ld?.valueScales?.get(vId);
176
+ const vText = fmtAxis(ld, vKey, scHit.yValue);
177
+ const lockValue = horizontal ? lockX : lockY;
178
+ primary.cursorFormattedValue = lockValue || !vScale ? vText : fmtAxis(ld, vKey, Math.round(vScale.invert(horizontal ? x : y)));
179
+ if (scHit.independentIsCategory) {
180
+ primary.label = scHit.category ?? scHit.label;
181
+ primary.formattedValue = vText;
182
+ } else {
183
+ const xId = ld?.valueXScales?.keys().next().value ?? "default";
184
+ const xKey = `x:${xId}`;
185
+ const xScale = ld?.valueXScales?.get(xId);
186
+ const xPointText = fmtAxis(ld, xKey, scHit.xValue);
187
+ primary.label = lockX || !xScale ? xPointText : fmtAxis(ld, xKey, Math.round(xScale.invert(x)));
188
+ primary.formattedValue = `${xPointText}, ${vText}`;
189
+ }
190
+ const allSeries = scHit.independentIsCategory ? [{
191
+ ...primary,
192
+ value: primary.value ?? 0,
193
+ snapPixel: primary.snapY
194
+ }] : [];
143
195
  return {
144
- datasetId: scHit.datasetId,
145
- index: scHit.index,
146
- label: scHit.label,
147
- value: scHit.yValue,
148
- xValue: scHit.xValue,
149
- yValue: scHit.yValue,
150
- independentIsCategory: scHit.independentIsCategory,
151
- xAxisTitle: scHit.xAxisTitle,
152
- yAxisTitle: scHit.yAxisTitle,
153
- ...scHit.bubbleValue != null ? { bubbleValue: scHit.bubbleValue } : {},
154
- color: scHit.color,
155
- snapX: scHit.x,
156
- snapY: scHit.y,
157
- formattedValue: "",
158
- cursorFormattedValue: ""
196
+ primary,
197
+ allSeries
159
198
  };
160
199
  },
161
200
  getPointPosition: (datasetId, index) => {
@@ -1,4 +1,4 @@
1
- import { useBarLayer, useBarRendererBase } from './chunk-AKMQHU5T.mjs';
1
+ import { useBarLayer, useBarRendererBase } from './chunk-V4KRWSEE.mjs';
2
2
  import { defineComponent, unref, openBlock, createElementBlock, createCommentVNode } from 'vue';
3
3
  import { createBarRendererCanvas } from '@primeui/chart-core/series/bar/controller-canvas';
4
4
 
@@ -1,6 +1,6 @@
1
- import { CHART_METHODS_KEY, CHART_STATE_KEY, CHART_HOVER_KEY, RENDERER_HINT_KEY, CHART_REFRESH_NONCE_KEY, CHART_CORE_INSTANCE_KEY } from './chunk-4Q3QUNX6.mjs';
2
- import { createChart, defaultLightTheme } from '@primeui/chart-core';
3
- import { inject, shallowRef, ref, computed, watch, provide } from 'vue';
1
+ import { CHART_METHODS_KEY, CHART_STATE_KEY, CHART_HOVER_KEY, CHART_RULE_OVERRIDES_KEY, RENDERER_HINT_KEY, CHART_REFRESH_NONCE_KEY, CHART_CORE_INSTANCE_KEY } from './chunk-FGBZ3VPE.mjs';
2
+ import { createChart, defaultLightTheme, applyColorblindMode } from '@primeui/chart-core';
3
+ import { inject, computed, shallowRef, ref, watch, provide } from 'vue';
4
4
 
5
5
  function useChartMethods() {
6
6
  const ctx = inject(CHART_METHODS_KEY);
@@ -23,6 +23,9 @@ function useChartHover() {
23
23
  }
24
24
  return hoverRef;
25
25
  }
26
+ function useRuleOverrides() {
27
+ return inject(CHART_RULE_OVERRIDES_KEY) ?? computed(() => ({}));
28
+ }
26
29
  function useRendererHint(hint) {
27
30
  const hintRef = inject(RENDERER_HINT_KEY);
28
31
  if (hintRef) {
@@ -122,6 +125,10 @@ function provideChartContext(options) {
122
125
  axesX: new Map(s0.axes.x),
123
126
  axesY: new Map(s0.axes.y)
124
127
  };
128
+ let cbEffective = null;
129
+ let cbRaw = null;
130
+ let cbTheme = null;
131
+ let cbExplicit = null;
125
132
  const stateValue = computed(() => {
126
133
  void version.value;
127
134
  const s = coreChart.$state;
@@ -132,7 +139,22 @@ function provideChartContext(options) {
132
139
  const annotations = mapsEqual(s.annotations, snap.annotations) ? snap.annotations : snap.annotations = new Map(s.annotations);
133
140
  const axesX = mapsEqual(s.axes.x, snap.axesX) ? snap.axesX : snap.axesX = new Map(s.axes.x);
134
141
  const axesY = mapsEqual(s.axes.y, snap.axesY) ? snap.axesY : snap.axesY = new Map(s.axes.y);
135
- return { datasets, datasetVisibility, hiddenItems, features, annotations, axes: { x: axesX, y: axesY } };
142
+ const cbOn = features.get("accessibility")?.props?.patterns === true;
143
+ let effectiveDatasets = datasets;
144
+ if (cbOn) {
145
+ const themeVal = theme?.value ?? defaultLightTheme;
146
+ const themeExplicit = renderer === "canvas" || themeVal !== defaultLightTheme;
147
+ if (datasets !== cbRaw || themeVal !== cbTheme || themeExplicit !== cbExplicit) {
148
+ cbEffective = applyColorblindMode(datasets, themeVal, themeExplicit);
149
+ cbRaw = datasets;
150
+ cbTheme = themeVal;
151
+ cbExplicit = themeExplicit;
152
+ }
153
+ effectiveDatasets = cbEffective;
154
+ } else if (cbRaw !== null) {
155
+ cbRaw = cbEffective = cbExplicit = null;
156
+ }
157
+ return { datasets: effectiveDatasets, datasetVisibility, hiddenItems, features, annotations, axes: { x: axesX, y: axesY } };
136
158
  });
137
159
  const hoverValue = computed(() => ({
138
160
  hover: hoverState.value
@@ -166,4 +188,4 @@ function provideChartContext(options) {
166
188
  };
167
189
  }
168
190
 
169
- export { provideChartContext, useChartHover, useChartMethods, useChartState, useRendererHint };
191
+ export { provideChartContext, useChartHover, useChartMethods, useChartState, useRendererHint, useRuleOverrides };
@@ -8,5 +8,6 @@ var CHART_GROUP_TEXT_KEY = /* @__PURE__ */ Symbol.for("chart-group-text");
8
8
  var TOOLTIP_CONTEXT_KEY = /* @__PURE__ */ Symbol.for("chart-tooltip");
9
9
  var CHART_CORE_INSTANCE_KEY = /* @__PURE__ */ Symbol.for("chart-core-instance");
10
10
  var CHART_REFRESH_NONCE_KEY = /* @__PURE__ */ Symbol.for("chart-refresh-nonce");
11
+ var CHART_RULE_OVERRIDES_KEY = /* @__PURE__ */ Symbol.for("chart-rule-overrides");
11
12
 
12
- export { CHART_CORE_INSTANCE_KEY, CHART_GROUP_TEXT_KEY, CHART_HOVER_KEY, CHART_METHODS_KEY, CHART_REFRESH_NONCE_KEY, CHART_STATE_KEY, ITEM_COLLECTOR_KEY, RENDERER_HINT_KEY, TOOLTIP_CONTEXT_KEY };
13
+ export { CHART_CORE_INSTANCE_KEY, CHART_GROUP_TEXT_KEY, CHART_HOVER_KEY, CHART_METHODS_KEY, CHART_REFRESH_NONCE_KEY, CHART_RULE_OVERRIDES_KEY, CHART_STATE_KEY, ITEM_COLLECTOR_KEY, RENDERER_HINT_KEY, TOOLTIP_CONTEXT_KEY };
@@ -1,9 +1,9 @@
1
- import { BarLayerSvg_default } from './chunk-2TOEQNJ6.mjs';
2
- import { BarLayerCanvas_default } from './chunk-IFZSHQDZ.mjs';
3
- import { CartesianRenderer_default } from './chunk-YZQS2YBK.mjs';
4
- import { registerFamilyRenderer, registerChartLayer, useDatasetAnimationRegistration, useDatasetRegistration, useItemCollector } from './chunk-I2BWSDNR.mjs';
1
+ import { BarLayerSvg_default } from './chunk-MX74LV4I.mjs';
2
+ import { BarLayerCanvas_default } from './chunk-EDDORION.mjs';
3
+ import { CartesianRenderer_default } from './chunk-BVB7G6Y5.mjs';
4
+ import { registerFamilyRenderer, registerChartLayer, useDatasetAnimationRegistration, useDatasetRegistration, useItemCollector } from './chunk-KX5GTFS3.mjs';
5
5
  import { STACKED_CONTEXT_KEY } from './chunk-L6N5IYAJ.mjs';
6
- import { useRendererHint, useChartMethods } from './chunk-QOWKMWNO.mjs';
6
+ import { useRendererHint, useChartMethods } from './chunk-F72RBTHC.mjs';
7
7
  import { defineComponent, useSlots, computed, inject, onMounted, watch, onUnmounted, renderSlot, createCommentVNode } from 'vue';
8
8
  import { resolveAccessor } from '@primeui/chart-core';
9
9
  import { getBarAxisHints } from '@primeui/chart-core/series/bar';
@@ -1,6 +1,7 @@
1
1
  import { useControllerLifecycle } from './chunk-KNNYJD4D.mjs';
2
+ import { applyDataLabelRuleOverrides } from './chunk-Q3I4EL3N.mjs';
2
3
  import { useRadialFrameRegistration } from './chunk-7EZEZMGG.mjs';
3
- import { useChartMethods, useChartState, useChartHover } from './chunk-QOWKMWNO.mjs';
4
+ import { useChartMethods, useChartState, useChartHover, useRuleOverrides } from './chunk-F72RBTHC.mjs';
4
5
  import { defineComponent, computed, toRef, unref, openBlock, createElementBlock, Fragment, createElementVNode, renderList, createBlock, createCommentVNode, ref, watch, h } from 'vue';
5
6
  import { buildPieSliceContentItems } from '@primeui/chart-core';
6
7
  import { createPieRendererCanvas } from '@primeui/chart-core/series/pie/controller-canvas';
@@ -78,9 +79,7 @@ function usePieRenderer(options) {
78
79
  return content;
79
80
  });
80
81
  function hitTest(x, y) {
81
- const hit = controller.hitTest(x, y);
82
- if (!hit) return null;
83
- return { datasetId: hit.datasetId, index: hit.index, label: hit.label, value: hit.value, percentage: hit.percentage, color: hit.color };
82
+ return controller.hitTest(x, y);
84
83
  }
85
84
  function getSlicePosition(datasetId, index) {
86
85
  return controller.getSlicePosition(datasetId, index);
@@ -122,13 +121,14 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
122
121
  const methods = useChartMethods();
123
122
  const state = useChartState();
124
123
  const hoverCtx = useChartHover();
124
+ const ruleOverrides = useRuleOverrides();
125
125
  const pie = usePieRenderer({
126
126
  chartArea: computed(() => props.chartArea),
127
127
  renderer: methods.renderer,
128
128
  canvasEl: toRef(props, "canvasEl"),
129
129
  containerEl: toRef(props, "containerEl"),
130
130
  datasets: computed(() => state.value.datasets),
131
- features: computed(() => state.value.features),
131
+ features: computed(() => applyDataLabelRuleOverrides(state.value.features, ruleOverrides.value)),
132
132
  hover: computed(() => hoverCtx.value.hover),
133
133
  datasetVisibility: computed(() => state.value.datasetVisibility),
134
134
  hiddenItems: computed(() => state.value.hiddenItems),
@@ -1,5 +1,5 @@
1
1
  import { AXIS_GROUP_REGISTRY_KEY } from './chunk-EHSDNH7K.mjs';
2
- import { useAxisComponentBase } from './chunk-I2BWSDNR.mjs';
2
+ import { useAxisComponentBase } from './chunk-KX5GTFS3.mjs';
3
3
  import { defineComponent, useSlots, computed, provide, renderSlot } from 'vue';
4
4
 
5
5
  var __default__ = { inheritAttrs: false };
@@ -1,5 +1,5 @@
1
1
  import { SYNC_BUS_KEY } from './chunk-H4HLHGUW.mjs';
2
- import { CHART_GROUP_TEXT_KEY } from './chunk-4Q3QUNX6.mjs';
2
+ import { CHART_GROUP_TEXT_KEY } from './chunk-FGBZ3VPE.mjs';
3
3
  import { defineComponent, provide, ref, openBlock, createElementBlock, toDisplayString, createCommentVNode, renderSlot } from 'vue';
4
4
  import { SyncBus, DEFAULT_CHART_CAPTION_PADDING, DEFAULT_CHART_TITLE_COLOR, DEFAULT_CHART_TITLE_FONT_SIZE, DEFAULT_CHART_TITLE_PADDING, DEFAULT_CHART_CAPTION_COLOR, DEFAULT_CHART_CAPTION_FONT_SIZE } from '@primeui/chart-core';
5
5
 
@@ -1,7 +1,7 @@
1
- import { TOOLTIP_DEFAULT_STYLE, TOOLTIP_BASE_STYLE } from './chunk-ZH4A4L6W.mjs';
2
- import { TOOLTIP_CONTEXT_KEY } from './chunk-4Q3QUNX6.mjs';
1
+ import { TOOLTIP_DEFAULT_STYLE, TOOLTIP_BASE_STYLE } from './chunk-Q3I4EL3N.mjs';
2
+ import { TOOLTIP_CONTEXT_KEY } from './chunk-FGBZ3VPE.mjs';
3
3
  import { defineComponent, inject, shallowRef, computed, ref, watch, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, normalizeStyle, createBlock, resolveDynamicComponent, unref, Fragment, createElementVNode, toDisplayString, renderList, createCommentVNode, createTextVNode } from 'vue';
4
- import { computeTooltipPosition, buildTooltipContent, safeRenderProp, formatTooltipValue, gradientToCssBackground } from '@primeui/chart-core';
4
+ import { computeTooltipPosition, buildTooltipContent, safeRenderProp, formatTooltipValue, patternToCssBackground, gradientToCssBackground } from '@primeui/chart-core';
5
5
 
6
6
  var _hoisted_1 = { class: "p-chart-tooltip__title" };
7
7
  var _hoisted_2 = {
@@ -160,8 +160,33 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
160
160
  });
161
161
  });
162
162
  const hasCustomRender = computed(() => !!props.tooltipConfig?.render);
163
- function swatchStyle(color, gradient, swatchColor) {
163
+ function swatchStyle(color, gradient, swatchColor, pattern, dash) {
164
164
  const background = swatchColor ?? color;
165
+ if (pattern) {
166
+ return {
167
+ backgroundColor: pattern.backgroundColor ?? "transparent",
168
+ backgroundImage: patternToCssBackground(pattern),
169
+ backgroundSize: "6px"
170
+ };
171
+ }
172
+ if (dash && dash.length >= 2) {
173
+ const scale = 0.6;
174
+ const stops = [];
175
+ let pos = 0;
176
+ for (let i = 0; i < dash.length; i++) {
177
+ const seg = Math.max(0.5, dash[i] * scale);
178
+ const c = i % 2 === 0 ? background : "transparent";
179
+ stops.push(`${c} ${pos}px`, `${c} ${pos + seg}px`);
180
+ pos += seg;
181
+ }
182
+ return {
183
+ backgroundColor: "transparent",
184
+ backgroundImage: `repeating-linear-gradient(90deg, ${stops.join(", ")})`,
185
+ backgroundSize: "100% 2px",
186
+ backgroundPosition: "center",
187
+ backgroundRepeat: "no-repeat"
188
+ };
189
+ }
165
190
  return gradient ? {
166
191
  backgroundColor: background,
167
192
  backgroundImage: gradientToCssBackground(gradient)
@@ -197,7 +222,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
197
222
  }), "tooltip")), { key: 0 })) : content.value?.type === "multi-series" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createElementVNode("div", _hoisted_1, toDisplayString(content.value.label), 1), (openBlock(true), createElementBlock(Fragment, null, renderList(content.value.series, (row) => {
198
223
  return openBlock(), createElementBlock(Fragment, { key: row.datasetId }, [row.ohlc ? (openBlock(), createElementBlock("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [createElementVNode("span", {
199
224
  class: "p-chart-tooltip__swatch",
200
- style: normalizeStyle(swatchStyle(row.color, row.colorGradient, row.swatchColor))
225
+ style: normalizeStyle(swatchStyle(row.color, row.colorGradient, row.swatchColor, row.colorPattern, row.dash))
201
226
  }, null, 4), createElementVNode("span", _hoisted_4, toDisplayString(row.label), 1)]), (openBlock(), createElementBlock(Fragment, null, renderList([
202
227
  "open",
203
228
  "high",
@@ -212,7 +237,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
212
237
  }), 64))])) : (openBlock(), createElementBlock("div", _hoisted_7, [
213
238
  createElementVNode("span", {
214
239
  class: "p-chart-tooltip__swatch",
215
- style: normalizeStyle(swatchStyle(row.color, row.colorGradient, row.swatchColor))
240
+ style: normalizeStyle(swatchStyle(row.color, row.colorGradient, row.swatchColor, row.colorPattern, row.dash))
216
241
  }, null, 4),
217
242
  createElementVNode("span", _hoisted_8, toDisplayString(row.label), 1),
218
243
  createElementVNode("span", _hoisted_9, toDisplayString(row.formattedValue), 1)
@@ -227,7 +252,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
227
252
  }, toDisplayString(row.value), 5)]);
228
253
  }), 128))], 64)) : content.value?.type === "ohlc" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [createElementVNode("div", _hoisted_12, [createElementVNode("span", {
229
254
  class: "p-chart-tooltip__swatch",
230
- style: normalizeStyle(swatchStyle(content.value.color, content.value.colorGradient, content.value.swatchColor))
255
+ style: normalizeStyle(swatchStyle(content.value.color, content.value.colorGradient, content.value.swatchColor, content.value.colorPattern, content.value.dash))
231
256
  }, null, 4), createElementVNode("span", _hoisted_13, toDisplayString(content.value.label), 1)]), (openBlock(true), createElementBlock(Fragment, null, renderList(content.value.rows, (row) => {
232
257
  return openBlock(), createElementBlock("div", {
233
258
  key: row.key,
@@ -236,7 +261,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
236
261
  }), 128))], 64)) : content.value?.type === "xy" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
237
262
  createElementVNode("div", _hoisted_16, [createElementVNode("span", {
238
263
  class: "p-chart-tooltip__swatch",
239
- style: normalizeStyle(swatchStyle(content.value.color, content.value.colorGradient, content.value.swatchColor))
264
+ style: normalizeStyle(swatchStyle(content.value.color, content.value.colorGradient, content.value.swatchColor, content.value.colorPattern, content.value.dash))
240
265
  }, null, 4), createElementVNode("span", _hoisted_17, toDisplayString(content.value.label), 1)]),
241
266
  createElementVNode("div", _hoisted_18, [createElementVNode("span", _hoisted_19, toDisplayString(content.value.xLabel), 1), createElementVNode("span", _hoisted_20, toDisplayString(content.value.xValue), 1)]),
242
267
  createElementVNode("div", _hoisted_21, [createElementVNode("span", _hoisted_22, toDisplayString(content.value.yLabel), 1), createElementVNode("span", _hoisted_23, toDisplayString(content.value.yValue), 1)]),
@@ -244,7 +269,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
244
269
  ], 64)) : content.value?.type === "simple" ? (openBlock(), createElementBlock("div", _hoisted_26, [
245
270
  createElementVNode("span", {
246
271
  class: "p-chart-tooltip__swatch",
247
- style: normalizeStyle(swatchStyle(content.value.color, content.value.colorGradient, content.value.swatchColor))
272
+ style: normalizeStyle(swatchStyle(content.value.color, content.value.colorGradient, content.value.swatchColor, content.value.colorPattern, content.value.dash))
248
273
  }, null, 4),
249
274
  createElementVNode("span", _hoisted_27, toDisplayString(content.value.label), 1),
250
275
  createElementVNode("span", _hoisted_28, [createTextVNode(toDisplayString(content.value.value), 1), content.value.percentage != null ? (openBlock(), createElementBlock("span", _hoisted_29, " (" + toDisplayString(content.value.percentage) + "%)", 1)) : createCommentVNode("", true)])
@@ -1,4 +1,4 @@
1
- import { useChartMethods } from './chunk-QOWKMWNO.mjs';
1
+ import { useChartMethods } from './chunk-F72RBTHC.mjs';
2
2
  import { defineComponent, onMounted, watch, onUnmounted, renderSlot } from 'vue';
3
3
 
4
4
  var _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,4 +1,4 @@
1
- import { ITEM_COLLECTOR_KEY } from './chunk-4Q3QUNX6.mjs';
1
+ import { ITEM_COLLECTOR_KEY } from './chunk-FGBZ3VPE.mjs';
2
2
  import { defineComponent, inject, onMounted, watch, onUnmounted } from 'vue';
3
3
 
4
4
  var _sfc_main = /* @__PURE__ */ defineComponent({
@@ -19,7 +19,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
19
19
  borderColor: {},
20
20
  borderStrokeWidth: {},
21
21
  size: {},
22
- secondaryLabel: {},
23
22
  opacity: {},
24
23
  nodeId: {},
25
24
  parentId: {}
@@ -48,7 +47,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
48
47
  borderRadius: props.borderRadius,
49
48
  borderColor: props.borderColor,
50
49
  borderStrokeWidth: props.borderStrokeWidth,
51
- secondaryLabel: props.secondaryLabel,
52
50
  opacity: props.opacity,
53
51
  nodeId: props.nodeId,
54
52
  parentId: props.parentId
@@ -1,4 +1,4 @@
1
- import { Chart_default } from './chunk-EKGCPOZJ.mjs';
1
+ import { Chart_default } from './chunk-7OLUXDMR.mjs';
2
2
  import { defineComponent, ref, openBlock, createBlock, mergeProps, withCtx, renderSlot } from 'vue';
3
3
 
4
4
  var _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,5 +1,5 @@
1
1
  import { STACKED_CONTEXT_KEY } from './chunk-L6N5IYAJ.mjs';
2
- import { useChartMethods } from './chunk-QOWKMWNO.mjs';
2
+ import { useChartMethods } from './chunk-F72RBTHC.mjs';
3
3
  import { defineComponent, onMounted, reactive, watch, onUnmounted, provide, renderSlot } from 'vue';
4
4
 
5
5
  var stackIdCounter = 0;
@@ -1,6 +1,6 @@
1
- import { LEGEND_ITEM_BASE_STYLE, LEGEND_SWATCH_STYLE } from './chunk-ZH4A4L6W.mjs';
1
+ import { LEGEND_ITEM_BASE_STYLE } from './chunk-Q3I4EL3N.mjs';
2
2
  import { defineComponent, ref, computed, openBlock, createElementBlock, normalizeStyle, Fragment, renderList, createBlock, resolveDynamicComponent, unref, createCommentVNode, createElementVNode, toDisplayString, nextTick } from 'vue';
3
- import { computeLegendStyle, safeRenderProp, gradientToCssBackground } from '@primeui/chart-core';
3
+ import { computeLegendStyle, safeRenderProp, legendSwatchStyle } from '@primeui/chart-core';
4
4
 
5
5
  var _hoisted_1 = ["dir"];
6
6
  var _hoisted_2 = {
@@ -102,24 +102,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
102
102
  }
103
103
  function getSwatchStyle(item) {
104
104
  const lc = props.legendConfig;
105
- const iconSize = lc.iconSize ?? 12;
106
- const iconShape = lc.iconShape;
107
- const base = {
108
- ...LEGEND_SWATCH_STYLE,
109
- width: `${iconSize}px`,
110
- height: iconShape === "line" ? "2px" : `${iconSize}px`,
111
- borderRadius: iconShape === "circle" ? "50%" : iconShape === "line" ? "1px" : "2px",
112
- backgroundColor: item.color,
113
- ...item.colorGradient ? { backgroundImage: gradientToCssBackground(item.colorGradient) } : {}
114
- };
115
- if (item.hasBorder && item.borderColor) {
116
- base.border = `2px solid ${item.borderColor}`;
117
- base.boxSizing = "border-box";
118
- }
119
- if (item.borderRadius !== void 0) {
120
- base.borderRadius = `${Math.min(item.borderRadius, 6)}px`;
121
- }
122
- return base;
105
+ return legendSwatchStyle(item, lc.iconSize ?? 12, lc.iconShape);
123
106
  }
124
107
  return (_ctx, _cache) => {
125
108
  return __props.legendConfig && __props.legendArea && __props.legendItems.length > 0 ? (openBlock(), createElementBlock("div", {
@@ -129,16 +112,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
129
112
  dir: __props.dir ?? "ltr"
130
113
  }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.legendItems, (item, idx) => {
131
114
  return openBlock(), createElementBlock(Fragment, { key: itemKey(item, idx) }, [__props.legendConfig.render ? (openBlock(), createElementBlock("div", _hoisted_2, [(openBlock(), createBlock(resolveDynamicComponent(() => unref(safeRenderProp)(() => __props.legendConfig.render({
132
- type: item.type,
133
- datasetId: item.datasetId,
134
- index: item.index,
135
- label: item.label,
136
- color: item.color,
137
- colorGradient: item.colorGradient,
138
- visible: item.visible,
139
- borderColor: item.borderColor,
140
- hasBorder: item.hasBorder,
141
- borderRadius: item.borderRadius,
115
+ ...item,
142
116
  isHovered: hoveredItem.value === item,
143
117
  onClick: () => handleClick(item),
144
118
  onMouseEnter: () => handleHover(item),
@@ -1,5 +1,5 @@
1
- import { registerZoomController } from './chunk-I2BWSDNR.mjs';
2
- import { useCustomizationRegistration } from './chunk-ZLD5VNMP.mjs';
1
+ import { registerZoomController } from './chunk-KX5GTFS3.mjs';
2
+ import { useCustomizationRegistration } from './chunk-QQGC223F.mjs';
3
3
  import { defineComponent, getCurrentInstance, computed } from 'vue';
4
4
  import { ZoomPanController } from '@primeui/chart-core';
5
5