@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.
- package/LICENSE +23 -0
- package/README.md +1 -0
- package/dist/Chart.parts.d.ts +39 -0
- package/dist/Chart.vue.d.ts +27 -0
- package/dist/ChartCanvas.mjs +14 -0
- package/dist/ChartCanvas.render.spec.d.ts +1 -0
- package/dist/ChartCanvas.vue.d.ts +23 -0
- package/dist/ChartStacked.spec.d.ts +1 -0
- package/dist/ChartSvg.axes.spec.d.ts +1 -0
- package/dist/ChartSvg.context.spec.d.ts +1 -0
- package/dist/ChartSvg.customizations.spec.d.ts +1 -0
- package/dist/ChartSvg.features.spec.d.ts +1 -0
- package/dist/ChartSvg.legend.spec.d.ts +1 -0
- package/dist/ChartSvg.mjs +14 -0
- package/dist/ChartSvg.registration.spec.d.ts +1 -0
- package/dist/ChartSvg.render.spec.d.ts +1 -0
- package/dist/ChartSvg.vue.d.ts +23 -0
- package/dist/_test/fixtures.d.ts +34 -0
- package/dist/bundle-discipline.spec.d.ts +1 -0
- package/dist/chunk-2D3PWFR2.mjs +214 -0
- package/dist/chunk-32XIRBZ7.mjs +87 -0
- package/dist/chunk-372K2BMN.mjs +1476 -0
- package/dist/chunk-42J32DPD.mjs +70 -0
- package/dist/chunk-44BAFHPK.mjs +51 -0
- package/dist/chunk-4CRHCZV3.mjs +142 -0
- package/dist/chunk-4NJ2PSHV.mjs +230 -0
- package/dist/chunk-4THCGGER.mjs +53 -0
- package/dist/chunk-4UVPCLJ7.mjs +70 -0
- package/dist/chunk-54DLUFIA.mjs +96 -0
- package/dist/chunk-56NMBNNX.mjs +52 -0
- package/dist/chunk-5DWO3G33.mjs +276 -0
- package/dist/chunk-5FTUGKPC.mjs +167 -0
- package/dist/chunk-5SRBQVU5.mjs +6 -0
- package/dist/chunk-62NGBLQ7.mjs +28 -0
- package/dist/chunk-644ROAHU.mjs +362 -0
- package/dist/chunk-6S4JMPKC.mjs +55 -0
- package/dist/chunk-72KINEJ6.mjs +52 -0
- package/dist/chunk-7P6ASYW6.mjs +7 -0
- package/dist/chunk-AAX7FOW3.mjs +210 -0
- package/dist/chunk-AUI5R4DA.mjs +84 -0
- package/dist/chunk-CDXF6ZTL.mjs +50 -0
- package/dist/chunk-CQHNYT2V.mjs +1692 -0
- package/dist/chunk-DLUFOM5K.mjs +218 -0
- package/dist/chunk-DOOXGOOB.mjs +123 -0
- package/dist/chunk-DYVFVVTO.mjs +97 -0
- package/dist/chunk-E2U4W5FW.mjs +288 -0
- package/dist/chunk-E4ROAOPT.mjs +291 -0
- package/dist/chunk-FFBK7Q3W.mjs +91 -0
- package/dist/chunk-FQTWLAVA.mjs +23 -0
- package/dist/chunk-FZ3PZ66C.mjs +12 -0
- package/dist/chunk-GA4VV5V4.mjs +21 -0
- package/dist/chunk-GFC24374.mjs +244 -0
- package/dist/chunk-GX2MK6VT.mjs +255 -0
- package/dist/chunk-HANSF33Z.mjs +169 -0
- package/dist/chunk-HTZVV6VV.mjs +550 -0
- package/dist/chunk-J2P5JBHC.mjs +26 -0
- package/dist/chunk-J43KLCZF.mjs +10 -0
- package/dist/chunk-JKK3D33U.mjs +64 -0
- package/dist/chunk-K326BBF7.mjs +276 -0
- package/dist/chunk-KOWFD2AE.mjs +72 -0
- package/dist/chunk-LD57I4SY.mjs +5 -0
- package/dist/chunk-MDA22SIZ.mjs +29 -0
- package/dist/chunk-NLXOJSKK.mjs +727 -0
- package/dist/chunk-O6L3PNFC.mjs +49 -0
- package/dist/chunk-PJVOZSPF.mjs +55 -0
- package/dist/chunk-PQV55JYI.mjs +38 -0
- package/dist/chunk-PSSXPTLQ.mjs +210 -0
- package/dist/chunk-RQURY2H3.mjs +40 -0
- package/dist/chunk-RRHYGSK6.mjs +29 -0
- package/dist/chunk-RSAZ7V5Z.mjs +42 -0
- package/dist/chunk-RSTIA3KM.mjs +41 -0
- package/dist/chunk-TEOO4OLV.mjs +6 -0
- package/dist/chunk-TIV2FI4S.mjs +53 -0
- package/dist/chunk-UO27BCRL.mjs +86 -0
- package/dist/chunk-VWABO23U.mjs +143 -0
- package/dist/chunk-W5M3BR6N.mjs +26 -0
- package/dist/chunk-WA735Y26.mjs +101 -0
- package/dist/chunk-WKSQR6L5.mjs +247 -0
- package/dist/chunk-WYV2MHP6.mjs +34 -0
- package/dist/chunk-XBDNMPF7.mjs +87 -0
- package/dist/chunk-YGHWUR7K.mjs +45 -0
- package/dist/chunk-YRKAI2R2.mjs +151 -0
- package/dist/chunk-ZHFL3RYO.mjs +228 -0
- package/dist/chunk-ZNINPVG7.mjs +30 -0
- package/dist/chunk-ZRCOVQQM.mjs +47 -0
- package/dist/components/charts/ChartBar.mjs +13 -0
- package/dist/components/charts/ChartBar.vue.d.ts +11 -0
- package/dist/components/charts/ChartCandlestick.mjs +11 -0
- package/dist/components/charts/ChartCandlestick.vue.d.ts +11 -0
- package/dist/components/charts/ChartHeatmap.mjs +11 -0
- package/dist/components/charts/ChartHeatmap.vue.d.ts +11 -0
- package/dist/components/charts/ChartLine.mjs +11 -0
- package/dist/components/charts/ChartLine.vue.d.ts +11 -0
- package/dist/components/charts/ChartPie.mjs +11 -0
- package/dist/components/charts/ChartPie.vue.d.ts +15 -0
- package/dist/components/charts/ChartPolar.mjs +11 -0
- package/dist/components/charts/ChartPolar.vue.d.ts +11 -0
- package/dist/components/charts/ChartRadar.mjs +11 -0
- package/dist/components/charts/ChartRadar.vue.d.ts +11 -0
- package/dist/components/charts/ChartScatter.mjs +11 -0
- package/dist/components/charts/ChartScatter.vue.d.ts +11 -0
- package/dist/components/charts/ChartTreemap.mjs +10 -0
- package/dist/components/charts/ChartTreemap.vue.d.ts +15 -0
- package/dist/components/charts/index.d.ts +2 -0
- package/dist/components/containers/ChartDecimation.mjs +6 -0
- package/dist/components/containers/ChartDecimation.vue.d.ts +29 -0
- package/dist/components/containers/ChartGroup.mjs +4 -0
- package/dist/components/containers/ChartGroup.vue.d.ts +13 -0
- package/dist/components/containers/ChartOverlap.mjs +5 -0
- package/dist/components/containers/ChartOverlap.vue.d.ts +13 -0
- package/dist/components/containers/ChartRange.mjs +6 -0
- package/dist/components/containers/ChartRange.vue.d.ts +13 -0
- package/dist/components/containers/ChartStacked.mjs +6 -0
- package/dist/components/containers/ChartStacked.vue.d.ts +21 -0
- package/dist/components/containers/ChartWaterfall.mjs +5 -0
- package/dist/components/containers/ChartWaterfall.vue.d.ts +17 -0
- package/dist/components/containers/keys.d.ts +5 -0
- package/dist/components/customizations/ChartAccessibility.mjs +9 -0
- package/dist/components/customizations/ChartAccessibility.vue.d.ts +28 -0
- package/dist/components/customizations/ChartAnnotation.mjs +5 -0
- package/dist/components/customizations/ChartAnnotation.vue.d.ts +8 -0
- package/dist/components/customizations/ChartAxisCategory.mjs +3 -0
- package/dist/components/customizations/ChartAxisCategory.vue.d.ts +4 -0
- package/dist/components/customizations/ChartAxisGroup.mjs +3 -0
- package/dist/components/customizations/ChartAxisGroup.vue.d.ts +14 -0
- package/dist/components/customizations/ChartBreadcrumb.mjs +6 -0
- package/dist/components/customizations/ChartBreadcrumb.vue.d.ts +15 -0
- package/dist/components/customizations/ChartCaption.mjs +9 -0
- package/dist/components/customizations/ChartCaption.vue.d.ts +4 -0
- package/dist/components/customizations/ChartColorLegend.mjs +9 -0
- package/dist/components/customizations/ChartColorLegend.vue.d.ts +47 -0
- package/dist/components/customizations/ChartDataLabels.mjs +9 -0
- package/dist/components/customizations/ChartDataLabels.vue.d.ts +53 -0
- package/dist/components/customizations/ChartExportMenu.mjs +9 -0
- package/dist/components/customizations/ChartExportMenu.vue.d.ts +29 -0
- package/dist/components/customizations/ChartHover.mjs +9 -0
- package/dist/components/customizations/ChartHover.vue.d.ts +4 -0
- package/dist/components/customizations/ChartLegend.mjs +9 -0
- package/dist/components/customizations/ChartLegend.vue.d.ts +7 -0
- package/dist/components/customizations/ChartNavigator.mjs +10 -0
- package/dist/components/customizations/ChartNavigator.vue.d.ts +4 -0
- package/dist/components/customizations/ChartReferenceBand.mjs +5 -0
- package/dist/components/customizations/ChartReferenceBand.vue.d.ts +4 -0
- package/dist/components/customizations/ChartReferenceLine.mjs +5 -0
- package/dist/components/customizations/ChartReferenceLine.vue.d.ts +4 -0
- package/dist/components/customizations/ChartResponsive.mjs +9 -0
- package/dist/components/customizations/ChartResponsive.vue.d.ts +12 -0
- package/dist/components/customizations/ChartTitle.mjs +9 -0
- package/dist/components/customizations/ChartTitle.vue.d.ts +4 -0
- package/dist/components/customizations/ChartTooltip.mjs +9 -0
- package/dist/components/customizations/ChartTooltip.vue.d.ts +6 -0
- package/dist/components/customizations/ChartXAxis.mjs +10 -0
- package/dist/components/customizations/ChartXAxis.vue.d.ts +24 -0
- package/dist/components/customizations/ChartYAxis.mjs +10 -0
- package/dist/components/customizations/ChartYAxis.vue.d.ts +23 -0
- package/dist/components/customizations/ChartZoom.mjs +9 -0
- package/dist/components/customizations/ChartZoom.vue.d.ts +4 -0
- package/dist/components/customizations/axisGroupKeys.d.ts +8 -0
- package/dist/components/customizations/index.d.ts +20 -0
- package/dist/components/items/ChartItem.mjs +3 -0
- package/dist/components/items/ChartItem.vue.d.ts +4 -0
- package/dist/components/items/ChartTreemapGroup.mjs +5 -0
- package/dist/components/items/ChartTreemapGroup.vue.d.ts +11 -0
- package/dist/components/items/index.d.ts +1 -0
- package/dist/components/renderers/CartesianRenderer.mjs +9 -0
- package/dist/components/renderers/CartesianRenderer.vue.d.ts +66 -0
- package/dist/components/renderers/ColorLegendRenderer.mjs +2 -0
- package/dist/components/renderers/ColorLegendRenderer.vue.d.ts +15 -0
- package/dist/components/renderers/LegendRenderer.mjs +3 -0
- package/dist/components/renderers/LegendRenderer.vue.d.ts +20 -0
- package/dist/components/renderers/NavigatorRenderer.mjs +5 -0
- package/dist/components/renderers/NavigatorRenderer.vue.d.ts +16 -0
- package/dist/components/renderers/RadialRenderer.mjs +9 -0
- package/dist/components/renderers/RadialRenderer.vue.d.ts +39 -0
- package/dist/components/renderers/RectRenderer.mjs +9 -0
- package/dist/components/renderers/RectRenderer.vue.d.ts +32 -0
- package/dist/components/renderers/TooltipRenderer.mjs +4 -0
- package/dist/components/renderers/TooltipRenderer.vue.d.ts +11 -0
- package/dist/components/renderers/layers/BarLayerCanvas.mjs +10 -0
- package/dist/components/renderers/layers/BarLayerCanvas.vue.d.ts +3 -0
- package/dist/components/renderers/layers/BarLayerSvg.mjs +10 -0
- package/dist/components/renderers/layers/BarLayerSvg.vue.d.ts +3 -0
- package/dist/components/renderers/layers/CandlestickLayer.mjs +9 -0
- package/dist/components/renderers/layers/CandlestickLayer.vue.d.ts +3 -0
- package/dist/components/renderers/layers/HeatmapLayer.mjs +9 -0
- package/dist/components/renderers/layers/HeatmapLayer.vue.d.ts +3 -0
- package/dist/components/renderers/layers/LineLayer.mjs +9 -0
- package/dist/components/renderers/layers/LineLayer.vue.d.ts +3 -0
- package/dist/components/renderers/layers/PieLayer.mjs +9 -0
- package/dist/components/renderers/layers/PieLayer.vue.d.ts +12 -0
- package/dist/components/renderers/layers/PolarLayer.mjs +9 -0
- package/dist/components/renderers/layers/PolarLayer.vue.d.ts +16 -0
- package/dist/components/renderers/layers/RadarLayer.mjs +9 -0
- package/dist/components/renderers/layers/RadarLayer.vue.d.ts +16 -0
- package/dist/components/renderers/layers/ScatterLayer.mjs +9 -0
- package/dist/components/renderers/layers/ScatterLayer.vue.d.ts +3 -0
- package/dist/composables/index.d.ts +35 -0
- package/dist/composables/useAnimationProps.d.ts +21 -0
- package/dist/composables/useAxisComponentBase.d.ts +11 -0
- package/dist/composables/useAxisRegistration.d.ts +7 -0
- package/dist/composables/useAxisTransition.d.ts +6 -0
- package/dist/composables/useBarLayer.d.ts +9 -0
- package/dist/composables/useBarRenderer.canvas.d.ts +2 -0
- package/dist/composables/useBarRenderer.svg.d.ts +2 -0
- package/dist/composables/useBarRendererBase.d.ts +3 -0
- package/dist/composables/useCandlestickRenderer.d.ts +2 -0
- package/dist/composables/useCartesianAnimation.d.ts +2 -0
- package/dist/composables/useCartesianFrame.d.ts +72 -0
- package/dist/composables/useCartesianLayout.d.ts +3 -0
- package/dist/composables/useChartContext.d.ts +40 -0
- package/dist/composables/useChartLayers.d.ts +31 -0
- package/dist/composables/useChartRefreshHook.d.ts +1 -0
- package/dist/composables/useChartSync.d.ts +2 -0
- package/dist/composables/useChartSyncCoordinator.d.ts +23 -0
- package/dist/composables/useControllerLifecycle.d.ts +18 -0
- package/dist/composables/useCustomizationRegistration.d.ts +18 -0
- package/dist/composables/useDatasetAnimationContext.d.ts +14 -0
- package/dist/composables/useDatasetRegistration.d.ts +6 -0
- package/dist/composables/useDrilldownState.d.ts +3 -0
- package/dist/composables/useFamilyRenderers.d.ts +10 -0
- package/dist/composables/useFamilyRenderers.spec.d.ts +1 -0
- package/dist/composables/useHeatmapRenderer.d.ts +2 -0
- package/dist/composables/useItemCollector.d.ts +2 -0
- package/dist/composables/useKeyboardController.d.ts +8 -0
- package/dist/composables/useKeyboardNavigation.d.ts +2 -0
- package/dist/composables/useLineRenderer.d.ts +2 -0
- package/dist/composables/useNavigatorRenderer.d.ts +7 -0
- package/dist/composables/usePieRenderer.d.ts +2 -0
- package/dist/composables/usePolarRenderer.d.ts +2 -0
- package/dist/composables/usePropertyAnimations.d.ts +4 -0
- package/dist/composables/useRadarRenderer.d.ts +2 -0
- package/dist/composables/useRadialFrame.d.ts +39 -0
- package/dist/composables/useResponsiveConfig.d.ts +8 -0
- package/dist/composables/useResponsiveDimensions.d.ts +2 -0
- package/dist/composables/useScatterRenderer.d.ts +2 -0
- package/dist/composables/useTreemapRenderer.d.ts +2 -0
- package/dist/composables/useZoomController.d.ts +9 -0
- package/dist/composables/useZoomPan.d.ts +2 -0
- package/dist/context/ChartContext.d.ts +21 -0
- package/dist/context/index.d.ts +4 -0
- package/dist/context/keys.d.ts +52 -0
- package/dist/context/syncKeys.d.ts +5 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.mjs +67 -0
- package/dist/namespace.d.ts +1 -0
- package/dist/namespace.mjs +112 -0
- package/dist/release-date.d.ts +11 -0
- package/dist/types/animation.types.d.ts +38 -0
- package/dist/types/axes.types.d.ts +27 -0
- package/dist/types/axisComponentBase.types.d.ts +5 -0
- package/dist/types/axisGroup.types.d.ts +1 -0
- package/dist/types/bar.types.d.ts +42 -0
- package/dist/types/breadcrumb.types.d.ts +12 -0
- package/dist/types/candlestick.types.d.ts +41 -0
- package/dist/types/canvas.types.d.ts +5 -0
- package/dist/types/caption.types.d.ts +8 -0
- package/dist/types/cartesian.types.d.ts +22 -0
- package/dist/types/chart.types.d.ts +51 -0
- package/dist/types/heatmap.types.d.ts +58 -0
- package/dist/types/index.d.ts +27 -0
- package/dist/types/item.types.d.ts +25 -0
- package/dist/types/keyboard.types.d.ts +24 -0
- package/dist/types/layout.types.d.ts +35 -0
- package/dist/types/legend.types.d.ts +13 -0
- package/dist/types/line.types.d.ts +64 -0
- package/dist/types/pie.types.d.ts +49 -0
- package/dist/types/polar.types.d.ts +63 -0
- package/dist/types/radar.types.d.ts +56 -0
- package/dist/types/responsiveDimensions.types.d.ts +16 -0
- package/dist/types/scatter.types.d.ts +50 -0
- package/dist/types/svg.types.d.ts +44 -0
- package/dist/types/tooltip.types.d.ts +6 -0
- package/dist/types/treemap.types.d.ts +50 -0
- package/dist/types/zoom.types.d.ts +45 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/styles.d.ts +10 -0
- package/package.json +63 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { BarLayerSvg_default } from './chunk-RRHYGSK6.mjs';
|
|
2
|
+
import { BarLayerCanvas_default } from './chunk-MDA22SIZ.mjs';
|
|
3
|
+
import { CartesianRenderer_default } from './chunk-HTZVV6VV.mjs';
|
|
4
|
+
import { registerFamilyRenderer, registerChartLayer, useDatasetAnimationRegistration, useDatasetRegistration, useItemCollector } from './chunk-CQHNYT2V.mjs';
|
|
5
|
+
import { STACKED_CONTEXT_KEY } from './chunk-TEOO4OLV.mjs';
|
|
6
|
+
import { useRendererHint, useChartMethods } from './chunk-HANSF33Z.mjs';
|
|
7
|
+
import { defineComponent, useSlots, computed, inject, onMounted, watch, onUnmounted, renderSlot, createCommentVNode } from 'vue';
|
|
8
|
+
import { resolveAccessor } from '@primeui/chart-core';
|
|
9
|
+
import { getBarAxisHints } from '@primeui/chart-core/series/bar';
|
|
10
|
+
|
|
11
|
+
var barIdCounter = 0;
|
|
12
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
+
__name: "ChartBar",
|
|
14
|
+
props: {
|
|
15
|
+
id: {},
|
|
16
|
+
data: {},
|
|
17
|
+
categoryField: { type: [
|
|
18
|
+
String,
|
|
19
|
+
Function,
|
|
20
|
+
Array
|
|
21
|
+
] },
|
|
22
|
+
valueField: { type: [
|
|
23
|
+
String,
|
|
24
|
+
Function,
|
|
25
|
+
Number,
|
|
26
|
+
null,
|
|
27
|
+
Array
|
|
28
|
+
] },
|
|
29
|
+
name: {},
|
|
30
|
+
color: { type: [
|
|
31
|
+
String,
|
|
32
|
+
Function,
|
|
33
|
+
Array
|
|
34
|
+
] },
|
|
35
|
+
opacity: { type: [
|
|
36
|
+
String,
|
|
37
|
+
Function,
|
|
38
|
+
Number,
|
|
39
|
+
Array
|
|
40
|
+
] },
|
|
41
|
+
hoverColor: { type: [
|
|
42
|
+
String,
|
|
43
|
+
Function,
|
|
44
|
+
Array
|
|
45
|
+
] },
|
|
46
|
+
hoverBorderColor: { type: [
|
|
47
|
+
String,
|
|
48
|
+
Function,
|
|
49
|
+
Array
|
|
50
|
+
] },
|
|
51
|
+
xAxisId: {},
|
|
52
|
+
yAxisId: {},
|
|
53
|
+
order: {},
|
|
54
|
+
stackId: {},
|
|
55
|
+
barGap: {},
|
|
56
|
+
categoryGap: {},
|
|
57
|
+
orientation: {},
|
|
58
|
+
weightField: { type: [
|
|
59
|
+
String,
|
|
60
|
+
Function,
|
|
61
|
+
Number,
|
|
62
|
+
Array
|
|
63
|
+
] },
|
|
64
|
+
renderShape: { type: Function },
|
|
65
|
+
barThickness: {},
|
|
66
|
+
maxBarThickness: {},
|
|
67
|
+
minBarLength: {},
|
|
68
|
+
connectNulls: { type: [Boolean, String] },
|
|
69
|
+
sort: {},
|
|
70
|
+
sortAggregate: {},
|
|
71
|
+
openField: { type: [
|
|
72
|
+
String,
|
|
73
|
+
Function,
|
|
74
|
+
Number,
|
|
75
|
+
Array
|
|
76
|
+
] },
|
|
77
|
+
keyField: {},
|
|
78
|
+
borderColor: { type: [
|
|
79
|
+
String,
|
|
80
|
+
Function,
|
|
81
|
+
Array
|
|
82
|
+
] },
|
|
83
|
+
borderStrokeWidth: { type: [
|
|
84
|
+
String,
|
|
85
|
+
Function,
|
|
86
|
+
Number,
|
|
87
|
+
Array
|
|
88
|
+
] },
|
|
89
|
+
borderDash: { type: [
|
|
90
|
+
Array,
|
|
91
|
+
String,
|
|
92
|
+
Function
|
|
93
|
+
] },
|
|
94
|
+
borderDashOffset: { type: [
|
|
95
|
+
String,
|
|
96
|
+
Function,
|
|
97
|
+
Number,
|
|
98
|
+
Array
|
|
99
|
+
] },
|
|
100
|
+
borderJoinStyle: {},
|
|
101
|
+
borderAlign: {},
|
|
102
|
+
borderRadius: { type: [
|
|
103
|
+
String,
|
|
104
|
+
Function,
|
|
105
|
+
Number,
|
|
106
|
+
Object,
|
|
107
|
+
Array
|
|
108
|
+
] },
|
|
109
|
+
borderSkipped: { type: [
|
|
110
|
+
String,
|
|
111
|
+
Function,
|
|
112
|
+
Boolean,
|
|
113
|
+
Array
|
|
114
|
+
] },
|
|
115
|
+
animations: {}
|
|
116
|
+
},
|
|
117
|
+
setup(__props) {
|
|
118
|
+
useRendererHint("cartesian");
|
|
119
|
+
registerFamilyRenderer("cartesian", CartesianRenderer_default);
|
|
120
|
+
registerChartLayer("bar", {
|
|
121
|
+
family: "cartesian",
|
|
122
|
+
frameKind: "grid",
|
|
123
|
+
layerByMode: {
|
|
124
|
+
svg: BarLayerSvg_default,
|
|
125
|
+
canvas: BarLayerCanvas_default
|
|
126
|
+
},
|
|
127
|
+
axisHints: { getAxisHints: getBarAxisHints }
|
|
128
|
+
});
|
|
129
|
+
const props = __props;
|
|
130
|
+
function generateBarId() {
|
|
131
|
+
return `bar-auto-${++barIdCounter}`;
|
|
132
|
+
}
|
|
133
|
+
const slots = useSlots();
|
|
134
|
+
const hasChildren = computed(() => !!slots.default);
|
|
135
|
+
const autoId = props.id || generateBarId();
|
|
136
|
+
const stackedContext = inject(STACKED_CONTEXT_KEY, null);
|
|
137
|
+
let autoOrder;
|
|
138
|
+
if (stackedContext && props.order === void 0) {
|
|
139
|
+
autoOrder = stackedContext.getNextOrder();
|
|
140
|
+
}
|
|
141
|
+
const effectiveOrder = props.order ?? autoOrder;
|
|
142
|
+
const stackId = stackedContext?.stackId;
|
|
143
|
+
useDatasetAnimationRegistration(() => autoId, () => props.animations);
|
|
144
|
+
if (!hasChildren.value) {
|
|
145
|
+
const datasetId = computed(() => autoId);
|
|
146
|
+
const datasetProps = computed(() => ({
|
|
147
|
+
id: autoId,
|
|
148
|
+
data: props.data,
|
|
149
|
+
categoryField: props.categoryField,
|
|
150
|
+
valueField: props.valueField,
|
|
151
|
+
color: props.color,
|
|
152
|
+
name: props.name,
|
|
153
|
+
order: effectiveOrder,
|
|
154
|
+
stackId,
|
|
155
|
+
orientation: props.orientation,
|
|
156
|
+
xAxisId: props.xAxisId,
|
|
157
|
+
yAxisId: props.yAxisId,
|
|
158
|
+
barGap: props.barGap,
|
|
159
|
+
categoryGap: props.categoryGap,
|
|
160
|
+
barThickness: props.barThickness,
|
|
161
|
+
maxBarThickness: props.maxBarThickness,
|
|
162
|
+
minBarLength: props.minBarLength,
|
|
163
|
+
borderRadius: props.borderRadius,
|
|
164
|
+
borderColor: props.borderColor,
|
|
165
|
+
borderStrokeWidth: props.borderStrokeWidth,
|
|
166
|
+
borderAlign: props.borderAlign,
|
|
167
|
+
borderDash: props.borderDash,
|
|
168
|
+
borderDashOffset: props.borderDashOffset,
|
|
169
|
+
borderJoinStyle: props.borderJoinStyle,
|
|
170
|
+
borderSkipped: props.borderSkipped,
|
|
171
|
+
opacity: props.opacity,
|
|
172
|
+
hoverColor: props.hoverColor,
|
|
173
|
+
hoverBorderColor: props.hoverBorderColor,
|
|
174
|
+
renderShape: props.renderShape,
|
|
175
|
+
openField: props.openField,
|
|
176
|
+
weightField: props.weightField,
|
|
177
|
+
sort: props.sort,
|
|
178
|
+
sortAggregate: props.sortAggregate,
|
|
179
|
+
connectNulls: props.connectNulls,
|
|
180
|
+
keyField: props.keyField
|
|
181
|
+
}));
|
|
182
|
+
useDatasetRegistration({
|
|
183
|
+
id: datasetId,
|
|
184
|
+
type: "bar",
|
|
185
|
+
props: datasetProps
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
if (hasChildren.value) {
|
|
189
|
+
let buildSynthesizedProps2 = function() {
|
|
190
|
+
const items = getItems();
|
|
191
|
+
const p = {
|
|
192
|
+
id: autoId,
|
|
193
|
+
data: items,
|
|
194
|
+
categoryField: (ctx) => ctx.datum.label ?? "",
|
|
195
|
+
valueField: (ctx) => ctx.datum.value,
|
|
196
|
+
color: ((ctx) => ctx.datum.color ?? resolveAccessor(props.color, ctx)),
|
|
197
|
+
borderRadius: (ctx) => ctx.datum.borderRadius,
|
|
198
|
+
borderColor: (ctx) => ctx.datum.borderColor,
|
|
199
|
+
borderStrokeWidth: (ctx) => ctx.datum.borderStrokeWidth,
|
|
200
|
+
name: props.name,
|
|
201
|
+
orientation: props.orientation,
|
|
202
|
+
xAxisId: props.xAxisId,
|
|
203
|
+
yAxisId: props.yAxisId,
|
|
204
|
+
order: effectiveOrder,
|
|
205
|
+
stackId,
|
|
206
|
+
barGap: props.barGap,
|
|
207
|
+
categoryGap: props.categoryGap,
|
|
208
|
+
renderShape: props.renderShape,
|
|
209
|
+
barThickness: props.barThickness,
|
|
210
|
+
maxBarThickness: props.maxBarThickness,
|
|
211
|
+
minBarLength: props.minBarLength,
|
|
212
|
+
borderAlign: props.borderAlign,
|
|
213
|
+
borderDash: props.borderDash,
|
|
214
|
+
borderDashOffset: props.borderDashOffset,
|
|
215
|
+
borderJoinStyle: props.borderJoinStyle,
|
|
216
|
+
borderSkipped: props.borderSkipped,
|
|
217
|
+
openField: (ctx) => ctx.datum.open,
|
|
218
|
+
weightField: props.weightField,
|
|
219
|
+
sort: props.sort,
|
|
220
|
+
sortAggregate: props.sortAggregate,
|
|
221
|
+
connectNulls: props.connectNulls,
|
|
222
|
+
keyField: props.keyField
|
|
223
|
+
};
|
|
224
|
+
return p;
|
|
225
|
+
};
|
|
226
|
+
const methods = useChartMethods();
|
|
227
|
+
const { getItems } = useItemCollector();
|
|
228
|
+
let isRegistered = false;
|
|
229
|
+
onMounted(() => {
|
|
230
|
+
methods.registerDataset(autoId, "bar", buildSynthesizedProps2());
|
|
231
|
+
isRegistered = true;
|
|
232
|
+
});
|
|
233
|
+
watch([
|
|
234
|
+
() => props.name,
|
|
235
|
+
() => props.color,
|
|
236
|
+
() => props.orientation,
|
|
237
|
+
() => props.order,
|
|
238
|
+
() => props.barGap,
|
|
239
|
+
() => props.categoryGap,
|
|
240
|
+
() => props.barThickness,
|
|
241
|
+
() => props.maxBarThickness,
|
|
242
|
+
() => props.minBarLength,
|
|
243
|
+
() => props.connectNulls,
|
|
244
|
+
() => props.borderRadius,
|
|
245
|
+
() => props.borderColor,
|
|
246
|
+
() => props.borderStrokeWidth,
|
|
247
|
+
() => props.borderAlign,
|
|
248
|
+
() => props.borderDash,
|
|
249
|
+
() => props.borderDashOffset,
|
|
250
|
+
() => props.borderJoinStyle,
|
|
251
|
+
() => props.borderSkipped,
|
|
252
|
+
() => props.renderShape,
|
|
253
|
+
() => props.xAxisId,
|
|
254
|
+
() => props.yAxisId,
|
|
255
|
+
() => props.openField,
|
|
256
|
+
() => props.weightField,
|
|
257
|
+
() => props.sort,
|
|
258
|
+
() => props.sortAggregate,
|
|
259
|
+
() => props.keyField
|
|
260
|
+
], () => {
|
|
261
|
+
if (!isRegistered) return;
|
|
262
|
+
methods.updateDataset(autoId, buildSynthesizedProps2());
|
|
263
|
+
}, { flush: "post" });
|
|
264
|
+
onUnmounted(() => {
|
|
265
|
+
methods.unregisterDataset(autoId);
|
|
266
|
+
isRegistered = false;
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
return (_ctx, _cache) => {
|
|
270
|
+
return hasChildren.value ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true);
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
var ChartBar_default = _sfc_main;
|
|
275
|
+
|
|
276
|
+
export { ChartBar_default };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { ITEM_COLLECTOR_KEY } from './chunk-FZ3PZ66C.mjs';
|
|
2
|
+
import { defineComponent, inject, onMounted, watch, onUnmounted } from 'vue';
|
|
3
|
+
|
|
4
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "ChartItem",
|
|
6
|
+
props: {
|
|
7
|
+
borderRadius: {},
|
|
8
|
+
y: {},
|
|
9
|
+
value: {},
|
|
10
|
+
label: {},
|
|
11
|
+
color: {},
|
|
12
|
+
borderColor: {},
|
|
13
|
+
borderStrokeWidth: {},
|
|
14
|
+
x: {},
|
|
15
|
+
size: {},
|
|
16
|
+
secondaryLabel: {},
|
|
17
|
+
opacity: {},
|
|
18
|
+
time: {},
|
|
19
|
+
open: {},
|
|
20
|
+
high: {},
|
|
21
|
+
low: {},
|
|
22
|
+
close: {},
|
|
23
|
+
row: {},
|
|
24
|
+
column: {},
|
|
25
|
+
nodeId: {},
|
|
26
|
+
parentId: {}
|
|
27
|
+
},
|
|
28
|
+
setup(__props) {
|
|
29
|
+
const props = __props;
|
|
30
|
+
const collector = inject(ITEM_COLLECTOR_KEY);
|
|
31
|
+
if (!collector) {
|
|
32
|
+
throw new Error("ChartItem must be used within a chart component (e.g., <ChartPie>, <ChartBar>)");
|
|
33
|
+
}
|
|
34
|
+
const itemIndex = collector.getNextIndex();
|
|
35
|
+
function buildItemProps() {
|
|
36
|
+
return {
|
|
37
|
+
value: props.value,
|
|
38
|
+
label: props.label,
|
|
39
|
+
color: props.color,
|
|
40
|
+
borderRadius: props.borderRadius,
|
|
41
|
+
borderColor: props.borderColor,
|
|
42
|
+
borderStrokeWidth: props.borderStrokeWidth,
|
|
43
|
+
x: props.x,
|
|
44
|
+
y: props.y,
|
|
45
|
+
time: props.time,
|
|
46
|
+
open: props.open,
|
|
47
|
+
high: props.high,
|
|
48
|
+
low: props.low,
|
|
49
|
+
close: props.close,
|
|
50
|
+
row: props.row,
|
|
51
|
+
column: props.column,
|
|
52
|
+
nodeId: props.nodeId,
|
|
53
|
+
parentId: props.parentId
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
onMounted(() => {
|
|
57
|
+
collector.registerItem(itemIndex, buildItemProps());
|
|
58
|
+
});
|
|
59
|
+
watch(() => buildItemProps(), (newProps) => {
|
|
60
|
+
collector.registerItem(itemIndex, newProps);
|
|
61
|
+
});
|
|
62
|
+
onUnmounted(() => {
|
|
63
|
+
collector.unregisterItem(itemIndex);
|
|
64
|
+
});
|
|
65
|
+
return (_ctx, _cache) => {
|
|
66
|
+
return null;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
var ChartItem_default = _sfc_main;
|
|
71
|
+
|
|
72
|
+
export { ChartItem_default };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useBarLayer, useBarRendererBase } from './chunk-YRKAI2R2.mjs';
|
|
2
|
+
import { defineComponent, unref, openBlock, createElementBlock, createCommentVNode } from 'vue';
|
|
3
|
+
import { createBarRendererCanvas } from '@primeui/chart-core/series/bar/controller-canvas';
|
|
4
|
+
|
|
5
|
+
function useBarRenderer(options) {
|
|
6
|
+
return useBarRendererBase(createBarRendererCanvas(), options);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// src/components/renderers/layers/BarLayerCanvas.vue
|
|
10
|
+
var _hoisted_1 = ["clip-path"];
|
|
11
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "BarLayerCanvas",
|
|
13
|
+
setup(__props) {
|
|
14
|
+
const { bar, methods, frame } = useBarLayer(useBarRenderer);
|
|
15
|
+
return (_ctx, _cache) => {
|
|
16
|
+
return unref(methods).renderer === "svg" && unref(bar).hasBarData.value ? (openBlock(), createElementBlock("g", {
|
|
17
|
+
key: 0,
|
|
18
|
+
ref: (el) => {
|
|
19
|
+
unref(bar).groupRef.value = el;
|
|
20
|
+
},
|
|
21
|
+
class: "bar-chart",
|
|
22
|
+
"clip-path": unref(frame).layoutData.value?.cartesianArea ? `url(#${unref(frame).plotClipId})` : void 0
|
|
23
|
+
}, null, 8, _hoisted_1)) : createCommentVNode("", true);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
var BarLayerCanvas_default = _sfc_main;
|
|
28
|
+
|
|
29
|
+
export { BarLayerCanvas_default };
|