@primeui/vue-chart 0.0.1-alpha.1 → 1.0.0-beta.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 (176) hide show
  1. package/dist/CartesianRenderer.rich.spec.d.ts +1 -0
  2. package/dist/Chart.features.spec.d.ts +1 -0
  3. package/dist/Chart.interactions.spec.d.ts +1 -0
  4. package/dist/Chart.pointEvents.spec.d.ts +1 -0
  5. package/dist/Chart.vue.d.ts +5 -1
  6. package/dist/ChartCanvas.mjs +15 -14
  7. package/dist/ChartCanvas.pipeline.spec.d.ts +1 -0
  8. package/dist/ChartCanvas.vue.d.ts +8 -4
  9. package/dist/ChartGroup.sync.spec.d.ts +1 -0
  10. package/dist/ChartLegend.spec.d.ts +1 -0
  11. package/dist/ChartSvg.containers.spec.d.ts +1 -0
  12. package/dist/ChartSvg.declarative.spec.d.ts +1 -0
  13. package/dist/ChartSvg.export-menu.spec.d.ts +1 -0
  14. package/dist/ChartSvg.hover.spec.d.ts +1 -0
  15. package/dist/ChartSvg.mjs +15 -14
  16. package/dist/ChartSvg.renderers.spec.d.ts +1 -0
  17. package/dist/ChartSvg.vue.d.ts +8 -4
  18. package/dist/ColorLegendRenderer.branches.spec.d.ts +1 -0
  19. package/dist/ColorLegendRenderer.spec.d.ts +1 -0
  20. package/dist/LegendRenderer.spec.d.ts +1 -0
  21. package/dist/NavigatorRenderer.spec.d.ts +1 -0
  22. package/dist/RadialHeatmap.rich.spec.d.ts +1 -0
  23. package/dist/TooltipRenderer.spec.d.ts +1 -0
  24. package/dist/{chunk-6S4JMPKC.mjs → chunks/chunk-2NZ3PUWW.mjs} +2 -2
  25. package/dist/{chunk-RRHYGSK6.mjs → chunks/chunk-2TOEQNJ6.mjs} +2 -2
  26. package/dist/{chunk-GX2MK6VT.mjs → chunks/chunk-36DHPBYP.mjs} +25 -23
  27. package/dist/{chunk-RSTIA3KM.mjs → chunks/chunk-3DINEX6C.mjs} +2 -1
  28. package/dist/{chunk-PJVOZSPF.mjs → chunks/chunk-3JA5JAHF.mjs} +2 -2
  29. package/dist/{chunk-KOWFD2AE.mjs → chunks/chunk-3PJULFR5.mjs} +22 -21
  30. package/dist/chunks/chunk-3X27K5XC.mjs +236 -0
  31. package/dist/chunks/chunk-3XOLEGDL.mjs +182 -0
  32. package/dist/{chunk-PSSXPTLQ.mjs → chunks/chunk-4SLSYRNY.mjs} +6 -6
  33. package/dist/chunks/chunk-4VWFG6HM.mjs +86 -0
  34. package/dist/{chunk-44BAFHPK.mjs → chunks/chunk-5HLEKAY2.mjs} +10 -5
  35. package/dist/{chunk-4NJ2PSHV.mjs → chunks/chunk-5ZLVNQ2L.mjs} +7 -4
  36. package/dist/{chunk-O6L3PNFC.mjs → chunks/chunk-6Z4MZIJI.mjs} +2 -2
  37. package/dist/chunks/chunk-7EZEZMGG.mjs +22 -0
  38. package/dist/chunks/chunk-ADAGGXFG.mjs +166 -0
  39. package/dist/{chunk-YRKAI2R2.mjs → chunks/chunk-AKMQHU5T.mjs} +15 -14
  40. package/dist/{chunk-ZRCOVQQM.mjs → chunks/chunk-BSROML7P.mjs} +2 -2
  41. package/dist/{chunk-WYV2MHP6.mjs → chunks/chunk-CGFPDWB4.mjs} +1 -1
  42. package/dist/{chunk-4CRHCZV3.mjs → chunks/chunk-CMJXLIEY.mjs} +125 -9
  43. package/dist/{chunk-42J32DPD.mjs → chunks/chunk-CRIB3I3L.mjs} +1 -1
  44. package/dist/{chunk-WKSQR6L5.mjs → chunks/chunk-CW2KYVYO.mjs} +31 -8
  45. package/dist/{chunk-644ROAHU.mjs → chunks/chunk-DDRSIMLE.mjs} +33 -12
  46. package/dist/{chunk-32XIRBZ7.mjs → chunks/chunk-DXKAPWMO.mjs} +2 -2
  47. package/dist/{chunk-372K2BMN.mjs → chunks/chunk-EKGCPOZJ.mjs} +56 -15
  48. package/dist/{chunk-E2U4W5FW.mjs → chunks/chunk-F7EK5D6J.mjs} +11 -11
  49. package/dist/{chunk-ZHFL3RYO.mjs → chunks/chunk-GE2Y2FHS.mjs} +6 -6
  50. package/dist/{chunk-AAX7FOW3.mjs → chunks/chunk-GIDIMIWE.mjs} +11 -11
  51. package/dist/{chunk-NLXOJSKK.mjs → chunks/chunk-GLFXRR7N.mjs} +29 -5
  52. package/dist/{chunk-W5M3BR6N.mjs → chunks/chunk-GV3CY6CQ.mjs} +1 -1
  53. package/dist/{chunk-CDXF6ZTL.mjs → chunks/chunk-HH5FUUXX.mjs} +1 -1
  54. package/dist/{chunk-RQURY2H3.mjs → chunks/chunk-HHZFGQN2.mjs} +2 -2
  55. package/dist/{chunk-2D3PWFR2.mjs → chunks/chunk-HVLFOABV.mjs} +4 -4
  56. package/dist/chunks/chunk-I2BWSDNR.mjs +832 -0
  57. package/dist/{chunk-MDA22SIZ.mjs → chunks/chunk-IFZSHQDZ.mjs} +2 -2
  58. package/dist/chunks/chunk-IRGQNA5W.mjs +289 -0
  59. package/dist/{chunk-72KINEJ6.mjs → chunks/chunk-IUGMS7ND.mjs} +10 -5
  60. package/dist/{chunk-56NMBNNX.mjs → chunks/chunk-JPKNWLLP.mjs} +3 -3
  61. package/dist/{chunk-XBDNMPF7.mjs → chunks/chunk-JVH4MDKX.mjs} +2 -2
  62. package/dist/chunks/chunk-KNNYJD4D.mjs +14 -0
  63. package/dist/{chunk-AUI5R4DA.mjs → chunks/chunk-L73MEG22.mjs} +2 -2
  64. package/dist/{chunk-K326BBF7.mjs → chunks/chunk-L74BEYTD.mjs} +38 -17
  65. package/dist/{chunk-DYVFVVTO.mjs → chunks/chunk-LJZCE7LQ.mjs} +102 -6
  66. package/dist/{chunk-YGHWUR7K.mjs → chunks/chunk-LP2YESP6.mjs} +1 -1
  67. package/dist/{chunk-WA735Y26.mjs → chunks/chunk-MGUGO3RV.mjs} +1 -1
  68. package/dist/{chunk-DOOXGOOB.mjs → chunks/chunk-OJHEN5FG.mjs} +96 -5
  69. package/dist/{chunk-ZNINPVG7.mjs → chunks/chunk-ON2FAZTD.mjs} +1 -1
  70. package/dist/{chunk-DLUFOM5K.mjs → chunks/chunk-PCBF6FSQ.mjs} +11 -11
  71. package/dist/{chunk-FQTWLAVA.mjs → chunks/chunk-QJCMFAHB.mjs} +1 -1
  72. package/dist/{chunk-62NGBLQ7.mjs → chunks/chunk-QONZ3SCZ.mjs} +1 -1
  73. package/dist/{chunk-HANSF33Z.mjs → chunks/chunk-QOWKMWNO.mjs} +1 -1
  74. package/dist/{chunk-GA4VV5V4.mjs → chunks/chunk-R4AZOPXC.mjs} +1 -1
  75. package/dist/{chunk-5DWO3G33.mjs → chunks/chunk-SGLTVJUA.mjs} +35 -21
  76. package/dist/{chunk-5FTUGKPC.mjs → chunks/chunk-TRGN3ZMM.mjs} +5 -5
  77. package/dist/{chunk-RSAZ7V5Z.mjs → chunks/chunk-TZ23VBFU.mjs} +2 -2
  78. package/dist/{chunk-4UVPCLJ7.mjs → chunks/chunk-U6X3GVJ3.mjs} +1 -1
  79. package/dist/{chunk-J2P5JBHC.mjs → chunks/chunk-UOMQNZMT.mjs} +1 -1
  80. package/dist/{chunk-4THCGGER.mjs → chunks/chunk-UOZFNTVQ.mjs} +2 -2
  81. package/dist/{chunk-TIV2FI4S.mjs → chunks/chunk-WVNDZNMV.mjs} +2 -2
  82. package/dist/{chunk-GFC24374.mjs → chunks/chunk-X4NWFK7L.mjs} +5 -5
  83. package/dist/{chunk-FFBK7Q3W.mjs → chunks/chunk-YI3GLQYF.mjs} +67 -4
  84. package/dist/{chunk-HTZVV6VV.mjs → chunks/chunk-YZQS2YBK.mjs} +8 -6
  85. package/dist/{chunk-PQV55JYI.mjs → chunks/chunk-ZLD5VNMP.mjs} +2 -2
  86. package/dist/components/charts/ChartBar.mjs +13 -13
  87. package/dist/components/charts/ChartCandlestick.mjs +11 -11
  88. package/dist/components/charts/ChartHeatmap.mjs +11 -11
  89. package/dist/components/charts/ChartLine.mjs +12 -11
  90. package/dist/components/charts/ChartPie.mjs +12 -11
  91. package/dist/components/charts/ChartPolar.mjs +13 -11
  92. package/dist/components/charts/ChartRadar.mjs +13 -11
  93. package/dist/components/charts/ChartScatter.mjs +12 -11
  94. package/dist/components/charts/ChartTreemap.mjs +10 -10
  95. package/dist/components/containers/ChartDecimation.mjs +6 -6
  96. package/dist/components/containers/ChartGroup.mjs +4 -4
  97. package/dist/components/containers/ChartOverlap.mjs +5 -5
  98. package/dist/components/containers/ChartRange.mjs +6 -6
  99. package/dist/components/containers/ChartStacked.mjs +6 -6
  100. package/dist/components/containers/ChartWaterfall.mjs +5 -5
  101. package/dist/components/customizations/ChartAccessibility.mjs +9 -9
  102. package/dist/components/customizations/ChartAnnotation.mjs +5 -5
  103. package/dist/components/customizations/ChartAxisCategory.mjs +3 -3
  104. package/dist/components/customizations/ChartAxisGroup.mjs +3 -3
  105. package/dist/components/customizations/ChartBreadcrumb.mjs +6 -6
  106. package/dist/components/customizations/ChartCaption.mjs +9 -9
  107. package/dist/components/customizations/ChartColorLegend.mjs +9 -9
  108. package/dist/components/customizations/ChartDataLabels.mjs +9 -9
  109. package/dist/components/customizations/ChartExportMenu.mjs +9 -9
  110. package/dist/components/customizations/ChartHover.mjs +9 -9
  111. package/dist/components/customizations/ChartLegend.mjs +9 -9
  112. package/dist/components/customizations/ChartNavigator.mjs +10 -10
  113. package/dist/components/customizations/ChartReferenceBand.mjs +5 -5
  114. package/dist/components/customizations/ChartReferenceLine.mjs +5 -5
  115. package/dist/components/customizations/ChartResponsive.mjs +9 -9
  116. package/dist/components/customizations/ChartTitle.mjs +9 -9
  117. package/dist/components/customizations/ChartTooltip.mjs +9 -9
  118. package/dist/components/customizations/ChartXAxis.mjs +10 -10
  119. package/dist/components/customizations/ChartYAxis.mjs +10 -10
  120. package/dist/components/customizations/ChartZoom.mjs +9 -9
  121. package/dist/components/items/ChartItem.mjs +3 -3
  122. package/dist/components/items/ChartTreemapGroup.mjs +5 -5
  123. package/dist/components/renderers/CartesianRenderer.mjs +9 -9
  124. package/dist/components/renderers/CartesianRenderer.vue.d.ts +2 -0
  125. package/dist/components/renderers/ColorLegendRenderer.mjs +2 -2
  126. package/dist/components/renderers/LegendRenderer.mjs +3 -3
  127. package/dist/components/renderers/NavigatorRenderer.mjs +5 -5
  128. package/dist/components/renderers/RadialRenderer.mjs +9 -9
  129. package/dist/components/renderers/RadialRenderer.vue.d.ts +1 -1
  130. package/dist/components/renderers/RectRenderer.mjs +9 -9
  131. package/dist/components/renderers/RectRenderer.vue.d.ts +1 -1
  132. package/dist/components/renderers/TooltipRenderer.mjs +4 -4
  133. package/dist/components/renderers/layers/BarLayerCanvas.mjs +10 -10
  134. package/dist/components/renderers/layers/BarLayerSvg.mjs +10 -10
  135. package/dist/components/renderers/layers/CandlestickLayer.mjs +9 -9
  136. package/dist/components/renderers/layers/HeatmapLayer.mjs +9 -9
  137. package/dist/components/renderers/layers/LineLayer.mjs +10 -9
  138. package/dist/components/renderers/layers/PieLayer.mjs +7 -9
  139. package/dist/components/renderers/layers/PolarLayer.mjs +8 -9
  140. package/dist/components/renderers/layers/RadarLayer.mjs +8 -9
  141. package/dist/components/renderers/layers/ScatterLayer.mjs +10 -9
  142. package/dist/composables/index.d.ts +0 -8
  143. package/dist/composables/useAnimationProps.d.ts +2 -5
  144. package/dist/composables/useChartSync.spec.d.ts +1 -0
  145. package/dist/composables/useChartSyncCoordinator.spec.d.ts +1 -0
  146. package/dist/composables/useHeatmapRenderer.spec.d.ts +1 -0
  147. package/dist/composables/usePolarRenderer.spec.d.ts +1 -0
  148. package/dist/composables/useResponsiveConfig.d.ts +1 -1
  149. package/dist/composables/useResponsiveDimensions.spec.d.ts +1 -0
  150. package/dist/composables/useTreemapRenderer.spec.d.ts +1 -0
  151. package/dist/context/ChartContext.d.ts +1 -1
  152. package/dist/index.d.ts +2 -1
  153. package/dist/index.mjs +69 -66
  154. package/dist/namespace.mjs +69 -112
  155. package/dist/types/animation.types.d.ts +2 -0
  156. package/dist/types/bar.types.d.ts +2 -1
  157. package/dist/types/candlestick.types.d.ts +0 -1
  158. package/dist/types/heatmap.types.d.ts +0 -1
  159. package/dist/types/index.d.ts +1 -1
  160. package/dist/types/item.types.d.ts +0 -1
  161. package/dist/types/line.types.d.ts +4 -1
  162. package/dist/types/scatter.types.d.ts +3 -2
  163. package/dist/useChartContext.spec.d.ts +1 -0
  164. package/package.json +7 -7
  165. package/dist/chunk-54DLUFIA.mjs +0 -96
  166. package/dist/chunk-CQHNYT2V.mjs +0 -1692
  167. package/dist/chunk-JKK3D33U.mjs +0 -64
  168. package/dist/chunk-UO27BCRL.mjs +0 -86
  169. package/dist/chunk-VWABO23U.mjs +0 -143
  170. /package/dist/{chunk-FZ3PZ66C.mjs → chunks/chunk-4Q3QUNX6.mjs} +0 -0
  171. /package/dist/{chunk-5SRBQVU5.mjs → chunks/chunk-EHSDNH7K.mjs} +0 -0
  172. /package/dist/{chunk-LD57I4SY.mjs → chunks/chunk-H4HLHGUW.mjs} +0 -0
  173. /package/dist/{chunk-TEOO4OLV.mjs → chunks/chunk-L6N5IYAJ.mjs} +0 -0
  174. /package/dist/{chunk-E4ROAOPT.mjs → chunks/chunk-S4YR4YK7.mjs} +0 -0
  175. /package/dist/{chunk-7P6ASYW6.mjs → chunks/chunk-VIHIR2BE.mjs} +0 -0
  176. /package/dist/{chunk-J43KLCZF.mjs → chunks/chunk-ZH4A4L6W.mjs} +0 -0
@@ -1,64 +0,0 @@
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 };
@@ -1,86 +0,0 @@
1
- import { usePieRenderer, useRadialFrameRegistration } from './chunk-CQHNYT2V.mjs';
2
- import { useChartMethods, useChartState, useChartHover } from './chunk-HANSF33Z.mjs';
3
- import { defineComponent, computed, toRef, unref, openBlock, createElementBlock, Fragment, createElementVNode, renderList, createBlock, createCommentVNode } from 'vue';
4
-
5
- var _sfc_main = /* @__PURE__ */ defineComponent({
6
- __name: "PieLayer",
7
- props: {
8
- chartArea: {},
9
- width: {},
10
- height: {},
11
- canvasEl: {},
12
- containerEl: {},
13
- adaptiveDataLabelFontSize: {}
14
- },
15
- setup(__props) {
16
- const VNodeRenderer = defineComponent({
17
- props: { node: {
18
- type: Object,
19
- required: true
20
- } },
21
- render() {
22
- return this.node;
23
- }
24
- });
25
- const props = __props;
26
- const methods = useChartMethods();
27
- const state = useChartState();
28
- const hoverCtx = useChartHover();
29
- const pie = usePieRenderer({
30
- chartArea: computed(() => props.chartArea),
31
- renderer: methods.renderer,
32
- canvasEl: toRef(props, "canvasEl"),
33
- containerEl: toRef(props, "containerEl"),
34
- datasets: computed(() => state.value.datasets),
35
- features: computed(() => state.value.features),
36
- hover: computed(() => hoverCtx.value.hover),
37
- datasetVisibility: computed(() => state.value.datasetVisibility),
38
- hiddenItems: computed(() => state.value.hiddenItems),
39
- chartId: methods.chartId,
40
- width: computed(() => props.width),
41
- height: computed(() => props.height),
42
- globalFont: methods.font,
43
- adaptiveDataLabelFontSize: computed(() => props.adaptiveDataLabelFontSize),
44
- dir: computed(() => methods.dir),
45
- theme: computed(() => methods.theme)
46
- });
47
- useRadialFrameRegistration({
48
- type: "pie",
49
- hitTest: (x, y) => pie.hitTest(x, y),
50
- getPointPosition: (datasetId, index) => {
51
- const pos = pie.getSlicePosition(datasetId, index);
52
- if (!pos) return null;
53
- const r = 6;
54
- return {
55
- x: pos.x - r,
56
- y: pos.y - r,
57
- width: r * 2,
58
- height: r * 2,
59
- shape: "circle"
60
- };
61
- },
62
- getCenter: () => pie.center.value,
63
- applyPropertyAnimations: (store) => pie.applyPropertyAnimations(store),
64
- renderFrameCycle: () => pie.renderFrameCycle()
65
- });
66
- return (_ctx, _cache) => {
67
- return unref(methods).renderer === "svg" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
68
- createElementVNode("g", { ref: (el) => {
69
- unref(pie).groupRef.value = el;
70
- } }, null, 512),
71
- createElementVNode("g", { ref: (el) => {
72
- unref(pie).labelGroupRef.value = el;
73
- } }, null, 512),
74
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(pie).svgContent.value, (el) => {
75
- return openBlock(), createBlock(unref(VNodeRenderer), {
76
- key: el.key ?? el.props?.key,
77
- node: el
78
- }, null, 8, ["node"]);
79
- }), 128))
80
- ], 64)) : createCommentVNode("", true);
81
- };
82
- }
83
- });
84
- var PieLayer_default = _sfc_main;
85
-
86
- export { PieLayer_default };
@@ -1,143 +0,0 @@
1
- import { useTreemapRenderer, usePropertyAnimations } from './chunk-CQHNYT2V.mjs';
2
- import { useChartMethods, useChartState, useChartHover } from './chunk-HANSF33Z.mjs';
3
- import { defineComponent, computed, toRef, shallowRef, onUnmounted, unref, openBlock, createElementBlock, createElementVNode, Fragment, renderList, createBlock, createCommentVNode } from 'vue';
4
- import { AnimatedPropertyStore, AnimationRegistry } from '@primeui/chart-core';
5
-
6
- var _sfc_main = /* @__PURE__ */ defineComponent({
7
- __name: "RectRenderer",
8
- props: {
9
- chartArea: {},
10
- width: {},
11
- height: {},
12
- canvasEl: {},
13
- drilldownState: {}
14
- },
15
- setup(__props, { expose: __expose }) {
16
- const VNodeRenderer = defineComponent({
17
- props: { node: {
18
- type: Object,
19
- required: true
20
- } },
21
- render() {
22
- return this.node;
23
- }
24
- });
25
- const props = __props;
26
- const methods = useChartMethods();
27
- const state = useChartState();
28
- const hoverCtx = useChartHover();
29
- const treemap = useTreemapRenderer({
30
- chartArea: computed(() => props.chartArea),
31
- renderer: methods.renderer,
32
- canvasEl: toRef(props, "canvasEl"),
33
- datasets: computed(() => state.value.datasets),
34
- features: computed(() => state.value.features),
35
- datasetVisibility: computed(() => state.value.datasetVisibility),
36
- hover: computed(() => hoverCtx.value.hover),
37
- width: computed(() => props.width),
38
- height: computed(() => props.height),
39
- chartId: methods.chartId,
40
- drilldownState: props.drilldownState,
41
- globalFont: methods.font,
42
- theme: computed(() => methods.theme)
43
- });
44
- function hitTest(x, y) {
45
- return treemap.hitTest(x, y);
46
- }
47
- function handleDrilldownClick(hit) {
48
- return treemap.handleDrilldownClick(hit);
49
- }
50
- function prepareDrillOut() {
51
- treemap.prepareDrillOut();
52
- }
53
- function updateHoverOverlay(hit) {
54
- treemap.updateHoverOverlay(hit);
55
- }
56
- function getColorScaleInfo() {
57
- return treemap.getColorScaleInfo();
58
- }
59
- const setWrapperRef = (el) => {
60
- treemap.wrapperRef.value = el;
61
- };
62
- const setGroupRef = (el) => {
63
- treemap.groupRef.value = el;
64
- };
65
- const setOverlayRef = (el) => {
66
- treemap.overlayRef.value = el;
67
- };
68
- function getPlotArea() {
69
- return props.chartArea ?? null;
70
- }
71
- function getPointPosition(datasetId, index) {
72
- return treemap.getPointPosition(datasetId, index);
73
- }
74
- const mergedPropertyAnimations = computed(() => {
75
- const f = state.value.features;
76
- const animProps = f.get("animation")?.props;
77
- if (animProps?.enabled === false) {
78
- return void 0;
79
- }
80
- const merged = [];
81
- if (animProps?.propertyAnimations) merged.push(...animProps.propertyAnimations);
82
- f.forEach((entry, key) => {
83
- if (typeof key !== "string" || !key.startsWith("animation:")) return;
84
- const p = entry.props;
85
- if (p.propertyAnimations) merged.push(...p.propertyAnimations);
86
- });
87
- if (!merged.length) {
88
- return void 0;
89
- }
90
- return merged;
91
- });
92
- const animStoreRef = shallowRef(new AnimatedPropertyStore());
93
- const animRegistry = new AnimationRegistry();
94
- const propertyAnimatableControllers = [];
95
- for (const candidate of [treemap]) {
96
- const partial = candidate;
97
- if (typeof partial.applyPropertyAnimations === "function" && typeof partial.renderFrameCycle === "function") {
98
- propertyAnimatableControllers.push(partial);
99
- }
100
- }
101
- animRegistry.setRepaintCallback(() => {
102
- const store = animStoreRef.value;
103
- if (!store) return;
104
- for (const c of propertyAnimatableControllers) c.applyPropertyAnimations(store);
105
- });
106
- function onPropertyComplete() {
107
- for (const c of propertyAnimatableControllers) c.renderFrameCycle();
108
- }
109
- usePropertyAnimations(mergedPropertyAnimations, animRegistry, animStoreRef.value, onPropertyComplete);
110
- onUnmounted(() => {
111
- animRegistry.destroy();
112
- animStoreRef.value?.destroy();
113
- animStoreRef.value = null;
114
- });
115
- __expose({
116
- hitTest,
117
- handleDrilldownClick,
118
- prepareDrillOut,
119
- updateHoverOverlay,
120
- getColorScaleInfo,
121
- getPlotArea,
122
- getPointPosition
123
- });
124
- return (_ctx, _cache) => {
125
- return unref(methods).renderer === "svg" ? (openBlock(), createElementBlock("g", {
126
- key: 0,
127
- ref: setWrapperRef
128
- }, [
129
- createElementVNode("g", { ref: setGroupRef }),
130
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(treemap).svgContent.value, (el) => {
131
- return openBlock(), createBlock(unref(VNodeRenderer), {
132
- key: el.key ?? el.props?.key,
133
- node: el
134
- }, null, 8, ["node"]);
135
- }), 128)),
136
- createElementVNode("g", { ref: setOverlayRef })
137
- ])) : createCommentVNode("", true);
138
- };
139
- }
140
- });
141
- var RectRenderer_default = _sfc_main;
142
-
143
- export { RectRenderer_default };