@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,218 @@
|
|
|
1
|
+
import { HeatmapLayer_default } from './chunk-54DLUFIA.mjs';
|
|
2
|
+
import { CartesianRenderer_default } from './chunk-HTZVV6VV.mjs';
|
|
3
|
+
import { registerFamilyRenderer, registerChartLayer, useDatasetAnimationRegistration, useDatasetRegistration, useItemCollector } from './chunk-CQHNYT2V.mjs';
|
|
4
|
+
import { useRendererHint, useChartMethods } from './chunk-HANSF33Z.mjs';
|
|
5
|
+
import { defineComponent, useSlots, computed, onMounted, watch, onUnmounted, renderSlot, createCommentVNode } from 'vue';
|
|
6
|
+
import { heatmapRenderer } from '@primeui/chart-core';
|
|
7
|
+
|
|
8
|
+
var heatmapIdCounter = 0;
|
|
9
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
+
__name: "ChartHeatmap",
|
|
11
|
+
props: {
|
|
12
|
+
id: {},
|
|
13
|
+
data: {},
|
|
14
|
+
valueField: {},
|
|
15
|
+
name: {},
|
|
16
|
+
columnField: {},
|
|
17
|
+
rowField: {},
|
|
18
|
+
color: {},
|
|
19
|
+
colorScale: {},
|
|
20
|
+
colorRange: {},
|
|
21
|
+
nullColor: {},
|
|
22
|
+
spacing: {},
|
|
23
|
+
borderRadius: {},
|
|
24
|
+
yAxisId: {},
|
|
25
|
+
min: {},
|
|
26
|
+
max: {},
|
|
27
|
+
showLabels: { type: Boolean },
|
|
28
|
+
labelFormat: { type: Function },
|
|
29
|
+
labelColor: { type: [
|
|
30
|
+
String,
|
|
31
|
+
Function,
|
|
32
|
+
Array
|
|
33
|
+
] },
|
|
34
|
+
hoverColor: { type: [
|
|
35
|
+
String,
|
|
36
|
+
Function,
|
|
37
|
+
Array
|
|
38
|
+
] },
|
|
39
|
+
hoverBorderColor: { type: [
|
|
40
|
+
String,
|
|
41
|
+
Function,
|
|
42
|
+
Array
|
|
43
|
+
] },
|
|
44
|
+
showEmptyCells: { type: Boolean },
|
|
45
|
+
opacity: { type: [
|
|
46
|
+
String,
|
|
47
|
+
Function,
|
|
48
|
+
Number,
|
|
49
|
+
Array
|
|
50
|
+
] },
|
|
51
|
+
order: {},
|
|
52
|
+
renderContent: { type: Function },
|
|
53
|
+
keyField: {},
|
|
54
|
+
borderColor: { type: [
|
|
55
|
+
String,
|
|
56
|
+
Function,
|
|
57
|
+
Array
|
|
58
|
+
] },
|
|
59
|
+
borderStrokeWidth: { type: [
|
|
60
|
+
String,
|
|
61
|
+
Function,
|
|
62
|
+
Number,
|
|
63
|
+
Array
|
|
64
|
+
] },
|
|
65
|
+
borderDash: { type: [
|
|
66
|
+
Array,
|
|
67
|
+
String,
|
|
68
|
+
Function
|
|
69
|
+
] },
|
|
70
|
+
borderDashOffset: { type: [
|
|
71
|
+
String,
|
|
72
|
+
Function,
|
|
73
|
+
Number,
|
|
74
|
+
Array
|
|
75
|
+
] },
|
|
76
|
+
borderJoinStyle: {},
|
|
77
|
+
borderAlign: {},
|
|
78
|
+
borderSkipped: { type: [
|
|
79
|
+
String,
|
|
80
|
+
Function,
|
|
81
|
+
Boolean,
|
|
82
|
+
Array
|
|
83
|
+
] },
|
|
84
|
+
animations: {}
|
|
85
|
+
},
|
|
86
|
+
setup(__props) {
|
|
87
|
+
useRendererHint("heatmap");
|
|
88
|
+
registerFamilyRenderer("cartesian", CartesianRenderer_default);
|
|
89
|
+
registerChartLayer("heatmap", {
|
|
90
|
+
family: "cartesian",
|
|
91
|
+
frameKind: null,
|
|
92
|
+
layer: HeatmapLayer_default,
|
|
93
|
+
axisHints: heatmapRenderer
|
|
94
|
+
});
|
|
95
|
+
const props = __props;
|
|
96
|
+
function generateHeatmapId() {
|
|
97
|
+
return `heatmap-auto-${++heatmapIdCounter}`;
|
|
98
|
+
}
|
|
99
|
+
const slots = useSlots();
|
|
100
|
+
const hasChildren = computed(() => !!slots.default);
|
|
101
|
+
const autoId = props.id || generateHeatmapId();
|
|
102
|
+
useDatasetAnimationRegistration(() => autoId, () => props.animations);
|
|
103
|
+
if (!hasChildren.value) {
|
|
104
|
+
const datasetId = computed(() => autoId);
|
|
105
|
+
const datasetProps = computed(() => ({
|
|
106
|
+
id: autoId,
|
|
107
|
+
data: props.data,
|
|
108
|
+
columnField: props.columnField,
|
|
109
|
+
rowField: props.rowField,
|
|
110
|
+
valueField: props.valueField,
|
|
111
|
+
name: props.name,
|
|
112
|
+
color: props.color,
|
|
113
|
+
colorScale: props.colorScale,
|
|
114
|
+
colorRange: props.colorRange,
|
|
115
|
+
nullColor: props.nullColor,
|
|
116
|
+
spacing: props.spacing,
|
|
117
|
+
borderRadius: props.borderRadius,
|
|
118
|
+
borderColor: props.borderColor,
|
|
119
|
+
borderStrokeWidth: props.borderStrokeWidth,
|
|
120
|
+
borderDash: props.borderDash,
|
|
121
|
+
borderDashOffset: props.borderDashOffset,
|
|
122
|
+
borderJoinStyle: props.borderJoinStyle,
|
|
123
|
+
borderAlign: props.borderAlign,
|
|
124
|
+
borderSkipped: props.borderSkipped,
|
|
125
|
+
yAxisId: props.yAxisId,
|
|
126
|
+
min: props.min,
|
|
127
|
+
max: props.max,
|
|
128
|
+
showLabels: props.showLabels,
|
|
129
|
+
labelFormat: props.labelFormat,
|
|
130
|
+
labelColor: props.labelColor,
|
|
131
|
+
showEmptyCells: props.showEmptyCells,
|
|
132
|
+
opacity: props.opacity,
|
|
133
|
+
renderContent: props.renderContent,
|
|
134
|
+
order: props.order,
|
|
135
|
+
keyField: props.keyField
|
|
136
|
+
}));
|
|
137
|
+
useDatasetRegistration({
|
|
138
|
+
id: datasetId,
|
|
139
|
+
type: "heatmap",
|
|
140
|
+
props: datasetProps
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
if (hasChildren.value) {
|
|
144
|
+
let buildSynthesizedProps2 = function() {
|
|
145
|
+
const items = getItems();
|
|
146
|
+
return {
|
|
147
|
+
id: autoId,
|
|
148
|
+
data: items,
|
|
149
|
+
columnField: (ctx) => ctx.datum.column ?? "",
|
|
150
|
+
rowField: (ctx) => ctx.datum.row ?? "",
|
|
151
|
+
valueField: (ctx) => ctx.datum.value,
|
|
152
|
+
name: props.name,
|
|
153
|
+
color: props.color,
|
|
154
|
+
colorScale: props.colorScale,
|
|
155
|
+
colorRange: props.colorRange,
|
|
156
|
+
nullColor: props.nullColor,
|
|
157
|
+
spacing: props.spacing,
|
|
158
|
+
borderRadius: props.borderRadius,
|
|
159
|
+
borderColor: props.borderColor,
|
|
160
|
+
borderStrokeWidth: props.borderStrokeWidth,
|
|
161
|
+
borderDash: props.borderDash,
|
|
162
|
+
borderDashOffset: props.borderDashOffset,
|
|
163
|
+
borderJoinStyle: props.borderJoinStyle,
|
|
164
|
+
borderAlign: props.borderAlign,
|
|
165
|
+
borderSkipped: props.borderSkipped,
|
|
166
|
+
yAxisId: props.yAxisId,
|
|
167
|
+
min: props.min,
|
|
168
|
+
max: props.max,
|
|
169
|
+
showLabels: props.showLabels,
|
|
170
|
+
labelFormat: props.labelFormat,
|
|
171
|
+
labelColor: props.labelColor,
|
|
172
|
+
showEmptyCells: props.showEmptyCells,
|
|
173
|
+
opacity: props.opacity,
|
|
174
|
+
renderContent: props.renderContent,
|
|
175
|
+
order: props.order,
|
|
176
|
+
keyField: props.keyField
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
const methods = useChartMethods();
|
|
180
|
+
const { getItems } = useItemCollector();
|
|
181
|
+
let isRegistered = false;
|
|
182
|
+
onMounted(() => {
|
|
183
|
+
methods.registerDataset(autoId, "heatmap", buildSynthesizedProps2());
|
|
184
|
+
isRegistered = true;
|
|
185
|
+
});
|
|
186
|
+
watch([
|
|
187
|
+
() => props.name,
|
|
188
|
+
() => props.color,
|
|
189
|
+
() => props.opacity,
|
|
190
|
+
() => props.colorScale,
|
|
191
|
+
() => props.colorRange,
|
|
192
|
+
() => props.order,
|
|
193
|
+
() => props.renderContent,
|
|
194
|
+
() => props.borderColor,
|
|
195
|
+
() => props.borderStrokeWidth,
|
|
196
|
+
() => props.borderDash,
|
|
197
|
+
() => props.borderDashOffset,
|
|
198
|
+
() => props.borderJoinStyle,
|
|
199
|
+
() => props.borderAlign,
|
|
200
|
+
() => props.borderRadius,
|
|
201
|
+
() => props.borderSkipped
|
|
202
|
+
], () => {
|
|
203
|
+
if (!isRegistered) return;
|
|
204
|
+
methods.updateDataset(autoId, buildSynthesizedProps2());
|
|
205
|
+
}, { flush: "post" });
|
|
206
|
+
onUnmounted(() => {
|
|
207
|
+
methods.unregisterDataset(autoId);
|
|
208
|
+
isRegistered = false;
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
return (_ctx, _cache) => {
|
|
212
|
+
return hasChildren.value ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true);
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
var ChartHeatmap_default = _sfc_main;
|
|
217
|
+
|
|
218
|
+
export { ChartHeatmap_default };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { useRadarRenderer, 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, resolveDynamicComponent, createCommentVNode } from 'vue';
|
|
4
|
+
import { buildMarkerRenderItems, DEFAULT_HOVER_DIM_OPACITY } from '@primeui/chart-core';
|
|
5
|
+
|
|
6
|
+
var _hoisted_1 = { class: "radar-markers" };
|
|
7
|
+
var _hoisted_2 = ["transform", "opacity"];
|
|
8
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "RadarLayer",
|
|
10
|
+
props: {
|
|
11
|
+
chartArea: {},
|
|
12
|
+
width: {},
|
|
13
|
+
height: {},
|
|
14
|
+
canvasEl: {},
|
|
15
|
+
adaptiveDataLabelFontSize: {},
|
|
16
|
+
sharedContext: {},
|
|
17
|
+
requestRedraw: { type: Function }
|
|
18
|
+
},
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const methods = useChartMethods();
|
|
22
|
+
const state = useChartState();
|
|
23
|
+
const hoverCtx = useChartHover();
|
|
24
|
+
const radar = useRadarRenderer({
|
|
25
|
+
chartArea: computed(() => props.chartArea),
|
|
26
|
+
renderer: methods.renderer,
|
|
27
|
+
canvasEl: toRef(props, "canvasEl"),
|
|
28
|
+
datasets: computed(() => state.value.datasets),
|
|
29
|
+
features: computed(() => state.value.features),
|
|
30
|
+
hover: computed(() => hoverCtx.value.hover),
|
|
31
|
+
datasetVisibility: computed(() => state.value.datasetVisibility),
|
|
32
|
+
globalFont: methods.font,
|
|
33
|
+
adaptiveDataLabelFontSize: computed(() => props.adaptiveDataLabelFontSize),
|
|
34
|
+
chartId: methods.chartId,
|
|
35
|
+
width: computed(() => props.width),
|
|
36
|
+
height: computed(() => props.height),
|
|
37
|
+
sharedContext: computed(() => props.sharedContext),
|
|
38
|
+
requestRedraw: () => props.requestRedraw(),
|
|
39
|
+
dir: computed(() => methods.dir),
|
|
40
|
+
xAxes: computed(() => state.value.axes.x),
|
|
41
|
+
yAxes: computed(() => state.value.axes.y),
|
|
42
|
+
theme: computed(() => methods.theme)
|
|
43
|
+
});
|
|
44
|
+
useRadialFrameRegistration({
|
|
45
|
+
type: "radar",
|
|
46
|
+
layout: radar.layout,
|
|
47
|
+
renderCanvasContent: radar.renderCanvasContent,
|
|
48
|
+
hitTest: (x, y) => radar.hitTest(x, y),
|
|
49
|
+
findAllNearest: (x, y) => radar.findAllNearest(x, y),
|
|
50
|
+
getCenter: () => radar.markerData.value?.layout?.center ?? null,
|
|
51
|
+
getPointPosition: (datasetId, index) => {
|
|
52
|
+
if (!radar.markerData.value) return null;
|
|
53
|
+
const { layout } = radar.markerData.value;
|
|
54
|
+
for (const sd of layout.series) {
|
|
55
|
+
if (sd.id === datasetId) {
|
|
56
|
+
const pt = sd.points[index];
|
|
57
|
+
if (pt) {
|
|
58
|
+
const r = 6;
|
|
59
|
+
return {
|
|
60
|
+
x: pt.x - r,
|
|
61
|
+
y: pt.y - r,
|
|
62
|
+
width: r * 2,
|
|
63
|
+
height: r * 2,
|
|
64
|
+
shape: "circle"
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
},
|
|
71
|
+
applyPropertyAnimations: (store) => radar.applyPropertyAnimations(store),
|
|
72
|
+
renderFrameCycle: () => radar.renderFrameCycle()
|
|
73
|
+
});
|
|
74
|
+
function buildRadarMarkerEntries() {
|
|
75
|
+
if (!radar.markerData.value) return [];
|
|
76
|
+
const { layout, entries: radarEntries } = radar.markerData.value;
|
|
77
|
+
const result = [];
|
|
78
|
+
const hc = state.value.features.get("hover")?.props;
|
|
79
|
+
for (let si = 0; si < layout.series.length; si++) {
|
|
80
|
+
const sd = layout.series[si];
|
|
81
|
+
const ds = radarEntries[si];
|
|
82
|
+
if (!ds || !sd.visible) continue;
|
|
83
|
+
const dsProps = ds.props;
|
|
84
|
+
const renderMarkerFn = dsProps.renderMarker;
|
|
85
|
+
if (!renderMarkerFn || dsProps.showMarkers === false) continue;
|
|
86
|
+
result.push({
|
|
87
|
+
dsId: ds.id,
|
|
88
|
+
renderMarker: renderMarkerFn,
|
|
89
|
+
visiblePoints: sd.points.map((pt, pi) => ({
|
|
90
|
+
x: pt.x,
|
|
91
|
+
y: pt.y,
|
|
92
|
+
dataIndex: pi,
|
|
93
|
+
value: pt.value,
|
|
94
|
+
category: layout.categories[pt.categoryIndex]
|
|
95
|
+
})),
|
|
96
|
+
data: dsProps.data,
|
|
97
|
+
color: sd.color ?? "",
|
|
98
|
+
markerSize: typeof dsProps.markerSize === "number" ? dsProps.markerSize : 4,
|
|
99
|
+
effects: hc ? { dimOpacity: hc.dimOpacity ?? methods.theme?.dimOpacity ?? DEFAULT_HOVER_DIM_OPACITY } : void 0
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return result;
|
|
103
|
+
}
|
|
104
|
+
const radarMarkerRenderItems = computed(() => {
|
|
105
|
+
if (methods.renderer !== "svg") return [];
|
|
106
|
+
return buildMarkerRenderItems(buildRadarMarkerEntries(), hoverCtx.value.hover);
|
|
107
|
+
});
|
|
108
|
+
return (_ctx, _cache) => {
|
|
109
|
+
return unref(methods).renderer === "svg" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("g", { ref: (el) => {
|
|
110
|
+
unref(radar).groupRef.value = el;
|
|
111
|
+
} }, null, 512), createElementVNode("g", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList(radarMarkerRenderItems.value, (item) => {
|
|
112
|
+
return openBlock(), createElementBlock("g", {
|
|
113
|
+
key: item.key,
|
|
114
|
+
transform: `translate(${item.x}, ${item.y})`,
|
|
115
|
+
opacity: item.opacity !== 1 ? item.opacity : void 0
|
|
116
|
+
}, [(openBlock(), createBlock(resolveDynamicComponent(() => item.renderMarker(item.context))))], 8, _hoisted_2);
|
|
117
|
+
}), 128))])], 64)) : createCommentVNode("", true);
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
var RadarLayer_default = _sfc_main;
|
|
122
|
+
|
|
123
|
+
export { RadarLayer_default };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { useCartesianFrame, useScatterRenderer, 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: "ScatterLayer",
|
|
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 decimationFeature = computed(() => features.value.get("decimation")?.props);
|
|
15
|
+
const scatter = useScatterRenderer({
|
|
16
|
+
chartArea: frame.cartesianArea,
|
|
17
|
+
renderer: methods.renderer,
|
|
18
|
+
canvasEl: frame.canvasEl,
|
|
19
|
+
datasets: computed(() => state.value.datasets),
|
|
20
|
+
datasetVisibility: computed(() => state.value.datasetVisibility),
|
|
21
|
+
hover: computed(() => hoverCtx.value.hover),
|
|
22
|
+
hoverConfig: frame.hoverConfig,
|
|
23
|
+
chartId: methods.chartId,
|
|
24
|
+
width: frame.width,
|
|
25
|
+
height: frame.height,
|
|
26
|
+
scatterXScales: computed(() => frame.layoutData.value?.scatterXScales),
|
|
27
|
+
valueScales: computed(() => frame.layoutData.value?.valueScales),
|
|
28
|
+
firstCategoryAxisId: computed(() => frame.layoutData.value?.scatterXScales?.keys().next().value ?? "default"),
|
|
29
|
+
firstValueAxisId: computed(() => frame.layoutData.value?.valueScales?.keys().next().value ?? "default"),
|
|
30
|
+
scatterStackBasesMap: computed(() => frame.layoutData.value?.scatterStackBasesMap),
|
|
31
|
+
compositor: frame.compositor,
|
|
32
|
+
decimationConfig: decimationFeature,
|
|
33
|
+
zoomState: frame.zoomState,
|
|
34
|
+
orientation: computed(() => frame.layoutData.value?.orientation ?? "vertical"),
|
|
35
|
+
labelConfig: frame.labelConfig,
|
|
36
|
+
features,
|
|
37
|
+
dir: computed(() => methods.dir),
|
|
38
|
+
theme: computed(() => methods.theme)
|
|
39
|
+
});
|
|
40
|
+
useCartesianFrameRegistration({
|
|
41
|
+
type: "scatter",
|
|
42
|
+
boostActive: scatter.boostActive,
|
|
43
|
+
markerOverlays: scatter.markerOverlays,
|
|
44
|
+
applyPropertyAnimations: (store) => scatter.applyPropertyAnimations(store),
|
|
45
|
+
renderFrameCycle: () => scatter.renderFrameCycle(),
|
|
46
|
+
syncWithAnimatedScale: (categoryScale, valueScales, valueXScales) => scatter.syncWithAnimatedScale(categoryScale, valueScales, valueXScales),
|
|
47
|
+
hitTest: (x, y) => {
|
|
48
|
+
const scHit = scatter.hitTest(x, y);
|
|
49
|
+
if (!scHit) return null;
|
|
50
|
+
return {
|
|
51
|
+
datasetId: scHit.datasetId,
|
|
52
|
+
index: scHit.index,
|
|
53
|
+
label: scHit.label,
|
|
54
|
+
value: scHit.yValue,
|
|
55
|
+
xValue: scHit.xValue,
|
|
56
|
+
yValue: scHit.yValue,
|
|
57
|
+
...scHit.bubbleValue != null ? { bubbleValue: scHit.bubbleValue } : {},
|
|
58
|
+
color: scHit.color,
|
|
59
|
+
snapX: scHit.x,
|
|
60
|
+
snapY: scHit.y,
|
|
61
|
+
formattedValue: "",
|
|
62
|
+
cursorFormattedValue: ""
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
getPointPosition: (datasetId, index) => {
|
|
66
|
+
const scatterLayout = scatter.scatterLayouts.get(datasetId);
|
|
67
|
+
if (scatterLayout) {
|
|
68
|
+
const found = scatterLayout.visiblePoints?.find((p) => p.dataIndex === index);
|
|
69
|
+
if (found) {
|
|
70
|
+
const r = found.radius || 6;
|
|
71
|
+
return {
|
|
72
|
+
x: found.px - r,
|
|
73
|
+
y: found.py - r,
|
|
74
|
+
width: r * 2,
|
|
75
|
+
height: r * 2,
|
|
76
|
+
shape: "circle"
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
return (_ctx, _cache) => {
|
|
84
|
+
return unref(methods).renderer === "svg" && unref(scatter).hasScatterData.value ? (openBlock(), createElementBlock("g", {
|
|
85
|
+
key: 0,
|
|
86
|
+
ref: (el) => {
|
|
87
|
+
unref(scatter).groupRef.value = el;
|
|
88
|
+
},
|
|
89
|
+
class: "scatter-chart",
|
|
90
|
+
"clip-path": unref(frame).layoutData.value?.cartesianArea ? `url(#${unref(frame).plotClipId})` : void 0
|
|
91
|
+
}, null, 8, _hoisted_1)) : createCommentVNode("", true);
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
var ScatterLayer_default = _sfc_main;
|
|
96
|
+
|
|
97
|
+
export { ScatterLayer_default };
|