vue-echarts 6.4.0 → 6.5.0

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/README.md CHANGED
@@ -227,7 +227,7 @@ Drop `<script>` inside your HTML file and access the component via `window.VueEC
227
227
  ```html
228
228
  <script src="https://cdn.jsdelivr.net/npm/vue@3.2.37"></script>
229
229
  <script src="https://cdn.jsdelivr.net/npm/echarts@5.3.3"></script>
230
- <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.4.0"></script>
230
+ <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.5.0"></script>
231
231
  ```
232
232
  <!-- vue3Scripts:end -->
233
233
 
@@ -247,7 +247,7 @@ app.component('v-chart', VueECharts)
247
247
  ```html
248
248
  <script src="https://cdn.jsdelivr.net/npm/vue@2.7.5"></script>
249
249
  <script src="https://cdn.jsdelivr.net/npm/echarts@5.3.3"></script>
250
- <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.4.0"></script>
250
+ <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.5.0"></script>
251
251
  ```
252
252
  <!-- vue2Scripts:end -->
253
253
 
package/README.zh-Hans.md CHANGED
@@ -225,7 +225,7 @@ import "echarts";
225
225
  ```html
226
226
  <script src="https://cdn.jsdelivr.net/npm/vue@3.2.37"></script>
227
227
  <script src="https://cdn.jsdelivr.net/npm/echarts@5.3.3"></script>
228
- <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.4.0"></script>
228
+ <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.5.0"></script>
229
229
  ```
230
230
  <!-- vue3Scripts:end -->
231
231
 
@@ -245,7 +245,7 @@ app.component('v-chart', VueECharts)
245
245
  ```html
246
246
  <script src="https://cdn.jsdelivr.net/npm/vue@2.7.5"></script>
247
247
  <script src="https://cdn.jsdelivr.net/npm/echarts@5.3.3"></script>
248
- <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.4.0"></script>
248
+ <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.5.0"></script>
249
249
  ```
250
250
  <!-- vue2Scripts:end -->
251
251
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { PropType, InjectionKey } from "vue-demi";
2
2
  import { Ref as Ref$0 } from "vue-demi";
3
- import { init, SetOptionOpts } from "echarts/core";
3
+ import { init, SetOptionOpts, ECElementEvent, ElementEvent } from "echarts/core";
4
4
  import { Ref } from "vue";
5
5
  type Injection<T> = T | null | Ref<T | null> | {
6
6
  value: T | null;
@@ -16,12 +16,6 @@ type UpdateOptionsInjection = Injection<UpdateOptions>;
16
16
  type EChartsType = ReturnType<InitType>;
17
17
  type SetOptionType = EChartsType["setOption"];
18
18
  type Option = Parameters<SetOptionType>[0];
19
- type EChartsEventName = "click" | "dblclick" | "mousedown" | "mousemove" | "mouseup" | "mouseover" | "mouseout" | "globalout" | "contextmenu" | "highlight" | "downplay" | "selectchanged" | "legendselectchanged" | "legendselected" | "legendunselected" | "legendselectall" | "legendinverseselect" | "legendscroll" | "datazoom" | "datarangeselected" | "graphroam" | "georoam" | "treeroam" | "timelinechanged" | "timelineplaychanged" | "restore" | "dataviewchanged" | "magictypechanged" | "geoselectchanged" | "geoselected" | "geounselected" | "axisareaselected" | "brush" | "brushEnd" | "brushselected" | "globalcursortaken" | "rendered" | "finished";
20
- type ZRenderEventName = "click" | "dblclick" | "mousewheel" | "mouseout" | "mouseover" | "mouseup" | "mousedown" | "mousemove" | "contextmenu" | "drag" | "dragstart" | "dragend" | "dragenter" | "dragleave" | "dragover" | "drop" | "globalout";
21
- type EventName = EChartsEventName | `zr:${ZRenderEventName}`;
22
- type Emits = {
23
- [key in EventName]: null;
24
- };
25
19
  interface EChartsElement extends HTMLElement {
26
20
  __dispose: (() => void) | null;
27
21
  }
@@ -151,9 +145,11 @@ declare const _default: import("vue-demi").DefineComponent<{
151
145
  renderer?: ("canvas" | "svg") | undefined;
152
146
  devicePixelRatio?: number | undefined;
153
147
  useDirtyRect?: boolean | undefined;
148
+ useCoarsePointer?: boolean | undefined;
149
+ pointerSize?: number | undefined;
154
150
  ssr?: boolean | undefined;
155
- width?: number | undefined;
156
- height?: number | undefined;
151
+ width?: string | number | undefined;
152
+ height?: string | number | undefined;
157
153
  }>;
158
154
  updateOptions: PropType<import("echarts/types/dist/shared").SetOptionOpts>;
159
155
  group: StringConstructor;
@@ -308,7 +304,76 @@ declare const _default: import("vue-demi").DefineComponent<{
308
304
  nonEventAttrs: import("vue-demi").ComputedRef<{
309
305
  [key: string]: any;
310
306
  }>;
311
- }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, Emits, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
307
+ }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {
308
+ click: (params: import("echarts/types/dist/shared").ECElementEvent) => boolean;
309
+ dblclick: (params: import("echarts/types/dist/shared").ECElementEvent) => boolean;
310
+ mousewheel: (params: import("echarts/types/dist/shared").ECElementEvent) => boolean;
311
+ mouseout: (params: import("echarts/types/dist/shared").ECElementEvent) => boolean;
312
+ mouseover: (params: import("echarts/types/dist/shared").ECElementEvent) => boolean;
313
+ mouseup: (params: import("echarts/types/dist/shared").ECElementEvent) => boolean;
314
+ mousedown: (params: import("echarts/types/dist/shared").ECElementEvent) => boolean;
315
+ mousemove: (params: import("echarts/types/dist/shared").ECElementEvent) => boolean;
316
+ contextmenu: (params: import("echarts/types/dist/shared").ECElementEvent) => boolean;
317
+ drag: (params: import("echarts/types/dist/shared").ECElementEvent) => boolean;
318
+ dragstart: (params: import("echarts/types/dist/shared").ECElementEvent) => boolean;
319
+ dragend: (params: import("echarts/types/dist/shared").ECElementEvent) => boolean;
320
+ dragenter: (params: import("echarts/types/dist/shared").ECElementEvent) => boolean;
321
+ dragleave: (params: import("echarts/types/dist/shared").ECElementEvent) => boolean;
322
+ dragover: (params: import("echarts/types/dist/shared").ECElementEvent) => boolean;
323
+ drop: (params: import("echarts/types/dist/shared").ECElementEvent) => boolean;
324
+ globalout: (params: import("echarts/types/dist/shared").ECElementEvent) => boolean;
325
+ } & {
326
+ highlight: null;
327
+ downplay: null;
328
+ selectchanged: null;
329
+ legendselectchanged: null;
330
+ legendselected: null;
331
+ legendunselected: null;
332
+ legendselectall: null;
333
+ legendinverseselect: null;
334
+ legendscroll: null;
335
+ datazoom: null;
336
+ datarangeselected: null;
337
+ graphroam: null;
338
+ georoam: null;
339
+ treeroam: null;
340
+ timelinechanged: null;
341
+ timelineplaychanged: null;
342
+ restore: null;
343
+ dataviewchanged: null;
344
+ magictypechanged: null;
345
+ geoselectchanged: null;
346
+ geoselected: null;
347
+ geounselected: null;
348
+ axisareaselected: null;
349
+ brush: null;
350
+ brushEnd: null;
351
+ brushselected: null;
352
+ globalcursortaken: null;
353
+ } & {
354
+ rendered: (params: {
355
+ elapsedTime: number;
356
+ }) => boolean;
357
+ finished: () => boolean;
358
+ } & {
359
+ "zr:click": (params: import("echarts/types/dist/shared").ElementEvent) => boolean;
360
+ "zr:dblclick": (params: import("echarts/types/dist/shared").ElementEvent) => boolean;
361
+ "zr:mousewheel": (params: import("echarts/types/dist/shared").ElementEvent) => boolean;
362
+ "zr:mouseout": (params: import("echarts/types/dist/shared").ElementEvent) => boolean;
363
+ "zr:mouseover": (params: import("echarts/types/dist/shared").ElementEvent) => boolean;
364
+ "zr:mouseup": (params: import("echarts/types/dist/shared").ElementEvent) => boolean;
365
+ "zr:mousedown": (params: import("echarts/types/dist/shared").ElementEvent) => boolean;
366
+ "zr:mousemove": (params: import("echarts/types/dist/shared").ElementEvent) => boolean;
367
+ "zr:contextmenu": (params: import("echarts/types/dist/shared").ElementEvent) => boolean;
368
+ "zr:drag": (params: import("echarts/types/dist/shared").ElementEvent) => boolean;
369
+ "zr:dragstart": (params: import("echarts/types/dist/shared").ElementEvent) => boolean;
370
+ "zr:dragend": (params: import("echarts/types/dist/shared").ElementEvent) => boolean;
371
+ "zr:dragenter": (params: import("echarts/types/dist/shared").ElementEvent) => boolean;
372
+ "zr:dragleave": (params: import("echarts/types/dist/shared").ElementEvent) => boolean;
373
+ "zr:dragover": (params: import("echarts/types/dist/shared").ElementEvent) => boolean;
374
+ "zr:drop": (params: import("echarts/types/dist/shared").ElementEvent) => boolean;
375
+ "zr:globalout": (params: import("echarts/types/dist/shared").ElementEvent) => boolean;
376
+ }, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
312
377
  loading: BooleanConstructor;
313
378
  loadingOptions: ObjectConstructor;
314
379
  autoresize: BooleanConstructor;
@@ -429,23 +494,50 @@ declare const _default: import("vue-demi").DefineComponent<{
429
494
  renderer?: ("canvas" | "svg") | undefined;
430
495
  devicePixelRatio?: number | undefined;
431
496
  useDirtyRect?: boolean | undefined;
497
+ useCoarsePointer?: boolean | undefined;
498
+ pointerSize?: number | undefined;
432
499
  ssr?: boolean | undefined;
433
- width?: number | undefined;
434
- height?: number | undefined;
500
+ width?: string | number | undefined;
501
+ height?: string | number | undefined;
435
502
  }>;
436
503
  updateOptions: PropType<import("echarts/types/dist/shared").SetOptionOpts>;
437
504
  group: StringConstructor;
438
505
  manualUpdate: BooleanConstructor;
439
506
  }>> & {
440
- onClick?: ((...args: any[]) => any) | undefined;
441
- onDblclick?: ((...args: any[]) => any) | undefined;
442
- onMouseout?: ((...args: any[]) => any) | undefined;
443
- onMouseover?: ((...args: any[]) => any) | undefined;
444
- onMouseup?: ((...args: any[]) => any) | undefined;
445
- onMousedown?: ((...args: any[]) => any) | undefined;
446
- onMousemove?: ((...args: any[]) => any) | undefined;
447
- onContextmenu?: ((...args: any[]) => any) | undefined;
448
- onGlobalout?: ((...args: any[]) => any) | undefined;
507
+ onClick?: ((params: import("echarts/types/dist/shared").ECElementEvent) => any) | undefined;
508
+ onDblclick?: ((params: import("echarts/types/dist/shared").ECElementEvent) => any) | undefined;
509
+ onMousewheel?: ((params: import("echarts/types/dist/shared").ECElementEvent) => any) | undefined;
510
+ onMouseout?: ((params: import("echarts/types/dist/shared").ECElementEvent) => any) | undefined;
511
+ onMouseover?: ((params: import("echarts/types/dist/shared").ECElementEvent) => any) | undefined;
512
+ onMouseup?: ((params: import("echarts/types/dist/shared").ECElementEvent) => any) | undefined;
513
+ onMousedown?: ((params: import("echarts/types/dist/shared").ECElementEvent) => any) | undefined;
514
+ onMousemove?: ((params: import("echarts/types/dist/shared").ECElementEvent) => any) | undefined;
515
+ onContextmenu?: ((params: import("echarts/types/dist/shared").ECElementEvent) => any) | undefined;
516
+ onDrag?: ((params: import("echarts/types/dist/shared").ECElementEvent) => any) | undefined;
517
+ onDragstart?: ((params: import("echarts/types/dist/shared").ECElementEvent) => any) | undefined;
518
+ onDragend?: ((params: import("echarts/types/dist/shared").ECElementEvent) => any) | undefined;
519
+ onDragenter?: ((params: import("echarts/types/dist/shared").ECElementEvent) => any) | undefined;
520
+ onDragleave?: ((params: import("echarts/types/dist/shared").ECElementEvent) => any) | undefined;
521
+ onDragover?: ((params: import("echarts/types/dist/shared").ECElementEvent) => any) | undefined;
522
+ onDrop?: ((params: import("echarts/types/dist/shared").ECElementEvent) => any) | undefined;
523
+ onGlobalout?: ((params: import("echarts/types/dist/shared").ECElementEvent) => any) | undefined;
524
+ "onZr:click"?: ((params: import("echarts/types/dist/shared").ElementEvent) => any) | undefined;
525
+ "onZr:dblclick"?: ((params: import("echarts/types/dist/shared").ElementEvent) => any) | undefined;
526
+ "onZr:mousewheel"?: ((params: import("echarts/types/dist/shared").ElementEvent) => any) | undefined;
527
+ "onZr:mouseout"?: ((params: import("echarts/types/dist/shared").ElementEvent) => any) | undefined;
528
+ "onZr:mouseover"?: ((params: import("echarts/types/dist/shared").ElementEvent) => any) | undefined;
529
+ "onZr:mouseup"?: ((params: import("echarts/types/dist/shared").ElementEvent) => any) | undefined;
530
+ "onZr:mousedown"?: ((params: import("echarts/types/dist/shared").ElementEvent) => any) | undefined;
531
+ "onZr:mousemove"?: ((params: import("echarts/types/dist/shared").ElementEvent) => any) | undefined;
532
+ "onZr:contextmenu"?: ((params: import("echarts/types/dist/shared").ElementEvent) => any) | undefined;
533
+ "onZr:drag"?: ((params: import("echarts/types/dist/shared").ElementEvent) => any) | undefined;
534
+ "onZr:dragstart"?: ((params: import("echarts/types/dist/shared").ElementEvent) => any) | undefined;
535
+ "onZr:dragend"?: ((params: import("echarts/types/dist/shared").ElementEvent) => any) | undefined;
536
+ "onZr:dragenter"?: ((params: import("echarts/types/dist/shared").ElementEvent) => any) | undefined;
537
+ "onZr:dragleave"?: ((params: import("echarts/types/dist/shared").ElementEvent) => any) | undefined;
538
+ "onZr:dragover"?: ((params: import("echarts/types/dist/shared").ElementEvent) => any) | undefined;
539
+ "onZr:drop"?: ((params: import("echarts/types/dist/shared").ElementEvent) => any) | undefined;
540
+ "onZr:globalout"?: ((params: import("echarts/types/dist/shared").ElementEvent) => any) | undefined;
449
541
  onHighlight?: ((...args: any[]) => any) | undefined;
450
542
  onDownplay?: ((...args: any[]) => any) | undefined;
451
543
  onSelectchanged?: ((...args: any[]) => any) | undefined;
@@ -473,25 +565,10 @@ declare const _default: import("vue-demi").DefineComponent<{
473
565
  onBrushEnd?: ((...args: any[]) => any) | undefined;
474
566
  onBrushselected?: ((...args: any[]) => any) | undefined;
475
567
  onGlobalcursortaken?: ((...args: any[]) => any) | undefined;
476
- onRendered?: ((...args: any[]) => any) | undefined;
477
- onFinished?: ((...args: any[]) => any) | undefined;
478
- "onZr:click"?: ((...args: any[]) => any) | undefined;
479
- "onZr:dblclick"?: ((...args: any[]) => any) | undefined;
480
- "onZr:mousewheel"?: ((...args: any[]) => any) | undefined;
481
- "onZr:mouseout"?: ((...args: any[]) => any) | undefined;
482
- "onZr:mouseover"?: ((...args: any[]) => any) | undefined;
483
- "onZr:mouseup"?: ((...args: any[]) => any) | undefined;
484
- "onZr:mousedown"?: ((...args: any[]) => any) | undefined;
485
- "onZr:mousemove"?: ((...args: any[]) => any) | undefined;
486
- "onZr:contextmenu"?: ((...args: any[]) => any) | undefined;
487
- "onZr:drag"?: ((...args: any[]) => any) | undefined;
488
- "onZr:dragstart"?: ((...args: any[]) => any) | undefined;
489
- "onZr:dragend"?: ((...args: any[]) => any) | undefined;
490
- "onZr:dragenter"?: ((...args: any[]) => any) | undefined;
491
- "onZr:dragleave"?: ((...args: any[]) => any) | undefined;
492
- "onZr:dragover"?: ((...args: any[]) => any) | undefined;
493
- "onZr:drop"?: ((...args: any[]) => any) | undefined;
494
- "onZr:globalout"?: ((...args: any[]) => any) | undefined;
568
+ onRendered?: ((params: {
569
+ elapsedTime: number;
570
+ }) => any) | undefined;
571
+ onFinished?: (() => any) | undefined;
495
572
  }, {
496
573
  autoresize: boolean;
497
574
  manualUpdate: boolean;
@@ -1,5 +1,5 @@
1
1
  import { DefineComponent, Ref } from 'vue-demi';
2
- import { init, SetOptionOpts } from 'echarts/core';
2
+ import { init, SetOptionOpts, ECElementEvent, ElementEvent } from 'echarts/core';
3
3
 
4
4
  type InitType = typeof init;
5
5
  type InitParameters = Parameters<InitType>;
@@ -11,16 +11,28 @@ type EChartsType = ReturnType<InitType>;
11
11
  type SetOptionType = EChartsType["setOption"];
12
12
  type Option = Parameters<SetOptionType>[0];
13
13
 
14
- type EChartsEventName =
14
+ type ElementEventName =
15
15
  | "click"
16
16
  | "dblclick"
17
+ | "mousewheel"
18
+ | "mouseout"
19
+ | "mouseover"
20
+ | "mouseup"
17
21
  | "mousedown"
18
22
  | "mousemove"
19
- | "mouseup"
20
- | "mouseover"
21
- | "mouseout"
22
- | "globalout"
23
23
  | "contextmenu"
24
+ | "drag"
25
+ | "dragstart"
26
+ | "dragend"
27
+ | "dragenter"
28
+ | "dragleave"
29
+ | "dragover"
30
+ | "drop"
31
+ | "globalout";
32
+
33
+ type ZRenderEventName = `zr:${ElementEventName}`;
34
+
35
+ type OtherEventName =
24
36
  | "highlight"
25
37
  | "downplay"
26
38
  | "selectchanged"
@@ -47,32 +59,26 @@ type EChartsEventName =
47
59
  | "brush"
48
60
  | "brushEnd"
49
61
  | "brushselected"
50
- | "globalcursortaken"
51
- | "rendered"
52
- | "finished";
53
- type ZRenderEventName =
54
- | "click"
55
- | "dblclick"
56
- | "mousewheel"
57
- | "mouseout"
58
- | "mouseover"
59
- | "mouseup"
60
- | "mousedown"
61
- | "mousemove"
62
- | "contextmenu"
63
- | "drag"
64
- | "dragstart"
65
- | "dragend"
66
- | "dragenter"
67
- | "dragleave"
68
- | "dragover"
69
- | "drop"
70
- | "globalout";
71
- type EventName = EChartsEventName | `zr:${ZRenderEventName}`;
72
- type Emits = {
73
- [key in EventName]: null;
62
+ | "globalcursortaken";
63
+
64
+ type ElementEmits = {
65
+ [key in ElementEventName]: (params: ECElementEvent) => boolean;
74
66
  };
75
67
 
68
+ type ZRenderEmits = {
69
+ [key in ZRenderEventName]: (params: ElementEvent) => boolean;
70
+ };
71
+
72
+ type OtherEmits = {
73
+ [key in OtherEventName]: null;
74
+ };
75
+
76
+ type Emits = ElementEmits &
77
+ OtherEmits & {
78
+ rendered: (params: { elapsedTime: number }) => boolean;
79
+ finished: () => boolean;
80
+ } & ZRenderEmits;
81
+
76
82
  /* eslint-disable @typescript-eslint/ban-types */
77
83
 
78
84
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-echarts",
3
- "version": "6.4.0",
3
+ "version": "6.5.0",
4
4
  "description": "Vue.js component for Apache ECharts.",
5
5
  "author": "GU Yiling <justice360@gmail.com>",
6
6
  "main": "dist/index.cjs.min.js",
@@ -29,7 +29,7 @@
29
29
  "@vue/eslint-config-typescript": "^10.0.0",
30
30
  "comment-mark": "^1.0.0",
31
31
  "core-js": "^3.23.0",
32
- "echarts": "^5.3.2",
32
+ "echarts": "^5.4.1",
33
33
  "echarts-liquidfill": "^3.1.0",
34
34
  "eslint": "^7.20.0",
35
35
  "eslint-plugin-prettier": "^3.3.1",
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "peerDependencies": {
58
58
  "@vue/composition-api": "^1.0.5",
59
- "echarts": "^5.1.2",
59
+ "echarts": "^5.4.1",
60
60
  "vue": "^2.6.12 || ^3.1.1"
61
61
  },
62
62
  "jsdelivr": "dist/index.umd.min.js",