@primeui/vue-chart 1.0.0-rc.1 → 1.0.0-rc.3
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/ChartCanvas.mjs +10 -10
- package/dist/ChartSvg.mjs +10 -10
- package/dist/RadarReference.spec.d.ts +1 -0
- package/dist/chunks/{chunk-QONZ3SCZ.mjs → chunk-2FGCWBQK.mjs} +1 -1
- package/dist/chunks/{chunk-4SLSYRNY.mjs → chunk-2VCCASMY.mjs} +5 -17
- package/dist/chunks/{chunk-IRGQNA5W.mjs → chunk-3ZXBNXFA.mjs} +10 -5
- package/dist/chunks/{chunk-CMJXLIEY.mjs → chunk-4B5OD4TC.mjs} +4 -13
- package/dist/chunks/{chunk-F7EK5D6J.mjs → chunk-4UH6LJNN.mjs} +4 -4
- package/dist/chunks/{chunk-YI3GLQYF.mjs → chunk-5CL32KCS.mjs} +6 -7
- package/dist/chunks/{chunk-GE2Y2FHS.mjs → chunk-6MD43V6R.mjs} +4 -4
- package/dist/chunks/{chunk-5ZLVNQ2L.mjs → chunk-7SY52FXI.mjs} +10 -6
- package/dist/chunks/{chunk-R4AZOPXC.mjs → chunk-AQK6S4DO.mjs} +1 -1
- package/dist/chunks/{chunk-EWDMF46D.mjs → chunk-B3QR3CVR.mjs} +1 -1
- package/dist/chunks/{chunk-UOMQNZMT.mjs → chunk-B7XC2DVN.mjs} +1 -1
- package/dist/chunks/{chunk-CRIB3I3L.mjs → chunk-BC6G3ODW.mjs} +1 -1
- package/dist/chunks/{chunk-YZQS2YBK.mjs → chunk-BVB7G6Y5.mjs} +12 -11
- package/dist/chunks/{chunk-GIDIMIWE.mjs → chunk-D2SPDSXY.mjs} +4 -4
- package/dist/chunks/{chunk-JVH4MDKX.mjs → chunk-D65PFBA5.mjs} +1 -1
- package/dist/chunks/{chunk-MGUGO3RV.mjs → chunk-DKLWPPME.mjs} +10 -0
- package/dist/chunks/{chunk-CGFPDWB4.mjs → chunk-DLRPM3GK.mjs} +1 -1
- package/dist/chunks/{chunk-3DINEX6C.mjs → chunk-DZIZEFTD.mjs} +1 -1
- package/dist/chunks/{chunk-LJZCE7LQ.mjs → chunk-EAHLFHB7.mjs} +58 -19
- package/dist/chunks/{chunk-IFZSHQDZ.mjs → chunk-EDDORION.mjs} +1 -1
- package/dist/chunks/{chunk-QOWKMWNO.mjs → chunk-F72RBTHC.mjs} +27 -5
- package/dist/chunks/{chunk-4Q3QUNX6.mjs → chunk-FGBZ3VPE.mjs} +2 -1
- package/dist/chunks/{chunk-L74BEYTD.mjs → chunk-FZ4TKLHE.mjs} +5 -5
- package/dist/chunks/{chunk-3XOLEGDL.mjs → chunk-G4V4FUNK.mjs} +5 -5
- package/dist/chunks/{chunk-DXKAPWMO.mjs → chunk-G5YSM76C.mjs} +1 -1
- package/dist/chunks/{chunk-3JA5JAHF.mjs → chunk-GRPL343U.mjs} +1 -1
- package/dist/chunks/{chunk-36DHPBYP.mjs → chunk-GV4YAVUN.mjs} +34 -9
- package/dist/chunks/{chunk-GV3CY6CQ.mjs → chunk-HXMG2ZBK.mjs} +1 -1
- package/dist/chunks/{chunk-3PJULFR5.mjs → chunk-IASQF4GU.mjs} +1 -3
- package/dist/chunks/{chunk-WVNDZNMV.mjs → chunk-ISDQNEMO.mjs} +1 -1
- package/dist/chunks/{chunk-TRGN3ZMM.mjs → chunk-JEC4JJ5P.mjs} +4 -30
- package/dist/chunks/{chunk-BSROML7P.mjs → chunk-KCLMHDWJ.mjs} +2 -2
- package/dist/chunks/{chunk-I2BWSDNR.mjs → chunk-KX5GTFS3.mjs} +19 -6
- package/dist/chunks/{chunk-3X27K5XC.mjs → chunk-L7XUBIMC.mjs} +24 -51
- package/dist/chunks/{chunk-2NZ3PUWW.mjs → chunk-LLYJBFOE.mjs} +2 -2
- package/dist/chunks/{chunk-DDRSIMLE.mjs → chunk-LNS6I3ZJ.mjs} +4 -4
- package/dist/chunks/{chunk-PR6MTWPJ.mjs → chunk-LWHQ3RXO.mjs} +1 -1
- package/dist/chunks/{chunk-CW2KYVYO.mjs → chunk-MCIY5P7K.mjs} +4 -4
- package/dist/chunks/{chunk-GLFXRR7N.mjs → chunk-MGNVYHQF.mjs} +53 -8
- package/dist/chunks/{chunk-2TOEQNJ6.mjs → chunk-MX74LV4I.mjs} +1 -1
- package/dist/chunks/{chunk-L73MEG22.mjs → chunk-NFVH44YP.mjs} +1 -3
- package/dist/chunks/{chunk-JPKNWLLP.mjs → chunk-NTTI64AJ.mjs} +8 -4
- package/dist/chunks/{chunk-LP2YESP6.mjs → chunk-OROBUJMJ.mjs} +1 -1
- package/dist/chunks/chunk-P3CYBDPQ.mjs +86 -0
- package/dist/chunks/{chunk-6Z4MZIJI.mjs → chunk-P43UWADF.mjs} +6 -4
- package/dist/chunks/chunk-Q3I4EL3N.mjs +23 -0
- package/dist/chunks/{chunk-HVLFOABV.mjs → chunk-QDCXS7WS.mjs} +3 -8
- package/dist/chunks/{chunk-4EU72IBK.mjs → chunk-QPX2OCOM.mjs} +20 -12
- package/dist/chunks/{chunk-ZLD5VNMP.mjs → chunk-QQGC223F.mjs} +2 -2
- package/dist/chunks/{chunk-ADAGGXFG.mjs → chunk-QWUGZTCV.mjs} +5 -6
- package/dist/chunks/{chunk-OJHEN5FG.mjs → chunk-TAFKOHFX.mjs} +5 -6
- package/dist/chunks/{chunk-HH5FUUXX.mjs → chunk-TLB6ZOL3.mjs} +3 -1
- package/dist/chunks/{chunk-SGLTVJUA.mjs → chunk-UA2J3TWE.mjs} +4 -4
- package/dist/chunks/{chunk-AKMQHU5T.mjs → chunk-V4KRWSEE.mjs} +2 -2
- package/dist/chunks/{chunk-U6X3GVJ3.mjs → chunk-VADMTZLH.mjs} +1 -1
- package/dist/chunks/{chunk-PCBF6FSQ.mjs → chunk-WCUZUBQ5.mjs} +21 -20
- package/dist/chunks/{chunk-ON2FAZTD.mjs → chunk-WHAJ2YDA.mjs} +1 -1
- package/dist/chunks/{chunk-X4NWFK7L.mjs → chunk-WNIMDHP5.mjs} +2 -2
- package/dist/chunks/{chunk-TZ23VBFU.mjs → chunk-XSKNTD24.mjs} +1 -1
- package/dist/chunks/{chunk-HHZFGQN2.mjs → chunk-YPRGZNY6.mjs} +1 -1
- package/dist/chunks/{chunk-UOZFNTVQ.mjs → chunk-YUQRDFQI.mjs} +2 -2
- package/dist/components/charts/ChartBar.mjs +10 -9
- package/dist/components/charts/ChartCandlestick.mjs +8 -7
- package/dist/components/charts/ChartHeatmap.mjs +8 -7
- package/dist/components/charts/ChartLine.mjs +8 -7
- package/dist/components/charts/ChartPie.mjs +8 -7
- package/dist/components/charts/ChartPolar.mjs +8 -8
- package/dist/components/charts/ChartRadar.mjs +8 -8
- package/dist/components/charts/ChartScatter.mjs +8 -7
- package/dist/components/charts/ChartTreemap.mjs +7 -6
- package/dist/components/containers/ChartDecimation.mjs +3 -3
- package/dist/components/containers/ChartGroup.mjs +2 -2
- package/dist/components/containers/ChartOverlap.mjs +3 -3
- package/dist/components/containers/ChartRange.mjs +3 -3
- package/dist/components/containers/ChartStacked.mjs +3 -3
- package/dist/components/containers/ChartWaterfall.mjs +3 -3
- package/dist/components/customizations/ChartAccessibility.mjs +5 -5
- package/dist/components/customizations/ChartAccessibility.vue.d.ts +3 -0
- package/dist/components/customizations/ChartAnnotation.mjs +3 -3
- package/dist/components/customizations/ChartAxisGroup.mjs +1 -1
- package/dist/components/customizations/ChartBreadcrumb.mjs +4 -4
- package/dist/components/customizations/ChartCaption.mjs +5 -5
- package/dist/components/customizations/ChartColorLegend.mjs +5 -5
- package/dist/components/customizations/ChartColorLegend.vue.d.ts +2 -2
- package/dist/components/customizations/ChartDataLabels.mjs +5 -5
- package/dist/components/customizations/ChartDataLabels.vue.d.ts +2 -0
- package/dist/components/customizations/ChartExportMenu.mjs +5 -5
- package/dist/components/customizations/ChartHover.mjs +5 -5
- package/dist/components/customizations/ChartLegend.mjs +5 -5
- package/dist/components/customizations/ChartNavigator.mjs +6 -6
- package/dist/components/customizations/ChartReferenceBand.mjs +3 -3
- package/dist/components/customizations/ChartReferenceLine.mjs +3 -3
- package/dist/components/customizations/ChartResponsive.mjs +5 -5
- package/dist/components/customizations/ChartTitle.mjs +5 -5
- package/dist/components/customizations/ChartTooltip.mjs +5 -5
- package/dist/components/customizations/ChartXAxis.mjs +5 -5
- package/dist/components/customizations/ChartYAxis.mjs +5 -5
- package/dist/components/customizations/ChartZoom.mjs +5 -5
- package/dist/components/items/ChartItem.mjs +2 -2
- package/dist/components/items/ChartTreemapGroup.mjs +3 -3
- package/dist/components/renderers/CartesianRenderer.mjs +6 -5
- package/dist/components/renderers/LegendRenderer.mjs +2 -2
- package/dist/components/renderers/NavigatorRenderer.mjs +3 -3
- package/dist/components/renderers/RadialRenderer.mjs +5 -5
- package/dist/components/renderers/RectRenderer.mjs +6 -5
- package/dist/components/renderers/TooltipRenderer.mjs +3 -3
- package/dist/components/renderers/layers/BarLayerCanvas.mjs +6 -6
- package/dist/components/renderers/layers/BarLayerSvg.mjs +6 -6
- package/dist/components/renderers/layers/CandlestickLayer.mjs +6 -5
- package/dist/components/renderers/layers/HeatmapLayer.mjs +6 -5
- package/dist/components/renderers/layers/LineLayer.mjs +5 -5
- package/dist/components/renderers/layers/PieLayer.mjs +4 -3
- package/dist/components/renderers/layers/PolarLayer.mjs +4 -4
- package/dist/components/renderers/layers/RadarLayer.mjs +4 -4
- package/dist/components/renderers/layers/ScatterLayer.mjs +5 -5
- package/dist/composables/useCartesianFrame.d.ts +3 -0
- package/dist/composables/useResponsiveConfig.d.ts +1 -0
- package/dist/composables/useResponsiveConfig.spec.d.ts +1 -0
- package/dist/context/ChartContext.d.ts +2 -0
- package/dist/context/index.d.ts +2 -2
- package/dist/context/keys.d.ts +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +61 -61
- package/dist/namespace.mjs +61 -61
- package/dist/release-date.d.ts +1 -1
- package/dist/types/axes.types.d.ts +1 -1
- package/dist/types/heatmap.types.d.ts +3 -8
- package/dist/types/index.d.ts +1 -1
- package/dist/types/line.types.d.ts +2 -2
- package/dist/types/scatter.types.d.ts +2 -0
- package/dist/types/treemap.types.d.ts +2 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/ruleOverrides.d.ts +13 -0
- package/dist/utils/ruleOverrides.spec.d.ts +1 -0
- package/package.json +5 -4
- package/dist/chunks/chunk-JBWL3G7O.mjs +0 -86
- package/dist/chunks/chunk-ZH4A4L6W.mjs +0 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CHART_METHODS_KEY, CHART_STATE_KEY, CHART_HOVER_KEY, RENDERER_HINT_KEY, CHART_REFRESH_NONCE_KEY, CHART_CORE_INSTANCE_KEY } from './chunk-
|
|
2
|
-
import { createChart, defaultLightTheme } from '@primeui/chart-core';
|
|
3
|
-
import { inject, shallowRef, ref,
|
|
1
|
+
import { CHART_METHODS_KEY, CHART_STATE_KEY, CHART_HOVER_KEY, CHART_RULE_OVERRIDES_KEY, RENDERER_HINT_KEY, CHART_REFRESH_NONCE_KEY, CHART_CORE_INSTANCE_KEY } from './chunk-FGBZ3VPE.mjs';
|
|
2
|
+
import { createChart, defaultLightTheme, applyColorblindMode } from '@primeui/chart-core';
|
|
3
|
+
import { inject, computed, shallowRef, ref, watch, provide } from 'vue';
|
|
4
4
|
|
|
5
5
|
function useChartMethods() {
|
|
6
6
|
const ctx = inject(CHART_METHODS_KEY);
|
|
@@ -23,6 +23,9 @@ function useChartHover() {
|
|
|
23
23
|
}
|
|
24
24
|
return hoverRef;
|
|
25
25
|
}
|
|
26
|
+
function useRuleOverrides() {
|
|
27
|
+
return inject(CHART_RULE_OVERRIDES_KEY) ?? computed(() => ({}));
|
|
28
|
+
}
|
|
26
29
|
function useRendererHint(hint) {
|
|
27
30
|
const hintRef = inject(RENDERER_HINT_KEY);
|
|
28
31
|
if (hintRef) {
|
|
@@ -122,6 +125,10 @@ function provideChartContext(options) {
|
|
|
122
125
|
axesX: new Map(s0.axes.x),
|
|
123
126
|
axesY: new Map(s0.axes.y)
|
|
124
127
|
};
|
|
128
|
+
let cbEffective = null;
|
|
129
|
+
let cbRaw = null;
|
|
130
|
+
let cbTheme = null;
|
|
131
|
+
let cbExplicit = null;
|
|
125
132
|
const stateValue = computed(() => {
|
|
126
133
|
void version.value;
|
|
127
134
|
const s = coreChart.$state;
|
|
@@ -132,7 +139,22 @@ function provideChartContext(options) {
|
|
|
132
139
|
const annotations = mapsEqual(s.annotations, snap.annotations) ? snap.annotations : snap.annotations = new Map(s.annotations);
|
|
133
140
|
const axesX = mapsEqual(s.axes.x, snap.axesX) ? snap.axesX : snap.axesX = new Map(s.axes.x);
|
|
134
141
|
const axesY = mapsEqual(s.axes.y, snap.axesY) ? snap.axesY : snap.axesY = new Map(s.axes.y);
|
|
135
|
-
|
|
142
|
+
const cbOn = features.get("accessibility")?.props?.patterns === true;
|
|
143
|
+
let effectiveDatasets = datasets;
|
|
144
|
+
if (cbOn) {
|
|
145
|
+
const themeVal = theme?.value ?? defaultLightTheme;
|
|
146
|
+
const themeExplicit = renderer === "canvas" || themeVal !== defaultLightTheme;
|
|
147
|
+
if (datasets !== cbRaw || themeVal !== cbTheme || themeExplicit !== cbExplicit) {
|
|
148
|
+
cbEffective = applyColorblindMode(datasets, themeVal, themeExplicit);
|
|
149
|
+
cbRaw = datasets;
|
|
150
|
+
cbTheme = themeVal;
|
|
151
|
+
cbExplicit = themeExplicit;
|
|
152
|
+
}
|
|
153
|
+
effectiveDatasets = cbEffective;
|
|
154
|
+
} else if (cbRaw !== null) {
|
|
155
|
+
cbRaw = cbEffective = cbExplicit = null;
|
|
156
|
+
}
|
|
157
|
+
return { datasets: effectiveDatasets, datasetVisibility, hiddenItems, features, annotations, axes: { x: axesX, y: axesY } };
|
|
136
158
|
});
|
|
137
159
|
const hoverValue = computed(() => ({
|
|
138
160
|
hover: hoverState.value
|
|
@@ -166,4 +188,4 @@ function provideChartContext(options) {
|
|
|
166
188
|
};
|
|
167
189
|
}
|
|
168
190
|
|
|
169
|
-
export { provideChartContext, useChartHover, useChartMethods, useChartState, useRendererHint };
|
|
191
|
+
export { provideChartContext, useChartHover, useChartMethods, useChartState, useRendererHint, useRuleOverrides };
|
|
@@ -8,5 +8,6 @@ var CHART_GROUP_TEXT_KEY = /* @__PURE__ */ Symbol.for("chart-group-text");
|
|
|
8
8
|
var TOOLTIP_CONTEXT_KEY = /* @__PURE__ */ Symbol.for("chart-tooltip");
|
|
9
9
|
var CHART_CORE_INSTANCE_KEY = /* @__PURE__ */ Symbol.for("chart-core-instance");
|
|
10
10
|
var CHART_REFRESH_NONCE_KEY = /* @__PURE__ */ Symbol.for("chart-refresh-nonce");
|
|
11
|
+
var CHART_RULE_OVERRIDES_KEY = /* @__PURE__ */ Symbol.for("chart-rule-overrides");
|
|
11
12
|
|
|
12
|
-
export { CHART_CORE_INSTANCE_KEY, CHART_GROUP_TEXT_KEY, CHART_HOVER_KEY, CHART_METHODS_KEY, CHART_REFRESH_NONCE_KEY, CHART_STATE_KEY, ITEM_COLLECTOR_KEY, RENDERER_HINT_KEY, TOOLTIP_CONTEXT_KEY };
|
|
13
|
+
export { CHART_CORE_INSTANCE_KEY, CHART_GROUP_TEXT_KEY, CHART_HOVER_KEY, CHART_METHODS_KEY, CHART_REFRESH_NONCE_KEY, CHART_RULE_OVERRIDES_KEY, CHART_STATE_KEY, ITEM_COLLECTOR_KEY, RENDERER_HINT_KEY, TOOLTIP_CONTEXT_KEY };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { BarLayerSvg_default } from './chunk-
|
|
2
|
-
import { BarLayerCanvas_default } from './chunk-
|
|
3
|
-
import { CartesianRenderer_default } from './chunk-
|
|
4
|
-
import { registerFamilyRenderer, registerChartLayer, useDatasetAnimationRegistration, useDatasetRegistration, useItemCollector } from './chunk-
|
|
1
|
+
import { BarLayerSvg_default } from './chunk-MX74LV4I.mjs';
|
|
2
|
+
import { BarLayerCanvas_default } from './chunk-EDDORION.mjs';
|
|
3
|
+
import { CartesianRenderer_default } from './chunk-BVB7G6Y5.mjs';
|
|
4
|
+
import { registerFamilyRenderer, registerChartLayer, useDatasetAnimationRegistration, useDatasetRegistration, useItemCollector } from './chunk-KX5GTFS3.mjs';
|
|
5
5
|
import { STACKED_CONTEXT_KEY } from './chunk-L6N5IYAJ.mjs';
|
|
6
|
-
import { useRendererHint, useChartMethods } from './chunk-
|
|
6
|
+
import { useRendererHint, useChartMethods } from './chunk-F72RBTHC.mjs';
|
|
7
7
|
import { defineComponent, useSlots, computed, inject, onMounted, watch, onUnmounted, renderSlot, createCommentVNode } from 'vue';
|
|
8
8
|
import { resolveAccessor } from '@primeui/chart-core';
|
|
9
9
|
import { getBarAxisHints } from '@primeui/chart-core/series/bar';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useControllerLifecycle } from './chunk-KNNYJD4D.mjs';
|
|
2
|
+
import { applyDataLabelRuleOverrides } from './chunk-Q3I4EL3N.mjs';
|
|
2
3
|
import { useRadialFrameRegistration } from './chunk-7EZEZMGG.mjs';
|
|
3
|
-
import { useChartMethods, useChartState, useChartHover } from './chunk-
|
|
4
|
+
import { useChartMethods, useChartState, useChartHover, useRuleOverrides } from './chunk-F72RBTHC.mjs';
|
|
4
5
|
import { defineComponent, computed, toRef, unref, openBlock, createElementBlock, Fragment, createElementVNode, renderList, createBlock, createCommentVNode, ref, watch, h } from 'vue';
|
|
5
6
|
import { buildPieSliceContentItems } from '@primeui/chart-core';
|
|
6
7
|
import { createPieRendererCanvas } from '@primeui/chart-core/series/pie/controller-canvas';
|
|
@@ -78,9 +79,7 @@ function usePieRenderer(options) {
|
|
|
78
79
|
return content;
|
|
79
80
|
});
|
|
80
81
|
function hitTest(x, y) {
|
|
81
|
-
|
|
82
|
-
if (!hit) return null;
|
|
83
|
-
return { datasetId: hit.datasetId, index: hit.index, label: hit.label, value: hit.value, percentage: hit.percentage, color: hit.color };
|
|
82
|
+
return controller.hitTest(x, y);
|
|
84
83
|
}
|
|
85
84
|
function getSlicePosition(datasetId, index) {
|
|
86
85
|
return controller.getSlicePosition(datasetId, index);
|
|
@@ -122,13 +121,14 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
122
121
|
const methods = useChartMethods();
|
|
123
122
|
const state = useChartState();
|
|
124
123
|
const hoverCtx = useChartHover();
|
|
124
|
+
const ruleOverrides = useRuleOverrides();
|
|
125
125
|
const pie = usePieRenderer({
|
|
126
126
|
chartArea: computed(() => props.chartArea),
|
|
127
127
|
renderer: methods.renderer,
|
|
128
128
|
canvasEl: toRef(props, "canvasEl"),
|
|
129
129
|
containerEl: toRef(props, "containerEl"),
|
|
130
130
|
datasets: computed(() => state.value.datasets),
|
|
131
|
-
features: computed(() => state.value.features),
|
|
131
|
+
features: computed(() => applyDataLabelRuleOverrides(state.value.features, ruleOverrides.value)),
|
|
132
132
|
hover: computed(() => hoverCtx.value.hover),
|
|
133
133
|
datasetVisibility: computed(() => state.value.datasetVisibility),
|
|
134
134
|
hiddenItems: computed(() => state.value.hiddenItems),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AXIS_GROUP_REGISTRY_KEY } from './chunk-EHSDNH7K.mjs';
|
|
2
|
-
import { useAxisComponentBase } from './chunk-
|
|
2
|
+
import { useAxisComponentBase } from './chunk-KX5GTFS3.mjs';
|
|
3
3
|
import { defineComponent, useSlots, computed, provide, renderSlot } from 'vue';
|
|
4
4
|
|
|
5
5
|
var __default__ = { inheritAttrs: false };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SYNC_BUS_KEY } from './chunk-H4HLHGUW.mjs';
|
|
2
|
-
import { CHART_GROUP_TEXT_KEY } from './chunk-
|
|
2
|
+
import { CHART_GROUP_TEXT_KEY } from './chunk-FGBZ3VPE.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,7 +1,7 @@
|
|
|
1
|
-
import { TOOLTIP_DEFAULT_STYLE, TOOLTIP_BASE_STYLE } from './chunk-
|
|
2
|
-
import { TOOLTIP_CONTEXT_KEY } from './chunk-
|
|
1
|
+
import { TOOLTIP_DEFAULT_STYLE, TOOLTIP_BASE_STYLE } from './chunk-Q3I4EL3N.mjs';
|
|
2
|
+
import { TOOLTIP_CONTEXT_KEY } from './chunk-FGBZ3VPE.mjs';
|
|
3
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';
|
|
4
|
+
import { computeTooltipPosition, buildTooltipContent, safeRenderProp, formatTooltipValue, patternToCssBackground, gradientToCssBackground } from '@primeui/chart-core';
|
|
5
5
|
|
|
6
6
|
var _hoisted_1 = { class: "p-chart-tooltip__title" };
|
|
7
7
|
var _hoisted_2 = {
|
|
@@ -160,8 +160,33 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
160
160
|
});
|
|
161
161
|
});
|
|
162
162
|
const hasCustomRender = computed(() => !!props.tooltipConfig?.render);
|
|
163
|
-
function swatchStyle(color, gradient, swatchColor) {
|
|
163
|
+
function swatchStyle(color, gradient, swatchColor, pattern, dash) {
|
|
164
164
|
const background = swatchColor ?? color;
|
|
165
|
+
if (pattern) {
|
|
166
|
+
return {
|
|
167
|
+
backgroundColor: pattern.backgroundColor ?? "transparent",
|
|
168
|
+
backgroundImage: patternToCssBackground(pattern),
|
|
169
|
+
backgroundSize: "6px"
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
if (dash && dash.length >= 2) {
|
|
173
|
+
const scale = 0.6;
|
|
174
|
+
const stops = [];
|
|
175
|
+
let pos = 0;
|
|
176
|
+
for (let i = 0; i < dash.length; i++) {
|
|
177
|
+
const seg = Math.max(0.5, dash[i] * scale);
|
|
178
|
+
const c = i % 2 === 0 ? background : "transparent";
|
|
179
|
+
stops.push(`${c} ${pos}px`, `${c} ${pos + seg}px`);
|
|
180
|
+
pos += seg;
|
|
181
|
+
}
|
|
182
|
+
return {
|
|
183
|
+
backgroundColor: "transparent",
|
|
184
|
+
backgroundImage: `repeating-linear-gradient(90deg, ${stops.join(", ")})`,
|
|
185
|
+
backgroundSize: "100% 2px",
|
|
186
|
+
backgroundPosition: "center",
|
|
187
|
+
backgroundRepeat: "no-repeat"
|
|
188
|
+
};
|
|
189
|
+
}
|
|
165
190
|
return gradient ? {
|
|
166
191
|
backgroundColor: background,
|
|
167
192
|
backgroundImage: gradientToCssBackground(gradient)
|
|
@@ -197,7 +222,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
197
222
|
}), "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) => {
|
|
198
223
|
return openBlock(), createElementBlock(Fragment, { key: row.datasetId }, [row.ohlc ? (openBlock(), createElementBlock("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [createElementVNode("span", {
|
|
199
224
|
class: "p-chart-tooltip__swatch",
|
|
200
|
-
style: normalizeStyle(swatchStyle(row.color, row.colorGradient, row.swatchColor))
|
|
225
|
+
style: normalizeStyle(swatchStyle(row.color, row.colorGradient, row.swatchColor, row.colorPattern, row.dash))
|
|
201
226
|
}, null, 4), createElementVNode("span", _hoisted_4, toDisplayString(row.label), 1)]), (openBlock(), createElementBlock(Fragment, null, renderList([
|
|
202
227
|
"open",
|
|
203
228
|
"high",
|
|
@@ -212,7 +237,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
212
237
|
}), 64))])) : (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
213
238
|
createElementVNode("span", {
|
|
214
239
|
class: "p-chart-tooltip__swatch",
|
|
215
|
-
style: normalizeStyle(swatchStyle(row.color, row.colorGradient, row.swatchColor))
|
|
240
|
+
style: normalizeStyle(swatchStyle(row.color, row.colorGradient, row.swatchColor, row.colorPattern, row.dash))
|
|
216
241
|
}, null, 4),
|
|
217
242
|
createElementVNode("span", _hoisted_8, toDisplayString(row.label), 1),
|
|
218
243
|
createElementVNode("span", _hoisted_9, toDisplayString(row.formattedValue), 1)
|
|
@@ -227,7 +252,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
227
252
|
}, toDisplayString(row.value), 5)]);
|
|
228
253
|
}), 128))], 64)) : content.value?.type === "ohlc" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [createElementVNode("div", _hoisted_12, [createElementVNode("span", {
|
|
229
254
|
class: "p-chart-tooltip__swatch",
|
|
230
|
-
style: normalizeStyle(swatchStyle(content.value.color, content.value.colorGradient, content.value.swatchColor))
|
|
255
|
+
style: normalizeStyle(swatchStyle(content.value.color, content.value.colorGradient, content.value.swatchColor, content.value.colorPattern, content.value.dash))
|
|
231
256
|
}, null, 4), createElementVNode("span", _hoisted_13, toDisplayString(content.value.label), 1)]), (openBlock(true), createElementBlock(Fragment, null, renderList(content.value.rows, (row) => {
|
|
232
257
|
return openBlock(), createElementBlock("div", {
|
|
233
258
|
key: row.key,
|
|
@@ -236,7 +261,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
236
261
|
}), 128))], 64)) : content.value?.type === "xy" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
237
262
|
createElementVNode("div", _hoisted_16, [createElementVNode("span", {
|
|
238
263
|
class: "p-chart-tooltip__swatch",
|
|
239
|
-
style: normalizeStyle(swatchStyle(content.value.color, content.value.colorGradient, content.value.swatchColor))
|
|
264
|
+
style: normalizeStyle(swatchStyle(content.value.color, content.value.colorGradient, content.value.swatchColor, content.value.colorPattern, content.value.dash))
|
|
240
265
|
}, null, 4), createElementVNode("span", _hoisted_17, toDisplayString(content.value.label), 1)]),
|
|
241
266
|
createElementVNode("div", _hoisted_18, [createElementVNode("span", _hoisted_19, toDisplayString(content.value.xLabel), 1), createElementVNode("span", _hoisted_20, toDisplayString(content.value.xValue), 1)]),
|
|
242
267
|
createElementVNode("div", _hoisted_21, [createElementVNode("span", _hoisted_22, toDisplayString(content.value.yLabel), 1), createElementVNode("span", _hoisted_23, toDisplayString(content.value.yValue), 1)]),
|
|
@@ -244,7 +269,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
244
269
|
], 64)) : content.value?.type === "simple" ? (openBlock(), createElementBlock("div", _hoisted_26, [
|
|
245
270
|
createElementVNode("span", {
|
|
246
271
|
class: "p-chart-tooltip__swatch",
|
|
247
|
-
style: normalizeStyle(swatchStyle(content.value.color, content.value.colorGradient, content.value.swatchColor))
|
|
272
|
+
style: normalizeStyle(swatchStyle(content.value.color, content.value.colorGradient, content.value.swatchColor, content.value.colorPattern, content.value.dash))
|
|
248
273
|
}, null, 4),
|
|
249
274
|
createElementVNode("span", _hoisted_27, toDisplayString(content.value.label), 1),
|
|
250
275
|
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)])
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ITEM_COLLECTOR_KEY } from './chunk-
|
|
1
|
+
import { ITEM_COLLECTOR_KEY } from './chunk-FGBZ3VPE.mjs';
|
|
2
2
|
import { defineComponent, inject, onMounted, watch, onUnmounted } from 'vue';
|
|
3
3
|
|
|
4
4
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -19,7 +19,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19
19
|
borderColor: {},
|
|
20
20
|
borderStrokeWidth: {},
|
|
21
21
|
size: {},
|
|
22
|
-
secondaryLabel: {},
|
|
23
22
|
opacity: {},
|
|
24
23
|
nodeId: {},
|
|
25
24
|
parentId: {}
|
|
@@ -48,7 +47,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
48
47
|
borderRadius: props.borderRadius,
|
|
49
48
|
borderColor: props.borderColor,
|
|
50
49
|
borderStrokeWidth: props.borderStrokeWidth,
|
|
51
|
-
secondaryLabel: props.secondaryLabel,
|
|
52
50
|
opacity: props.opacity,
|
|
53
51
|
nodeId: props.nodeId,
|
|
54
52
|
parentId: props.parentId
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { STACKED_CONTEXT_KEY } from './chunk-L6N5IYAJ.mjs';
|
|
2
|
-
import { useChartMethods } from './chunk-
|
|
2
|
+
import { useChartMethods } from './chunk-F72RBTHC.mjs';
|
|
3
3
|
import { defineComponent, onMounted, reactive, watch, onUnmounted, provide, renderSlot } from 'vue';
|
|
4
4
|
|
|
5
5
|
var stackIdCounter = 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LEGEND_ITEM_BASE_STYLE
|
|
1
|
+
import { LEGEND_ITEM_BASE_STYLE } from './chunk-Q3I4EL3N.mjs';
|
|
2
2
|
import { defineComponent, ref, computed, openBlock, createElementBlock, normalizeStyle, Fragment, renderList, createBlock, resolveDynamicComponent, unref, createCommentVNode, createElementVNode, toDisplayString, nextTick } from 'vue';
|
|
3
|
-
import { computeLegendStyle, safeRenderProp,
|
|
3
|
+
import { computeLegendStyle, safeRenderProp, legendSwatchStyle } from '@primeui/chart-core';
|
|
4
4
|
|
|
5
5
|
var _hoisted_1 = ["dir"];
|
|
6
6
|
var _hoisted_2 = {
|
|
@@ -102,24 +102,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
102
102
|
}
|
|
103
103
|
function getSwatchStyle(item) {
|
|
104
104
|
const lc = props.legendConfig;
|
|
105
|
-
|
|
106
|
-
const iconShape = lc.iconShape;
|
|
107
|
-
const base = {
|
|
108
|
-
...LEGEND_SWATCH_STYLE,
|
|
109
|
-
width: `${iconSize}px`,
|
|
110
|
-
height: iconShape === "line" ? "2px" : `${iconSize}px`,
|
|
111
|
-
borderRadius: iconShape === "circle" ? "50%" : iconShape === "line" ? "1px" : "2px",
|
|
112
|
-
backgroundColor: item.color,
|
|
113
|
-
...item.colorGradient ? { backgroundImage: gradientToCssBackground(item.colorGradient) } : {}
|
|
114
|
-
};
|
|
115
|
-
if (item.hasBorder && item.borderColor) {
|
|
116
|
-
base.border = `2px solid ${item.borderColor}`;
|
|
117
|
-
base.boxSizing = "border-box";
|
|
118
|
-
}
|
|
119
|
-
if (item.borderRadius !== void 0) {
|
|
120
|
-
base.borderRadius = `${Math.min(item.borderRadius, 6)}px`;
|
|
121
|
-
}
|
|
122
|
-
return base;
|
|
105
|
+
return legendSwatchStyle(item, lc.iconSize ?? 12, lc.iconShape);
|
|
123
106
|
}
|
|
124
107
|
return (_ctx, _cache) => {
|
|
125
108
|
return __props.legendConfig && __props.legendArea && __props.legendItems.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
@@ -129,16 +112,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
129
112
|
dir: __props.dir ?? "ltr"
|
|
130
113
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.legendItems, (item, idx) => {
|
|
131
114
|
return openBlock(), createElementBlock(Fragment, { key: itemKey(item, idx) }, [__props.legendConfig.render ? (openBlock(), createElementBlock("div", _hoisted_2, [(openBlock(), createBlock(resolveDynamicComponent(() => unref(safeRenderProp)(() => __props.legendConfig.render({
|
|
132
|
-
|
|
133
|
-
datasetId: item.datasetId,
|
|
134
|
-
index: item.index,
|
|
135
|
-
label: item.label,
|
|
136
|
-
color: item.color,
|
|
137
|
-
colorGradient: item.colorGradient,
|
|
138
|
-
visible: item.visible,
|
|
139
|
-
borderColor: item.borderColor,
|
|
140
|
-
hasBorder: item.hasBorder,
|
|
141
|
-
borderRadius: item.borderRadius,
|
|
115
|
+
...item,
|
|
142
116
|
isHovered: hoveredItem.value === item,
|
|
143
117
|
onClick: () => handleClick(item),
|
|
144
118
|
onMouseEnter: () => handleHover(item),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerZoomController } from './chunk-
|
|
2
|
-
import { useCustomizationRegistration } from './chunk-
|
|
1
|
+
import { registerZoomController } from './chunk-KX5GTFS3.mjs';
|
|
2
|
+
import { useCustomizationRegistration } from './chunk-QQGC223F.mjs';
|
|
3
3
|
import { defineComponent, getCurrentInstance, computed } from 'vue';
|
|
4
4
|
import { ZoomPanController } from '@primeui/chart-core';
|
|
5
5
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { STACKED_CONTEXT_KEY, RANGE_CONTEXT_KEY } from './chunk-L6N5IYAJ.mjs';
|
|
2
|
-
import { useCustomizationRegistration, useChartRefreshHook } from './chunk-
|
|
3
|
-
import { useChartMethods } from './chunk-
|
|
2
|
+
import { useCustomizationRegistration, useChartRefreshHook } from './chunk-QQGC223F.mjs';
|
|
3
|
+
import { useChartMethods } from './chunk-F72RBTHC.mjs';
|
|
4
4
|
import { SYNC_BUS_KEY } from './chunk-H4HLHGUW.mjs';
|
|
5
|
-
import { ITEM_COLLECTOR_KEY } from './chunk-
|
|
5
|
+
import { ITEM_COLLECTOR_KEY } from './chunk-FGBZ3VPE.mjs';
|
|
6
6
|
import { getCurrentInstance, computed, ref, watch, onUnmounted, toValue, watchEffect, inject, shallowRef, onMounted, onScopeDispose, shallowReactive, provide, onBeforeUnmount, unref } from 'vue';
|
|
7
|
-
import { normalizeAnimationsMap, setupPropertyAnimations, createAnimationDriver, AnimationRegistry, buildStaticFrame, renderWithCompositor, driveCartesianUpdate, resolveHoverRepaintFrame,
|
|
7
|
+
import { normalizeAnimationsMap, setupPropertyAnimations, createAnimationDriver, AnimationRegistry, buildStaticFrame, renderWithCompositor, cancelDriverRafs, driveCartesianUpdate, resolveHoverRepaintFrame, CartesianLayoutController, resolveSyncConfig, DatasetRegistrationController, DrilldownStateController, ItemCollector, getEasing, ChartSyncCoordinator, INACTIVE_STATE, KeyboardNavigationController, getResponsiveTier, getAdaptiveDefaults, evaluateResponsiveRules, ResponsiveDimensionsController, createInitialZoomState, configureCanvasHiDPI, renderCartesianOverlay, buildAnimatedFrame, isZoomed, AxisRegistrationController, AxisTransitionState, ZoomPanController, normalizeSubConfig } from '@primeui/chart-core';
|
|
8
8
|
|
|
9
9
|
function useAxisRegistration(axis, id, props) {
|
|
10
10
|
const methods = useChartMethods();
|
|
@@ -263,7 +263,18 @@ function useCartesianAnimation(options) {
|
|
|
263
263
|
[layoutData, groupRef, gridGroupRef],
|
|
264
264
|
() => {
|
|
265
265
|
const layout = layoutData.value;
|
|
266
|
-
if (!layout)
|
|
266
|
+
if (!layout) {
|
|
267
|
+
if (renderer === "svg") {
|
|
268
|
+
const grid = gridGroupRef.value;
|
|
269
|
+
const main = groupRef.value;
|
|
270
|
+
if (grid) while (grid.firstChild) grid.removeChild(grid.firstChild);
|
|
271
|
+
if (main) while (main.firstChild) main.removeChild(main.firstChild);
|
|
272
|
+
}
|
|
273
|
+
cancelDriverRafs(driver);
|
|
274
|
+
driver.cachedLayout = null;
|
|
275
|
+
driver.lastFrame = null;
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
267
278
|
if (renderer === "svg" && !groupRef.value) return;
|
|
268
279
|
const animFeature = features.value.get("animation")?.props;
|
|
269
280
|
driveCartesianUpdate(layout, driver, axisTransition, animFeature, renderFrame, buildStatic, buildAnimated, globalFont, locale, isDragging?.value);
|
|
@@ -523,7 +534,8 @@ function useChartContext(options) {
|
|
|
523
534
|
axis: b.axis,
|
|
524
535
|
normalized: b.normalized,
|
|
525
536
|
categoryIndex: b.categoryIndex,
|
|
526
|
-
sourceType: b.sourceType
|
|
537
|
+
sourceType: b.sourceType,
|
|
538
|
+
cellIndex: b.cellIndex
|
|
527
539
|
});
|
|
528
540
|
}
|
|
529
541
|
break;
|
|
@@ -711,6 +723,7 @@ function useResponsiveConfig(width, height, responsiveFeature, globalFont) {
|
|
|
711
723
|
return { tier, defaults, ruleOverrides };
|
|
712
724
|
});
|
|
713
725
|
return {
|
|
726
|
+
tier: computed(() => config.value.tier),
|
|
714
727
|
defaults: computed(() => config.value.defaults),
|
|
715
728
|
ruleOverrides: computed(() => config.value.ruleOverrides)
|
|
716
729
|
};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { applyDataLabelRuleOverrides } from './chunk-Q3I4EL3N.mjs';
|
|
2
|
+
import { useCartesianFrame, useCartesianFrameRegistration } from './chunk-KX5GTFS3.mjs';
|
|
3
|
+
import { useChartMethods, useChartState, useChartHover, useRuleOverrides } from './chunk-F72RBTHC.mjs';
|
|
3
4
|
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
5
|
import { createHeatmapRendererCanvas } from '@primeui/chart-core/series/heatmap/controller-canvas';
|
|
6
6
|
import { createHeatmapRendererSvg } from '@primeui/chart-core/series/heatmap/controller-svg';
|
|
7
7
|
|
|
8
8
|
function useHeatmapRenderer(options) {
|
|
9
|
-
const { chartArea, renderer, canvasEl, datasets,
|
|
9
|
+
const { chartArea, renderer, canvasEl, datasets, datasetVisibility, hover, hoverConfig, chartId, width, height, features, compositor, globalFont, theme } = options;
|
|
10
10
|
const groupRef = ref(null);
|
|
11
|
-
const gridGroupRef = ref(null);
|
|
12
|
-
const axisGroupRef = ref(null);
|
|
13
11
|
const controller = renderer === "canvas" ? createHeatmapRendererCanvas() : createHeatmapRendererSvg();
|
|
14
12
|
const versionRef = ref(0);
|
|
15
13
|
controller.onFrame = () => {
|
|
@@ -19,13 +17,11 @@ function useHeatmapRenderer(options) {
|
|
|
19
17
|
void versionRef.value;
|
|
20
18
|
return controller.scaleResult;
|
|
21
19
|
});
|
|
22
|
-
const axisLayoutsComputed = computed(() => {
|
|
23
|
-
void versionRef.value;
|
|
24
|
-
return controller.axisLayouts;
|
|
25
|
-
});
|
|
26
20
|
watch(
|
|
27
|
-
[datasets, datasetVisibility, chartArea,
|
|
21
|
+
[datasets, datasetVisibility, chartArea, features, width, height, groupRef, options.locale, theme, options.layoutData ?? ref(null)],
|
|
28
22
|
() => {
|
|
23
|
+
const ld = options.layoutData?.value;
|
|
24
|
+
const sharedLayout = ld?.sharedCategoryYScale ? { xScale: ld.sharedCategoryScale, yScale: ld.sharedCategoryYScale, area: ld.cartesianArea, axisLayouts: ld.axisLayouts } : void 0;
|
|
29
25
|
controller.update({
|
|
30
26
|
datasets: datasets.value,
|
|
31
27
|
datasetVisibility: datasetVisibility.value,
|
|
@@ -34,7 +30,6 @@ function useHeatmapRenderer(options) {
|
|
|
34
30
|
width: width.value,
|
|
35
31
|
height: height.value,
|
|
36
32
|
renderer,
|
|
37
|
-
axes: axes.value,
|
|
38
33
|
features: features.value,
|
|
39
34
|
hover: hover.value,
|
|
40
35
|
hoverConfig: hoverConfig.value,
|
|
@@ -44,14 +39,12 @@ function useHeatmapRenderer(options) {
|
|
|
44
39
|
globalFont,
|
|
45
40
|
locale: options.locale?.value,
|
|
46
41
|
theme: theme.value,
|
|
42
|
+
sharedLayout,
|
|
47
43
|
resolveDatasetProps: (dsId) => {
|
|
48
44
|
const dsReg = datasets.value.get(dsId);
|
|
49
45
|
return dsReg?.props;
|
|
50
46
|
}
|
|
51
47
|
});
|
|
52
|
-
if (renderer === "svg") {
|
|
53
|
-
renderHeatmapAxesSvg(gridGroupRef.value, axisGroupRef.value, controller.axisLayouts, theme.value);
|
|
54
|
-
}
|
|
55
48
|
},
|
|
56
49
|
{ immediate: true, flush: "post" }
|
|
57
50
|
);
|
|
@@ -127,11 +120,8 @@ function useHeatmapRenderer(options) {
|
|
|
127
120
|
});
|
|
128
121
|
return {
|
|
129
122
|
groupRef,
|
|
130
|
-
gridGroupRef,
|
|
131
|
-
axisGroupRef,
|
|
132
123
|
hitTest,
|
|
133
124
|
getPointPosition,
|
|
134
|
-
axisLayouts: axisLayoutsComputed,
|
|
135
125
|
plotArea: chartArea,
|
|
136
126
|
getColorScaleInfo,
|
|
137
127
|
scaleResult,
|
|
@@ -158,13 +148,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
158
148
|
const methods = useChartMethods();
|
|
159
149
|
const state = useChartState();
|
|
160
150
|
const hoverCtx = useChartHover();
|
|
161
|
-
const
|
|
151
|
+
const ruleOverrides = useRuleOverrides();
|
|
152
|
+
const features = computed(() => applyDataLabelRuleOverrides(state.value.features, ruleOverrides.value));
|
|
162
153
|
const heatmap = useHeatmapRenderer({
|
|
163
154
|
chartArea: frame.cartesianArea,
|
|
164
155
|
renderer: methods.renderer,
|
|
165
156
|
canvasEl: frame.canvasEl,
|
|
166
157
|
datasets: computed(() => state.value.datasets),
|
|
167
|
-
axes: computed(() => state.value.axes),
|
|
168
158
|
datasetVisibility: computed(() => state.value.datasetVisibility),
|
|
169
159
|
hover: computed(() => hoverCtx.value.hover),
|
|
170
160
|
hoverConfig: frame.hoverConfig,
|
|
@@ -175,7 +165,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
175
165
|
compositor: frame.compositor,
|
|
176
166
|
globalFont: methods.font,
|
|
177
167
|
locale: computed(() => methods.locale),
|
|
178
|
-
theme: computed(() => methods.theme)
|
|
168
|
+
theme: computed(() => methods.theme),
|
|
169
|
+
layoutData: frame.layoutData
|
|
179
170
|
});
|
|
180
171
|
useCartesianFrameRegistration({
|
|
181
172
|
type: "heatmap",
|
|
@@ -188,12 +179,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
188
179
|
const hmHit = heatmap.hitTest(x, y);
|
|
189
180
|
if (!hmHit) return null;
|
|
190
181
|
return {
|
|
191
|
-
|
|
192
|
-
index: hmHit.index,
|
|
193
|
-
col: hmHit.col,
|
|
182
|
+
...hmHit,
|
|
194
183
|
label: `${hmHit.xLabel}, ${hmHit.yLabel}`,
|
|
195
184
|
value: hmHit.value ?? 0,
|
|
196
|
-
color: hmHit.color,
|
|
197
185
|
snapX: hmHit.x + hmHit.width / 2,
|
|
198
186
|
snapY: hmHit.y + hmHit.height / 2,
|
|
199
187
|
formattedValue: hmHit.value != null ? String(hmHit.value) : "",
|
|
@@ -202,32 +190,17 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
202
190
|
}
|
|
203
191
|
});
|
|
204
192
|
return (_ctx, _cache) => {
|
|
205
|
-
return unref(methods).renderer === "svg" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
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);
|
|
193
|
+
return unref(methods).renderer === "svg" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("g", {
|
|
194
|
+
ref: (el) => {
|
|
195
|
+
unref(heatmap).groupRef.value = el;
|
|
196
|
+
},
|
|
197
|
+
class: "heatmap-chart"
|
|
198
|
+
}, null, 512), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(heatmap).svgContent.value, (el) => {
|
|
199
|
+
return openBlock(), createBlock(unref(VNodeRenderer), {
|
|
200
|
+
key: el.key ?? el.props?.key,
|
|
201
|
+
node: el
|
|
202
|
+
}, null, 8, ["node"]);
|
|
203
|
+
}), 128))], 64)) : createCommentVNode("", true);
|
|
231
204
|
};
|
|
232
205
|
}
|
|
233
206
|
});
|
|
@@ -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-QQGC223F.mjs';
|
|
2
|
+
import { CHART_METHODS_KEY, CHART_GROUP_TEXT_KEY } from './chunk-FGBZ3VPE.mjs';
|
|
3
3
|
import { defineComponent, inject, computed, onMounted, watch, onUnmounted } from 'vue';
|
|
4
4
|
|
|
5
5
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CartesianRenderer_default } from './chunk-
|
|
2
|
-
import { LineLayer_default } from './chunk-
|
|
3
|
-
import { registerFamilyRenderer, registerChartLayer, useDatasetAnimationRegistration, useDatasetRegistration, useItemCollector } from './chunk-
|
|
1
|
+
import { CartesianRenderer_default } from './chunk-BVB7G6Y5.mjs';
|
|
2
|
+
import { LineLayer_default } from './chunk-4B5OD4TC.mjs';
|
|
3
|
+
import { registerFamilyRenderer, registerChartLayer, useDatasetAnimationRegistration, useDatasetRegistration, useItemCollector } from './chunk-KX5GTFS3.mjs';
|
|
4
4
|
import { STACKED_CONTEXT_KEY, RANGE_CONTEXT_KEY } from './chunk-L6N5IYAJ.mjs';
|
|
5
|
-
import { useRendererHint, useChartMethods } from './chunk-
|
|
5
|
+
import { useRendererHint, useChartMethods } from './chunk-F72RBTHC.mjs';
|
|
6
6
|
import { defineComponent, useSlots, computed, inject, onMounted, watch, onUnmounted, renderSlot, createCommentVNode } from 'vue';
|
|
7
7
|
import { lineRenderer } from '@primeui/chart-core/series/line';
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CandlestickLayer_default } from './chunk-
|
|
2
|
-
import { CartesianRenderer_default } from './chunk-
|
|
3
|
-
import { registerFamilyRenderer, registerChartLayer, useDatasetAnimationRegistration, useDatasetRegistration, useItemCollector } from './chunk-
|
|
4
|
-
import { useRendererHint, useChartMethods } from './chunk-
|
|
1
|
+
import { CandlestickLayer_default } from './chunk-5CL32KCS.mjs';
|
|
2
|
+
import { CartesianRenderer_default } from './chunk-BVB7G6Y5.mjs';
|
|
3
|
+
import { registerFamilyRenderer, registerChartLayer, useDatasetAnimationRegistration, useDatasetRegistration, useItemCollector } from './chunk-KX5GTFS3.mjs';
|
|
4
|
+
import { useRendererHint, useChartMethods } from './chunk-F72RBTHC.mjs';
|
|
5
5
|
import { defineComponent, useSlots, computed, onMounted, watch, onUnmounted, renderSlot, createCommentVNode } from 'vue';
|
|
6
6
|
import { candlestickRenderer } from '@primeui/chart-core/series/candlestick';
|
|
7
7
|
|