@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,288 @@
1
+ import { RadarLayer_default } from './chunk-DOOXGOOB.mjs';
2
+ import { RadialRenderer_default } from './chunk-4NJ2PSHV.mjs';
3
+ import { registerFamilyRenderer, registerChartLayer, useDatasetAnimationRegistration, useDatasetRegistration, useItemCollector } from './chunk-CQHNYT2V.mjs';
4
+ import { STACKED_CONTEXT_KEY } from './chunk-TEOO4OLV.mjs';
5
+ import { useRendererHint, useChartMethods } from './chunk-HANSF33Z.mjs';
6
+ import { defineComponent, useSlots, computed, inject, onMounted, watch, onUnmounted, renderSlot, createCommentVNode } from 'vue';
7
+
8
+ var radarIdCounter = 0;
9
+ var _sfc_main = /* @__PURE__ */ defineComponent({
10
+ __name: "ChartRadar",
11
+ props: {
12
+ id: {},
13
+ data: {},
14
+ categoryField: { type: [
15
+ String,
16
+ Function,
17
+ Array
18
+ ] },
19
+ valueField: { type: [
20
+ String,
21
+ Function,
22
+ Number,
23
+ Array
24
+ ] },
25
+ name: {},
26
+ color: {},
27
+ hoverColor: { type: [
28
+ String,
29
+ Function,
30
+ Array
31
+ ] },
32
+ hoverBorderColor: { type: [
33
+ String,
34
+ Function,
35
+ Array
36
+ ] },
37
+ fillOpacity: {},
38
+ lineStrokeWidth: {},
39
+ lineStyle: {},
40
+ lineDash: {},
41
+ showMarkers: { type: Boolean },
42
+ markerSize: { type: [
43
+ String,
44
+ Function,
45
+ Number,
46
+ Array
47
+ ] },
48
+ curve: {},
49
+ renderMarker: { type: Function },
50
+ keyField: {},
51
+ yAxisId: {},
52
+ borderColor: { type: [
53
+ String,
54
+ Function,
55
+ Array
56
+ ] },
57
+ borderStrokeWidth: { type: [
58
+ String,
59
+ Function,
60
+ Number,
61
+ Array
62
+ ] },
63
+ borderDash: { type: [
64
+ Array,
65
+ String,
66
+ Function
67
+ ] },
68
+ borderDashOffset: { type: [
69
+ String,
70
+ Function,
71
+ Number,
72
+ Array
73
+ ] },
74
+ borderJoinStyle: {},
75
+ borderAlign: {},
76
+ borderRadius: { type: [
77
+ String,
78
+ Function,
79
+ Number,
80
+ Object,
81
+ Array
82
+ ] },
83
+ borderSkipped: { type: [
84
+ String,
85
+ Function,
86
+ Boolean,
87
+ Array
88
+ ] },
89
+ pointRadius: {},
90
+ hoverPointRadius: {},
91
+ pointBackgroundColor: { type: [
92
+ String,
93
+ Function,
94
+ Array
95
+ ] },
96
+ pointBorderColor: { type: [
97
+ String,
98
+ Function,
99
+ Array
100
+ ] },
101
+ pointBorderStrokeWidth: { type: [
102
+ String,
103
+ Function,
104
+ Number,
105
+ Array
106
+ ] },
107
+ pointBorderDash: { type: [
108
+ Array,
109
+ String,
110
+ Function
111
+ ] },
112
+ pointBorderDashOffset: { type: [
113
+ String,
114
+ Function,
115
+ Number,
116
+ Array
117
+ ] },
118
+ pointBorderJoinStyle: {},
119
+ pointBorderRadius: { type: [
120
+ String,
121
+ Function,
122
+ Number,
123
+ Array
124
+ ] },
125
+ markerShape: { type: [
126
+ String,
127
+ Function,
128
+ Array
129
+ ] },
130
+ pointRotation: { type: [
131
+ String,
132
+ Function,
133
+ Number,
134
+ Array
135
+ ] },
136
+ animations: {}
137
+ },
138
+ setup(__props) {
139
+ useRendererHint("radial");
140
+ registerFamilyRenderer("radial", RadialRenderer_default);
141
+ registerChartLayer("radar", {
142
+ family: "radial",
143
+ frameKind: "grid",
144
+ layer: RadarLayer_default
145
+ });
146
+ const props = __props;
147
+ function generateRadarId() {
148
+ return `radar-auto-${++radarIdCounter}`;
149
+ }
150
+ const slots = useSlots();
151
+ const hasChildren = computed(() => !!slots.default);
152
+ const autoId = props.id || generateRadarId();
153
+ useDatasetAnimationRegistration(() => autoId, () => props.animations);
154
+ const stackedContext = inject(STACKED_CONTEXT_KEY, null);
155
+ const stackId = stackedContext?.stackId;
156
+ if (!hasChildren.value) {
157
+ const datasetId = computed(() => autoId);
158
+ const datasetProps = computed(() => ({
159
+ id: autoId,
160
+ data: props.data,
161
+ categoryField: props.categoryField,
162
+ valueField: props.valueField,
163
+ color: props.color,
164
+ name: props.name,
165
+ fillOpacity: props.fillOpacity,
166
+ lineStrokeWidth: props.lineStrokeWidth,
167
+ lineStyle: props.lineStyle,
168
+ lineDash: props.lineDash,
169
+ showMarkers: props.showMarkers,
170
+ markerSize: props.markerSize,
171
+ curve: props.curve,
172
+ markerShape: props.markerShape,
173
+ pointRotation: props.pointRotation,
174
+ pointBackgroundColor: props.pointBackgroundColor,
175
+ pointBorderColor: props.pointBorderColor,
176
+ pointBorderStrokeWidth: props.pointBorderStrokeWidth,
177
+ pointBorderDash: props.pointBorderDash,
178
+ pointBorderDashOffset: props.pointBorderDashOffset,
179
+ pointBorderJoinStyle: props.pointBorderJoinStyle,
180
+ pointBorderRadius: props.pointBorderRadius,
181
+ keyField: props.keyField,
182
+ renderMarker: props.renderMarker,
183
+ stackId,
184
+ yAxisId: props.yAxisId,
185
+ borderColor: props.borderColor,
186
+ borderStrokeWidth: props.borderStrokeWidth,
187
+ borderDash: props.borderDash,
188
+ borderDashOffset: props.borderDashOffset,
189
+ borderJoinStyle: props.borderJoinStyle,
190
+ borderAlign: props.borderAlign,
191
+ borderRadius: props.borderRadius,
192
+ borderSkipped: props.borderSkipped,
193
+ hoverColor: props.hoverColor,
194
+ hoverBorderColor: props.hoverBorderColor
195
+ }));
196
+ useDatasetRegistration({
197
+ id: datasetId,
198
+ type: "radar",
199
+ props: datasetProps
200
+ });
201
+ }
202
+ if (hasChildren.value) {
203
+ let buildSynthesizedProps2 = function() {
204
+ return {
205
+ id: autoId,
206
+ data: getItems(),
207
+ categoryField: (ctx) => ctx.datum.label ?? "",
208
+ valueField: (ctx) => ctx.datum.value,
209
+ name: props.name,
210
+ color: props.color,
211
+ fillOpacity: props.fillOpacity,
212
+ lineStrokeWidth: props.lineStrokeWidth,
213
+ lineStyle: props.lineStyle,
214
+ lineDash: props.lineDash,
215
+ showMarkers: props.showMarkers,
216
+ markerSize: props.markerSize,
217
+ curve: props.curve,
218
+ markerShape: props.markerShape,
219
+ pointRotation: props.pointRotation,
220
+ pointBackgroundColor: props.pointBackgroundColor,
221
+ pointBorderColor: props.pointBorderColor,
222
+ pointBorderStrokeWidth: props.pointBorderStrokeWidth,
223
+ pointBorderDash: props.pointBorderDash,
224
+ pointBorderDashOffset: props.pointBorderDashOffset,
225
+ pointBorderJoinStyle: props.pointBorderJoinStyle,
226
+ pointBorderRadius: props.pointBorderRadius,
227
+ keyField: props.keyField,
228
+ renderMarker: props.renderMarker,
229
+ stackId,
230
+ yAxisId: props.yAxisId,
231
+ borderColor: props.borderColor,
232
+ borderStrokeWidth: props.borderStrokeWidth,
233
+ borderDash: props.borderDash,
234
+ borderDashOffset: props.borderDashOffset,
235
+ borderJoinStyle: props.borderJoinStyle,
236
+ borderAlign: props.borderAlign,
237
+ borderRadius: props.borderRadius,
238
+ borderSkipped: props.borderSkipped
239
+ };
240
+ };
241
+ const methods = useChartMethods();
242
+ const { getItems } = useItemCollector();
243
+ let isRegistered = false;
244
+ onMounted(() => {
245
+ methods.registerDataset(autoId, "radar", buildSynthesizedProps2());
246
+ isRegistered = true;
247
+ });
248
+ watch([
249
+ () => props.name,
250
+ () => props.color,
251
+ () => props.fillOpacity,
252
+ () => props.lineStrokeWidth,
253
+ () => props.lineStyle,
254
+ () => props.lineDash,
255
+ () => props.showMarkers,
256
+ () => props.markerSize,
257
+ () => props.pointBorderColor,
258
+ () => props.pointBorderStrokeWidth,
259
+ () => props.pointBorderDash,
260
+ () => props.pointBorderDashOffset,
261
+ () => props.pointBorderJoinStyle,
262
+ () => props.pointBorderRadius,
263
+ () => props.curve,
264
+ () => props.borderColor,
265
+ () => props.borderStrokeWidth,
266
+ () => props.borderDash,
267
+ () => props.borderDashOffset,
268
+ () => props.borderJoinStyle,
269
+ () => props.borderAlign,
270
+ () => props.borderRadius,
271
+ () => props.borderSkipped
272
+ ], () => {
273
+ if (!isRegistered) return;
274
+ methods.updateDataset(autoId, buildSynthesizedProps2());
275
+ }, { flush: "post" });
276
+ onUnmounted(() => {
277
+ methods.unregisterDataset(autoId);
278
+ isRegistered = false;
279
+ });
280
+ }
281
+ return (_ctx, _cache) => {
282
+ return hasChildren.value ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true);
283
+ };
284
+ }
285
+ });
286
+ var ChartRadar_default = _sfc_main;
287
+
288
+ export { ChartRadar_default };
@@ -0,0 +1,291 @@
1
+ import { defineComponent, computed, ref, watch, openBlock, createElementBlock, normalizeStyle, createVNode, unref, createElementVNode, createCommentVNode, Fragment, renderList, toDisplayString } from 'vue';
2
+ import { DEFAULT_HEAT_COLORS, buildAutoColorScale, interpolateColor, formatCompactValue } from '@primeui/chart-core';
3
+
4
+ // src/components/renderers/ColorLegendRenderer.vue
5
+ var _hoisted_1 = ["aria-label"];
6
+ var _hoisted_2 = ["viewBox"];
7
+ var _hoisted_3 = ["points", "fill"];
8
+ var _hoisted_4 = ["viewBox"];
9
+ var _hoisted_5 = ["points", "fill"];
10
+ var INDICATOR_SIZE = 6;
11
+ var _sfc_main = /* @__PURE__ */ defineComponent({
12
+ __name: "ColorLegendRenderer",
13
+ props: {
14
+ config: {},
15
+ area: {},
16
+ autoColorScale: {},
17
+ hoveredValue: {}
18
+ },
19
+ setup(__props) {
20
+ const VNodeRenderer = defineComponent({
21
+ props: { node: {
22
+ type: Object,
23
+ required: true
24
+ } },
25
+ render() {
26
+ return this.node;
27
+ }
28
+ });
29
+ const props = __props;
30
+ const position = computed(() => props.config.position ?? "bottom");
31
+ const isHorizontal = computed(() => position.value === "top" || position.value === "bottom");
32
+ const resolved = computed(() => {
33
+ const range = props.config.colorRange ?? props.autoColorScale?.colorRange ?? DEFAULT_HEAT_COLORS;
34
+ let scale;
35
+ if (props.config.colorScale && props.config.colorScale.length > 0) {
36
+ scale = props.config.colorScale;
37
+ } else if (props.autoColorScale?.colorScale && props.autoColorScale.colorScale.length > 0) {
38
+ scale = props.autoColorScale.colorScale;
39
+ } else {
40
+ const min = props.autoColorScale?.min ?? 0;
41
+ const max = props.autoColorScale?.max ?? 100;
42
+ scale = buildAutoColorScale(min, max, range.length);
43
+ }
44
+ const scaleMin = scale[0];
45
+ const scaleMax = scale[scale.length - 1];
46
+ const tickVals = [];
47
+ if (props.config.colorScale && props.config.colorScale.length > 0 && props.config.ticks === void 0) {
48
+ tickVals.push(...props.config.colorScale);
49
+ } else {
50
+ const numTicks = props.config.ticks ?? 3;
51
+ if (numTicks === 1) {
52
+ tickVals.push((scaleMin + scaleMax) / 2);
53
+ } else {
54
+ for (let i = 0; i < numTicks; i++) {
55
+ tickVals.push(scaleMin + (scaleMax - scaleMin) * (i / (numTicks - 1)));
56
+ }
57
+ }
58
+ }
59
+ return {
60
+ colorScale: scale,
61
+ colorRange: range,
62
+ tickValues: tickVals
63
+ };
64
+ });
65
+ const canvasRef = ref(null);
66
+ const barHeight = computed(() => props.config.height ?? 12);
67
+ const barWidth = computed(() => props.config.width ?? 16);
68
+ const borderRadius = computed(() => props.config.borderRadius ?? 4);
69
+ watch([
70
+ resolved,
71
+ canvasRef,
72
+ isHorizontal
73
+ ], () => {
74
+ const canvas = canvasRef.value;
75
+ if (!canvas) return;
76
+ const dpr = window.devicePixelRatio || 1;
77
+ const rect = canvas.getBoundingClientRect();
78
+ const w = rect.width;
79
+ const h = rect.height;
80
+ if (w === 0 || h === 0) return;
81
+ canvas.width = w * dpr;
82
+ canvas.height = h * dpr;
83
+ const ctx = canvas.getContext("2d");
84
+ if (!ctx) return;
85
+ ctx.scale(dpr, dpr);
86
+ const { colorScale, colorRange } = resolved.value;
87
+ const scaleMin = colorScale[0];
88
+ const scaleMax = colorScale[colorScale.length - 1];
89
+ const steps = props.config.steps;
90
+ if (steps && steps > 1) {
91
+ const dim = isHorizontal.value ? w : h;
92
+ const stepSize = dim / steps;
93
+ for (let i = 0; i < steps; i++) {
94
+ const t = (i + 0.5) / steps;
95
+ const value = scaleMin + (scaleMax - scaleMin) * t;
96
+ const color = interpolateColor(colorScale, colorRange, value);
97
+ ctx.fillStyle = color;
98
+ if (isHorizontal.value) {
99
+ ctx.fillRect(i * stepSize, 0, stepSize + 0.5, h);
100
+ } else {
101
+ const y = h - (i + 1) * stepSize;
102
+ ctx.fillRect(0, y, w, stepSize + 0.5);
103
+ }
104
+ }
105
+ } else {
106
+ const dim = isHorizontal.value ? w : h;
107
+ const resolution = Math.min(Math.round(dim * 2), 512);
108
+ for (let i = 0; i < resolution; i++) {
109
+ const t = i / (resolution - 1);
110
+ const value = scaleMin + (scaleMax - scaleMin) * t;
111
+ const color = interpolateColor(colorScale, colorRange, value);
112
+ ctx.fillStyle = color;
113
+ if (isHorizontal.value) {
114
+ const x = t * w;
115
+ const cellW = w / resolution + 1;
116
+ ctx.fillRect(x, 0, cellW, h);
117
+ } else {
118
+ const y = (1 - t) * h;
119
+ const cellH = h / resolution + 1;
120
+ ctx.fillRect(0, y - cellH, w, cellH);
121
+ }
122
+ }
123
+ }
124
+ }, {
125
+ immediate: true,
126
+ flush: "post"
127
+ });
128
+ const showIndicator = computed(() => props.config.showIndicator !== false);
129
+ const indicatorColor = computed(() => props.config.indicatorColor ?? "#374151");
130
+ const indicatorT = computed(() => {
131
+ if (!showIndicator.value || props.hoveredValue == null) return null;
132
+ const { colorScale } = resolved.value;
133
+ const scaleMin = colorScale[0];
134
+ const scaleMax = colorScale[colorScale.length - 1];
135
+ if (scaleMax === scaleMin) return null;
136
+ return Math.max(0, Math.min(1, (props.hoveredValue - scaleMin) / (scaleMax - scaleMin)));
137
+ });
138
+ const format = computed(() => props.config.formatLabel ?? formatCompactValue);
139
+ const labelSize = computed(() => props.config.labelSize ?? 11);
140
+ const labelColor = computed(() => props.config.labelColor ?? "#6b7280");
141
+ const containerStyle = computed(() => ({
142
+ position: "absolute",
143
+ left: `${props.area.x}px`,
144
+ top: `${props.area.y}px`,
145
+ width: `${props.area.width}px`,
146
+ height: `${props.area.height}px`,
147
+ display: "flex",
148
+ flexDirection: isHorizontal.value ? "column" : "row",
149
+ alignItems: "stretch",
150
+ justifyContent: "center",
151
+ gap: "4px",
152
+ padding: isHorizontal.value ? "4px 0" : "0 4px"
153
+ }));
154
+ const barStyle = computed(() => ({
155
+ width: isHorizontal.value ? "100%" : `${barWidth.value}px`,
156
+ height: isHorizontal.value ? `${barHeight.value}px` : "100%",
157
+ borderRadius: `${borderRadius.value}px`,
158
+ overflow: "hidden",
159
+ flexShrink: 0
160
+ }));
161
+ const tickContainerStyle = computed(() => isHorizontal.value ? {
162
+ display: "flex",
163
+ justifyContent: "space-between",
164
+ width: "100%"
165
+ } : {
166
+ position: "relative",
167
+ flex: "1"
168
+ });
169
+ function tickLabelStyle(i) {
170
+ const base = {
171
+ fontSize: `${labelSize.value}px`,
172
+ color: labelColor.value,
173
+ fontFamily: "system-ui, sans-serif",
174
+ lineHeight: "1",
175
+ whiteSpace: "nowrap"
176
+ };
177
+ if (isHorizontal.value) {
178
+ return {
179
+ ...base,
180
+ textAlign: i === 0 ? "left" : i === resolved.value.tickValues.length - 1 ? "right" : "center",
181
+ flex: i > 0 && i < resolved.value.tickValues.length - 1 ? "1" : "none"
182
+ };
183
+ }
184
+ const t = resolved.value.tickValues.length > 1 ? i / (resolved.value.tickValues.length - 1) : 0.5;
185
+ return {
186
+ ...base,
187
+ position: "absolute",
188
+ top: `${(1 - t) * 100}%`,
189
+ transform: "translateY(-50%)",
190
+ left: "0"
191
+ };
192
+ }
193
+ const hIndicatorPoints = computed(() => {
194
+ if (indicatorT.value == null) return "";
195
+ const pct = indicatorT.value * 100;
196
+ return `${pct},0 ${Math.max(0, pct - 1)},${INDICATOR_SIZE} ${Math.min(100, pct + 1)},${INDICATOR_SIZE}`;
197
+ });
198
+ const vIndicatorPoints = computed(() => {
199
+ if (indicatorT.value == null) return "";
200
+ const pct = (1 - indicatorT.value) * 100;
201
+ return `0,${pct} ${INDICATOR_SIZE},${Math.max(0, pct - 1)} ${INDICATOR_SIZE},${Math.min(100, pct + 1)}`;
202
+ });
203
+ const ariaLabel = computed(() => {
204
+ const tvs = resolved.value.tickValues;
205
+ return `Color scale from ${format.value(tvs[0])} to ${format.value(tvs[tvs.length - 1])}`;
206
+ });
207
+ const customRenderVNode = computed(() => {
208
+ const renderFn = props.config.render;
209
+ if (!renderFn) return null;
210
+ const { colorScale, colorRange } = resolved.value;
211
+ const ctx = {
212
+ colorScale,
213
+ colorRange,
214
+ min: colorScale[0],
215
+ max: colorScale[colorScale.length - 1],
216
+ indicatorValue: props.hoveredValue
217
+ };
218
+ return renderFn(ctx) ?? null;
219
+ });
220
+ const customContainerStyle = computed(() => ({
221
+ position: "absolute",
222
+ left: `${props.area.x}px`,
223
+ top: `${props.area.y}px`,
224
+ width: `${props.area.width}px`,
225
+ height: `${props.area.height}px`
226
+ }));
227
+ return (_ctx, _cache) => {
228
+ return customRenderVNode.value ? (openBlock(), createElementBlock("div", {
229
+ key: 0,
230
+ style: normalizeStyle(customContainerStyle.value)
231
+ }, [createVNode(unref(VNodeRenderer), { node: customRenderVNode.value }, null, 8, ["node"])], 4)) : (openBlock(), createElementBlock("div", {
232
+ key: 1,
233
+ style: normalizeStyle(containerStyle.value),
234
+ role: "img",
235
+ "aria-label": ariaLabel.value
236
+ }, [createElementVNode("div", { style: normalizeStyle({
237
+ position: "relative",
238
+ width: barStyle.value.width,
239
+ height: barStyle.value.height,
240
+ flexShrink: 0
241
+ }) }, [
242
+ createElementVNode("canvas", {
243
+ ref: (el) => {
244
+ canvasRef.value = el;
245
+ },
246
+ style: normalizeStyle(barStyle.value)
247
+ }, null, 4),
248
+ indicatorT.value != null && isHorizontal.value ? (openBlock(), createElementBlock("svg", {
249
+ key: 0,
250
+ viewBox: `0 0 100 ${INDICATOR_SIZE}`,
251
+ width: "100%",
252
+ height: INDICATOR_SIZE,
253
+ style: normalizeStyle({
254
+ position: "absolute",
255
+ bottom: `${-INDICATOR_SIZE}px`,
256
+ left: "0",
257
+ pointerEvents: "none",
258
+ overflow: "visible"
259
+ })
260
+ }, [createElementVNode("polygon", {
261
+ points: hIndicatorPoints.value,
262
+ fill: indicatorColor.value
263
+ }, null, 8, _hoisted_3)], 12, _hoisted_2)) : createCommentVNode("", true),
264
+ indicatorT.value != null && !isHorizontal.value ? (openBlock(), createElementBlock("svg", {
265
+ key: 1,
266
+ viewBox: `0 0 ${INDICATOR_SIZE} 100`,
267
+ width: INDICATOR_SIZE,
268
+ height: "100%",
269
+ style: normalizeStyle({
270
+ position: "absolute",
271
+ right: `${-INDICATOR_SIZE}px`,
272
+ top: "0",
273
+ pointerEvents: "none",
274
+ overflow: "visible"
275
+ })
276
+ }, [createElementVNode("polygon", {
277
+ points: vIndicatorPoints.value,
278
+ fill: indicatorColor.value
279
+ }, null, 8, _hoisted_5)], 12, _hoisted_4)) : createCommentVNode("", true)
280
+ ], 4), createElementVNode("div", { style: normalizeStyle(tickContainerStyle.value) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(resolved.value.tickValues, (v, i) => {
281
+ return openBlock(), createElementBlock("span", {
282
+ key: i,
283
+ style: normalizeStyle(tickLabelStyle(i))
284
+ }, toDisplayString(format.value(v)), 5);
285
+ }), 128))], 4)], 12, _hoisted_1));
286
+ };
287
+ }
288
+ });
289
+ var ColorLegendRenderer_default = _sfc_main;
290
+
291
+ export { ColorLegendRenderer_default };
@@ -0,0 +1,91 @@
1
+ import { useCartesianFrame, useCandlestickRenderer, useCartesianFrameRegistration } from './chunk-CQHNYT2V.mjs';
2
+ import { useChartMethods, useChartState, useChartHover } from './chunk-HANSF33Z.mjs';
3
+ import { defineComponent, computed, unref, openBlock, createElementBlock, createCommentVNode } from 'vue';
4
+
5
+ var _hoisted_1 = ["clip-path"];
6
+ var _sfc_main = /* @__PURE__ */ defineComponent({
7
+ __name: "CandlestickLayer",
8
+ setup(__props) {
9
+ const frame = useCartesianFrame();
10
+ const methods = useChartMethods();
11
+ const state = useChartState();
12
+ const hoverCtx = useChartHover();
13
+ const features = computed(() => state.value.features);
14
+ const candlestick = useCandlestickRenderer({
15
+ chartArea: frame.cartesianArea,
16
+ renderer: methods.renderer,
17
+ canvasEl: frame.canvasEl,
18
+ datasets: computed(() => state.value.datasets),
19
+ datasetVisibility: computed(() => state.value.datasetVisibility),
20
+ features,
21
+ hover: computed(() => hoverCtx.value.hover),
22
+ hoverConfig: frame.hoverConfig,
23
+ chartId: methods.chartId,
24
+ width: frame.width,
25
+ height: frame.height,
26
+ categoryScale: computed(() => frame.layoutData.value?.sharedCategoryScale),
27
+ valueScales: computed(() => frame.layoutData.value?.valueScales),
28
+ firstValueAxisId: computed(() => frame.layoutData.value?.valueScales?.keys().next().value ?? "default"),
29
+ layoutData: computed(() => frame.layoutData.value ?? null),
30
+ compositor: frame.compositor,
31
+ theme: computed(() => methods.theme)
32
+ });
33
+ useCartesianFrameRegistration({
34
+ type: "candlestick",
35
+ applyPropertyAnimations: (store) => candlestick.applyPropertyAnimations(store),
36
+ renderFrameCycle: () => candlestick.renderFrameCycle(),
37
+ findAllNearest: (x, y) => candlestick.findAllNearest(x, y),
38
+ hitTest: (x, y) => {
39
+ const csHit = candlestick.hitTest(x, y);
40
+ if (!csHit) return null;
41
+ return {
42
+ datasetId: csHit.datasetId,
43
+ index: csHit.index,
44
+ label: csHit.label,
45
+ value: csHit.close,
46
+ color: csHit.color,
47
+ snapX: csHit.x,
48
+ snapY: csHit.y,
49
+ formattedValue: `O:${csHit.open} H:${csHit.high} L:${csHit.low} C:${csHit.close}`,
50
+ cursorFormattedValue: "",
51
+ ohlc: {
52
+ open: csHit.open,
53
+ high: csHit.high,
54
+ low: csHit.low,
55
+ close: csHit.close
56
+ }
57
+ };
58
+ },
59
+ getPointPosition: (datasetId, index) => {
60
+ const csLayout = candlestick.candlestickLayouts.get(datasetId);
61
+ if (csLayout) {
62
+ const found = csLayout.visibleCandles?.find((c) => c.dataIndex === index);
63
+ if (found) {
64
+ const w = found.bodyWidth || 8;
65
+ return {
66
+ x: found.x - w / 2,
67
+ y: found.wickTop,
68
+ width: w,
69
+ height: found.wickBottom - found.wickTop,
70
+ shape: "rect"
71
+ };
72
+ }
73
+ }
74
+ return null;
75
+ }
76
+ });
77
+ return (_ctx, _cache) => {
78
+ return unref(methods).renderer === "svg" && unref(candlestick).hasCandlestickData.value ? (openBlock(), createElementBlock("g", {
79
+ key: 0,
80
+ ref: (el) => {
81
+ unref(candlestick).groupRef.value = el;
82
+ },
83
+ class: "candlestick-chart",
84
+ "clip-path": unref(frame).layoutData.value?.cartesianArea ? `url(#${unref(frame).plotClipId})` : void 0
85
+ }, null, 8, _hoisted_1)) : createCommentVNode("", true);
86
+ };
87
+ }
88
+ });
89
+ var CandlestickLayer_default = _sfc_main;
90
+
91
+ export { CandlestickLayer_default };
@@ -0,0 +1,23 @@
1
+ import { AXIS_GROUP_COLLECTOR_KEY } from './chunk-5SRBQVU5.mjs';
2
+ import { defineComponent, inject, onMounted, onUnmounted } from 'vue';
3
+
4
+ var _sfc_main = /* @__PURE__ */ defineComponent({
5
+ __name: "ChartAxisCategory",
6
+ props: { value: {} },
7
+ setup(__props) {
8
+ const props = __props;
9
+ const collector = inject(AXIS_GROUP_COLLECTOR_KEY, null);
10
+ onMounted(() => {
11
+ collector?.addValue(props.value);
12
+ });
13
+ onUnmounted(() => {
14
+ collector?.removeValue(props.value);
15
+ });
16
+ return (_ctx, _cache) => {
17
+ return null;
18
+ };
19
+ }
20
+ });
21
+ var ChartAxisCategory_default = _sfc_main;
22
+
23
+ export { ChartAxisCategory_default };