vue-echarts 6.4.1 → 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.1"></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.1"></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.1"></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.1"></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,15 +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
- interface MouseEventParams {
20
- componentType: string;
21
- seriesType: string;
22
- seriesIndex: number;
23
- seriesName: string;
24
- name: string;
25
- dataIndex: number;
26
- color: string;
27
- }
28
19
  interface EChartsElement extends HTMLElement {
29
20
  __dispose: (() => void) | null;
30
21
  }
@@ -154,9 +145,11 @@ declare const _default: import("vue-demi").DefineComponent<{
154
145
  renderer?: ("canvas" | "svg") | undefined;
155
146
  devicePixelRatio?: number | undefined;
156
147
  useDirtyRect?: boolean | undefined;
148
+ useCoarsePointer?: boolean | undefined;
149
+ pointerSize?: number | undefined;
157
150
  ssr?: boolean | undefined;
158
- width?: number | undefined;
159
- height?: number | undefined;
151
+ width?: string | number | undefined;
152
+ height?: string | number | undefined;
160
153
  }>;
161
154
  updateOptions: PropType<import("echarts/types/dist/shared").SetOptionOpts>;
162
155
  group: StringConstructor;
@@ -312,15 +305,23 @@ declare const _default: import("vue-demi").DefineComponent<{
312
305
  [key: string]: any;
313
306
  }>;
314
307
  }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {
315
- click: (params: MouseEventParams) => boolean;
316
- dblclick: (params: MouseEventParams) => boolean;
317
- mouseout: (params: MouseEventParams) => boolean;
318
- mouseover: (params: MouseEventParams) => boolean;
319
- mouseup: (params: MouseEventParams) => boolean;
320
- mousedown: (params: MouseEventParams) => boolean;
321
- mousemove: (params: MouseEventParams) => boolean;
322
- contextmenu: (params: MouseEventParams) => boolean;
323
- globalout: (params: MouseEventParams) => boolean;
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;
324
325
  } & {
325
326
  highlight: null;
326
327
  downplay: null;
@@ -349,25 +350,29 @@ declare const _default: import("vue-demi").DefineComponent<{
349
350
  brushEnd: null;
350
351
  brushselected: null;
351
352
  globalcursortaken: null;
352
- rendered: null;
353
- finished: null;
354
- "zr:click": null;
355
- "zr:dblclick": null;
356
- "zr:mousewheel": null;
357
- "zr:mouseout": null;
358
- "zr:mouseover": null;
359
- "zr:mouseup": null;
360
- "zr:mousedown": null;
361
- "zr:mousemove": null;
362
- "zr:contextmenu": null;
363
- "zr:drag": null;
364
- "zr:dragstart": null;
365
- "zr:dragend": null;
366
- "zr:dragenter": null;
367
- "zr:dragleave": null;
368
- "zr:dragover": null;
369
- "zr:drop": null;
370
- "zr:globalout": 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;
371
376
  }, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
372
377
  loading: BooleanConstructor;
373
378
  loadingOptions: ObjectConstructor;
@@ -489,23 +494,50 @@ declare const _default: import("vue-demi").DefineComponent<{
489
494
  renderer?: ("canvas" | "svg") | undefined;
490
495
  devicePixelRatio?: number | undefined;
491
496
  useDirtyRect?: boolean | undefined;
497
+ useCoarsePointer?: boolean | undefined;
498
+ pointerSize?: number | undefined;
492
499
  ssr?: boolean | undefined;
493
- width?: number | undefined;
494
- height?: number | undefined;
500
+ width?: string | number | undefined;
501
+ height?: string | number | undefined;
495
502
  }>;
496
503
  updateOptions: PropType<import("echarts/types/dist/shared").SetOptionOpts>;
497
504
  group: StringConstructor;
498
505
  manualUpdate: BooleanConstructor;
499
506
  }>> & {
500
- onClick?: ((params: MouseEventParams) => any) | undefined;
501
- onDblclick?: ((params: MouseEventParams) => any) | undefined;
502
- onMouseout?: ((params: MouseEventParams) => any) | undefined;
503
- onMouseover?: ((params: MouseEventParams) => any) | undefined;
504
- onMouseup?: ((params: MouseEventParams) => any) | undefined;
505
- onMousedown?: ((params: MouseEventParams) => any) | undefined;
506
- onMousemove?: ((params: MouseEventParams) => any) | undefined;
507
- onContextmenu?: ((params: MouseEventParams) => any) | undefined;
508
- onGlobalout?: ((params: MouseEventParams) => 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;
509
541
  onHighlight?: ((...args: any[]) => any) | undefined;
510
542
  onDownplay?: ((...args: any[]) => any) | undefined;
511
543
  onSelectchanged?: ((...args: any[]) => any) | undefined;
@@ -533,25 +565,10 @@ declare const _default: import("vue-demi").DefineComponent<{
533
565
  onBrushEnd?: ((...args: any[]) => any) | undefined;
534
566
  onBrushselected?: ((...args: any[]) => any) | undefined;
535
567
  onGlobalcursortaken?: ((...args: any[]) => any) | undefined;
536
- onRendered?: ((...args: any[]) => any) | undefined;
537
- onFinished?: ((...args: any[]) => any) | undefined;
538
- "onZr:click"?: ((...args: any[]) => any) | undefined;
539
- "onZr:dblclick"?: ((...args: any[]) => any) | undefined;
540
- "onZr:mousewheel"?: ((...args: any[]) => any) | undefined;
541
- "onZr:mouseout"?: ((...args: any[]) => any) | undefined;
542
- "onZr:mouseover"?: ((...args: any[]) => any) | undefined;
543
- "onZr:mouseup"?: ((...args: any[]) => any) | undefined;
544
- "onZr:mousedown"?: ((...args: any[]) => any) | undefined;
545
- "onZr:mousemove"?: ((...args: any[]) => any) | undefined;
546
- "onZr:contextmenu"?: ((...args: any[]) => any) | undefined;
547
- "onZr:drag"?: ((...args: any[]) => any) | undefined;
548
- "onZr:dragstart"?: ((...args: any[]) => any) | undefined;
549
- "onZr:dragend"?: ((...args: any[]) => any) | undefined;
550
- "onZr:dragenter"?: ((...args: any[]) => any) | undefined;
551
- "onZr:dragleave"?: ((...args: any[]) => any) | undefined;
552
- "onZr:dragover"?: ((...args: any[]) => any) | undefined;
553
- "onZr:drop"?: ((...args: any[]) => any) | undefined;
554
- "onZr:globalout"?: ((...args: any[]) => any) | undefined;
568
+ onRendered?: ((params: {
569
+ elapsedTime: number;
570
+ }) => any) | undefined;
571
+ onFinished?: (() => any) | undefined;
555
572
  }, {
556
573
  autoresize: boolean;
557
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,17 +11,28 @@ type EChartsType = ReturnType<InitType>;
11
11
  type SetOptionType = EChartsType["setOption"];
12
12
  type Option = Parameters<SetOptionType>[0];
13
13
 
14
- type EChartsMouseEventName =
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
- | "contextmenu";
24
- type EChartsOtherEventName =
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 =
25
36
  | "highlight"
26
37
  | "downplay"
27
38
  | "selectchanged"
@@ -48,49 +59,25 @@ type EChartsOtherEventName =
48
59
  | "brush"
49
60
  | "brushEnd"
50
61
  | "brushselected"
51
- | "globalcursortaken"
52
- | "rendered"
53
- | "finished";
54
- type ZRenderEventName =
55
- | "click"
56
- | "dblclick"
57
- | "mousewheel"
58
- | "mouseout"
59
- | "mouseover"
60
- | "mouseup"
61
- | "mousedown"
62
- | "mousemove"
63
- | "contextmenu"
64
- | "drag"
65
- | "dragstart"
66
- | "dragend"
67
- | "dragenter"
68
- | "dragleave"
69
- | "dragover"
70
- | "drop"
71
- | "globalout";
72
- type OtherEventName = EChartsOtherEventName | `zr:${ZRenderEventName}`;
73
-
74
- // See https://echarts.apache.org/en/api.html#events.Mouse%20events
75
- interface MouseEventParams {
76
- componentType: string;
77
- seriesType: string;
78
- seriesIndex: number;
79
- seriesName: string;
80
- name: string;
81
- dataIndex: number;
82
- color: string;
83
- }
84
-
85
- type MouseEmits = {
86
- [k in EChartsMouseEventName]: (params: MouseEventParams) => boolean;
62
+ | "globalcursortaken";
63
+
64
+ type ElementEmits = {
65
+ [key in ElementEventName]: (params: ECElementEvent) => boolean;
66
+ };
67
+
68
+ type ZRenderEmits = {
69
+ [key in ZRenderEventName]: (params: ElementEvent) => boolean;
87
70
  };
88
71
 
89
72
  type OtherEmits = {
90
73
  [key in OtherEventName]: null;
91
74
  };
92
75
 
93
- type Emits = MouseEmits & OtherEmits;
76
+ type Emits = ElementEmits &
77
+ OtherEmits & {
78
+ rendered: (params: { elapsedTime: number }) => boolean;
79
+ finished: () => boolean;
80
+ } & ZRenderEmits;
94
81
 
95
82
  /* eslint-disable @typescript-eslint/ban-types */
96
83
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-echarts",
3
- "version": "6.4.1",
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",