@primeui/vue-chart 0.0.1-alpha.1 → 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CartesianRenderer.rich.spec.d.ts +1 -0
- package/dist/Chart.features.spec.d.ts +1 -0
- package/dist/Chart.interactions.spec.d.ts +1 -0
- package/dist/Chart.pointEvents.spec.d.ts +1 -0
- package/dist/Chart.vue.d.ts +5 -1
- package/dist/ChartCanvas.mjs +15 -14
- package/dist/ChartCanvas.pipeline.spec.d.ts +1 -0
- package/dist/ChartCanvas.vue.d.ts +8 -4
- package/dist/ChartGroup.sync.spec.d.ts +1 -0
- package/dist/ChartLegend.spec.d.ts +1 -0
- package/dist/ChartSvg.containers.spec.d.ts +1 -0
- package/dist/ChartSvg.declarative.spec.d.ts +1 -0
- package/dist/ChartSvg.export-menu.spec.d.ts +1 -0
- package/dist/ChartSvg.hover.spec.d.ts +1 -0
- package/dist/ChartSvg.mjs +15 -14
- package/dist/ChartSvg.renderers.spec.d.ts +1 -0
- package/dist/ChartSvg.vue.d.ts +8 -4
- package/dist/ColorLegendRenderer.branches.spec.d.ts +1 -0
- package/dist/ColorLegendRenderer.spec.d.ts +1 -0
- package/dist/LegendRenderer.spec.d.ts +1 -0
- package/dist/NavigatorRenderer.spec.d.ts +1 -0
- package/dist/RadialHeatmap.rich.spec.d.ts +1 -0
- package/dist/TooltipRenderer.spec.d.ts +1 -0
- package/dist/{chunk-6S4JMPKC.mjs → chunks/chunk-2NZ3PUWW.mjs} +2 -2
- package/dist/{chunk-RRHYGSK6.mjs → chunks/chunk-2TOEQNJ6.mjs} +2 -2
- package/dist/{chunk-GX2MK6VT.mjs → chunks/chunk-36DHPBYP.mjs} +25 -23
- package/dist/{chunk-RSTIA3KM.mjs → chunks/chunk-3DINEX6C.mjs} +2 -1
- package/dist/{chunk-PJVOZSPF.mjs → chunks/chunk-3JA5JAHF.mjs} +2 -2
- package/dist/{chunk-KOWFD2AE.mjs → chunks/chunk-3PJULFR5.mjs} +22 -21
- package/dist/chunks/chunk-3X27K5XC.mjs +236 -0
- package/dist/chunks/chunk-3XOLEGDL.mjs +182 -0
- package/dist/{chunk-PSSXPTLQ.mjs → chunks/chunk-4SLSYRNY.mjs} +6 -6
- package/dist/chunks/chunk-4VWFG6HM.mjs +86 -0
- package/dist/{chunk-44BAFHPK.mjs → chunks/chunk-5HLEKAY2.mjs} +10 -5
- package/dist/{chunk-4NJ2PSHV.mjs → chunks/chunk-5ZLVNQ2L.mjs} +7 -4
- package/dist/{chunk-O6L3PNFC.mjs → chunks/chunk-6Z4MZIJI.mjs} +2 -2
- package/dist/chunks/chunk-7EZEZMGG.mjs +22 -0
- package/dist/chunks/chunk-ADAGGXFG.mjs +166 -0
- package/dist/{chunk-YRKAI2R2.mjs → chunks/chunk-AKMQHU5T.mjs} +15 -14
- package/dist/{chunk-ZRCOVQQM.mjs → chunks/chunk-BSROML7P.mjs} +2 -2
- package/dist/{chunk-WYV2MHP6.mjs → chunks/chunk-CGFPDWB4.mjs} +1 -1
- package/dist/{chunk-4CRHCZV3.mjs → chunks/chunk-CMJXLIEY.mjs} +125 -9
- package/dist/{chunk-42J32DPD.mjs → chunks/chunk-CRIB3I3L.mjs} +1 -1
- package/dist/{chunk-WKSQR6L5.mjs → chunks/chunk-CW2KYVYO.mjs} +31 -8
- package/dist/{chunk-644ROAHU.mjs → chunks/chunk-DDRSIMLE.mjs} +33 -12
- package/dist/{chunk-32XIRBZ7.mjs → chunks/chunk-DXKAPWMO.mjs} +2 -2
- package/dist/{chunk-372K2BMN.mjs → chunks/chunk-EKGCPOZJ.mjs} +56 -15
- package/dist/{chunk-E2U4W5FW.mjs → chunks/chunk-F7EK5D6J.mjs} +11 -11
- package/dist/{chunk-ZHFL3RYO.mjs → chunks/chunk-GE2Y2FHS.mjs} +6 -6
- package/dist/{chunk-AAX7FOW3.mjs → chunks/chunk-GIDIMIWE.mjs} +11 -11
- package/dist/{chunk-NLXOJSKK.mjs → chunks/chunk-GLFXRR7N.mjs} +29 -5
- package/dist/{chunk-W5M3BR6N.mjs → chunks/chunk-GV3CY6CQ.mjs} +1 -1
- package/dist/{chunk-CDXF6ZTL.mjs → chunks/chunk-HH5FUUXX.mjs} +1 -1
- package/dist/{chunk-RQURY2H3.mjs → chunks/chunk-HHZFGQN2.mjs} +2 -2
- package/dist/{chunk-2D3PWFR2.mjs → chunks/chunk-HVLFOABV.mjs} +4 -4
- package/dist/chunks/chunk-I2BWSDNR.mjs +832 -0
- package/dist/{chunk-MDA22SIZ.mjs → chunks/chunk-IFZSHQDZ.mjs} +2 -2
- package/dist/chunks/chunk-IRGQNA5W.mjs +289 -0
- package/dist/{chunk-72KINEJ6.mjs → chunks/chunk-IUGMS7ND.mjs} +10 -5
- package/dist/{chunk-56NMBNNX.mjs → chunks/chunk-JPKNWLLP.mjs} +3 -3
- package/dist/{chunk-XBDNMPF7.mjs → chunks/chunk-JVH4MDKX.mjs} +2 -2
- package/dist/chunks/chunk-KNNYJD4D.mjs +14 -0
- package/dist/{chunk-AUI5R4DA.mjs → chunks/chunk-L73MEG22.mjs} +2 -2
- package/dist/{chunk-K326BBF7.mjs → chunks/chunk-L74BEYTD.mjs} +38 -17
- package/dist/{chunk-DYVFVVTO.mjs → chunks/chunk-LJZCE7LQ.mjs} +102 -6
- package/dist/{chunk-YGHWUR7K.mjs → chunks/chunk-LP2YESP6.mjs} +1 -1
- package/dist/{chunk-WA735Y26.mjs → chunks/chunk-MGUGO3RV.mjs} +1 -1
- package/dist/{chunk-DOOXGOOB.mjs → chunks/chunk-OJHEN5FG.mjs} +96 -5
- package/dist/{chunk-ZNINPVG7.mjs → chunks/chunk-ON2FAZTD.mjs} +1 -1
- package/dist/{chunk-DLUFOM5K.mjs → chunks/chunk-PCBF6FSQ.mjs} +11 -11
- package/dist/{chunk-FQTWLAVA.mjs → chunks/chunk-QJCMFAHB.mjs} +1 -1
- package/dist/{chunk-62NGBLQ7.mjs → chunks/chunk-QONZ3SCZ.mjs} +1 -1
- package/dist/{chunk-HANSF33Z.mjs → chunks/chunk-QOWKMWNO.mjs} +1 -1
- package/dist/{chunk-GA4VV5V4.mjs → chunks/chunk-R4AZOPXC.mjs} +1 -1
- package/dist/{chunk-5DWO3G33.mjs → chunks/chunk-SGLTVJUA.mjs} +35 -21
- package/dist/{chunk-5FTUGKPC.mjs → chunks/chunk-TRGN3ZMM.mjs} +5 -5
- package/dist/{chunk-RSAZ7V5Z.mjs → chunks/chunk-TZ23VBFU.mjs} +2 -2
- package/dist/{chunk-4UVPCLJ7.mjs → chunks/chunk-U6X3GVJ3.mjs} +1 -1
- package/dist/{chunk-J2P5JBHC.mjs → chunks/chunk-UOMQNZMT.mjs} +1 -1
- package/dist/{chunk-4THCGGER.mjs → chunks/chunk-UOZFNTVQ.mjs} +2 -2
- package/dist/{chunk-TIV2FI4S.mjs → chunks/chunk-WVNDZNMV.mjs} +2 -2
- package/dist/{chunk-GFC24374.mjs → chunks/chunk-X4NWFK7L.mjs} +5 -5
- package/dist/{chunk-FFBK7Q3W.mjs → chunks/chunk-YI3GLQYF.mjs} +67 -4
- package/dist/{chunk-HTZVV6VV.mjs → chunks/chunk-YZQS2YBK.mjs} +8 -6
- package/dist/{chunk-PQV55JYI.mjs → chunks/chunk-ZLD5VNMP.mjs} +2 -2
- package/dist/components/charts/ChartBar.mjs +13 -13
- package/dist/components/charts/ChartCandlestick.mjs +11 -11
- package/dist/components/charts/ChartHeatmap.mjs +11 -11
- package/dist/components/charts/ChartLine.mjs +12 -11
- package/dist/components/charts/ChartPie.mjs +12 -11
- package/dist/components/charts/ChartPolar.mjs +13 -11
- package/dist/components/charts/ChartRadar.mjs +13 -11
- package/dist/components/charts/ChartScatter.mjs +12 -11
- package/dist/components/charts/ChartTreemap.mjs +10 -10
- package/dist/components/containers/ChartDecimation.mjs +6 -6
- package/dist/components/containers/ChartGroup.mjs +4 -4
- package/dist/components/containers/ChartOverlap.mjs +5 -5
- package/dist/components/containers/ChartRange.mjs +6 -6
- package/dist/components/containers/ChartStacked.mjs +6 -6
- package/dist/components/containers/ChartWaterfall.mjs +5 -5
- package/dist/components/customizations/ChartAccessibility.mjs +9 -9
- package/dist/components/customizations/ChartAnnotation.mjs +5 -5
- package/dist/components/customizations/ChartAxisCategory.mjs +3 -3
- package/dist/components/customizations/ChartAxisGroup.mjs +3 -3
- package/dist/components/customizations/ChartBreadcrumb.mjs +6 -6
- package/dist/components/customizations/ChartCaption.mjs +9 -9
- package/dist/components/customizations/ChartColorLegend.mjs +9 -9
- package/dist/components/customizations/ChartDataLabels.mjs +9 -9
- package/dist/components/customizations/ChartExportMenu.mjs +9 -9
- package/dist/components/customizations/ChartHover.mjs +9 -9
- package/dist/components/customizations/ChartLegend.mjs +9 -9
- package/dist/components/customizations/ChartNavigator.mjs +10 -10
- package/dist/components/customizations/ChartReferenceBand.mjs +5 -5
- package/dist/components/customizations/ChartReferenceLine.mjs +5 -5
- package/dist/components/customizations/ChartResponsive.mjs +9 -9
- package/dist/components/customizations/ChartTitle.mjs +9 -9
- package/dist/components/customizations/ChartTooltip.mjs +9 -9
- package/dist/components/customizations/ChartXAxis.mjs +10 -10
- package/dist/components/customizations/ChartYAxis.mjs +10 -10
- package/dist/components/customizations/ChartZoom.mjs +9 -9
- package/dist/components/items/ChartItem.mjs +3 -3
- package/dist/components/items/ChartTreemapGroup.mjs +5 -5
- package/dist/components/renderers/CartesianRenderer.mjs +9 -9
- package/dist/components/renderers/CartesianRenderer.vue.d.ts +2 -0
- package/dist/components/renderers/ColorLegendRenderer.mjs +2 -2
- package/dist/components/renderers/LegendRenderer.mjs +3 -3
- package/dist/components/renderers/NavigatorRenderer.mjs +5 -5
- package/dist/components/renderers/RadialRenderer.mjs +9 -9
- package/dist/components/renderers/RadialRenderer.vue.d.ts +1 -1
- package/dist/components/renderers/RectRenderer.mjs +9 -9
- package/dist/components/renderers/RectRenderer.vue.d.ts +1 -1
- package/dist/components/renderers/TooltipRenderer.mjs +4 -4
- package/dist/components/renderers/layers/BarLayerCanvas.mjs +10 -10
- package/dist/components/renderers/layers/BarLayerSvg.mjs +10 -10
- package/dist/components/renderers/layers/CandlestickLayer.mjs +9 -9
- package/dist/components/renderers/layers/HeatmapLayer.mjs +9 -9
- package/dist/components/renderers/layers/LineLayer.mjs +10 -9
- package/dist/components/renderers/layers/PieLayer.mjs +7 -9
- package/dist/components/renderers/layers/PolarLayer.mjs +8 -9
- package/dist/components/renderers/layers/RadarLayer.mjs +8 -9
- package/dist/components/renderers/layers/ScatterLayer.mjs +10 -9
- package/dist/composables/index.d.ts +0 -8
- package/dist/composables/useAnimationProps.d.ts +2 -5
- package/dist/composables/useChartSync.spec.d.ts +1 -0
- package/dist/composables/useChartSyncCoordinator.spec.d.ts +1 -0
- package/dist/composables/useHeatmapRenderer.spec.d.ts +1 -0
- package/dist/composables/usePolarRenderer.spec.d.ts +1 -0
- package/dist/composables/useResponsiveConfig.d.ts +1 -1
- package/dist/composables/useResponsiveDimensions.spec.d.ts +1 -0
- package/dist/composables/useTreemapRenderer.spec.d.ts +1 -0
- package/dist/context/ChartContext.d.ts +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +69 -66
- package/dist/namespace.mjs +69 -112
- package/dist/types/animation.types.d.ts +2 -0
- package/dist/types/bar.types.d.ts +2 -1
- package/dist/types/candlestick.types.d.ts +0 -1
- package/dist/types/heatmap.types.d.ts +0 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/item.types.d.ts +0 -1
- package/dist/types/line.types.d.ts +4 -1
- package/dist/types/scatter.types.d.ts +3 -2
- package/dist/useChartContext.spec.d.ts +1 -0
- package/package.json +7 -7
- package/dist/chunk-54DLUFIA.mjs +0 -96
- package/dist/chunk-CQHNYT2V.mjs +0 -1692
- package/dist/chunk-JKK3D33U.mjs +0 -64
- package/dist/chunk-UO27BCRL.mjs +0 -86
- package/dist/chunk-VWABO23U.mjs +0 -143
- /package/dist/{chunk-FZ3PZ66C.mjs → chunks/chunk-4Q3QUNX6.mjs} +0 -0
- /package/dist/{chunk-5SRBQVU5.mjs → chunks/chunk-EHSDNH7K.mjs} +0 -0
- /package/dist/{chunk-LD57I4SY.mjs → chunks/chunk-H4HLHGUW.mjs} +0 -0
- /package/dist/{chunk-TEOO4OLV.mjs → chunks/chunk-L6N5IYAJ.mjs} +0 -0
- /package/dist/{chunk-E4ROAOPT.mjs → chunks/chunk-S4YR4YK7.mjs} +0 -0
- /package/dist/{chunk-7P6ASYW6.mjs → chunks/chunk-VIHIR2BE.mjs} +0 -0
- /package/dist/{chunk-J43KLCZF.mjs → chunks/chunk-ZH4A4L6W.mjs} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/Chart.vue.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChartCanvasProps } from './types';
|
|
1
|
+
import type { ChartCanvasProps, ChartPointEvent } from './types';
|
|
2
2
|
declare const _default: typeof __VLS_export;
|
|
3
3
|
export default _default;
|
|
4
4
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ChartCanvasProps & {
|
|
@@ -8,10 +8,14 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ChartC
|
|
|
8
8
|
$plugins: import("vue").ShallowRef<Record<string, unknown>, Record<string, unknown>>;
|
|
9
9
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
10
|
resize: (width: number, height: number) => any;
|
|
11
|
+
"point-click": (event: ChartPointEvent<unknown>) => any;
|
|
12
|
+
"point-hover": (event: ChartPointEvent<unknown> | null) => any;
|
|
11
13
|
}, string, import("vue").PublicProps, Readonly<ChartCanvasProps & {
|
|
12
14
|
renderer: "svg" | "canvas";
|
|
13
15
|
}> & Readonly<{
|
|
14
16
|
onResize?: ((width: number, height: number) => any) | undefined;
|
|
17
|
+
"onPoint-click"?: ((event: ChartPointEvent<unknown>) => any) | undefined;
|
|
18
|
+
"onPoint-hover"?: ((event: ChartPointEvent<unknown> | null) => any) | undefined;
|
|
15
19
|
}>, {
|
|
16
20
|
responsive: boolean;
|
|
17
21
|
dir: "ltr" | "rtl" | "auto";
|
package/dist/ChartCanvas.mjs
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
export { ChartCanvas_default as default } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './chunk-
|
|
1
|
+
export { ChartCanvas_default as default } from './chunks/chunk-IUGMS7ND.mjs';
|
|
2
|
+
import './chunks/chunk-EKGCPOZJ.mjs';
|
|
3
|
+
import './chunks/chunk-TRGN3ZMM.mjs';
|
|
4
|
+
import './chunks/chunk-S4YR4YK7.mjs';
|
|
5
|
+
import './chunks/chunk-36DHPBYP.mjs';
|
|
6
|
+
import './chunks/chunk-ZH4A4L6W.mjs';
|
|
7
|
+
import './chunks/chunk-I2BWSDNR.mjs';
|
|
8
|
+
import './chunks/chunk-L6N5IYAJ.mjs';
|
|
9
|
+
import './chunks/chunk-ZLD5VNMP.mjs';
|
|
10
|
+
import './chunks/chunk-7EZEZMGG.mjs';
|
|
11
|
+
import './chunks/chunk-GLFXRR7N.mjs';
|
|
12
|
+
import './chunks/chunk-QOWKMWNO.mjs';
|
|
13
|
+
import './chunks/chunk-H4HLHGUW.mjs';
|
|
14
|
+
import './chunks/chunk-4Q3QUNX6.mjs';
|
|
15
|
+
import './chunks/chunk-VIHIR2BE.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import type { ChartCanvasProps } from './types';
|
|
2
|
-
declare var
|
|
1
|
+
import type { ChartCanvasProps, ChartPointEvent } from './types';
|
|
2
|
+
declare var __VLS_13: {};
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
|
-
default?: (props: typeof
|
|
4
|
+
default?: (props: typeof __VLS_13) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import("vue").DefineComponent<ChartCanvasProps, {
|
|
7
7
|
redraw: () => void | undefined;
|
|
8
8
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
9
|
resize: (width: number, height: number) => any;
|
|
10
|
+
"point-click": (event: ChartPointEvent<unknown>) => any;
|
|
11
|
+
"point-hover": (event: ChartPointEvent<unknown> | null) => any;
|
|
10
12
|
}, string, import("vue").PublicProps, Readonly<ChartCanvasProps> & Readonly<{
|
|
11
13
|
onResize?: ((width: number, height: number) => any) | undefined;
|
|
14
|
+
"onPoint-click"?: ((event: ChartPointEvent<unknown>) => any) | undefined;
|
|
15
|
+
"onPoint-hover"?: ((event: ChartPointEvent<unknown> | null) => any) | undefined;
|
|
12
16
|
}>, {
|
|
13
|
-
animation: import("
|
|
17
|
+
animation: import("@primeui/chart-types").AnimationSpec | false;
|
|
14
18
|
responsive: boolean;
|
|
15
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
20
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/ChartSvg.mjs
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
export { ChartSvg_default as default } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './chunk-
|
|
1
|
+
export { ChartSvg_default as default } from './chunks/chunk-5HLEKAY2.mjs';
|
|
2
|
+
import './chunks/chunk-EKGCPOZJ.mjs';
|
|
3
|
+
import './chunks/chunk-TRGN3ZMM.mjs';
|
|
4
|
+
import './chunks/chunk-S4YR4YK7.mjs';
|
|
5
|
+
import './chunks/chunk-36DHPBYP.mjs';
|
|
6
|
+
import './chunks/chunk-ZH4A4L6W.mjs';
|
|
7
|
+
import './chunks/chunk-I2BWSDNR.mjs';
|
|
8
|
+
import './chunks/chunk-L6N5IYAJ.mjs';
|
|
9
|
+
import './chunks/chunk-ZLD5VNMP.mjs';
|
|
10
|
+
import './chunks/chunk-7EZEZMGG.mjs';
|
|
11
|
+
import './chunks/chunk-GLFXRR7N.mjs';
|
|
12
|
+
import './chunks/chunk-QOWKMWNO.mjs';
|
|
13
|
+
import './chunks/chunk-H4HLHGUW.mjs';
|
|
14
|
+
import './chunks/chunk-4Q3QUNX6.mjs';
|
|
15
|
+
import './chunks/chunk-VIHIR2BE.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/ChartSvg.vue.d.ts
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import type { ChartSvgProps } from './types';
|
|
2
|
-
declare var
|
|
1
|
+
import type { ChartPointEvent, ChartSvgProps } from './types';
|
|
2
|
+
declare var __VLS_13: {};
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
|
-
default?: (props: typeof
|
|
4
|
+
default?: (props: typeof __VLS_13) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import("vue").DefineComponent<ChartSvgProps, {
|
|
7
7
|
redraw: () => void | undefined;
|
|
8
8
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
9
|
resize: (width: number, height: number) => any;
|
|
10
|
+
"point-click": (event: ChartPointEvent<unknown>) => any;
|
|
11
|
+
"point-hover": (event: ChartPointEvent<unknown> | null) => any;
|
|
10
12
|
}, string, import("vue").PublicProps, Readonly<ChartSvgProps> & Readonly<{
|
|
11
13
|
onResize?: ((width: number, height: number) => any) | undefined;
|
|
14
|
+
"onPoint-click"?: ((event: ChartPointEvent<unknown>) => any) | undefined;
|
|
15
|
+
"onPoint-hover"?: ((event: ChartPointEvent<unknown> | null) => any) | undefined;
|
|
12
16
|
}>, {
|
|
13
|
-
animation: import("
|
|
17
|
+
animation: import("@primeui/chart-types").AnimationSpec | false;
|
|
14
18
|
responsive: boolean;
|
|
15
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
20
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useCustomizationRegistration } from './chunk-
|
|
2
|
-
import { CHART_METHODS_KEY, CHART_GROUP_TEXT_KEY } from './chunk-
|
|
1
|
+
import { useCustomizationRegistration } from './chunk-ZLD5VNMP.mjs';
|
|
2
|
+
import { CHART_METHODS_KEY, CHART_GROUP_TEXT_KEY } from './chunk-4Q3QUNX6.mjs';
|
|
3
3
|
import { defineComponent, inject, computed, onMounted, watch, onUnmounted } from 'vue';
|
|
4
4
|
|
|
5
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useBarLayer, useBarRendererBase } from './chunk-
|
|
1
|
+
import { useBarLayer, useBarRendererBase } from './chunk-AKMQHU5T.mjs';
|
|
2
2
|
import { defineComponent, unref, openBlock, createElementBlock, createCommentVNode } from 'vue';
|
|
3
3
|
import { createBarRendererSvg } from '@primeui/chart-core/series/bar/controller-svg';
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13
13
|
setup(__props) {
|
|
14
14
|
const { bar, methods, frame } = useBarLayer(useBarRenderer);
|
|
15
15
|
return (_ctx, _cache) => {
|
|
16
|
-
return unref(methods).renderer === "svg"
|
|
16
|
+
return unref(methods).renderer === "svg" ? (openBlock(), createElementBlock("g", {
|
|
17
17
|
key: 0,
|
|
18
18
|
ref: (el) => {
|
|
19
19
|
unref(bar).groupRef.value = el;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TOOLTIP_DEFAULT_STYLE, TOOLTIP_BASE_STYLE } from './chunk-
|
|
2
|
-
import { TOOLTIP_CONTEXT_KEY } from './chunk-
|
|
3
|
-
import { defineComponent, inject, shallowRef, computed, ref, watch, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, normalizeStyle, createBlock, resolveDynamicComponent, Fragment, createElementVNode, toDisplayString, renderList, createCommentVNode, createTextVNode } from 'vue';
|
|
4
|
-
import { computeTooltipPosition, buildTooltipContent, gradientToCssBackground } from '@primeui/chart-core';
|
|
1
|
+
import { TOOLTIP_DEFAULT_STYLE, TOOLTIP_BASE_STYLE } from './chunk-ZH4A4L6W.mjs';
|
|
2
|
+
import { TOOLTIP_CONTEXT_KEY } from './chunk-4Q3QUNX6.mjs';
|
|
3
|
+
import { defineComponent, inject, shallowRef, computed, ref, watch, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, normalizeStyle, createBlock, resolveDynamicComponent, unref, Fragment, createElementVNode, toDisplayString, renderList, createCommentVNode, createTextVNode } from 'vue';
|
|
4
|
+
import { computeTooltipPosition, buildTooltipContent, safeRenderProp, formatTooltipValue, gradientToCssBackground } from '@primeui/chart-core';
|
|
5
5
|
|
|
6
6
|
var _hoisted_1 = { class: "p-chart-tooltip__title" };
|
|
7
7
|
var _hoisted_2 = {
|
|
@@ -50,21 +50,23 @@ var _hoisted_17 = {
|
|
|
50
50
|
style: { "margin-bottom": "0" }
|
|
51
51
|
};
|
|
52
52
|
var _hoisted_18 = { class: "p-chart-tooltip__row" };
|
|
53
|
-
var _hoisted_19 = { class: "p-chart-
|
|
54
|
-
var _hoisted_20 = { class: "p-chart-
|
|
55
|
-
var _hoisted_21 = { class: "p-chart-
|
|
56
|
-
var _hoisted_22 = {
|
|
53
|
+
var _hoisted_19 = { class: "p-chart-tooltip__label" };
|
|
54
|
+
var _hoisted_20 = { class: "p-chart-tooltip__value" };
|
|
55
|
+
var _hoisted_21 = { class: "p-chart-tooltip__row" };
|
|
56
|
+
var _hoisted_22 = { class: "p-chart-tooltip__label" };
|
|
57
|
+
var _hoisted_23 = { class: "p-chart-tooltip__value" };
|
|
58
|
+
var _hoisted_24 = {
|
|
57
59
|
key: 0,
|
|
58
60
|
class: "p-chart-tooltip__row"
|
|
59
61
|
};
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
+
var _hoisted_25 = { class: "p-chart-tooltip__value" };
|
|
63
|
+
var _hoisted_26 = {
|
|
62
64
|
key: 5,
|
|
63
65
|
class: "p-chart-tooltip__row"
|
|
64
66
|
};
|
|
65
|
-
var
|
|
66
|
-
var
|
|
67
|
-
var
|
|
67
|
+
var _hoisted_27 = { class: "p-chart-tooltip__label" };
|
|
68
|
+
var _hoisted_28 = { class: "p-chart-tooltip__value" };
|
|
69
|
+
var _hoisted_29 = {
|
|
68
70
|
key: 0,
|
|
69
71
|
style: {
|
|
70
72
|
"opacity": "0.6",
|
|
@@ -172,7 +174,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
172
174
|
ref: tooltipEl,
|
|
173
175
|
style: normalizeStyle(tooltipStyle.value),
|
|
174
176
|
class: normalizeClass(["chart-tooltip", { "p-chart-tooltip": !hasCustomRender.value }])
|
|
175
|
-
}, [hasCustomRender.value ? (openBlock(), createBlock(resolveDynamicComponent(() => __props.tooltipConfig.render({
|
|
177
|
+
}, [hasCustomRender.value ? (openBlock(), createBlock(resolveDynamicComponent(() => unref(safeRenderProp)(() => __props.tooltipConfig.render({
|
|
176
178
|
datasetId: visibleTooltip.value.datasetId,
|
|
177
179
|
index: visibleTooltip.value.index,
|
|
178
180
|
label: visibleTooltip.value.label,
|
|
@@ -190,9 +192,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
190
192
|
value: h.value,
|
|
191
193
|
percentage: h.percentage,
|
|
192
194
|
ohlc: h.ohlc,
|
|
193
|
-
formattedValue: h.formattedValue
|
|
195
|
+
formattedValue: h.formattedValue ?? unref(formatTooltipValue)(h.value, props.locale)
|
|
194
196
|
})) : void 0
|
|
195
|
-
})), { key: 0 })) : content.value?.type === "multi-series" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createElementVNode("div", _hoisted_1, toDisplayString(content.value.label), 1), (openBlock(true), createElementBlock(Fragment, null, renderList(content.value.series, (row) => {
|
|
197
|
+
}), "tooltip")), { key: 0 })) : content.value?.type === "multi-series" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createElementVNode("div", _hoisted_1, toDisplayString(content.value.label), 1), (openBlock(true), createElementBlock(Fragment, null, renderList(content.value.series, (row) => {
|
|
196
198
|
return openBlock(), createElementBlock(Fragment, { key: row.datasetId }, [row.ohlc ? (openBlock(), createElementBlock("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [createElementVNode("span", {
|
|
197
199
|
class: "p-chart-tooltip__swatch",
|
|
198
200
|
style: normalizeStyle(swatchStyle(row.color, row.colorGradient, row.swatchColor))
|
|
@@ -231,21 +233,21 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
231
233
|
key: row.key,
|
|
232
234
|
class: "p-chart-tooltip__row"
|
|
233
235
|
}, [createElementVNode("span", _hoisted_14, toDisplayString(row.key), 1), createElementVNode("span", _hoisted_15, toDisplayString(row.value), 1)]);
|
|
234
|
-
}), 128))], 64)) : content.value?.type === "
|
|
236
|
+
}), 128))], 64)) : content.value?.type === "xy" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
235
237
|
createElementVNode("div", _hoisted_16, [createElementVNode("span", {
|
|
236
238
|
class: "p-chart-tooltip__swatch",
|
|
237
239
|
style: normalizeStyle(swatchStyle(content.value.color, content.value.colorGradient, content.value.swatchColor))
|
|
238
240
|
}, null, 4), createElementVNode("span", _hoisted_17, toDisplayString(content.value.label), 1)]),
|
|
239
|
-
createElementVNode("div", _hoisted_18, [
|
|
240
|
-
createElementVNode("div",
|
|
241
|
-
content.value.bubbleValue != null ? (openBlock(), createElementBlock("div",
|
|
242
|
-
], 64)) : content.value?.type === "simple" ? (openBlock(), createElementBlock("div",
|
|
241
|
+
createElementVNode("div", _hoisted_18, [createElementVNode("span", _hoisted_19, toDisplayString(content.value.xLabel), 1), createElementVNode("span", _hoisted_20, toDisplayString(content.value.xValue), 1)]),
|
|
242
|
+
createElementVNode("div", _hoisted_21, [createElementVNode("span", _hoisted_22, toDisplayString(content.value.yLabel), 1), createElementVNode("span", _hoisted_23, toDisplayString(content.value.yValue), 1)]),
|
|
243
|
+
content.value.bubbleValue != null ? (openBlock(), createElementBlock("div", _hoisted_24, [_cache[0] || (_cache[0] = createElementVNode("span", { class: "p-chart-tooltip__label" }, "value", -1)), createElementVNode("span", _hoisted_25, toDisplayString(content.value.bubbleValue), 1)])) : createCommentVNode("", true)
|
|
244
|
+
], 64)) : content.value?.type === "simple" ? (openBlock(), createElementBlock("div", _hoisted_26, [
|
|
243
245
|
createElementVNode("span", {
|
|
244
246
|
class: "p-chart-tooltip__swatch",
|
|
245
247
|
style: normalizeStyle(swatchStyle(content.value.color, content.value.colorGradient, content.value.swatchColor))
|
|
246
248
|
}, null, 4),
|
|
247
|
-
createElementVNode("span",
|
|
248
|
-
createElementVNode("span",
|
|
249
|
+
createElementVNode("span", _hoisted_27, toDisplayString(content.value.label), 1),
|
|
250
|
+
createElementVNode("span", _hoisted_28, [createTextVNode(toDisplayString(content.value.value), 1), content.value.percentage != null ? (openBlock(), createElementBlock("span", _hoisted_29, " (" + toDisplayString(content.value.percentage) + "%)", 1)) : createCommentVNode("", true)])
|
|
249
251
|
])) : createCommentVNode("", true)], 6)) : createCommentVNode("", true);
|
|
250
252
|
};
|
|
251
253
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useCustomizationRegistration } from './chunk-
|
|
1
|
+
import { useCustomizationRegistration } from './chunk-ZLD5VNMP.mjs';
|
|
2
2
|
import { defineComponent, computed } from 'vue';
|
|
3
3
|
|
|
4
4
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -28,6 +28,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
28
28
|
borderDash: props.borderDash,
|
|
29
29
|
borderDashOffset: props.borderDashOffset,
|
|
30
30
|
dimOpacity: props.dimOpacity,
|
|
31
|
+
radiusMultiplier: props.radiusMultiplier,
|
|
31
32
|
onClick: props.onClick
|
|
32
33
|
}));
|
|
33
34
|
useCustomizationRegistration("hover", registrationProps);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SYNC_BUS_KEY } from './chunk-
|
|
2
|
-
import { CHART_GROUP_TEXT_KEY } from './chunk-
|
|
1
|
+
import { SYNC_BUS_KEY } from './chunk-H4HLHGUW.mjs';
|
|
2
|
+
import { CHART_GROUP_TEXT_KEY } from './chunk-4Q3QUNX6.mjs';
|
|
3
3
|
import { defineComponent, provide, ref, openBlock, createElementBlock, toDisplayString, createCommentVNode, renderSlot } from 'vue';
|
|
4
4
|
import { SyncBus, DEFAULT_CHART_CAPTION_PADDING, DEFAULT_CHART_TITLE_COLOR, DEFAULT_CHART_TITLE_FONT_SIZE, DEFAULT_CHART_TITLE_PADDING, DEFAULT_CHART_CAPTION_COLOR, DEFAULT_CHART_CAPTION_FONT_SIZE } from '@primeui/chart-core';
|
|
5
5
|
|
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import { ITEM_COLLECTOR_KEY } from './chunk-
|
|
1
|
+
import { ITEM_COLLECTOR_KEY } from './chunk-4Q3QUNX6.mjs';
|
|
2
2
|
import { defineComponent, inject, onMounted, watch, onUnmounted } from 'vue';
|
|
3
3
|
|
|
4
4
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "ChartItem",
|
|
6
6
|
props: {
|
|
7
7
|
borderRadius: {},
|
|
8
|
-
|
|
8
|
+
categoryX: {},
|
|
9
|
+
categoryY: {},
|
|
10
|
+
valueX: {},
|
|
11
|
+
valueY: {},
|
|
12
|
+
category: {},
|
|
9
13
|
value: {},
|
|
10
|
-
|
|
14
|
+
open: {},
|
|
15
|
+
high: {},
|
|
16
|
+
low: {},
|
|
17
|
+
close: {},
|
|
11
18
|
color: {},
|
|
12
19
|
borderColor: {},
|
|
13
20
|
borderStrokeWidth: {},
|
|
14
|
-
x: {},
|
|
15
21
|
size: {},
|
|
16
22
|
secondaryLabel: {},
|
|
17
23
|
opacity: {},
|
|
18
|
-
time: {},
|
|
19
|
-
open: {},
|
|
20
|
-
high: {},
|
|
21
|
-
low: {},
|
|
22
|
-
close: {},
|
|
23
|
-
row: {},
|
|
24
|
-
column: {},
|
|
25
24
|
nodeId: {},
|
|
26
25
|
parentId: {}
|
|
27
26
|
},
|
|
@@ -34,21 +33,23 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
34
33
|
const itemIndex = collector.getNextIndex();
|
|
35
34
|
function buildItemProps() {
|
|
36
35
|
return {
|
|
36
|
+
categoryX: props.categoryX,
|
|
37
|
+
categoryY: props.categoryY,
|
|
38
|
+
valueX: props.valueX,
|
|
39
|
+
valueY: props.valueY,
|
|
40
|
+
category: props.category,
|
|
37
41
|
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
42
|
open: props.open,
|
|
47
43
|
high: props.high,
|
|
48
44
|
low: props.low,
|
|
49
45
|
close: props.close,
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
size: props.size,
|
|
47
|
+
color: props.color,
|
|
48
|
+
borderRadius: props.borderRadius,
|
|
49
|
+
borderColor: props.borderColor,
|
|
50
|
+
borderStrokeWidth: props.borderStrokeWidth,
|
|
51
|
+
secondaryLabel: props.secondaryLabel,
|
|
52
|
+
opacity: props.opacity,
|
|
52
53
|
nodeId: props.nodeId,
|
|
53
54
|
parentId: props.parentId
|
|
54
55
|
};
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { useCartesianFrame, useCartesianFrameRegistration } from './chunk-I2BWSDNR.mjs';
|
|
2
|
+
import { useChartMethods, useChartState, useChartHover } from './chunk-QOWKMWNO.mjs';
|
|
3
|
+
import { defineComponent, computed, unref, openBlock, createElementBlock, Fragment, createElementVNode, renderList, createBlock, createCommentVNode, ref, watch, onUnmounted, createVNode } from 'vue';
|
|
4
|
+
import { renderHeatmapAxesSvg } from '@primeui/chart-core';
|
|
5
|
+
import { createHeatmapRendererCanvas } from '@primeui/chart-core/series/heatmap/controller-canvas';
|
|
6
|
+
import { createHeatmapRendererSvg } from '@primeui/chart-core/series/heatmap/controller-svg';
|
|
7
|
+
|
|
8
|
+
function useHeatmapRenderer(options) {
|
|
9
|
+
const { chartArea, renderer, canvasEl, datasets, axes, datasetVisibility, hover, hoverConfig, chartId, width, height, features, compositor, globalFont, theme } = options;
|
|
10
|
+
const groupRef = ref(null);
|
|
11
|
+
const gridGroupRef = ref(null);
|
|
12
|
+
const axisGroupRef = ref(null);
|
|
13
|
+
const controller = renderer === "canvas" ? createHeatmapRendererCanvas() : createHeatmapRendererSvg();
|
|
14
|
+
const versionRef = ref(0);
|
|
15
|
+
controller.onFrame = () => {
|
|
16
|
+
versionRef.value++;
|
|
17
|
+
};
|
|
18
|
+
const scaleResult = computed(() => {
|
|
19
|
+
void versionRef.value;
|
|
20
|
+
return controller.scaleResult;
|
|
21
|
+
});
|
|
22
|
+
const axisLayoutsComputed = computed(() => {
|
|
23
|
+
void versionRef.value;
|
|
24
|
+
return controller.axisLayouts;
|
|
25
|
+
});
|
|
26
|
+
watch(
|
|
27
|
+
[datasets, datasetVisibility, chartArea, axes, features, width, height, groupRef, gridGroupRef, axisGroupRef, options.locale, theme],
|
|
28
|
+
() => {
|
|
29
|
+
controller.update({
|
|
30
|
+
datasets: datasets.value,
|
|
31
|
+
datasetVisibility: datasetVisibility.value,
|
|
32
|
+
chartArea: chartArea.value,
|
|
33
|
+
chartId,
|
|
34
|
+
width: width.value,
|
|
35
|
+
height: height.value,
|
|
36
|
+
renderer,
|
|
37
|
+
axes: axes.value,
|
|
38
|
+
features: features.value,
|
|
39
|
+
hover: hover.value,
|
|
40
|
+
hoverConfig: hoverConfig.value,
|
|
41
|
+
compositor,
|
|
42
|
+
canvasEl: canvasEl.value,
|
|
43
|
+
svgGroup: groupRef.value,
|
|
44
|
+
globalFont,
|
|
45
|
+
locale: options.locale?.value,
|
|
46
|
+
theme: theme.value,
|
|
47
|
+
resolveDatasetProps: (dsId) => {
|
|
48
|
+
const dsReg = datasets.value.get(dsId);
|
|
49
|
+
return dsReg?.props;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
if (renderer === "svg") {
|
|
53
|
+
renderHeatmapAxesSvg(gridGroupRef.value, axisGroupRef.value, controller.axisLayouts, theme.value);
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{ immediate: true, flush: "post" }
|
|
57
|
+
);
|
|
58
|
+
watch(hover, () => {
|
|
59
|
+
controller.applyHover(hover.value);
|
|
60
|
+
});
|
|
61
|
+
onUnmounted(() => {
|
|
62
|
+
controller.destroy();
|
|
63
|
+
});
|
|
64
|
+
function hitTest(x, y) {
|
|
65
|
+
return controller.hitTest(x, y);
|
|
66
|
+
}
|
|
67
|
+
function getPointPosition(datasetId, index) {
|
|
68
|
+
const lr = controller.layoutResult;
|
|
69
|
+
if (!lr) return null;
|
|
70
|
+
const hmLayout = lr.layouts.get(datasetId);
|
|
71
|
+
const cell = hmLayout?.cells.find((c) => c.index === index && !c.isEmpty);
|
|
72
|
+
if (!cell) return null;
|
|
73
|
+
return { x: cell.x, y: cell.y, width: cell.width, height: cell.height, shape: "rect" };
|
|
74
|
+
}
|
|
75
|
+
function getColorScaleInfo() {
|
|
76
|
+
return controller.getColorScaleInfo();
|
|
77
|
+
}
|
|
78
|
+
function applyPropertyAnimations(store) {
|
|
79
|
+
controller.applyPropertyAnimations(store);
|
|
80
|
+
}
|
|
81
|
+
function renderFrameCycle() {
|
|
82
|
+
controller.renderFrameCycle();
|
|
83
|
+
}
|
|
84
|
+
const svgContent = computed(() => {
|
|
85
|
+
if (renderer !== "svg") return [];
|
|
86
|
+
void versionRef.value;
|
|
87
|
+
const lr = controller.layoutResult;
|
|
88
|
+
if (!lr) return [];
|
|
89
|
+
const elements = [];
|
|
90
|
+
for (const [datasetId, hmLayout] of lr.layouts) {
|
|
91
|
+
const dsReg = datasets.value.get(datasetId);
|
|
92
|
+
const hmProps = dsReg?.props;
|
|
93
|
+
const renderFn = hmProps?.renderContent;
|
|
94
|
+
const data = hmProps?.data;
|
|
95
|
+
if (!renderFn || !data) continue;
|
|
96
|
+
for (const cell of hmLayout.cells) {
|
|
97
|
+
if (cell.isEmpty) continue;
|
|
98
|
+
const dataItem = data[cell.index];
|
|
99
|
+
if (!dataItem) continue;
|
|
100
|
+
const result = renderFn({
|
|
101
|
+
data: dataItem,
|
|
102
|
+
index: cell.index,
|
|
103
|
+
value: cell.value,
|
|
104
|
+
xLabel: cell.xLabel,
|
|
105
|
+
yLabel: cell.yLabel,
|
|
106
|
+
color: cell.color,
|
|
107
|
+
x: cell.x,
|
|
108
|
+
y: cell.y,
|
|
109
|
+
width: cell.width,
|
|
110
|
+
height: cell.height,
|
|
111
|
+
row: cell.row,
|
|
112
|
+
col: cell.col,
|
|
113
|
+
isEmpty: cell.isEmpty
|
|
114
|
+
});
|
|
115
|
+
if (result != null) {
|
|
116
|
+
const clipId = `hm-clip-${datasetId}-${cell.index}`;
|
|
117
|
+
elements.push(
|
|
118
|
+
createVNode("g", { key: `${datasetId}-${cell.index}`, "clip-path": `url(#${clipId})` }, [
|
|
119
|
+
createVNode("defs", null, [createVNode("clipPath", { id: clipId }, [createVNode("rect", { x: cell.x, y: cell.y, width: cell.width, height: cell.height })])]),
|
|
120
|
+
result
|
|
121
|
+
])
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return elements;
|
|
127
|
+
});
|
|
128
|
+
return {
|
|
129
|
+
groupRef,
|
|
130
|
+
gridGroupRef,
|
|
131
|
+
axisGroupRef,
|
|
132
|
+
hitTest,
|
|
133
|
+
getPointPosition,
|
|
134
|
+
axisLayouts: axisLayoutsComputed,
|
|
135
|
+
plotArea: chartArea,
|
|
136
|
+
getColorScaleInfo,
|
|
137
|
+
scaleResult,
|
|
138
|
+
svgContent,
|
|
139
|
+
applyPropertyAnimations,
|
|
140
|
+
renderFrameCycle
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// src/components/renderers/layers/HeatmapLayer.vue
|
|
145
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
146
|
+
__name: "HeatmapLayer",
|
|
147
|
+
setup(__props) {
|
|
148
|
+
const VNodeRenderer = defineComponent({
|
|
149
|
+
props: { node: {
|
|
150
|
+
type: Object,
|
|
151
|
+
required: true
|
|
152
|
+
} },
|
|
153
|
+
render() {
|
|
154
|
+
return this.node;
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
const frame = useCartesianFrame();
|
|
158
|
+
const methods = useChartMethods();
|
|
159
|
+
const state = useChartState();
|
|
160
|
+
const hoverCtx = useChartHover();
|
|
161
|
+
const features = computed(() => state.value.features);
|
|
162
|
+
const heatmap = useHeatmapRenderer({
|
|
163
|
+
chartArea: frame.cartesianArea,
|
|
164
|
+
renderer: methods.renderer,
|
|
165
|
+
canvasEl: frame.canvasEl,
|
|
166
|
+
datasets: computed(() => state.value.datasets),
|
|
167
|
+
axes: computed(() => state.value.axes),
|
|
168
|
+
datasetVisibility: computed(() => state.value.datasetVisibility),
|
|
169
|
+
hover: computed(() => hoverCtx.value.hover),
|
|
170
|
+
hoverConfig: frame.hoverConfig,
|
|
171
|
+
chartId: methods.chartId,
|
|
172
|
+
width: frame.width,
|
|
173
|
+
height: frame.height,
|
|
174
|
+
features,
|
|
175
|
+
compositor: frame.compositor,
|
|
176
|
+
globalFont: methods.font,
|
|
177
|
+
locale: computed(() => methods.locale),
|
|
178
|
+
theme: computed(() => methods.theme)
|
|
179
|
+
});
|
|
180
|
+
useCartesianFrameRegistration({
|
|
181
|
+
type: "heatmap",
|
|
182
|
+
getColorScaleInfo: () => heatmap.getColorScaleInfo(),
|
|
183
|
+
scaleResult: heatmap.scaleResult,
|
|
184
|
+
getPointPosition: (datasetId, index) => heatmap.getPointPosition(datasetId, index),
|
|
185
|
+
applyPropertyAnimations: (store) => heatmap.applyPropertyAnimations(store),
|
|
186
|
+
renderFrameCycle: () => heatmap.renderFrameCycle(),
|
|
187
|
+
hitTest: (x, y) => {
|
|
188
|
+
const hmHit = heatmap.hitTest(x, y);
|
|
189
|
+
if (!hmHit) return null;
|
|
190
|
+
return {
|
|
191
|
+
datasetId: hmHit.datasetId,
|
|
192
|
+
index: hmHit.index,
|
|
193
|
+
col: hmHit.col,
|
|
194
|
+
label: `${hmHit.xLabel}, ${hmHit.yLabel}`,
|
|
195
|
+
value: hmHit.value ?? 0,
|
|
196
|
+
color: hmHit.color,
|
|
197
|
+
snapX: hmHit.x + hmHit.width / 2,
|
|
198
|
+
snapY: hmHit.y + hmHit.height / 2,
|
|
199
|
+
formattedValue: hmHit.value != null ? String(hmHit.value) : "",
|
|
200
|
+
cursorFormattedValue: ""
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
return (_ctx, _cache) => {
|
|
205
|
+
return unref(methods).renderer === "svg" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
206
|
+
createElementVNode("g", {
|
|
207
|
+
ref: (el) => {
|
|
208
|
+
unref(heatmap).gridGroupRef.value = el;
|
|
209
|
+
},
|
|
210
|
+
class: "heatmap-grid"
|
|
211
|
+
}, null, 512),
|
|
212
|
+
createElementVNode("g", {
|
|
213
|
+
ref: (el) => {
|
|
214
|
+
unref(heatmap).groupRef.value = el;
|
|
215
|
+
},
|
|
216
|
+
class: "heatmap-chart"
|
|
217
|
+
}, null, 512),
|
|
218
|
+
createElementVNode("g", {
|
|
219
|
+
ref: (el) => {
|
|
220
|
+
unref(heatmap).axisGroupRef.value = el;
|
|
221
|
+
},
|
|
222
|
+
class: "heatmap-axes"
|
|
223
|
+
}, null, 512),
|
|
224
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(heatmap).svgContent.value, (el) => {
|
|
225
|
+
return openBlock(), createBlock(unref(VNodeRenderer), {
|
|
226
|
+
key: el.key ?? el.props?.key,
|
|
227
|
+
node: el
|
|
228
|
+
}, null, 8, ["node"]);
|
|
229
|
+
}), 128))
|
|
230
|
+
], 64)) : createCommentVNode("", true);
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
var HeatmapLayer_default = _sfc_main;
|
|
235
|
+
|
|
236
|
+
export { HeatmapLayer_default };
|