@katlux/block-charts 0.1.0-beta.0 → 0.1.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/module.d.mts +6 -0
  2. package/dist/module.json +12 -0
  3. package/dist/module.mjs +23 -0
  4. package/dist/runtime/components/KAreaChart/KAreaChart.d.vue.ts +53 -0
  5. package/dist/runtime/components/KAreaChart/KAreaChart.vue +382 -0
  6. package/dist/runtime/components/KAreaChart/KAreaChart.vue.d.ts +53 -0
  7. package/dist/runtime/components/KBarChart/KBarChart.d.vue.ts +55 -0
  8. package/dist/runtime/components/KBarChart/KBarChart.vue +398 -0
  9. package/dist/runtime/components/KBarChart/KBarChart.vue.d.ts +55 -0
  10. package/dist/runtime/components/KHeatMap/KHeatMap.d.vue.ts +36 -0
  11. package/dist/runtime/components/KHeatMap/KHeatMap.vue +263 -0
  12. package/dist/runtime/components/KHeatMap/KHeatMap.vue.d.ts +36 -0
  13. package/dist/runtime/components/KLineChart/KLineChart.d.vue.ts +51 -0
  14. package/dist/runtime/components/KLineChart/KLineChart.vue +407 -0
  15. package/dist/runtime/components/KLineChart/KLineChart.vue.d.ts +51 -0
  16. package/dist/runtime/components/KPieChart/KPieChart.d.vue.ts +32 -0
  17. package/dist/runtime/components/KPieChart/KPieChart.vue +273 -0
  18. package/dist/runtime/components/KPieChart/KPieChart.vue.d.ts +32 -0
  19. package/dist/runtime/components/KScatterChart/KScatterChart.d.vue.ts +55 -0
  20. package/dist/runtime/components/KScatterChart/KScatterChart.vue +356 -0
  21. package/dist/runtime/components/KScatterChart/KScatterChart.vue.d.ts +55 -0
  22. package/dist/runtime/composables/useChartAnimation.d.ts +9 -0
  23. package/dist/runtime/composables/useChartAnimation.js +32 -0
  24. package/dist/runtime/composables/useChartAxes.d.ts +40 -0
  25. package/dist/runtime/composables/useChartAxes.js +58 -0
  26. package/dist/runtime/composables/useChartCanvas.d.ts +11 -0
  27. package/dist/runtime/composables/useChartCanvas.js +47 -0
  28. package/dist/runtime/composables/useChartData.d.ts +14 -0
  29. package/dist/runtime/composables/useChartData.js +45 -0
  30. package/dist/runtime/composables/useChartExport.d.ts +5 -0
  31. package/dist/runtime/composables/useChartExport.js +32 -0
  32. package/dist/runtime/composables/useChartHitTest.d.ts +11 -0
  33. package/dist/runtime/composables/useChartHitTest.js +39 -0
  34. package/dist/runtime/composables/useChartSvg.d.ts +17 -0
  35. package/dist/runtime/composables/useChartSvg.js +22 -0
  36. package/dist/runtime/composables/useChartViewport.d.ts +25 -0
  37. package/dist/runtime/composables/useChartViewport.js +92 -0
  38. package/dist/types.d.mts +3 -0
  39. package/package.json +7 -3
  40. package/build.config.ts +0 -4
  41. package/src/module.ts +0 -25
  42. package/src/runtime/components/KAreaChart/KAreaChart.vue +0 -410
  43. package/src/runtime/components/KBarChart/KBarChart.vue +0 -427
  44. package/src/runtime/components/KHeatMap/KHeatMap.vue +0 -301
  45. package/src/runtime/components/KLineChart/KLineChart.vue +0 -493
  46. package/src/runtime/components/KPieChart/KPieChart.vue +0 -307
  47. package/src/runtime/components/KScatterChart/KScatterChart.vue +0 -375
  48. package/src/runtime/composables/useChartAnimation.ts +0 -45
  49. package/src/runtime/composables/useChartAxes.ts +0 -105
  50. package/src/runtime/composables/useChartCanvas.ts +0 -67
  51. package/src/runtime/composables/useChartData.ts +0 -79
  52. package/src/runtime/composables/useChartExport.ts +0 -40
  53. package/src/runtime/composables/useChartHitTest.ts +0 -71
  54. package/src/runtime/composables/useChartSvg.ts +0 -45
  55. package/src/runtime/composables/useChartViewport.ts +0 -140
@@ -0,0 +1,398 @@
1
+ <template lang="pug">
2
+ .k-chart-wrapper(
3
+ :class="{ 'k-chart--grabbing': isDragging, 'k-chart--pannable': canPan }"
4
+ :style="{ cursor: isDragging ? 'grabbing' : canPan ? 'grab' : 'default' }"
5
+ @wheel.prevent="onWheel"
6
+ @mousedown="onMouseDown"
7
+ @mousemove="onMouseMove"
8
+ @mouseup="onMouseUp"
9
+ @mouseleave="onMouseLeave"
10
+ )
11
+ .k-chart-controls(v-if="zoomable")
12
+ KButton(size="small" @click="zoomIn" title="Zoom In") +
13
+ KButton(size="small" @click="zoomOut" title="Zoom Out") −
14
+ KButton(size="small" @click="resetZoom" title="Reset") ↺
15
+ .k-chart-inner(ref="containerRef")
16
+ KLoader(:loading="isLoading" overlay)
17
+ canvas(ref="canvasRef" v-show="!isLoading")
18
+ svg.k-chart-svg(v-show="!isLoading" ref="svgRef" :width="width" :height="height")
19
+ defs
20
+ clipPath(id="plot-clip")
21
+ rect(
22
+ :x="plotLeft"
23
+ :y="plotTop"
24
+ :width="plotWidth.value"
25
+ :height="plotHeight.value"
26
+ )
27
+ g.k-chart-hits
28
+ // Hit detection is now handled by calculation in onMouseMove
29
+
30
+ // Dynamic Interaction Layer
31
+ g.k-chart-interaction(v-if="hoveredIndex !== -1 && hoveredBar" clip-path="url(#plot-clip)")
32
+ rect.k-chart-hit-proxy(
33
+ :x="hoveredBar.x"
34
+ :y="hoveredBar.y"
35
+ :width="hoveredBar.w"
36
+ :height="hoveredBar.h"
37
+ fill="transparent"
38
+ style="cursor: pointer"
39
+ @click="emit('click-point', hoveredBar.item, hoveredIndex)"
40
+ )
41
+ rect(
42
+ :x="hoveredBar.x - 2"
43
+ :y="hoveredBar.y - 2"
44
+ :width="hoveredBar.w + 4"
45
+ :height="hoveredBar.h + 4"
46
+ fill="transparent"
47
+ stroke="#fff"
48
+ stroke-width="2"
49
+ rx="2"
50
+ pointer-events="none"
51
+ )
52
+ .k-chart-tooltip(v-if="tooltipState.visible && !isLoading" :style="{ left: tooltipState.x + 'px', top: tooltipState.y + 'px' }")
53
+ slot(name="tooltip" :item="tooltipState.item" :index="tooltipState.index")
54
+ span {{ tooltipState.content }}
55
+ </template>
56
+
57
+ <script setup>
58
+ import { ref, watch, computed, onMounted, nextTick } from "vue";
59
+ import { useChartCanvas } from "../../composables/useChartCanvas";
60
+ import { useChartSvg } from "../../composables/useChartSvg";
61
+ import { useChartData } from "../../composables/useChartData";
62
+ import { useChartViewport } from "../../composables/useChartViewport";
63
+ import { useChartAnimation, easeOut } from "../../composables/useChartAnimation";
64
+ import { useChartExport } from "../../composables/useChartExport";
65
+ const props = defineProps({
66
+ dataProvider: { type: null, required: false },
67
+ categoryField: { type: String, required: false, default: "category" },
68
+ valueField: { type: String, required: false, default: "value" },
69
+ groupField: { type: String, required: false, default: "group" },
70
+ orientation: { type: String, required: false, default: "vertical" },
71
+ mode: { type: String, required: false, default: "clustered" },
72
+ animated: { type: Boolean, required: false, default: true },
73
+ zoomable: { type: Boolean, required: false, default: true },
74
+ maxZoom: { type: Number, required: false, default: 8 },
75
+ colors: { type: Array, required: false, default: () => ["#6366f1", "#22d3ee", "#f59e0b", "#10b981", "#f43f5e", "#a855f7"] },
76
+ backgroundColor: { type: String, required: false, default: "#ffffff" },
77
+ showLegend: { type: Boolean, required: false, default: true },
78
+ xAxisTitle: { type: String, required: false, default: "" },
79
+ yAxisTitle: { type: String, required: false, default: "" }
80
+ });
81
+ const emit = defineEmits(["click-point", "hover-point", "zoom-change", "pan-change"]);
82
+ const containerRef = ref(null);
83
+ const canvasRef = ref(null);
84
+ const svgRef = ref(null);
85
+ const { ctx, width, height, clear, setupCanvas } = useChartCanvas();
86
+ const { hoveredIndex, tooltipState, showTooltip, hideTooltip, setHovered } = useChartSvg();
87
+ const dataRef = computed(() => props.dataProvider);
88
+ const { items } = useChartData(dataRef);
89
+ const { progress, animate } = useChartAnimation();
90
+ const { exportPng, exportSvg: exportSvgFile } = useChartExport();
91
+ const isLoading = computed(() => {
92
+ return props.dataProvider?.loading?.value || props.dataProvider?.initialLoad?.value || false;
93
+ });
94
+ const maxZoomRef = computed(() => props.maxZoom);
95
+ const plotWidthRef = computed(() => Math.max(0, width.value - 75));
96
+ const plotLeftRef = computed(() => 55);
97
+ const viewport = useChartViewport({ maxZoom: maxZoomRef, plotWidth: plotWidthRef, plotLeft: plotLeftRef });
98
+ const {
99
+ scale,
100
+ panOffset,
101
+ isDragging,
102
+ canPan,
103
+ zoomIn,
104
+ zoomOut,
105
+ resetZoom,
106
+ onWheel,
107
+ onMouseDown,
108
+ onMouseMove: onViewportMouseMove,
109
+ onMouseUp,
110
+ onMouseLeave: onViewportMouseLeave
111
+ } = viewport;
112
+ const PAD = { top: 20, right: 20, bottom: 50, left: 55 };
113
+ const plotLeft = PAD.left;
114
+ const plotTop = PAD.top;
115
+ const plotWidth = computed(() => Math.max(0, width.value - PAD.left - PAD.right));
116
+ const plotHeight = computed(() => Math.max(0, height.value - PAD.top - PAD.bottom));
117
+ const categories = computed(() => [...new Set(items.value.map((r) => String(r[props.categoryField])))]);
118
+ const groups = computed(() => [...new Set(items.value.map((r) => String(r[props.groupField] ?? "default")))]);
119
+ const maxValue = computed(() => {
120
+ if (props.mode === "stacked") {
121
+ const sums = categories.value.map(
122
+ (cat) => items.value.filter((r) => String(r[props.categoryField]) === cat).reduce((acc, r) => acc + Math.max(0, Number(r[props.valueField])), 0)
123
+ );
124
+ return Math.max(...sums, 10);
125
+ }
126
+ const vals = items.value.map((r) => Number(r[props.valueField]));
127
+ return vals.length ? Math.max(...vals, 10) : 10;
128
+ });
129
+ const visibleCatCount = computed(() => Math.max(1, Math.ceil(categories.value.length / scale.value)));
130
+ const panCatOffset = computed(() => {
131
+ const maxPan = categories.value.length - visibleCatCount.value;
132
+ const ratio = panOffset.value.x / (plotWidth.value || 1);
133
+ return Math.round(Math.min(Math.max(ratio * categories.value.length, 0), maxPan));
134
+ });
135
+ const visibleCategories = computed(
136
+ () => categories.value.slice(panCatOffset.value, panCatOffset.value + visibleCatCount.value)
137
+ );
138
+ const hitBars = ref([]);
139
+ const hoveredBar = computed(() => {
140
+ if (hoveredIndex.value === -1) return null;
141
+ return hitBars.value[hoveredIndex.value];
142
+ });
143
+ const draw = () => {
144
+ if (!ctx.value) return;
145
+ clear(props.backgroundColor);
146
+ const c = ctx.value;
147
+ const p = easeOut(progress.value);
148
+ const bars = [];
149
+ const catCount = visibleCategories.value.length;
150
+ const gCount = groups.value.length || 1;
151
+ const catWidth = plotWidth.value / (catCount || 1);
152
+ let barWidth = catWidth * 0.7;
153
+ if (props.mode === "clustered" && gCount > 1) {
154
+ barWidth = catWidth * 0.8 / gCount;
155
+ }
156
+ c.save();
157
+ c.strokeStyle = "rgba(100,100,120,0.1)";
158
+ c.lineWidth = 1;
159
+ c.fillStyle = "rgba(150,150,170,0.8)";
160
+ c.font = "11px system-ui, sans-serif";
161
+ c.textAlign = "right";
162
+ for (let i = 0; i <= 5; i++) {
163
+ const val = maxValue.value / 5 * i;
164
+ const y = plotTop + plotHeight.value - val / maxValue.value * plotHeight.value;
165
+ c.beginPath();
166
+ c.moveTo(plotLeft, y);
167
+ c.lineTo(plotLeft + plotWidth.value, y);
168
+ c.stroke();
169
+ c.fillText(val.toFixed(0), plotLeft - 8, y + 4);
170
+ }
171
+ c.strokeStyle = "rgba(100,100,120,0.05)";
172
+ for (let i = 0; i <= catCount; i++) {
173
+ const x = plotLeft + i * catWidth;
174
+ c.beginPath();
175
+ c.moveTo(x, plotTop);
176
+ c.lineTo(x, plotTop + plotHeight.value);
177
+ c.stroke();
178
+ }
179
+ c.strokeStyle = "rgba(150,150,170,0.5)";
180
+ c.beginPath();
181
+ c.moveTo(plotLeft, plotTop + plotHeight.value);
182
+ c.lineTo(plotLeft + plotWidth.value, plotTop + plotHeight.value);
183
+ c.stroke();
184
+ c.beginPath();
185
+ c.moveTo(plotLeft, plotTop);
186
+ c.lineTo(plotLeft, plotTop + plotHeight.value);
187
+ c.stroke();
188
+ c.restore();
189
+ c.save();
190
+ c.beginPath();
191
+ c.rect(plotLeft, plotTop, plotWidth.value, plotHeight.value);
192
+ c.clip();
193
+ visibleCategories.value.forEach((cat, catIdx) => {
194
+ const catItems = items.value.filter((r) => String(r[props.categoryField]) === cat);
195
+ const catX = plotLeft + catIdx * catWidth;
196
+ if (props.mode === "stacked") {
197
+ let yOffset = 0;
198
+ groups.value.forEach((group, gIdx) => {
199
+ const item = catItems.find((r) => String(r[props.groupField] ?? "default") === group);
200
+ if (!item) return;
201
+ const val = Number(item[props.valueField]) * p;
202
+ const bh = val / maxValue.value * plotHeight.value;
203
+ const bx = catX + (catWidth - barWidth) / 2;
204
+ const by = plotTop + plotHeight.value - (yOffset + val) / maxValue.value * plotHeight.value;
205
+ const isHovered = hoveredIndex.value === bars.length;
206
+ const color = props.colors[gIdx % props.colors.length];
207
+ c.fillStyle = isHovered ? color : color + "dd";
208
+ c.fillRect(bx, by, barWidth, bh);
209
+ c.strokeStyle = "rgba(255,255,255,0.3)";
210
+ c.lineWidth = 1;
211
+ c.strokeRect(bx, by, barWidth, bh);
212
+ bars.push({ x: bx, y: by, w: barWidth, h: bh, item, label: `${cat} (${group}): ${item[props.valueField]}` });
213
+ yOffset += Number(item[props.valueField]);
214
+ });
215
+ } else if (props.mode === "simple") {
216
+ const item = catItems[0];
217
+ if (item) {
218
+ const isHovered = hoveredIndex.value === bars.length;
219
+ const val = Number(item[props.valueField]) * p;
220
+ const bh = val / maxValue.value * plotHeight.value;
221
+ const bx = catX + (catWidth - barWidth) / 2;
222
+ const by = plotTop + plotHeight.value - bh;
223
+ const color = props.colors[0] || "#6366f1";
224
+ c.fillStyle = isHovered ? color : color + "dd";
225
+ c.fillRect(bx, by, barWidth, bh);
226
+ bars.push({ x: bx, y: by, w: barWidth, h: bh, item, label: `${cat}: ${item[props.valueField]}` });
227
+ }
228
+ } else {
229
+ groups.value.forEach((group, gIdx) => {
230
+ const item = catItems.find((r) => String(r[props.groupField] ?? "default") === group);
231
+ if (!item) return;
232
+ const isHovered = hoveredIndex.value === bars.length;
233
+ const val = Number(item[props.valueField]) * p;
234
+ const bh = val / maxValue.value * plotHeight.value;
235
+ const gCountTotal = groups.value.length;
236
+ const totalBarsW = gCountTotal * barWidth + (gCountTotal - 1) * 2;
237
+ const startX = catX + (catWidth - totalBarsW) / 2;
238
+ const bx = startX + gIdx * (barWidth + 2);
239
+ const by = plotTop + plotHeight.value - bh;
240
+ const color = props.colors[gIdx % props.colors.length];
241
+ c.fillStyle = isHovered ? color : color + "dd";
242
+ c.fillRect(bx, by, barWidth, bh);
243
+ bars.push({ x: bx, y: by, w: barWidth, h: bh, item, label: `${cat} (${group}): ${item[props.valueField]}` });
244
+ });
245
+ }
246
+ });
247
+ c.restore();
248
+ c.save();
249
+ c.fillStyle = "rgba(150,150,170,0.9)";
250
+ c.font = "11px system-ui, sans-serif";
251
+ c.textAlign = "center";
252
+ visibleCategories.value.forEach((cat, catIdx) => {
253
+ const catX = plotLeft + catIdx * catWidth;
254
+ const label = cat.length > 10 ? cat.slice(0, 10) + "\u2026" : cat;
255
+ c.fillText(label, catX + catWidth / 2, plotTop + plotHeight.value + 18);
256
+ });
257
+ c.restore();
258
+ c.save();
259
+ c.fillStyle = "rgba(120,120,140,0.8)";
260
+ if (props.xAxisTitle) {
261
+ c.textAlign = "center";
262
+ c.fillText(props.xAxisTitle, plotLeft + plotWidth.value / 2, plotTop + plotHeight.value + 38);
263
+ }
264
+ if (props.yAxisTitle) {
265
+ c.translate(plotLeft - 40, plotTop + plotHeight.value / 2);
266
+ c.rotate(-Math.PI / 2);
267
+ c.textAlign = "center";
268
+ c.fillText(props.yAxisTitle, 0, 0);
269
+ }
270
+ c.restore();
271
+ hitBars.value = bars;
272
+ if (props.showLegend) {
273
+ drawLegend(c);
274
+ }
275
+ };
276
+ const drawLegend = (c) => {
277
+ c.save();
278
+ c.font = "11px system-ui, sans-serif";
279
+ c.textAlign = "left";
280
+ c.textBaseline = "middle";
281
+ let xOffset = plotLeft;
282
+ const yPos = plotTop + plotHeight.value + 35;
283
+ groups.value.forEach((group, i) => {
284
+ const color = props.colors[i % props.colors.length];
285
+ c.fillStyle = color;
286
+ c.fillRect(xOffset, yPos - 4, 10, 8);
287
+ c.fillStyle = "rgba(150,150,170,0.9)";
288
+ const label = group === "default" ? "Series" : group;
289
+ c.fillText(label, xOffset + 15, yPos);
290
+ xOffset += c.measureText(label).width + 35;
291
+ });
292
+ c.restore();
293
+ };
294
+ watch([items, scale, panOffset, hoveredIndex, progress, () => props.mode, () => props.orientation], draw, { deep: true });
295
+ watch(items, () => {
296
+ if (props.animated) animate();
297
+ }, { deep: true });
298
+ watch(scale, (v) => emit("zoom-change", v));
299
+ watch(panOffset, (v) => emit("pan-change", v), { deep: true });
300
+ onMounted(async () => {
301
+ await nextTick();
302
+ if (containerRef.value && canvasRef.value) {
303
+ setupCanvas(canvasRef.value);
304
+ if (props.animated) animate();
305
+ else draw();
306
+ }
307
+ });
308
+ const onMouseMove = (e) => {
309
+ onViewportMouseMove(e);
310
+ if (isDragging.value) {
311
+ setHovered(-1);
312
+ hideTooltip();
313
+ return;
314
+ }
315
+ const rect = containerRef.value?.getBoundingClientRect();
316
+ if (!rect) return;
317
+ const mouseX = e.clientX - rect.left;
318
+ const mouseY = e.clientY - rect.top;
319
+ const hovered = hitBars.value.find(
320
+ (b) => mouseX >= b.x && mouseX <= b.x + b.w && mouseY >= b.y && mouseY <= b.y + b.h
321
+ );
322
+ if (hovered) {
323
+ const idx = hitBars.value.indexOf(hovered);
324
+ setHovered(idx);
325
+ showTooltip(mouseX + 10, mouseY - 10, hovered.label, hovered.item, idx);
326
+ emit("hover-point", hovered.item, idx);
327
+ } else {
328
+ setHovered(-1);
329
+ hideTooltip();
330
+ }
331
+ };
332
+ const onMouseLeave = (e) => {
333
+ onViewportMouseLeave(e);
334
+ setHovered(-1);
335
+ hideTooltip();
336
+ };
337
+ defineExpose({
338
+ zoomIn: viewport.zoomIn,
339
+ zoomOut: viewport.zoomOut,
340
+ resetZoom: viewport.resetZoom,
341
+ exportPng: () => canvasRef.value && exportPng(canvasRef.value, "bar-chart.png"),
342
+ exportSvg: () => svgRef.value && exportSvgFile(svgRef.value, "bar-chart.svg")
343
+ });
344
+ </script>
345
+
346
+ <style scoped>
347
+ .k-chart-wrapper {
348
+ position: relative;
349
+ user-select: none;
350
+ }
351
+ .k-chart-wrapper .k-chart-controls {
352
+ position: absolute;
353
+ top: 8px;
354
+ right: 8px;
355
+ z-index: 10;
356
+ display: flex;
357
+ gap: 4px;
358
+ }
359
+ .k-chart-wrapper .k-chart-btn {
360
+ display: none;
361
+ }
362
+ .k-chart-wrapper .k-chart-inner {
363
+ width: 100%;
364
+ height: 400px;
365
+ position: relative;
366
+ }
367
+ .k-chart-wrapper .k-chart-inner canvas, .k-chart-wrapper .k-chart-inner .k-chart-svg {
368
+ position: absolute;
369
+ top: 0;
370
+ left: 0;
371
+ width: 100%;
372
+ height: 100%;
373
+ display: block;
374
+ }
375
+ .k-chart-wrapper .k-chart-inner .k-chart-svg {
376
+ overflow: visible;
377
+ }
378
+ .k-chart-wrapper .k-chart-svg {
379
+ pointer-events: none;
380
+ }
381
+ .k-chart-wrapper .k-chart-svg .k-chart-hit-proxy {
382
+ pointer-events: all;
383
+ cursor: pointer;
384
+ }
385
+ .k-chart-wrapper .k-chart-tooltip {
386
+ position: absolute;
387
+ background: var(--bg-color-elevated, #1e1e2e);
388
+ color: var(--text-color-primary, #cdd6f4);
389
+ border: 1px solid var(--border-color-medium, #45475a);
390
+ border-radius: 8px;
391
+ padding: 6px 10px;
392
+ font-size: 12px;
393
+ pointer-events: none;
394
+ z-index: 20;
395
+ white-space: nowrap;
396
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
397
+ }
398
+ </style>
@@ -0,0 +1,55 @@
1
+ type __VLS_Props = {
2
+ dataProvider?: any;
3
+ categoryField?: string;
4
+ valueField?: string;
5
+ groupField?: string;
6
+ orientation?: 'vertical' | 'horizontal';
7
+ mode?: 'simple' | 'clustered' | 'stacked';
8
+ animated?: boolean;
9
+ zoomable?: boolean;
10
+ maxZoom?: number;
11
+ colors?: string[];
12
+ backgroundColor?: string;
13
+ showLegend?: boolean;
14
+ xAxisTitle?: string;
15
+ yAxisTitle?: string;
16
+ };
17
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
18
+ zoomIn: () => void;
19
+ zoomOut: () => void;
20
+ resetZoom: () => void;
21
+ exportPng: () => void | null;
22
+ exportSvg: () => void | null;
23
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
+ "click-point": (item: any, index: number) => any;
25
+ "hover-point": (item: any, index: number) => any;
26
+ "zoom-change": (scale: number) => any;
27
+ "pan-change": (offset: {
28
+ x: number;
29
+ y: number;
30
+ }) => any;
31
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
32
+ "onClick-point"?: ((item: any, index: number) => any) | undefined;
33
+ "onHover-point"?: ((item: any, index: number) => any) | undefined;
34
+ "onZoom-change"?: ((scale: number) => any) | undefined;
35
+ "onPan-change"?: ((offset: {
36
+ x: number;
37
+ y: number;
38
+ }) => any) | undefined;
39
+ }>, {
40
+ animated: boolean;
41
+ zoomable: boolean;
42
+ maxZoom: number;
43
+ colors: string[];
44
+ backgroundColor: string;
45
+ showLegend: boolean;
46
+ xAxisTitle: string;
47
+ yAxisTitle: string;
48
+ categoryField: string;
49
+ valueField: string;
50
+ groupField: string;
51
+ orientation: "vertical" | "horizontal";
52
+ mode: "simple" | "clustered" | "stacked";
53
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
54
+ declare const _default: typeof __VLS_export;
55
+ export default _default;
@@ -0,0 +1,36 @@
1
+ type __VLS_Props = {
2
+ dataProvider?: any;
3
+ rowField?: string;
4
+ columnField?: string;
5
+ valueField?: string;
6
+ colorLow?: string;
7
+ colorHigh?: string;
8
+ colors?: string[];
9
+ backgroundColor?: string;
10
+ showLegend?: boolean;
11
+ xAxisTitle?: string;
12
+ yAxisTitle?: string;
13
+ };
14
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
15
+ exportPng: () => void | null;
16
+ exportSvg: () => void | null;
17
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
+ "click-point": (item: any, index: number) => any;
19
+ "hover-point": (item: any, index: number) => any;
20
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
21
+ "onClick-point"?: ((item: any, index: number) => any) | undefined;
22
+ "onHover-point"?: ((item: any, index: number) => any) | undefined;
23
+ }>, {
24
+ colors: string[];
25
+ backgroundColor: string;
26
+ showLegend: boolean;
27
+ xAxisTitle: string;
28
+ yAxisTitle: string;
29
+ valueField: string;
30
+ rowField: string;
31
+ columnField: string;
32
+ colorLow: string;
33
+ colorHigh: string;
34
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
+ declare const _default: typeof __VLS_export;
36
+ export default _default;