@primeui/vue-chart 0.0.1-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/LICENSE +23 -0
  2. package/README.md +1 -0
  3. package/dist/Chart.parts.d.ts +39 -0
  4. package/dist/Chart.vue.d.ts +27 -0
  5. package/dist/ChartCanvas.mjs +14 -0
  6. package/dist/ChartCanvas.render.spec.d.ts +1 -0
  7. package/dist/ChartCanvas.vue.d.ts +23 -0
  8. package/dist/ChartStacked.spec.d.ts +1 -0
  9. package/dist/ChartSvg.axes.spec.d.ts +1 -0
  10. package/dist/ChartSvg.context.spec.d.ts +1 -0
  11. package/dist/ChartSvg.customizations.spec.d.ts +1 -0
  12. package/dist/ChartSvg.features.spec.d.ts +1 -0
  13. package/dist/ChartSvg.legend.spec.d.ts +1 -0
  14. package/dist/ChartSvg.mjs +14 -0
  15. package/dist/ChartSvg.registration.spec.d.ts +1 -0
  16. package/dist/ChartSvg.render.spec.d.ts +1 -0
  17. package/dist/ChartSvg.vue.d.ts +23 -0
  18. package/dist/_test/fixtures.d.ts +34 -0
  19. package/dist/bundle-discipline.spec.d.ts +1 -0
  20. package/dist/chunk-2D3PWFR2.mjs +214 -0
  21. package/dist/chunk-32XIRBZ7.mjs +87 -0
  22. package/dist/chunk-372K2BMN.mjs +1476 -0
  23. package/dist/chunk-42J32DPD.mjs +70 -0
  24. package/dist/chunk-44BAFHPK.mjs +51 -0
  25. package/dist/chunk-4CRHCZV3.mjs +142 -0
  26. package/dist/chunk-4NJ2PSHV.mjs +230 -0
  27. package/dist/chunk-4THCGGER.mjs +53 -0
  28. package/dist/chunk-4UVPCLJ7.mjs +70 -0
  29. package/dist/chunk-54DLUFIA.mjs +96 -0
  30. package/dist/chunk-56NMBNNX.mjs +52 -0
  31. package/dist/chunk-5DWO3G33.mjs +276 -0
  32. package/dist/chunk-5FTUGKPC.mjs +167 -0
  33. package/dist/chunk-5SRBQVU5.mjs +6 -0
  34. package/dist/chunk-62NGBLQ7.mjs +28 -0
  35. package/dist/chunk-644ROAHU.mjs +362 -0
  36. package/dist/chunk-6S4JMPKC.mjs +55 -0
  37. package/dist/chunk-72KINEJ6.mjs +52 -0
  38. package/dist/chunk-7P6ASYW6.mjs +7 -0
  39. package/dist/chunk-AAX7FOW3.mjs +210 -0
  40. package/dist/chunk-AUI5R4DA.mjs +84 -0
  41. package/dist/chunk-CDXF6ZTL.mjs +50 -0
  42. package/dist/chunk-CQHNYT2V.mjs +1692 -0
  43. package/dist/chunk-DLUFOM5K.mjs +218 -0
  44. package/dist/chunk-DOOXGOOB.mjs +123 -0
  45. package/dist/chunk-DYVFVVTO.mjs +97 -0
  46. package/dist/chunk-E2U4W5FW.mjs +288 -0
  47. package/dist/chunk-E4ROAOPT.mjs +291 -0
  48. package/dist/chunk-FFBK7Q3W.mjs +91 -0
  49. package/dist/chunk-FQTWLAVA.mjs +23 -0
  50. package/dist/chunk-FZ3PZ66C.mjs +12 -0
  51. package/dist/chunk-GA4VV5V4.mjs +21 -0
  52. package/dist/chunk-GFC24374.mjs +244 -0
  53. package/dist/chunk-GX2MK6VT.mjs +255 -0
  54. package/dist/chunk-HANSF33Z.mjs +169 -0
  55. package/dist/chunk-HTZVV6VV.mjs +550 -0
  56. package/dist/chunk-J2P5JBHC.mjs +26 -0
  57. package/dist/chunk-J43KLCZF.mjs +10 -0
  58. package/dist/chunk-JKK3D33U.mjs +64 -0
  59. package/dist/chunk-K326BBF7.mjs +276 -0
  60. package/dist/chunk-KOWFD2AE.mjs +72 -0
  61. package/dist/chunk-LD57I4SY.mjs +5 -0
  62. package/dist/chunk-MDA22SIZ.mjs +29 -0
  63. package/dist/chunk-NLXOJSKK.mjs +727 -0
  64. package/dist/chunk-O6L3PNFC.mjs +49 -0
  65. package/dist/chunk-PJVOZSPF.mjs +55 -0
  66. package/dist/chunk-PQV55JYI.mjs +38 -0
  67. package/dist/chunk-PSSXPTLQ.mjs +210 -0
  68. package/dist/chunk-RQURY2H3.mjs +40 -0
  69. package/dist/chunk-RRHYGSK6.mjs +29 -0
  70. package/dist/chunk-RSAZ7V5Z.mjs +42 -0
  71. package/dist/chunk-RSTIA3KM.mjs +41 -0
  72. package/dist/chunk-TEOO4OLV.mjs +6 -0
  73. package/dist/chunk-TIV2FI4S.mjs +53 -0
  74. package/dist/chunk-UO27BCRL.mjs +86 -0
  75. package/dist/chunk-VWABO23U.mjs +143 -0
  76. package/dist/chunk-W5M3BR6N.mjs +26 -0
  77. package/dist/chunk-WA735Y26.mjs +101 -0
  78. package/dist/chunk-WKSQR6L5.mjs +247 -0
  79. package/dist/chunk-WYV2MHP6.mjs +34 -0
  80. package/dist/chunk-XBDNMPF7.mjs +87 -0
  81. package/dist/chunk-YGHWUR7K.mjs +45 -0
  82. package/dist/chunk-YRKAI2R2.mjs +151 -0
  83. package/dist/chunk-ZHFL3RYO.mjs +228 -0
  84. package/dist/chunk-ZNINPVG7.mjs +30 -0
  85. package/dist/chunk-ZRCOVQQM.mjs +47 -0
  86. package/dist/components/charts/ChartBar.mjs +13 -0
  87. package/dist/components/charts/ChartBar.vue.d.ts +11 -0
  88. package/dist/components/charts/ChartCandlestick.mjs +11 -0
  89. package/dist/components/charts/ChartCandlestick.vue.d.ts +11 -0
  90. package/dist/components/charts/ChartHeatmap.mjs +11 -0
  91. package/dist/components/charts/ChartHeatmap.vue.d.ts +11 -0
  92. package/dist/components/charts/ChartLine.mjs +11 -0
  93. package/dist/components/charts/ChartLine.vue.d.ts +11 -0
  94. package/dist/components/charts/ChartPie.mjs +11 -0
  95. package/dist/components/charts/ChartPie.vue.d.ts +15 -0
  96. package/dist/components/charts/ChartPolar.mjs +11 -0
  97. package/dist/components/charts/ChartPolar.vue.d.ts +11 -0
  98. package/dist/components/charts/ChartRadar.mjs +11 -0
  99. package/dist/components/charts/ChartRadar.vue.d.ts +11 -0
  100. package/dist/components/charts/ChartScatter.mjs +11 -0
  101. package/dist/components/charts/ChartScatter.vue.d.ts +11 -0
  102. package/dist/components/charts/ChartTreemap.mjs +10 -0
  103. package/dist/components/charts/ChartTreemap.vue.d.ts +15 -0
  104. package/dist/components/charts/index.d.ts +2 -0
  105. package/dist/components/containers/ChartDecimation.mjs +6 -0
  106. package/dist/components/containers/ChartDecimation.vue.d.ts +29 -0
  107. package/dist/components/containers/ChartGroup.mjs +4 -0
  108. package/dist/components/containers/ChartGroup.vue.d.ts +13 -0
  109. package/dist/components/containers/ChartOverlap.mjs +5 -0
  110. package/dist/components/containers/ChartOverlap.vue.d.ts +13 -0
  111. package/dist/components/containers/ChartRange.mjs +6 -0
  112. package/dist/components/containers/ChartRange.vue.d.ts +13 -0
  113. package/dist/components/containers/ChartStacked.mjs +6 -0
  114. package/dist/components/containers/ChartStacked.vue.d.ts +21 -0
  115. package/dist/components/containers/ChartWaterfall.mjs +5 -0
  116. package/dist/components/containers/ChartWaterfall.vue.d.ts +17 -0
  117. package/dist/components/containers/keys.d.ts +5 -0
  118. package/dist/components/customizations/ChartAccessibility.mjs +9 -0
  119. package/dist/components/customizations/ChartAccessibility.vue.d.ts +28 -0
  120. package/dist/components/customizations/ChartAnnotation.mjs +5 -0
  121. package/dist/components/customizations/ChartAnnotation.vue.d.ts +8 -0
  122. package/dist/components/customizations/ChartAxisCategory.mjs +3 -0
  123. package/dist/components/customizations/ChartAxisCategory.vue.d.ts +4 -0
  124. package/dist/components/customizations/ChartAxisGroup.mjs +3 -0
  125. package/dist/components/customizations/ChartAxisGroup.vue.d.ts +14 -0
  126. package/dist/components/customizations/ChartBreadcrumb.mjs +6 -0
  127. package/dist/components/customizations/ChartBreadcrumb.vue.d.ts +15 -0
  128. package/dist/components/customizations/ChartCaption.mjs +9 -0
  129. package/dist/components/customizations/ChartCaption.vue.d.ts +4 -0
  130. package/dist/components/customizations/ChartColorLegend.mjs +9 -0
  131. package/dist/components/customizations/ChartColorLegend.vue.d.ts +47 -0
  132. package/dist/components/customizations/ChartDataLabels.mjs +9 -0
  133. package/dist/components/customizations/ChartDataLabels.vue.d.ts +53 -0
  134. package/dist/components/customizations/ChartExportMenu.mjs +9 -0
  135. package/dist/components/customizations/ChartExportMenu.vue.d.ts +29 -0
  136. package/dist/components/customizations/ChartHover.mjs +9 -0
  137. package/dist/components/customizations/ChartHover.vue.d.ts +4 -0
  138. package/dist/components/customizations/ChartLegend.mjs +9 -0
  139. package/dist/components/customizations/ChartLegend.vue.d.ts +7 -0
  140. package/dist/components/customizations/ChartNavigator.mjs +10 -0
  141. package/dist/components/customizations/ChartNavigator.vue.d.ts +4 -0
  142. package/dist/components/customizations/ChartReferenceBand.mjs +5 -0
  143. package/dist/components/customizations/ChartReferenceBand.vue.d.ts +4 -0
  144. package/dist/components/customizations/ChartReferenceLine.mjs +5 -0
  145. package/dist/components/customizations/ChartReferenceLine.vue.d.ts +4 -0
  146. package/dist/components/customizations/ChartResponsive.mjs +9 -0
  147. package/dist/components/customizations/ChartResponsive.vue.d.ts +12 -0
  148. package/dist/components/customizations/ChartTitle.mjs +9 -0
  149. package/dist/components/customizations/ChartTitle.vue.d.ts +4 -0
  150. package/dist/components/customizations/ChartTooltip.mjs +9 -0
  151. package/dist/components/customizations/ChartTooltip.vue.d.ts +6 -0
  152. package/dist/components/customizations/ChartXAxis.mjs +10 -0
  153. package/dist/components/customizations/ChartXAxis.vue.d.ts +24 -0
  154. package/dist/components/customizations/ChartYAxis.mjs +10 -0
  155. package/dist/components/customizations/ChartYAxis.vue.d.ts +23 -0
  156. package/dist/components/customizations/ChartZoom.mjs +9 -0
  157. package/dist/components/customizations/ChartZoom.vue.d.ts +4 -0
  158. package/dist/components/customizations/axisGroupKeys.d.ts +8 -0
  159. package/dist/components/customizations/index.d.ts +20 -0
  160. package/dist/components/items/ChartItem.mjs +3 -0
  161. package/dist/components/items/ChartItem.vue.d.ts +4 -0
  162. package/dist/components/items/ChartTreemapGroup.mjs +5 -0
  163. package/dist/components/items/ChartTreemapGroup.vue.d.ts +11 -0
  164. package/dist/components/items/index.d.ts +1 -0
  165. package/dist/components/renderers/CartesianRenderer.mjs +9 -0
  166. package/dist/components/renderers/CartesianRenderer.vue.d.ts +66 -0
  167. package/dist/components/renderers/ColorLegendRenderer.mjs +2 -0
  168. package/dist/components/renderers/ColorLegendRenderer.vue.d.ts +15 -0
  169. package/dist/components/renderers/LegendRenderer.mjs +3 -0
  170. package/dist/components/renderers/LegendRenderer.vue.d.ts +20 -0
  171. package/dist/components/renderers/NavigatorRenderer.mjs +5 -0
  172. package/dist/components/renderers/NavigatorRenderer.vue.d.ts +16 -0
  173. package/dist/components/renderers/RadialRenderer.mjs +9 -0
  174. package/dist/components/renderers/RadialRenderer.vue.d.ts +39 -0
  175. package/dist/components/renderers/RectRenderer.mjs +9 -0
  176. package/dist/components/renderers/RectRenderer.vue.d.ts +32 -0
  177. package/dist/components/renderers/TooltipRenderer.mjs +4 -0
  178. package/dist/components/renderers/TooltipRenderer.vue.d.ts +11 -0
  179. package/dist/components/renderers/layers/BarLayerCanvas.mjs +10 -0
  180. package/dist/components/renderers/layers/BarLayerCanvas.vue.d.ts +3 -0
  181. package/dist/components/renderers/layers/BarLayerSvg.mjs +10 -0
  182. package/dist/components/renderers/layers/BarLayerSvg.vue.d.ts +3 -0
  183. package/dist/components/renderers/layers/CandlestickLayer.mjs +9 -0
  184. package/dist/components/renderers/layers/CandlestickLayer.vue.d.ts +3 -0
  185. package/dist/components/renderers/layers/HeatmapLayer.mjs +9 -0
  186. package/dist/components/renderers/layers/HeatmapLayer.vue.d.ts +3 -0
  187. package/dist/components/renderers/layers/LineLayer.mjs +9 -0
  188. package/dist/components/renderers/layers/LineLayer.vue.d.ts +3 -0
  189. package/dist/components/renderers/layers/PieLayer.mjs +9 -0
  190. package/dist/components/renderers/layers/PieLayer.vue.d.ts +12 -0
  191. package/dist/components/renderers/layers/PolarLayer.mjs +9 -0
  192. package/dist/components/renderers/layers/PolarLayer.vue.d.ts +16 -0
  193. package/dist/components/renderers/layers/RadarLayer.mjs +9 -0
  194. package/dist/components/renderers/layers/RadarLayer.vue.d.ts +16 -0
  195. package/dist/components/renderers/layers/ScatterLayer.mjs +9 -0
  196. package/dist/components/renderers/layers/ScatterLayer.vue.d.ts +3 -0
  197. package/dist/composables/index.d.ts +35 -0
  198. package/dist/composables/useAnimationProps.d.ts +21 -0
  199. package/dist/composables/useAxisComponentBase.d.ts +11 -0
  200. package/dist/composables/useAxisRegistration.d.ts +7 -0
  201. package/dist/composables/useAxisTransition.d.ts +6 -0
  202. package/dist/composables/useBarLayer.d.ts +9 -0
  203. package/dist/composables/useBarRenderer.canvas.d.ts +2 -0
  204. package/dist/composables/useBarRenderer.svg.d.ts +2 -0
  205. package/dist/composables/useBarRendererBase.d.ts +3 -0
  206. package/dist/composables/useCandlestickRenderer.d.ts +2 -0
  207. package/dist/composables/useCartesianAnimation.d.ts +2 -0
  208. package/dist/composables/useCartesianFrame.d.ts +72 -0
  209. package/dist/composables/useCartesianLayout.d.ts +3 -0
  210. package/dist/composables/useChartContext.d.ts +40 -0
  211. package/dist/composables/useChartLayers.d.ts +31 -0
  212. package/dist/composables/useChartRefreshHook.d.ts +1 -0
  213. package/dist/composables/useChartSync.d.ts +2 -0
  214. package/dist/composables/useChartSyncCoordinator.d.ts +23 -0
  215. package/dist/composables/useControllerLifecycle.d.ts +18 -0
  216. package/dist/composables/useCustomizationRegistration.d.ts +18 -0
  217. package/dist/composables/useDatasetAnimationContext.d.ts +14 -0
  218. package/dist/composables/useDatasetRegistration.d.ts +6 -0
  219. package/dist/composables/useDrilldownState.d.ts +3 -0
  220. package/dist/composables/useFamilyRenderers.d.ts +10 -0
  221. package/dist/composables/useFamilyRenderers.spec.d.ts +1 -0
  222. package/dist/composables/useHeatmapRenderer.d.ts +2 -0
  223. package/dist/composables/useItemCollector.d.ts +2 -0
  224. package/dist/composables/useKeyboardController.d.ts +8 -0
  225. package/dist/composables/useKeyboardNavigation.d.ts +2 -0
  226. package/dist/composables/useLineRenderer.d.ts +2 -0
  227. package/dist/composables/useNavigatorRenderer.d.ts +7 -0
  228. package/dist/composables/usePieRenderer.d.ts +2 -0
  229. package/dist/composables/usePolarRenderer.d.ts +2 -0
  230. package/dist/composables/usePropertyAnimations.d.ts +4 -0
  231. package/dist/composables/useRadarRenderer.d.ts +2 -0
  232. package/dist/composables/useRadialFrame.d.ts +39 -0
  233. package/dist/composables/useResponsiveConfig.d.ts +8 -0
  234. package/dist/composables/useResponsiveDimensions.d.ts +2 -0
  235. package/dist/composables/useScatterRenderer.d.ts +2 -0
  236. package/dist/composables/useTreemapRenderer.d.ts +2 -0
  237. package/dist/composables/useZoomController.d.ts +9 -0
  238. package/dist/composables/useZoomPan.d.ts +2 -0
  239. package/dist/context/ChartContext.d.ts +21 -0
  240. package/dist/context/index.d.ts +4 -0
  241. package/dist/context/keys.d.ts +52 -0
  242. package/dist/context/syncKeys.d.ts +5 -0
  243. package/dist/index.d.ts +44 -0
  244. package/dist/index.mjs +67 -0
  245. package/dist/namespace.d.ts +1 -0
  246. package/dist/namespace.mjs +112 -0
  247. package/dist/release-date.d.ts +11 -0
  248. package/dist/types/animation.types.d.ts +38 -0
  249. package/dist/types/axes.types.d.ts +27 -0
  250. package/dist/types/axisComponentBase.types.d.ts +5 -0
  251. package/dist/types/axisGroup.types.d.ts +1 -0
  252. package/dist/types/bar.types.d.ts +42 -0
  253. package/dist/types/breadcrumb.types.d.ts +12 -0
  254. package/dist/types/candlestick.types.d.ts +41 -0
  255. package/dist/types/canvas.types.d.ts +5 -0
  256. package/dist/types/caption.types.d.ts +8 -0
  257. package/dist/types/cartesian.types.d.ts +22 -0
  258. package/dist/types/chart.types.d.ts +51 -0
  259. package/dist/types/heatmap.types.d.ts +58 -0
  260. package/dist/types/index.d.ts +27 -0
  261. package/dist/types/item.types.d.ts +25 -0
  262. package/dist/types/keyboard.types.d.ts +24 -0
  263. package/dist/types/layout.types.d.ts +35 -0
  264. package/dist/types/legend.types.d.ts +13 -0
  265. package/dist/types/line.types.d.ts +64 -0
  266. package/dist/types/pie.types.d.ts +49 -0
  267. package/dist/types/polar.types.d.ts +63 -0
  268. package/dist/types/radar.types.d.ts +56 -0
  269. package/dist/types/responsiveDimensions.types.d.ts +16 -0
  270. package/dist/types/scatter.types.d.ts +50 -0
  271. package/dist/types/svg.types.d.ts +44 -0
  272. package/dist/types/tooltip.types.d.ts +6 -0
  273. package/dist/types/treemap.types.d.ts +50 -0
  274. package/dist/types/zoom.types.d.ts +45 -0
  275. package/dist/utils/index.d.ts +3 -0
  276. package/dist/utils/styles.d.ts +10 -0
  277. package/package.json +63 -0
@@ -0,0 +1,550 @@
1
+ import { useChartLayers, useCartesianLayout, provideCartesianFrame, useCartesianAnimation } from './chunk-CQHNYT2V.mjs';
2
+ import { useChartMethods, useChartState, useChartHover } from './chunk-HANSF33Z.mjs';
3
+ import { SYNC_BUS_KEY } from './chunk-LD57I4SY.mjs';
4
+ import { defineComponent, computed, inject, ref, onUnmounted, watch, shallowRef, toRef, h, openBlock, createElementBlock, Fragment, unref, createElementVNode, createCommentVNode, renderList, createBlock, resolveDynamicComponent } from 'vue';
5
+ import { applyAxisOverrides, calculateCartesianArea, computeNaturalAxisWidths, needsAxisPadding, buildMarkerRenderItems, computeReferenceLines, computeReferenceBands, CanvasCompositor, normalizeDataLabelConfig, shallowEqual, AnimatedPropertyStore, renderCartesianFrame, resolveNearestHit, mergeAllNearestResults, buildZoomScales } from '@primeui/chart-core';
6
+
7
+ var _hoisted_1 = { key: 0 };
8
+ var _hoisted_2 = ["id"];
9
+ var _hoisted_3 = [
10
+ "x",
11
+ "y",
12
+ "width",
13
+ "height"
14
+ ];
15
+ var _hoisted_4 = {
16
+ key: 0,
17
+ class: "data-labels-custom"
18
+ };
19
+ var _hoisted_5 = ["clip-path"];
20
+ var _hoisted_6 = ["id"];
21
+ var _hoisted_7 = [
22
+ "x",
23
+ "y",
24
+ "width",
25
+ "height"
26
+ ];
27
+ var _hoisted_8 = ["transform", "opacity"];
28
+ var _sfc_main = /* @__PURE__ */ defineComponent({
29
+ __name: "CartesianRenderer",
30
+ props: {
31
+ chartArea: {},
32
+ width: {},
33
+ height: {},
34
+ canvasEl: {},
35
+ overlayCanvasEl: {},
36
+ zoomState: {},
37
+ adaptiveDataLabelFontSize: {},
38
+ adaptiveDataLabelRotation: {},
39
+ ruleOverrides: {}
40
+ },
41
+ setup(__props, { expose: __expose }) {
42
+ const VNodeRenderer = defineComponent({
43
+ props: { node: {
44
+ type: Object,
45
+ required: true
46
+ } },
47
+ render() {
48
+ return this.node;
49
+ }
50
+ });
51
+ const chartLayers = useChartLayers();
52
+ const cartesianRenderersByType = computed(() => {
53
+ const m = /* @__PURE__ */ new Map();
54
+ if (chartLayers) {
55
+ for (const [type, entry] of chartLayers) {
56
+ if (entry.family === "cartesian" && entry.axisHints) m.set(type, entry.axisHints);
57
+ }
58
+ }
59
+ return m;
60
+ });
61
+ const props = __props;
62
+ const methods = useChartMethods();
63
+ const state = useChartState();
64
+ const hoverCtx = useChartHover();
65
+ const features = computed(() => state.value.features);
66
+ const hoverConfig = computed(() => features.value.get("hover")?.props);
67
+ const effectiveAxes = computed(() => ({
68
+ x: applyAxisOverrides(state.value.axes.x, props.ruleOverrides?.xAxis),
69
+ y: applyAxisOverrides(state.value.axes.y, props.ruleOverrides?.yAxis)
70
+ }));
71
+ const syncBus = inject(SYNC_BUS_KEY, null);
72
+ const maxAxisWidths = ref({
73
+ left: 0,
74
+ right: 0
75
+ });
76
+ if (syncBus) {
77
+ maxAxisWidths.value = syncBus.getMaxAxisWidths();
78
+ const unsub = syncBus.subscribeAxisWidths((max) => {
79
+ maxAxisWidths.value = { ...max };
80
+ });
81
+ onUnmounted(unsub);
82
+ }
83
+ let _prevChartArea = null;
84
+ const stableChartArea = computed(() => {
85
+ const c = props.chartArea;
86
+ if (_prevChartArea && _prevChartArea.x === c.x && _prevChartArea.y === c.y && _prevChartArea.width === c.width && _prevChartArea.height === c.height) {
87
+ return _prevChartArea;
88
+ }
89
+ return _prevChartArea = c;
90
+ });
91
+ const naturalArea = computed(() => calculateCartesianArea(stableChartArea.value, effectiveAxes.value, state.value.datasets, features.value, methods.font, methods.locale, cartesianRenderersByType.value));
92
+ if (syncBus) {
93
+ watch(naturalArea, (area) => {
94
+ syncBus.publishAxisWidths(methods.chartId, computeNaturalAxisWidths(area, stableChartArea.value));
95
+ }, { immediate: true });
96
+ }
97
+ const cartesianArea = computed(() => {
98
+ const area = naturalArea.value;
99
+ const max = maxAxisWidths.value;
100
+ if (!syncBus || !needsAxisPadding(area, stableChartArea.value, max)) return area;
101
+ return calculateCartesianArea(stableChartArea.value, effectiveAxes.value, state.value.datasets, features.value, methods.font, methods.locale, cartesianRenderersByType.value, max);
102
+ });
103
+ const layoutData = useCartesianLayout({
104
+ cartesianArea,
105
+ datasets: computed(() => state.value.datasets),
106
+ axes: effectiveAxes,
107
+ features,
108
+ datasetVisibility: computed(() => state.value.datasetVisibility),
109
+ hover: computed(() => hoverCtx.value.hover),
110
+ hoverConfig,
111
+ chartId: methods.chartId,
112
+ renderer: methods.renderer,
113
+ width: computed(() => props.width),
114
+ height: computed(() => props.height),
115
+ zoomState: computed(() => props.zoomState ?? null),
116
+ dir: computed(() => methods.dir),
117
+ globalFont: methods.font,
118
+ locale: computed(() => methods.locale),
119
+ theme: computed(() => methods.theme)
120
+ });
121
+ const groupRef = ref(null);
122
+ const gridGroupRef = ref(null);
123
+ const markerRenderItems = computed(() => {
124
+ if (methods.renderer !== "svg") return [];
125
+ return buildMarkerRenderItems(allMarkerOverlays.value, hoverCtx.value.hover);
126
+ });
127
+ const customReferenceLinesBeforeData = computed(() => {
128
+ if (methods.renderer !== "svg" || !layoutData.value?.cartesianArea) return [];
129
+ const { referenceLines, axisLayouts, cartesianArea: cartesianArea2, sharedCategoryScale, orientation } = layoutData.value;
130
+ if (!referenceLines) return [];
131
+ const custom = referenceLines.filter((l) => l.render && (l.placement ?? "afterData") === "beforeData");
132
+ if (custom.length === 0) return [];
133
+ const geos = computeReferenceLines(custom, axisLayouts, cartesianArea2, sharedCategoryScale ?? null, orientation);
134
+ return custom.map((l, i) => ({
135
+ key: `rl-before-${l.referenceLineId}`,
136
+ geo: geos[i],
137
+ renderFn: l.render,
138
+ placement: "beforeData"
139
+ }));
140
+ });
141
+ const customReferenceLinesAfterData = computed(() => {
142
+ if (methods.renderer !== "svg" || !layoutData.value?.cartesianArea) return [];
143
+ const { referenceLines, axisLayouts, cartesianArea: cartesianArea2, sharedCategoryScale, orientation } = layoutData.value;
144
+ if (!referenceLines) return [];
145
+ const custom = referenceLines.filter((l) => l.render && (l.placement ?? "afterData") === "afterData");
146
+ if (custom.length === 0) return [];
147
+ const geos = computeReferenceLines(custom, axisLayouts, cartesianArea2, sharedCategoryScale ?? null, orientation);
148
+ return custom.map((l, i) => ({
149
+ key: `rl-after-${l.referenceLineId}`,
150
+ geo: geos[i],
151
+ renderFn: l.render,
152
+ placement: "afterData"
153
+ }));
154
+ });
155
+ const customReferenceBandsBeforeData = computed(() => {
156
+ if (methods.renderer !== "svg" || !layoutData.value?.cartesianArea) return [];
157
+ const { referenceBands, axisLayouts, cartesianArea: cartesianArea2, sharedCategoryScale, orientation } = layoutData.value;
158
+ if (!referenceBands) return [];
159
+ const custom = referenceBands.filter((b) => b.render && (b.placement ?? "beforeData") === "beforeData");
160
+ if (custom.length === 0) return [];
161
+ const geos = computeReferenceBands(custom, axisLayouts, cartesianArea2, sharedCategoryScale ?? null, orientation);
162
+ return custom.map((b, i) => ({
163
+ key: `rb-before-${b.referenceBandId}`,
164
+ geo: geos[i],
165
+ renderFn: b.render,
166
+ placement: "beforeData"
167
+ }));
168
+ });
169
+ const customReferenceBandsAfterData = computed(() => {
170
+ if (methods.renderer !== "svg" || !layoutData.value?.cartesianArea) return [];
171
+ const { referenceBands, axisLayouts, cartesianArea: cartesianArea2, sharedCategoryScale, orientation } = layoutData.value;
172
+ if (!referenceBands) return [];
173
+ const custom = referenceBands.filter((b) => b.render && (b.placement ?? "beforeData") === "afterData");
174
+ if (custom.length === 0) return [];
175
+ const geos = computeReferenceBands(custom, axisLayouts, cartesianArea2, sharedCategoryScale ?? null, orientation);
176
+ return custom.map((b, i) => ({
177
+ key: `rb-after-${b.referenceBandId}`,
178
+ geo: geos[i],
179
+ renderFn: b.render,
180
+ placement: "afterData"
181
+ }));
182
+ });
183
+ const sharedCompositor = new CanvasCompositor();
184
+ const labelConfig = computed(() => {
185
+ if (props.ruleOverrides?.dataLabels?.enabled === false) return null;
186
+ const dlProps = features.value.get("dataLabels")?.props;
187
+ return normalizeDataLabelConfig(dlProps, props.adaptiveDataLabelFontSize, props.adaptiveDataLabelRotation, methods.font) ?? null;
188
+ });
189
+ let _prevMergedPA;
190
+ const mergedPropertyAnimations = computed(() => {
191
+ const f = state.value.features;
192
+ const animProps = f.get("animation")?.props;
193
+ const merged = [];
194
+ if (animProps?.propertyAnimations) merged.push(...animProps.propertyAnimations);
195
+ f.forEach((entry, key) => {
196
+ if (typeof key !== "string" || !key.startsWith("animation:")) return;
197
+ const p = entry.props;
198
+ if (p.propertyAnimations) merged.push(...p.propertyAnimations);
199
+ });
200
+ if (!merged.length) {
201
+ _prevMergedPA = void 0;
202
+ return void 0;
203
+ }
204
+ const prev = _prevMergedPA;
205
+ if (prev && prev.length === merged.length && prev.every((m, i) => shallowEqual(m, merged[i]))) {
206
+ return prev;
207
+ }
208
+ return _prevMergedPA = merged;
209
+ });
210
+ const animStoreRef = shallowRef(new AnimatedPropertyStore());
211
+ const frame = provideCartesianFrame({
212
+ canvasEl: toRef(props, "canvasEl"),
213
+ width: computed(() => props.width),
214
+ height: computed(() => props.height),
215
+ plotClipId: `plot-clip-${methods.chartId}`,
216
+ cartesianArea,
217
+ layoutData,
218
+ labelConfig,
219
+ hoverConfig,
220
+ zoomState: computed(() => props.zoomState ?? null),
221
+ adaptiveDataLabelFontSize: computed(() => props.adaptiveDataLabelFontSize),
222
+ adaptiveDataLabelRotation: computed(() => props.adaptiveDataLabelRotation),
223
+ compositor: sharedCompositor,
224
+ animStore: animStoreRef
225
+ });
226
+ const cartesianSeriesLayers = computed(() => collectCartesianLayers("grid"));
227
+ const cartesianFramelessLayers = computed(() => collectCartesianLayers(null));
228
+ function collectCartesianLayers(frameKind) {
229
+ if (!chartLayers) return [];
230
+ const mode = methods.renderer === "canvas" ? "canvas" : "svg";
231
+ const out = [];
232
+ for (const [type, entry] of chartLayers) {
233
+ if (entry.family !== "cartesian" || entry.frameKind !== frameKind) continue;
234
+ const layer = entry.layerByMode ? entry.layerByMode[mode] : entry.layer;
235
+ if (layer) out.push({
236
+ type,
237
+ layer
238
+ });
239
+ }
240
+ return out;
241
+ }
242
+ const allMarkerOverlays = computed(() => Array.from(frame.handles.values()).flatMap((handle) => handle.markerOverlays?.value ?? []));
243
+ const customDataLabelVNodes = computed(() => {
244
+ if (methods.renderer !== "svg" || !layoutData.value) return [];
245
+ const dlProps = features.value.get("dataLabels")?.props;
246
+ const lc = normalizeDataLabelConfig(dlProps, props.adaptiveDataLabelFontSize, props.adaptiveDataLabelRotation, methods.font);
247
+ if (!lc?.render) return [];
248
+ const nodes = [];
249
+ for (const handle of frame.handles.values()) {
250
+ if (handle.dataLabelVNodes) nodes.push(...handle.dataLabelVNodes.value);
251
+ }
252
+ return nodes;
253
+ });
254
+ const customTickOverlayRefs = /* @__PURE__ */ new Map();
255
+ const customTickVNodes = computed(() => {
256
+ if (methods.renderer !== "svg" || !layoutData.value) return [];
257
+ const nodes = [];
258
+ for (const [axisKey, axisInfo] of layoutData.value.axisLayouts) {
259
+ const renderFn = axisInfo.props.render;
260
+ const renderTickFn = axisInfo.props.renderTick;
261
+ if (renderFn) {
262
+ const tickNodes = [];
263
+ for (const tick of axisInfo.layout.ticks) {
264
+ const result = renderFn({
265
+ value: tick.value,
266
+ label: tick.label,
267
+ index: tick.tickIndex,
268
+ position: axisInfo.layout.position,
269
+ x: tick.labelX,
270
+ y: tick.labelY
271
+ });
272
+ if (result != null) {
273
+ tickNodes.push(h("g", {
274
+ key: tick.tickIndex,
275
+ transform: `translate(${tick.labelX},${tick.labelY})${tick.rotation ? ` rotate(${tick.rotation})` : ""}`,
276
+ "text-anchor": tick.anchor,
277
+ "dominant-baseline": tick.baseline === "top" ? "hanging" : tick.baseline
278
+ }, [result]));
279
+ }
280
+ }
281
+ nodes.push(h("g", {
282
+ key: axisKey,
283
+ ref: (el) => {
284
+ customTickOverlayRefs.set(axisKey, el);
285
+ },
286
+ class: "axis-custom-ticks"
287
+ }, tickNodes));
288
+ }
289
+ if (renderTickFn) {
290
+ const markNodes = [];
291
+ for (const tick of axisInfo.layout.ticks) {
292
+ const result = renderTickFn({
293
+ value: tick.value,
294
+ label: tick.label,
295
+ index: tick.tickIndex,
296
+ position: axisInfo.layout.position,
297
+ x: tick.x1,
298
+ y: tick.y1
299
+ });
300
+ if (result != null) {
301
+ markNodes.push(h("g", {
302
+ key: tick.tickIndex,
303
+ transform: `translate(${tick.x1},${tick.y1})`,
304
+ "text-anchor": "middle"
305
+ }, [result]));
306
+ }
307
+ }
308
+ nodes.push(h("g", {
309
+ key: `${axisKey}-tick`,
310
+ ref: (el) => {
311
+ customTickOverlayRefs.set(`${axisKey}-tick`, el);
312
+ },
313
+ class: "axis-custom-tick-marks"
314
+ }, markNodes));
315
+ }
316
+ }
317
+ return nodes;
318
+ });
319
+ const skipHoverRepaint = computed(() => {
320
+ if (!frame.handles.get("scatter")?.boostActive?.value) return false;
321
+ for (const [, ds] of state.value.datasets) {
322
+ if (ds.type !== "scatter") return false;
323
+ }
324
+ return true;
325
+ });
326
+ useCartesianAnimation({
327
+ layoutData,
328
+ renderer: methods.renderer,
329
+ canvasEl: toRef(props, "canvasEl"),
330
+ overlayCanvasEl: toRef(props, "overlayCanvasEl"),
331
+ markerOverlays: allMarkerOverlays,
332
+ groupRef,
333
+ gridGroupRef,
334
+ hover: computed(() => hoverCtx.value.hover),
335
+ features,
336
+ width: computed(() => props.width),
337
+ height: computed(() => props.height),
338
+ customTickOverlayRefs,
339
+ skipHoverRepaint,
340
+ isZoomed: computed(() => !!(props.zoomState?.x || props.zoomState?.y)),
341
+ // enabled={false} disables every animation system. Configs merged from
342
+ // chart-level `animation` and all per-dataset `animation:${id}` keyed entries.
343
+ propertyAnimations: mergedPropertyAnimations,
344
+ animStoreRef,
345
+ onAnimFrame: () => {
346
+ const store = animStoreRef.value;
347
+ if (store) {
348
+ for (const handle of frame.handles.values()) handle.applyPropertyAnimations?.(store);
349
+ }
350
+ },
351
+ onPropertyComplete: () => {
352
+ for (const handle of frame.handles.values()) handle.renderFrameCycle?.();
353
+ },
354
+ renderFrame: (params) => {
355
+ const staticCategoryScale = layoutData.value?.sharedCategoryScale;
356
+ const staticValueScales = layoutData.value?.valueScales;
357
+ const staticScatterXScales = layoutData.value?.scatterXScales;
358
+ const categoryChanged = !!(staticCategoryScale && params.categoryScale && params.categoryScale !== staticCategoryScale);
359
+ const valueChanged = !!(staticValueScales && params.valueScales && params.valueScales !== staticValueScales);
360
+ const scatterXChanged = !!(staticScatterXScales && params.valueXScales && params.valueXScales !== staticScatterXScales);
361
+ if (categoryChanged || valueChanged || scatterXChanged) {
362
+ for (const handle of frame.handles.values()) handle.syncWithAnimatedScale?.(params.categoryScale ?? staticCategoryScale, params.valueScales, params.valueXScales);
363
+ }
364
+ renderCartesianFrame(params);
365
+ },
366
+ compositor: sharedCompositor,
367
+ dir: computed(() => methods.dir),
368
+ globalFont: methods.font,
369
+ locale: methods.locale,
370
+ theme: () => methods.theme
371
+ });
372
+ function hitTest(x, y) {
373
+ const hmHit = frame.handles.get("heatmap")?.hitTest(x, y);
374
+ if (hmHit) return hmHit;
375
+ const csHit = frame.handles.get("candlestick")?.hitTest(x, y);
376
+ if (csHit) return csHit;
377
+ const scHit = frame.handles.get("scatter")?.hitTest(x, y);
378
+ if (scHit) return scHit;
379
+ const lnHit = frame.handles.get("line")?.hitTest(x, y);
380
+ if (lnHit) return lnHit;
381
+ return frame.handles.get("bar")?.hitTest(x, y) ?? null;
382
+ }
383
+ function findNearest(x, y) {
384
+ const barHit = frame.handles.get("bar")?.findNearest?.(x, y) ?? null;
385
+ const lineResult = frame.handles.get("line")?.findAllNearest?.(x, y) ?? null;
386
+ const lineHit = lineResult?.primary ?? null;
387
+ if (!barHit && !lineHit) return null;
388
+ if (!barHit) return lineHit;
389
+ if (!lineHit) return barHit;
390
+ return resolveNearestHit(lineHit, barHit, x, y);
391
+ }
392
+ function findAllNearest(x, y) {
393
+ const barResult = frame.handles.get("bar")?.findAllNearest?.(x, y) ?? null;
394
+ const lineResult = frame.handles.get("line")?.findAllNearest?.(x, y) ?? null;
395
+ const csResult = frame.handles.get("candlestick")?.findAllNearest?.(x, y) ?? null;
396
+ return mergeAllNearestResults([
397
+ barResult,
398
+ lineResult,
399
+ csResult
400
+ ], x, y);
401
+ }
402
+ function getPlotArea() {
403
+ return layoutData.value?.cartesianArea ?? cartesianArea.value ?? null;
404
+ }
405
+ function getScales() {
406
+ const ld = layoutData.value;
407
+ if (!ld) return null;
408
+ return buildZoomScales(ld, props.zoomState);
409
+ }
410
+ function getOriginalDomains() {
411
+ return layoutData.value?.originalDomains ?? {};
412
+ }
413
+ const plotClipId = computed(() => `plot-clip-${methods.chartId}`);
414
+ const plotArea = computed(() => layoutData.value?.cartesianArea ?? null);
415
+ function getColorScaleInfo() {
416
+ return frame.handles.get("heatmap")?.getColorScaleInfo?.() ?? null;
417
+ }
418
+ function getCrosshairContext() {
419
+ const ld = layoutData.value;
420
+ if (!ld) return null;
421
+ const isHorizontal = ld.orientation === "horizontal";
422
+ return {
423
+ orientation: ld.orientation,
424
+ categoryAxisPosition: isHorizontal ? ld.valueAxisPosition : ld.categoryAxisPosition,
425
+ valueAxisPosition: isHorizontal ? ld.categoryAxisPosition : ld.valueAxisPosition
426
+ };
427
+ }
428
+ function getPointPosition(datasetId, index) {
429
+ const barPos = frame.handles.get("bar")?.getPointPosition(datasetId, index);
430
+ if (barPos) return barPos;
431
+ const linePos = frame.handles.get("line")?.getPointPosition(datasetId, index);
432
+ if (linePos) return linePos;
433
+ const scatterPos = frame.handles.get("scatter")?.getPointPosition(datasetId, index);
434
+ if (scatterPos) return scatterPos;
435
+ const csPos = frame.handles.get("candlestick")?.getPointPosition(datasetId, index);
436
+ if (csPos) return csPos;
437
+ const heatmapPos = frame.handles.get("heatmap")?.getPointPosition(datasetId, index);
438
+ if (heatmapPos) return heatmapPos;
439
+ return null;
440
+ }
441
+ const isTimeAxis = computed(() => !!layoutData.value?.sharedTimeScale);
442
+ function getHeatmapScales() {
443
+ return frame.handles.get("heatmap")?.scaleResult?.value ?? null;
444
+ }
445
+ function getScaleById(axisId) {
446
+ return layoutData.value?.valueScales.get(axisId);
447
+ }
448
+ __expose({
449
+ hitTest,
450
+ findNearest,
451
+ findAllNearest,
452
+ getPlotArea,
453
+ getScales,
454
+ getOriginalDomains,
455
+ getColorScaleInfo,
456
+ getCrosshairContext,
457
+ getPointPosition,
458
+ isTimeAxis,
459
+ getHeatmapScales,
460
+ getScaleById
461
+ });
462
+ return (_ctx, _cache) => {
463
+ return openBlock(), createElementBlock(Fragment, null, [
464
+ unref(methods).renderer === "svg" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
465
+ plotArea.value ? (openBlock(), createElementBlock("defs", _hoisted_1, [createElementVNode("clipPath", { id: plotClipId.value }, [createElementVNode("rect", {
466
+ x: plotArea.value.x,
467
+ y: plotArea.value.y,
468
+ width: plotArea.value.width,
469
+ height: plotArea.value.height
470
+ }, null, 8, _hoisted_3)], 8, _hoisted_2)])) : createCommentVNode("", true),
471
+ (openBlock(true), createElementBlock(Fragment, null, renderList(customReferenceBandsBeforeData.value, (entry) => {
472
+ return openBlock(), createElementBlock("g", {
473
+ key: entry.key,
474
+ class: "reference-band-custom"
475
+ }, [(openBlock(), createBlock(resolveDynamicComponent(() => entry.renderFn(entry.geo))))]);
476
+ }), 128)),
477
+ (openBlock(true), createElementBlock(Fragment, null, renderList(customReferenceLinesBeforeData.value, (entry) => {
478
+ return openBlock(), createElementBlock("g", {
479
+ key: entry.key,
480
+ class: "reference-line-custom"
481
+ }, [(openBlock(), createBlock(resolveDynamicComponent(() => entry.renderFn(entry.geo))))]);
482
+ }), 128)),
483
+ createElementVNode("g", {
484
+ ref: (el) => {
485
+ gridGroupRef.value = el;
486
+ },
487
+ class: "cartesian-grid"
488
+ }, null, 512)
489
+ ], 64)) : createCommentVNode("", true),
490
+ (openBlock(true), createElementBlock(Fragment, null, renderList(cartesianFramelessLayers.value, (layer) => {
491
+ return openBlock(), createBlock(resolveDynamicComponent(layer.layer), { key: layer.type });
492
+ }), 128)),
493
+ (openBlock(true), createElementBlock(Fragment, null, renderList(cartesianSeriesLayers.value, (layer) => {
494
+ return openBlock(), createBlock(resolveDynamicComponent(layer.layer), { key: layer.type });
495
+ }), 128)),
496
+ unref(methods).renderer === "svg" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
497
+ createElementVNode("g", {
498
+ ref: (el) => {
499
+ groupRef.value = el;
500
+ },
501
+ class: "cartesian-chart"
502
+ }, null, 512),
503
+ (openBlock(true), createElementBlock(Fragment, null, renderList(customTickVNodes.value, (node) => {
504
+ return openBlock(), createBlock(unref(VNodeRenderer), {
505
+ key: node.key ?? void 0,
506
+ node
507
+ }, null, 8, ["node"]);
508
+ }), 128)),
509
+ (openBlock(true), createElementBlock(Fragment, null, renderList(customReferenceLinesAfterData.value, (entry) => {
510
+ return openBlock(), createElementBlock("g", {
511
+ key: entry.key,
512
+ class: "reference-line-custom"
513
+ }, [(openBlock(), createBlock(resolveDynamicComponent(() => entry.renderFn(entry.geo))))]);
514
+ }), 128)),
515
+ (openBlock(true), createElementBlock(Fragment, null, renderList(customReferenceBandsAfterData.value, (entry) => {
516
+ return openBlock(), createElementBlock("g", {
517
+ key: entry.key,
518
+ class: "reference-band-custom"
519
+ }, [(openBlock(), createBlock(resolveDynamicComponent(() => entry.renderFn(entry.geo))))]);
520
+ }), 128)),
521
+ customDataLabelVNodes.value.length ? (openBlock(), createElementBlock("g", _hoisted_4, [(openBlock(true), createElementBlock(Fragment, null, renderList(customDataLabelVNodes.value, (node, i) => {
522
+ return openBlock(), createBlock(resolveDynamicComponent(() => node), { key: i });
523
+ }), 128))])) : createCommentVNode("", true),
524
+ createElementVNode("g", {
525
+ ref: "markerOverlayRef",
526
+ class: "marker-overlay",
527
+ "clip-path": unref(layoutData)?.cartesianArea ? `url(#marker-clip-${unref(methods).chartId})` : void 0
528
+ }, [unref(layoutData)?.cartesianArea ? (openBlock(), createElementBlock("clipPath", {
529
+ key: 0,
530
+ id: `marker-clip-${unref(methods).chartId}`
531
+ }, [createElementVNode("rect", {
532
+ x: unref(layoutData).cartesianArea.x,
533
+ y: unref(layoutData).cartesianArea.y,
534
+ width: unref(layoutData).cartesianArea.width,
535
+ height: unref(layoutData).cartesianArea.height
536
+ }, null, 8, _hoisted_7)], 8, _hoisted_6)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(markerRenderItems.value, (item) => {
537
+ return openBlock(), createElementBlock("g", {
538
+ key: item.key,
539
+ transform: `translate(${item.x}, ${item.y})`,
540
+ opacity: item.opacity !== 1 ? item.opacity : void 0
541
+ }, [(openBlock(), createBlock(resolveDynamicComponent(() => item.renderMarker(item.context))))], 8, _hoisted_8);
542
+ }), 128))], 8, _hoisted_5)
543
+ ], 64)) : createCommentVNode("", true)
544
+ ], 64);
545
+ };
546
+ }
547
+ });
548
+ var CartesianRenderer_default = _sfc_main;
549
+
550
+ export { CartesianRenderer_default };
@@ -0,0 +1,26 @@
1
+ import { useCustomizationRegistration } from './chunk-PQV55JYI.mjs';
2
+ import { defineComponent, computed } from 'vue';
3
+
4
+ var _sfc_main = /* @__PURE__ */ defineComponent({
5
+ __name: "ChartResponsive",
6
+ props: {
7
+ rules: {},
8
+ breakpoints: {},
9
+ disableAutoAdaptive: { type: Boolean }
10
+ },
11
+ setup(__props) {
12
+ const props = __props;
13
+ const registrationProps = computed(() => ({
14
+ rules: props.rules,
15
+ breakpoints: props.breakpoints,
16
+ disableAutoAdaptive: props.disableAutoAdaptive
17
+ }));
18
+ useCustomizationRegistration("responsive", registrationProps);
19
+ return (_ctx, _cache) => {
20
+ return null;
21
+ };
22
+ }
23
+ });
24
+ var ChartResponsive_default = _sfc_main;
25
+
26
+ export { ChartResponsive_default };
@@ -0,0 +1,10 @@
1
+ import { LEGEND_ITEM_BASE_STYLE as LEGEND_ITEM_BASE_STYLE$1, LEGEND_SWATCH_STYLE as LEGEND_SWATCH_STYLE$1, TOOLTIP_BASE_STYLE as TOOLTIP_BASE_STYLE$1, TOOLTIP_DEFAULT_STYLE as TOOLTIP_DEFAULT_STYLE$1 } from '@primeui/chart-core';
2
+ export { normalizeDataLabelConfig } from '@primeui/chart-core';
3
+
4
+ // src/utils/styles.ts
5
+ var LEGEND_ITEM_BASE_STYLE = LEGEND_ITEM_BASE_STYLE$1;
6
+ var LEGEND_SWATCH_STYLE = LEGEND_SWATCH_STYLE$1;
7
+ var TOOLTIP_BASE_STYLE = TOOLTIP_BASE_STYLE$1;
8
+ var TOOLTIP_DEFAULT_STYLE = TOOLTIP_DEFAULT_STYLE$1;
9
+
10
+ export { LEGEND_ITEM_BASE_STYLE, LEGEND_SWATCH_STYLE, TOOLTIP_BASE_STYLE, TOOLTIP_DEFAULT_STYLE };
@@ -0,0 +1,64 @@
1
+ import { usePolarRenderer, useRadialFrameRegistration } from './chunk-CQHNYT2V.mjs';
2
+ import { useChartMethods, useChartState, useChartHover } from './chunk-HANSF33Z.mjs';
3
+ import { defineComponent, computed, toRef, unref, openBlock, createElementBlock, createCommentVNode } from 'vue';
4
+
5
+ var _sfc_main = /* @__PURE__ */ defineComponent({
6
+ __name: "PolarLayer",
7
+ props: {
8
+ chartArea: {},
9
+ width: {},
10
+ height: {},
11
+ canvasEl: {},
12
+ adaptiveDataLabelFontSize: {},
13
+ sharedContext: {},
14
+ requestRedraw: { type: Function }
15
+ },
16
+ setup(__props) {
17
+ const props = __props;
18
+ const methods = useChartMethods();
19
+ const state = useChartState();
20
+ const hoverCtx = useChartHover();
21
+ const polar = usePolarRenderer({
22
+ chartArea: computed(() => props.chartArea),
23
+ renderer: methods.renderer,
24
+ canvasEl: toRef(props, "canvasEl"),
25
+ datasets: computed(() => state.value.datasets),
26
+ features: computed(() => state.value.features),
27
+ hover: computed(() => hoverCtx.value.hover),
28
+ datasetVisibility: computed(() => state.value.datasetVisibility),
29
+ globalFont: methods.font,
30
+ adaptiveDataLabelFontSize: computed(() => props.adaptiveDataLabelFontSize),
31
+ chartId: methods.chartId,
32
+ width: computed(() => props.width),
33
+ height: computed(() => props.height),
34
+ sharedContext: computed(() => props.sharedContext),
35
+ requestRedraw: () => props.requestRedraw(),
36
+ dir: computed(() => methods.dir),
37
+ xAxes: computed(() => state.value.axes.x),
38
+ yAxes: computed(() => state.value.axes.y),
39
+ theme: computed(() => methods.theme)
40
+ });
41
+ useRadialFrameRegistration({
42
+ type: "polar",
43
+ layout: polar.layout,
44
+ renderCanvasContent: polar.renderCanvasContent,
45
+ hitTest: (x, y) => polar.hitTest(x, y),
46
+ findAllNearest: (x, y) => polar.findAllNearest(x, y),
47
+ getCenter: () => polar.center ?? null,
48
+ getPointPosition: (datasetId, index) => polar.getPointPosition(datasetId, index),
49
+ applyPropertyAnimations: (store) => polar.applyPropertyAnimations(store),
50
+ renderFrameCycle: () => polar.renderFrameCycle()
51
+ });
52
+ return (_ctx, _cache) => {
53
+ return unref(methods).renderer === "svg" ? (openBlock(), createElementBlock("g", {
54
+ key: 0,
55
+ ref: (el) => {
56
+ unref(polar).groupRef.value = el;
57
+ }
58
+ }, null, 512)) : createCommentVNode("", true);
59
+ };
60
+ }
61
+ });
62
+ var PolarLayer_default = _sfc_main;
63
+
64
+ export { PolarLayer_default };