@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,407 @@
1
+ <template lang="pug">
2
+ .k-chart-wrapper(
3
+ ref="wrapperRef"
4
+ :class="{ 'k-chart--grabbing': isDragging, 'k-chart--pannable': canPan }"
5
+ :style="{ cursor: isDragging ? 'grabbing' : canPan ? 'grab' : 'default' }"
6
+ @wheel.prevent="onWheel"
7
+ @mousedown="onMouseDown"
8
+ @mousemove="onMouseMove"
9
+ @mouseup="onMouseUp"
10
+ @mouseleave="onMouseLeave"
11
+ )
12
+ .k-chart-controls(v-if="zoomable")
13
+ KButton(size="small" @click="zoomIn" title="Zoom In") +
14
+ KButton(size="small" @click="zoomOut" title="Zoom Out") −
15
+ KButton(size="small" @click="resetZoom" title="Reset Zoom") ↺
16
+ .k-chart-inner(ref="containerRef")
17
+ KLoader(:loading="isLoading" overlay)
18
+ canvas(ref="canvasRef" v-show="!isLoading")
19
+ svg.k-chart-svg(
20
+ v-show="!isLoading"
21
+ ref="svgRef"
22
+ :width="width"
23
+ :height="height"
24
+ )
25
+ defs
26
+ clipPath(id="plot-clip")
27
+ rect(
28
+ :x="axes.plotLeft"
29
+ :y="axes.plotTop"
30
+ :width="axes.plotWidth.value"
31
+ :height="axes.plotHeight.value"
32
+ )
33
+ // Dynamic Interaction Layer: Repositions one set of circles to the nearest point
34
+ g.k-chart-interaction(v-if="hoveredIndex !== -1" clip-path="url(#plot-clip)")
35
+ circle.k-chart-hit-proxy(
36
+ v-for="(pt, i) in hoveredPoints"
37
+ :key="i"
38
+ :cx="pt.x"
39
+ :cy="pt.y"
40
+ :r="10"
41
+ fill="transparent"
42
+ style="cursor: pointer"
43
+ @click="emit('click-point', pt.item, pt.index)"
44
+ )
45
+ // Visible indicators
46
+ circle(
47
+ v-for="(pt, i) in hoveredPoints"
48
+ :key="'v' + i"
49
+ :cx="pt.x"
50
+ :cy="pt.y"
51
+ :r="5"
52
+ :fill="pt.color"
53
+ stroke="#fff"
54
+ stroke-width="2"
55
+ pointer-events="none"
56
+ )
57
+ // Tooltip
58
+ .k-chart-tooltip(
59
+ v-if="tooltipState.visible && !isLoading"
60
+ :style="{ left: tooltipState.x + 'px', top: tooltipState.y + 'px' }"
61
+ )
62
+ slot(name="tooltip" :item="tooltipState.item" :index="tooltipState.index")
63
+ span {{ tooltipState.content }}
64
+ </template>
65
+
66
+ <script setup>
67
+ import { ref, watch, computed, onMounted, onUnmounted, nextTick } from "vue";
68
+ import { useChartCanvas } from "../../composables/useChartCanvas";
69
+ import { useChartSvg } from "../../composables/useChartSvg";
70
+ import { useChartData } from "../../composables/useChartData";
71
+ import { useChartAxes, parseValue } from "../../composables/useChartAxes";
72
+ import { useChartViewport } from "../../composables/useChartViewport";
73
+ import { useChartAnimation, easeOut } from "../../composables/useChartAnimation";
74
+ import { useChartExport } from "../../composables/useChartExport";
75
+ import { useChartHitTest } from "../../composables/useChartHitTest";
76
+ const props = defineProps({
77
+ dataProvider: { type: null, required: false },
78
+ xField: { type: String, required: false, default: "x" },
79
+ yField: { type: String, required: false, default: "y" },
80
+ seriesField: { type: String, required: false, default: "series" },
81
+ animated: { type: Boolean, required: false, default: true },
82
+ zoomable: { type: Boolean, required: false, default: true },
83
+ maxZoom: { type: Number, required: false, default: 10 },
84
+ colors: { type: Array, required: false, default: () => ["#6366f1", "#22d3ee", "#f59e0b", "#10b981", "#f43f5e", "#a855f7", "#14b8a6", "#fb923c"] },
85
+ backgroundColor: { type: String, required: false, default: "#ffffff" },
86
+ showLegend: { type: Boolean, required: false, default: true },
87
+ xAxisTitle: { type: String, required: false, default: "" },
88
+ yAxisTitle: { type: String, required: false, default: "" }
89
+ });
90
+ const emit = defineEmits(["click-point", "hover-point", "zoom-change", "pan-change"]);
91
+ const wrapperRef = ref(null);
92
+ const containerRef = ref(null);
93
+ const canvasRef = ref(null);
94
+ const svgRef = ref(null);
95
+ const { ctx, width, height, clear, setupCanvas } = useChartCanvas();
96
+ const { hoveredIndex, tooltipState, showTooltip, hideTooltip, setHovered } = useChartSvg();
97
+ const dataRef = computed(() => props.dataProvider);
98
+ const { items, loading } = useChartData(dataRef);
99
+ const { progress, animate } = useChartAnimation();
100
+ const { exportPng, exportSvg: exportSvgFile } = useChartExport();
101
+ const isLoading = computed(() => {
102
+ return props.dataProvider?.loading?.value || props.dataProvider?.initialLoad?.value || false;
103
+ });
104
+ const maxZoomRef = computed(() => props.maxZoom);
105
+ const plotWidthRef = computed(() => Math.max(0, width.value - 75));
106
+ const plotLeftRef = computed(() => 55);
107
+ const viewport = useChartViewport({ maxZoom: maxZoomRef, plotWidth: plotWidthRef, plotLeft: plotLeftRef });
108
+ const { findNearestX } = useChartHitTest();
109
+ const {
110
+ scale,
111
+ panOffset,
112
+ isDragging,
113
+ canPan,
114
+ zoomIn,
115
+ zoomOut,
116
+ resetZoom,
117
+ onWheel,
118
+ onMouseDown,
119
+ onMouseMove: onViewportMouseMove,
120
+ onMouseUp,
121
+ onMouseLeave: onViewportMouseLeave
122
+ } = viewport;
123
+ const xFieldRef = computed(() => props.xField);
124
+ const yFieldRef = computed(() => props.yField);
125
+ const seriesMap = computed(() => {
126
+ const map = /* @__PURE__ */ new Map();
127
+ for (const item of items.value) {
128
+ const key = String(item[props.seriesField] ?? "default");
129
+ if (!map.has(key)) map.set(key, []);
130
+ map.get(key).push(item);
131
+ }
132
+ return map;
133
+ });
134
+ const axes = useChartAxes({
135
+ items,
136
+ xField: xFieldRef,
137
+ yField: yFieldRef,
138
+ width,
139
+ height,
140
+ scale,
141
+ panOffset,
142
+ padding: { top: 20, right: 20, bottom: 40, left: 55 }
143
+ });
144
+ const draw = () => {
145
+ if (!ctx.value) return;
146
+ clear(props.backgroundColor);
147
+ const c = ctx.value;
148
+ const p = easeOut(progress.value);
149
+ drawGrid(c);
150
+ drawAxes(c);
151
+ c.save();
152
+ c.beginPath();
153
+ c.rect(axes.plotLeft, axes.plotTop, axes.plotWidth.value, axes.plotHeight.value);
154
+ c.clip();
155
+ let seriesIdx = 0;
156
+ for (const [, seriesItems] of seriesMap.value) {
157
+ const color = props.colors[seriesIdx % props.colors.length];
158
+ drawLine(c, seriesItems, color, p);
159
+ seriesIdx++;
160
+ }
161
+ c.restore();
162
+ if (props.showLegend) {
163
+ drawLegend(c);
164
+ }
165
+ };
166
+ const drawLegend = (c) => {
167
+ c.save();
168
+ c.font = "11px system-ui, sans-serif";
169
+ c.textAlign = "left";
170
+ c.textBaseline = "middle";
171
+ const keys = Array.from(seriesMap.value.keys());
172
+ let xOffset = axes.plotLeft;
173
+ const yPos = axes.plotTop + axes.plotHeight.value + 28;
174
+ keys.forEach((key, i) => {
175
+ const color = props.colors[i % props.colors.length];
176
+ c.fillStyle = color;
177
+ c.beginPath();
178
+ c.arc(xOffset + 5, yPos, 4, 0, Math.PI * 2);
179
+ c.fill();
180
+ c.fillStyle = "rgba(150,150,170,0.9)";
181
+ const label = key === "default" ? "Series" : key;
182
+ c.fillText(label, xOffset + 15, yPos);
183
+ xOffset += c.measureText(label).width + 35;
184
+ });
185
+ c.restore();
186
+ };
187
+ const drawGrid = (c) => {
188
+ c.save();
189
+ c.strokeStyle = "rgba(100,100,120,0.1)";
190
+ c.lineWidth = 1;
191
+ const ySteps = 6;
192
+ for (let i = 0; i <= ySteps; i++) {
193
+ const y = axes.plotTop + axes.plotHeight.value / ySteps * i;
194
+ c.beginPath();
195
+ c.moveTo(axes.plotLeft, y);
196
+ c.lineTo(axes.plotLeft + axes.plotWidth.value, y);
197
+ c.stroke();
198
+ }
199
+ const xSteps = 6;
200
+ for (let i = 0; i <= xSteps; i++) {
201
+ const x = axes.plotLeft + axes.plotWidth.value / xSteps * i;
202
+ c.beginPath();
203
+ c.moveTo(x, axes.plotTop);
204
+ c.lineTo(x, axes.plotTop + axes.plotHeight.value);
205
+ c.stroke();
206
+ }
207
+ c.restore();
208
+ };
209
+ const drawAxes = (c) => {
210
+ c.save();
211
+ c.strokeStyle = "rgba(150,150,170,0.5)";
212
+ c.lineWidth = 1;
213
+ c.fillStyle = "rgba(150,150,170,0.8)";
214
+ c.font = "11px system-ui, sans-serif";
215
+ c.textAlign = "right";
216
+ const ySteps = 5;
217
+ for (let i = 0; i <= ySteps; i++) {
218
+ const val = axes.yMin.value + (axes.yMax.value - axes.yMin.value) * (i / ySteps);
219
+ const y = axes.toY(val);
220
+ c.fillText(val.toFixed(1), axes.plotLeft - 8, y + 4);
221
+ }
222
+ c.textAlign = "center";
223
+ const xSteps = 5;
224
+ for (let i = 0; i <= xSteps; i++) {
225
+ const val = axes.xMin.value + (axes.xMax.value - axes.xMin.value) * (i / xSteps);
226
+ const x = axes.toX(val);
227
+ let label = val.toFixed(1);
228
+ if (val > 1e12) label = new Date(val).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
229
+ c.fillText(label, x, axes.plotTop + axes.plotHeight.value + 16);
230
+ }
231
+ c.beginPath();
232
+ c.moveTo(axes.plotLeft, axes.plotTop + axes.plotHeight.value);
233
+ c.lineTo(axes.plotLeft + axes.plotWidth.value, axes.plotTop + axes.plotHeight.value);
234
+ c.stroke();
235
+ c.beginPath();
236
+ c.moveTo(axes.plotLeft, axes.plotTop);
237
+ c.lineTo(axes.plotLeft, axes.plotTop + axes.plotHeight.value);
238
+ c.stroke();
239
+ c.fillStyle = "rgba(120,120,140,0.8)";
240
+ if (props.xAxisTitle) {
241
+ c.textAlign = "center";
242
+ c.fillText(props.xAxisTitle, axes.plotLeft + axes.plotWidth.value / 2, axes.plotTop + axes.plotHeight.value + 34);
243
+ }
244
+ if (props.yAxisTitle) {
245
+ c.save();
246
+ c.translate(axes.plotLeft - 40, axes.plotTop + axes.plotHeight.value / 2);
247
+ c.rotate(-Math.PI / 2);
248
+ c.textAlign = "center";
249
+ c.fillText(props.yAxisTitle, 0, 0);
250
+ c.restore();
251
+ }
252
+ c.restore();
253
+ };
254
+ const drawLine = (c, data, color, progress2) => {
255
+ if (!data.length) return;
256
+ const sorted = [...data].sort((a, b) => parseValue(a[props.xField]) - parseValue(b[props.xField]));
257
+ const totalPts = sorted.length;
258
+ const drawCount = Math.max(1, Math.floor(totalPts * progress2));
259
+ c.save();
260
+ c.strokeStyle = color;
261
+ c.lineWidth = 2.5;
262
+ c.lineJoin = "round";
263
+ c.lineCap = "round";
264
+ c.beginPath();
265
+ sorted.slice(0, drawCount).forEach((item, i) => {
266
+ const x = axes.toX(parseValue(item[props.xField]));
267
+ const y = axes.toY(parseValue(item[props.yField]));
268
+ if (i === 0) c.moveTo(x, y);
269
+ else c.lineTo(x, y);
270
+ });
271
+ c.stroke();
272
+ for (let i = 0; i < drawCount; i++) {
273
+ const item = sorted[i];
274
+ const x = axes.toX(parseValue(item[props.xField]));
275
+ const y = axes.toY(parseValue(item[props.yField]));
276
+ const isHovered = hoveredIndex.value === items.value.indexOf(item);
277
+ c.beginPath();
278
+ c.arc(x, y, isHovered ? 5 : 3, 0, Math.PI * 2);
279
+ c.fillStyle = isHovered ? "#fff" : color;
280
+ c.strokeStyle = color;
281
+ c.lineWidth = 2;
282
+ c.fill();
283
+ c.stroke();
284
+ }
285
+ c.restore();
286
+ };
287
+ watch([items, scale, panOffset, hoveredIndex, progress], draw, { deep: true });
288
+ watch(items, () => {
289
+ if (props.animated) animate();
290
+ }, { deep: true });
291
+ watch(scale, (v) => emit("zoom-change", v));
292
+ watch(panOffset, (v) => emit("pan-change", v), { deep: true });
293
+ onMounted(async () => {
294
+ await nextTick();
295
+ if (containerRef.value && canvasRef.value) {
296
+ setupCanvas(canvasRef.value);
297
+ if (props.animated) animate();
298
+ else draw();
299
+ }
300
+ });
301
+ const hoveredPoints = computed(() => {
302
+ if (hoveredIndex.value === -1) return [];
303
+ const item = items.value[hoveredIndex.value];
304
+ const xVal = parseValue(item[props.xField]);
305
+ const xPx = axes.toX(xVal);
306
+ const pts = [];
307
+ let seriesIdx = 0;
308
+ for (const [key, seriesItems] of seriesMap.value) {
309
+ const seriesItem = seriesItems.find((it) => parseValue(it[props.xField]) === xVal);
310
+ if (seriesItem) {
311
+ pts.push({
312
+ x: xPx,
313
+ y: axes.toY(parseValue(seriesItem[props.yField])),
314
+ color: props.colors[seriesIdx % props.colors.length],
315
+ item: seriesItem,
316
+ index: items.value.indexOf(seriesItem)
317
+ });
318
+ }
319
+ seriesIdx++;
320
+ }
321
+ return pts;
322
+ });
323
+ const onMouseMove = (e) => {
324
+ onViewportMouseMove(e);
325
+ if (isDragging.value) {
326
+ setHovered(-1);
327
+ hideTooltip();
328
+ return;
329
+ }
330
+ const rect = wrapperRef.value?.getBoundingClientRect();
331
+ if (!rect) return;
332
+ const mouseX = e.clientX - rect.left;
333
+ const mouseY = e.clientY - rect.top;
334
+ const nearest = findNearestX(items.value, mouseX, props.xField, axes);
335
+ if (nearest) {
336
+ setHovered(nearest.index);
337
+ showTooltip(mouseX + 10, mouseY - 20, `${nearest.item[props.xField]}: ${nearest.item[props.yField]}`, nearest.item, nearest.index);
338
+ emit("hover-point", nearest.item, nearest.index);
339
+ } else {
340
+ setHovered(-1);
341
+ hideTooltip();
342
+ }
343
+ };
344
+ const onMouseLeave = (e) => {
345
+ onViewportMouseLeave(e);
346
+ setHovered(-1);
347
+ hideTooltip();
348
+ };
349
+ defineExpose({
350
+ zoomIn: viewport.zoomIn,
351
+ zoomOut: viewport.zoomOut,
352
+ resetZoom: viewport.resetZoom,
353
+ exportPng: () => canvasRef.value && exportPng(canvasRef.value, "line-chart.png"),
354
+ exportSvg: () => svgRef.value && exportSvgFile(svgRef.value, "line-chart.svg")
355
+ });
356
+ </script>
357
+
358
+ <style scoped>
359
+ .k-chart-wrapper {
360
+ position: relative;
361
+ user-select: none;
362
+ }
363
+ .k-chart-wrapper .k-chart-controls {
364
+ position: absolute;
365
+ top: 8px;
366
+ right: 8px;
367
+ z-index: 10;
368
+ display: flex;
369
+ gap: 4px;
370
+ }
371
+ .k-chart-wrapper .k-chart-inner {
372
+ width: 100%;
373
+ height: 400px;
374
+ position: relative;
375
+ }
376
+ .k-chart-wrapper .k-chart-inner canvas, .k-chart-wrapper .k-chart-inner .k-chart-svg {
377
+ position: absolute;
378
+ top: 0;
379
+ left: 0;
380
+ width: 100%;
381
+ height: 100%;
382
+ display: block;
383
+ }
384
+ .k-chart-wrapper .k-chart-inner .k-chart-svg {
385
+ overflow: visible;
386
+ }
387
+ .k-chart-wrapper .k-chart-svg {
388
+ pointer-events: none;
389
+ }
390
+ .k-chart-wrapper .k-chart-svg .k-chart-hit-proxy {
391
+ pointer-events: all;
392
+ cursor: pointer;
393
+ }
394
+ .k-chart-wrapper .k-chart-tooltip {
395
+ position: absolute;
396
+ background: var(--bg-color-elevated, #1e1e2e);
397
+ color: var(--text-color-primary, #cdd6f4);
398
+ border: 1px solid var(--border-color-medium, #45475a);
399
+ border-radius: 8px;
400
+ padding: 6px 10px;
401
+ font-size: 12px;
402
+ pointer-events: none;
403
+ z-index: 20;
404
+ white-space: nowrap;
405
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
406
+ }
407
+ </style>
@@ -0,0 +1,51 @@
1
+ type __VLS_Props = {
2
+ dataProvider?: any;
3
+ xField?: string;
4
+ yField?: string;
5
+ seriesField?: string;
6
+ animated?: boolean;
7
+ zoomable?: boolean;
8
+ maxZoom?: number;
9
+ colors?: string[];
10
+ backgroundColor?: string;
11
+ showLegend?: boolean;
12
+ xAxisTitle?: string;
13
+ yAxisTitle?: string;
14
+ };
15
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
16
+ zoomIn: () => void;
17
+ zoomOut: () => void;
18
+ resetZoom: () => void;
19
+ exportPng: () => void | null;
20
+ exportSvg: () => void | null;
21
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
+ "click-point": (item: any, index: number) => any;
23
+ "hover-point": (item: any, index: number) => any;
24
+ "zoom-change": (scale: number) => any;
25
+ "pan-change": (offset: {
26
+ x: number;
27
+ y: number;
28
+ }) => any;
29
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
30
+ "onClick-point"?: ((item: any, index: number) => any) | undefined;
31
+ "onHover-point"?: ((item: any, index: number) => any) | undefined;
32
+ "onZoom-change"?: ((scale: number) => any) | undefined;
33
+ "onPan-change"?: ((offset: {
34
+ x: number;
35
+ y: number;
36
+ }) => any) | undefined;
37
+ }>, {
38
+ xField: string;
39
+ yField: string;
40
+ seriesField: string;
41
+ animated: boolean;
42
+ zoomable: boolean;
43
+ maxZoom: number;
44
+ colors: string[];
45
+ backgroundColor: string;
46
+ showLegend: boolean;
47
+ xAxisTitle: string;
48
+ yAxisTitle: string;
49
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
50
+ declare const _default: typeof __VLS_export;
51
+ export default _default;
@@ -0,0 +1,32 @@
1
+ type __VLS_Props = {
2
+ dataProvider?: any;
3
+ labelField?: string;
4
+ valueField?: string;
5
+ donut?: boolean;
6
+ animated?: boolean;
7
+ colors?: string[];
8
+ backgroundColor?: string;
9
+ showLegend?: boolean;
10
+ title?: string;
11
+ };
12
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
13
+ exportPng: () => void | null;
14
+ exportSvg: () => void | null;
15
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ "click-point": (item: any, index: number) => any;
17
+ "hover-point": (item: any, index: number) => any;
18
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
19
+ "onClick-point"?: ((item: any, index: number) => any) | undefined;
20
+ "onHover-point"?: ((item: any, index: number) => any) | undefined;
21
+ }>, {
22
+ title: string;
23
+ animated: boolean;
24
+ colors: string[];
25
+ backgroundColor: string;
26
+ showLegend: boolean;
27
+ valueField: string;
28
+ labelField: string;
29
+ donut: boolean;
30
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
31
+ declare const _default: typeof __VLS_export;
32
+ export default _default;