vue-echarts 8.0.1 → 8.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.
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  > Still using Vue 2? Read v7 docs [here →](https://github.com/ecomfe/vue-echarts/tree/7.x)
8
8
 
9
- ## Installation & Usage
9
+ ## Installation & usage
10
10
 
11
11
  ### npm
12
12
 
@@ -16,7 +16,7 @@ npm install echarts vue-echarts
16
16
 
17
17
  #### Example
18
18
 
19
- <details>
19
+ <details open>
20
20
  <summary><a href="https://stackblitz.com/edit/vue-echarts-8?file=src%2FApp.vue">Demo →</a></summary>
21
21
 
22
22
  ```vue
@@ -28,21 +28,11 @@ npm install echarts vue-echarts
28
28
  import { use } from "echarts/core";
29
29
  import { CanvasRenderer } from "echarts/renderers";
30
30
  import { PieChart } from "echarts/charts";
31
- import {
32
- TitleComponent,
33
- TooltipComponent,
34
- LegendComponent,
35
- } from "echarts/components";
31
+ import { TitleComponent, TooltipComponent, LegendComponent } from "echarts/components";
36
32
  import VChart, { THEME_KEY } from "vue-echarts";
37
33
  import { ref, provide } from "vue";
38
34
 
39
- use([
40
- CanvasRenderer,
41
- PieChart,
42
- TitleComponent,
43
- TooltipComponent,
44
- LegendComponent,
45
- ]);
35
+ use([CanvasRenderer, PieChart, TitleComponent, TooltipComponent, LegendComponent]);
46
36
 
47
37
  provide(THEME_KEY, "dark");
48
38
 
@@ -94,12 +84,17 @@ const option = ref({
94
84
 
95
85
  </details>
96
86
 
97
- > [!IMPORTANT]
98
- > We encourage manually importing components and charts from ECharts for smaller bundle size. We've built an [import code generator](https://vue-echarts.dev/#codegen) to help you with that. You can just paste in your `option` code and we'll generate the precise import code for you.
99
- >
100
- > ![](https://github.com/ecomfe/vue-echarts/assets/1726061/f9c38a06-3422-4f0e-ab8c-f242d9aea9aa)
101
- >
102
- > [Try it →](https://vue-echarts.dev/#codegen)
87
+ #### On-demand importing&nbsp;<sup><a href="#on-demand-importing"><img src="https://img.shields.io/badge/recommended-10B981" alt="recommended" align="middle" height="16"></a></sup>
88
+
89
+ To keep your bundle size small, we recommend manually importing the components and charts you need from ECharts. To make this easier, we’ve created an [import code generator](https://vue-echarts.dev/#codegen). Simply paste your `option` code into the tool, and it will generate the exact import statements for you.
90
+
91
+ <picture>
92
+ <source media="(prefers-color-scheme: dark)" srcset="assets/codegen-dark.webp">
93
+ <source media="(prefers-color-scheme: light)" srcset="assets/codegen-light.webp">
94
+ <img alt="A modal for generating ECharts import code. The left panel shows a chart configuration in JSON, while the right panel displays TypeScript import statements for ECharts charts and components." src="assets/codegen-light.webp">
95
+ </picture>
96
+
97
+ [Try it →](https://vue-echarts.dev/#codegen)
103
98
 
104
99
  But if you really want to import the whole ECharts bundle without having to import modules manually, just add this in your code:
105
100
 
@@ -118,8 +113,8 @@ Drop `<script>` inside your HTML file and access the component via `window.VueEC
118
113
 
119
114
  ```html
120
115
  <script src="https://cdn.jsdelivr.net/npm/echarts@6.0.0"></script>
121
- <script src="https://cdn.jsdelivr.net/npm/vue@3.5.21"></script>
122
- <script src="https://cdn.jsdelivr.net/npm/vue-echarts@8.0.1"></script>
116
+ <script src="https://cdn.jsdelivr.net/npm/vue@3.5.27"></script>
117
+ <script src="https://cdn.jsdelivr.net/npm/vue-echarts@8.1.0-beta.2"></script>
123
118
  ```
124
119
 
125
120
  <!-- scripts:end -->
@@ -153,7 +148,7 @@ See more examples [here](https://github.com/ecomfe/vue-echarts/tree/main/demo).
153
148
 
154
149
  ECharts' universal interface. Modifying this prop triggers Vue ECharts to compute an update plan and call `setOption`. Read more [here →](https://echarts.apache.org/en/option.html)
155
150
 
156
- #### Smart Update
151
+ #### Smart update
157
152
  - If you supply `update-options` (via prop or injection), Vue ECharts forwards it directly to `setOption` and skips the planner.
158
153
  - Manual `setOption` calls (only available when `manual-update` is `true`) behave like native ECharts, honouring only the per-call override you pass in and are not carried across re-initializations.
159
154
  - Otherwise, Vue ECharts analyses the change: removed objects become `null`, removed arrays become `[]` with `replaceMerge`, ID/anonymous deletions trigger `replaceMerge`, and risky changes fall back to `notMerge: true`.
@@ -247,7 +242,7 @@ Vue ECharts support the following events:
247
242
 
248
243
  See supported events in the [ECharts API reference →](https://echarts.apache.org/en/api.html#events)
249
244
 
250
- #### Native DOM Events
245
+ #### Native DOM events
251
246
 
252
247
  As Vue ECharts binds events to the ECharts instance by default, there is some caveat when using native DOM events. You need to prefix the event name with `native:` to bind native DOM events.
253
248
 
@@ -257,7 +252,9 @@ As Vue ECharts binds events to the ECharts instance by default, there is some ca
257
252
  </template>
258
253
  ```
259
254
 
260
- ### Provide / Inject
255
+ Event handlers passed via attrs are reactive by default. Updating `onClick`, `onZr:*`, or `onNative:*` handlers will rebind them automatically.
256
+
257
+ ### Provide / inject
261
258
 
262
259
  Vue ECharts provides provide/inject API for `theme`, `init-options`, `update-options` and `loading-options` to help configuring contextual options. eg. for `theme` you can use the provide API like this:
263
260
 
@@ -337,9 +334,15 @@ export default {
337
334
 
338
335
  ### Slots
339
336
 
340
- Vue ECharts allows you to define ECharts option's [`tooltip.formatter`](https://echarts.apache.org/en/option.html#tooltip.formatter) and [`toolbox.feature.dataView.optionToContent`](https://echarts.apache.org/en/option.html#toolbox.feature.dataView.optionToContent) callbacks via Vue slots instead of defining them in your `option` object. This simplifies custom HTMLElement rendering using familiar Vue templating.
337
+ Vue ECharts supports three slot categories:
338
+
339
+ - Callback slots for [`tooltip.formatter`](https://echarts.apache.org/en/option.html#tooltip.formatter).
340
+ - Callback slots for [`toolbox.feature.dataView.optionToContent`](https://echarts.apache.org/en/option.html#toolbox.feature.dataView.optionToContent).
341
+ - Optional `#graphic` slot (enabled by importing `vue-echarts/graphic`) for building [`option.graphic`](https://echarts.apache.org/en/option.html#graphic) declaratively with `G*` components.
342
+
343
+ #### Callback slot naming convention (`tooltip*` / `dataView*`)
341
344
 
342
- #### Slot Naming Convention
345
+ These naming rules apply to callback slots only. The graphic slot name is always `#graphic`.
343
346
 
344
347
  - Slot names begin with `tooltip`/`dataView`, followed by hyphen-separated path segments to the target.
345
348
  - Each segment corresponds to an `option` property name or an array index (for arrays, use the numeric index).
@@ -405,7 +408,78 @@ The slot props correspond to the first parameter of the callback function.
405
408
  > [!NOTE]
406
409
  > Slots take precedence over the corresponding callback defined in `props.option`.
407
410
 
408
- ### Static Methods
411
+ #### Graphic slot&nbsp;<sup><a href="#slots"><img src="https://img.shields.io/badge/new-A855F7" alt="new" align="middle" height="16"></a></sup>
412
+
413
+ ```ts
414
+ import { GGroup, GRect, GText } from "vue-echarts/graphic";
415
+ ```
416
+
417
+ Available components:
418
+
419
+ - `GGroup`
420
+ - `GRect`
421
+ - `GCircle`
422
+ - `GText`
423
+ - `GLine`
424
+ - `GPolyline`
425
+ - `GPolygon`
426
+ - `GImage`
427
+ - `GSector`
428
+ - `GRing`
429
+ - `GArc`
430
+ - `GBezierCurve`
431
+ - `GCompoundPath`
432
+
433
+ Read more at [ECharts `option.graphic` →](https://echarts.apache.org/en/option.html#graphic)
434
+
435
+ > [!NOTE]
436
+ >
437
+ > - Graphic element events additionally support `dblclick` and `contextmenu`.
438
+ > - Event listeners support the `.once` modifier.
439
+ > - `#graphic` overrides `option.graphic`. In `manual-update` mode, call `chartRef.setOption(...)` to apply changes.
440
+
441
+ <details>
442
+ <summary>Usage</summary>
443
+
444
+ ```vue
445
+ <script setup lang="ts">
446
+ import { ref } from "vue";
447
+ import type { ElementEvent } from "echarts/core";
448
+
449
+ const option = {
450
+ xAxis: { type: "category", data: ["Mon", "Tue", "Wed"] },
451
+ yAxis: { type: "value" },
452
+ series: [{ type: "line", data: [120, 200, 150] }],
453
+ };
454
+
455
+ const overlay = ref({ x: 84, y: 22 });
456
+
457
+ function onDrag(event: ElementEvent) {
458
+ overlay.value.x = event.offsetX - 44;
459
+ overlay.value.y = event.offsetY - 14;
460
+ }
461
+ </script>
462
+
463
+ <template>
464
+ <VChart :option="option">
465
+ <template #graphic>
466
+ <GGroup id="drag-handle" :x="overlay.x" :y="overlay.y">
467
+ <GRect :width="88" :height="28" :r="6" fill="#5470c6" draggable @drag="onDrag" />
468
+ <GText
469
+ :x="10"
470
+ :y="8"
471
+ :text="`x: ${Math.round(overlay.x)} y: ${Math.round(overlay.y)}`"
472
+ text-fill="#fff"
473
+ />
474
+ </GGroup>
475
+ </template>
476
+ </VChart>
477
+ </template>
478
+ ```
479
+
480
+ </details>
481
+
482
+ ### Static methods
409
483
 
410
484
  Static methods can be accessed from [`echarts` itself](https://echarts.apache.org/en/api.html#echarts).
411
485
 
package/README.zh-Hans.md CHANGED
@@ -16,7 +16,7 @@ npm install echarts vue-echarts
16
16
 
17
17
  #### 示例
18
18
 
19
- <details>
19
+ <details open>
20
20
  <summary><a href="https://stackblitz.com/edit/vue-echarts-8?file=src%2FApp.vue">Demo →</a></summary>
21
21
 
22
22
  ```vue
@@ -28,21 +28,11 @@ npm install echarts vue-echarts
28
28
  import { use } from "echarts/core";
29
29
  import { CanvasRenderer } from "echarts/renderers";
30
30
  import { PieChart } from "echarts/charts";
31
- import {
32
- TitleComponent,
33
- TooltipComponent,
34
- LegendComponent,
35
- } from "echarts/components";
31
+ import { TitleComponent, TooltipComponent, LegendComponent } from "echarts/components";
36
32
  import VChart, { THEME_KEY } from "vue-echarts";
37
33
  import { ref, provide } from "vue";
38
34
 
39
- use([
40
- CanvasRenderer,
41
- PieChart,
42
- TitleComponent,
43
- TooltipComponent,
44
- LegendComponent,
45
- ]);
35
+ use([CanvasRenderer, PieChart, TitleComponent, TooltipComponent, LegendComponent]);
46
36
 
47
37
  provide(THEME_KEY, "dark");
48
38
 
@@ -94,12 +84,17 @@ const option = ref({
94
84
 
95
85
  </details>
96
86
 
97
- > [!IMPORTANT]
98
- > 我们鼓励手动从 ECharts 中引入组件和图表,以减小打包体积。我们已经为此构建了一个[导入代码生成器](https://vue-echarts.dev/#codegen)。你只需要把`option` 代码粘贴进去,就可以得到精确的导入代码。
99
- >
100
- > ![](https://github.com/ecomfe/vue-echarts/assets/1726061/f9c38a06-3422-4f0e-ab8c-f242d9aea9aa)
101
- >
102
- > [试一试 →](https://vue-echarts.dev/#codegen)
87
+ #### 按需导入&nbsp;<sup><a href="#按需导入"><img src="https://img.shields.io/badge/%E6%8E%A8%E8%8D%90-10B981" alt="推荐" align="middle" height="16"></a></sup>
88
+
89
+ 为了减小打包体积,我们建议手动从 ECharts 中导入所需的组件和图表。我们提供了一个[导入代码生成器](https://vue-echarts.dev/#codegen),可以帮你自动生成导入语句。只需将你的 `option` 代码粘贴进去,工具就会为你生成精确的导入代码。
90
+
91
+ <picture>
92
+ <source media="(prefers-color-scheme: dark)" srcset="assets/codegen-dark.webp">
93
+ <source media="(prefers-color-scheme: light)" srcset="assets/codegen-light.webp">
94
+ <img alt="一个用于生成 ECharts 导入代码的弹窗。左侧面板展示图表的 JSON 配置,右侧面板展示对应的 TypeScript 导入语句。" src="assets/codegen-light.webp">
95
+ </picture>
96
+
97
+ [试一试 →](https://vue-echarts.dev/#codegen)
103
98
 
104
99
  但如果你实在需要全量引入 ECharts 从而无需手动引入模块,只需要在代码中添加:
105
100
 
@@ -118,8 +113,8 @@ import "echarts";
118
113
 
119
114
  ```html
120
115
  <script src="https://cdn.jsdelivr.net/npm/echarts@6.0.0"></script>
121
- <script src="https://cdn.jsdelivr.net/npm/vue@3.5.21"></script>
122
- <script src="https://cdn.jsdelivr.net/npm/vue-echarts@8.0.1"></script>
116
+ <script src="https://cdn.jsdelivr.net/npm/vue@3.5.27"></script>
117
+ <script src="https://cdn.jsdelivr.net/npm/vue-echarts@8.1.0-beta.2"></script>
123
118
  ```
124
119
 
125
120
  <!-- scripts:end -->
@@ -257,6 +252,8 @@ Vue ECharts 支持如下事件:
257
252
  </template>
258
253
  ```
259
254
 
255
+ 通过 attrs 传入的事件处理器默认是响应式的。更新 `onClick`、`onZr:*` 或 `onNative:*` 后会自动重新绑定。
256
+
260
257
  ### Provide / Inject
261
258
 
262
259
  Vue ECharts 为 `theme`、`init-options`、`update-options` 和 `loading-options` 提供了 provide/inject API,以通过上下文配置选项。例如:可以通过如下方式来使用 provide API 为 `theme` 提供上下文配置:
@@ -335,11 +332,17 @@ export default {
335
332
  > - [`showLoading`](https://echarts.apache.org/zh/api.html#echartsInstance.showLoading) / [`hideLoading`](https://echarts.apache.org/zh/api.html#echartsInstance.hideLoading):请使用 `loading` 和 `loading-options` prop。
336
333
  > - [`setTheme`](https://echarts.apache.org/zh/api.html#echartsInstance.setTheme):请使用 `theme` prop。
337
334
 
338
- ### 插槽(Slots)
335
+ ### 插槽
336
+
337
+ Vue ECharts 当前支持三类插槽:
338
+
339
+ - 回调类插槽:用于 [`tooltip.formatter`](https://echarts.apache.org/zh/option.html#tooltip.formatter)。
340
+ - 回调类插槽:用于 [`toolbox.feature.dataView.optionToContent`](https://echarts.apache.org/zh/option.html#toolbox.feature.dataView.optionToContent)。
341
+ - 可选 `#graphic` 插槽(需引入 `vue-echarts/graphic`):通过 `G*` 组件声明式构建 [`option.graphic`](https://echarts.apache.org/zh/option.html#graphic)。
339
342
 
340
- Vue ECharts 允许你通过 Vue 插槽来定义 ECharts 配置中的 [`tooltip.formatter`](https://echarts.apache.org/zh/option.html#tooltip.formatter) 和 [`toolbox.feature.dataView.optionToContent`](https://echarts.apache.org/zh/option.html#toolbox.feature.dataView.optionToContent) 回调,而无需在 `option` 对象中定义它们。你可以使用熟悉的 Vue 模板语法来编写自定义提示框或数据视图中的内容。
343
+ #### 回调插槽命名约定(`tooltip*` / `dataView*`)
341
344
 
342
- #### 插槽命名约定
345
+ 下面的命名规则只适用于回调类插槽,`graphic` 插槽固定使用 `#graphic`。
343
346
 
344
347
  - 插槽名称以 `tooltip`/`dataView` 开头,后面跟随用连字符分隔的路径片段,用于定位目标。
345
348
  - 每个路径片段对应 `option` 对象的属性名或数组索引(数组索引使用数字形式)。
@@ -405,6 +408,77 @@ Vue ECharts 允许你通过 Vue 插槽来定义 ECharts 配置中的 [`tooltip.f
405
408
  > [!NOTE]
406
409
  > 插槽会优先于 `props.option` 中对应的回调函数。
407
410
 
411
+ #### Graphic 插槽&nbsp;<sup><a href="#插槽"><img src="https://img.shields.io/badge/%E6%96%B0%E5%8A%9F%E8%83%BD-A855F7" alt="新功能" align="middle" height="16"></a></sup>
412
+
413
+ ```ts
414
+ import { GGroup, GRect, GText } from "vue-echarts/graphic";
415
+ ```
416
+
417
+ 可用组件:
418
+
419
+ - `GGroup`
420
+ - `GRect`
421
+ - `GCircle`
422
+ - `GText`
423
+ - `GLine`
424
+ - `GPolyline`
425
+ - `GPolygon`
426
+ - `GImage`
427
+ - `GSector`
428
+ - `GRing`
429
+ - `GArc`
430
+ - `GBezierCurve`
431
+ - `GCompoundPath`
432
+
433
+ 更多细节可参考 [ECharts `option.graphic` →](https://echarts.apache.org/zh/option.html#graphic)
434
+
435
+ > [!NOTE]
436
+ >
437
+ > - graphic 元素事件额外支持 `dblclick`、`contextmenu`。
438
+ > - 事件支持 `.once` 修饰符。
439
+ > - `#graphic` 会覆盖 `option.graphic`。`manual-update` 模式下需调用 `chartRef.setOption(...)` 提交变更。
440
+
441
+ <details>
442
+ <summary>用法示例</summary>
443
+
444
+ ```vue
445
+ <script setup lang="ts">
446
+ import { ref } from "vue";
447
+ import type { ElementEvent } from "echarts/core";
448
+
449
+ const option = {
450
+ xAxis: { type: "category", data: ["Mon", "Tue", "Wed"] },
451
+ yAxis: { type: "value" },
452
+ series: [{ type: "line", data: [120, 200, 150] }],
453
+ };
454
+
455
+ const overlay = ref({ x: 84, y: 22 });
456
+
457
+ function onDrag(event: ElementEvent) {
458
+ overlay.value.x = event.offsetX - 44;
459
+ overlay.value.y = event.offsetY - 14;
460
+ }
461
+ </script>
462
+
463
+ <template>
464
+ <VChart :option="option">
465
+ <template #graphic>
466
+ <GGroup id="drag-handle" :x="overlay.x" :y="overlay.y">
467
+ <GRect :width="88" :height="28" :r="6" fill="#5470c6" draggable @drag="onDrag" />
468
+ <GText
469
+ :x="10"
470
+ :y="8"
471
+ :text="`x: ${Math.round(overlay.x)} y: ${Math.round(overlay.y)}`"
472
+ text-fill="#fff"
473
+ />
474
+ </GGroup>
475
+ </template>
476
+ </VChart>
477
+ </template>
478
+ ```
479
+
480
+ </details>
481
+
408
482
  ### 静态方法
409
483
 
410
484
  静态方法请直接通过 [`echarts` 本身](https://echarts.apache.org/zh/api.html#echarts)进行调用。
@@ -0,0 +1,219 @@
1
+ import { VChartSlotsExtension } from "./index.js";
2
+ import * as vue from "vue";
3
+ import { InjectionKey, MaybeRefOrGetter, PropType, SlotsType } from "vue";
4
+ import * as echarts_core0 from "echarts/core";
5
+ import { ElementEvent, SetOptionOpts, init } from "echarts/core";
6
+ import { TooltipComponentFormatterCallbackParams } from "echarts";
7
+
8
+ //#region src/types.d.ts
9
+ type Injection<T> = MaybeRefOrGetter<T | null>;
10
+ type InitType = typeof init;
11
+ type InitParameters = Parameters<InitType>;
12
+ type Theme = NonNullable<InitParameters[1]>;
13
+ type ThemeInjection = Injection<Theme>;
14
+ type InitOptions = NonNullable<InitParameters[2]>;
15
+ type InitOptionsInjection = Injection<InitOptions>;
16
+ type UpdateOptions = SetOptionOpts;
17
+ type UpdateOptionsInjection = Injection<UpdateOptions>;
18
+ type EChartsType = ReturnType<InitType>;
19
+ type SetOptionType = EChartsType["setOption"];
20
+ type Option = Parameters<SetOptionType>[0];
21
+ type AutoResize = boolean | {
22
+ throttle?: number;
23
+ onResize?: () => void;
24
+ };
25
+ type LoadingOptions = {
26
+ text?: string;
27
+ textColor?: string;
28
+ fontSize?: number | string;
29
+ fontWeight?: number | string;
30
+ fontStyle?: string;
31
+ fontFamily?: string;
32
+ maskColor?: string;
33
+ showSpinner?: boolean;
34
+ color?: string;
35
+ spinnerRadius?: number;
36
+ lineWidth?: number;
37
+ zlevel?: number;
38
+ };
39
+ type LoadingOptionsInjection = Injection<LoadingOptions>;
40
+ type MouseEventName = "click" | "dblclick" | "mouseout" | "mouseover" | "mouseup" | "mousedown" | "mousemove" | "contextmenu" | "globalout";
41
+ type ElementEventName = MouseEventName | "mousewheel" | "drag" | "dragstart" | "dragend" | "dragenter" | "dragleave" | "dragover" | "drop";
42
+ //#endregion
43
+ //#region src/composables/api.d.ts
44
+ declare const METHOD_NAMES: readonly ["getWidth", "getHeight", "getDom", "getOption", "resize", "dispatchAction", "convertToPixel", "convertFromPixel", "containPixel", "getDataURL", "getConnectedDataURL", "appendData", "clear", "isDisposed", "dispose"];
45
+ type MethodName = (typeof METHOD_NAMES)[number];
46
+ type PublicMethods = Pick<EChartsType, MethodName>;
47
+ //#endregion
48
+ //#region src/composables/loading.d.ts
49
+ declare const LOADING_OPTIONS_KEY: InjectionKey<LoadingOptionsInjection>;
50
+ //#endregion
51
+ //#region src/composables/slot.d.ts
52
+ type SlotsTypes = SlotsType<Record<"tooltip" | `tooltip-${string}`, TooltipComponentFormatterCallbackParams> & Record<"dataView" | `dataView-${string}`, Option> & VChartSlotsExtension>;
53
+ //#endregion
54
+ //#region src/wc.d.ts
55
+ interface EChartsElement extends HTMLElement {
56
+ __dispose: (() => void) | null;
57
+ }
58
+ //#endregion
59
+ //#region src/ECharts.d.ts
60
+ declare const THEME_KEY: InjectionKey<ThemeInjection>;
61
+ declare const INIT_OPTIONS_KEY: InjectionKey<InitOptionsInjection>;
62
+ declare const UPDATE_OPTIONS_KEY: InjectionKey<UpdateOptionsInjection>;
63
+ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
64
+ loading: BooleanConstructor;
65
+ loadingOptions: PropType<LoadingOptions>;
66
+ autoresize: PropType<AutoResize>;
67
+ option: PropType<Option>;
68
+ theme: {
69
+ type: PropType<Theme>;
70
+ };
71
+ initOptions: PropType<InitOptions>;
72
+ updateOptions: PropType<UpdateOptions>;
73
+ group: StringConstructor;
74
+ manualUpdate: BooleanConstructor;
75
+ }>, {
76
+ setOption: {
77
+ <Opt extends echarts_core0.EChartsCoreOption>(option: Opt, notMerge?: boolean, lazyUpdate?: boolean): void;
78
+ <Opt extends echarts_core0.EChartsCoreOption>(option: Opt, opts?: echarts_core0.SetOptionOpts): void;
79
+ };
80
+ root: vue.ShallowRef<EChartsElement | undefined, EChartsElement | undefined>;
81
+ chart: vue.ShallowRef<echarts_core0.ECharts | undefined, echarts_core0.ECharts | undefined>;
82
+ } & PublicMethods, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
83
+ click: (params: echarts_core0.ECElementEvent) => void;
84
+ dblclick: (params: echarts_core0.ECElementEvent) => void;
85
+ mouseout: (params: echarts_core0.ECElementEvent) => void;
86
+ mouseover: (params: echarts_core0.ECElementEvent) => void;
87
+ mouseup: (params: echarts_core0.ECElementEvent) => void;
88
+ mousedown: (params: echarts_core0.ECElementEvent) => void;
89
+ mousemove: (params: echarts_core0.ECElementEvent) => void;
90
+ contextmenu: (params: echarts_core0.ECElementEvent) => void;
91
+ globalout: (params: echarts_core0.ECElementEvent) => void;
92
+ } & {
93
+ highlight: (params: unknown) => void;
94
+ downplay: (params: unknown) => void;
95
+ selectchanged: (params: unknown) => void;
96
+ legendselectchanged: (params: unknown) => void;
97
+ legendselected: (params: unknown) => void;
98
+ legendunselected: (params: unknown) => void;
99
+ legendselectall: (params: unknown) => void;
100
+ legendinverseselect: (params: unknown) => void;
101
+ legendscroll: (params: unknown) => void;
102
+ datazoom: (params: unknown) => void;
103
+ datarangeselected: (params: unknown) => void;
104
+ graphroam: (params: unknown) => void;
105
+ georoam: (params: unknown) => void;
106
+ treeroam: (params: unknown) => void;
107
+ timelinechanged: (params: unknown) => void;
108
+ timelineplaychanged: (params: unknown) => void;
109
+ restore: (params: unknown) => void;
110
+ dataviewchanged: (params: unknown) => void;
111
+ magictypechanged: (params: unknown) => void;
112
+ geoselectchanged: (params: unknown) => void;
113
+ geoselected: (params: unknown) => void;
114
+ geounselected: (params: unknown) => void;
115
+ axisareaselected: (params: unknown) => void;
116
+ brush: (params: unknown) => void;
117
+ brushEnd: (params: unknown) => void;
118
+ brushselected: (params: unknown) => void;
119
+ globalcursortaken: (params: unknown) => void;
120
+ } & {
121
+ rendered: (params: {
122
+ elapsedTime: number;
123
+ }) => void;
124
+ finished: () => void;
125
+ } & {
126
+ "zr:mousewheel": (params: echarts_core0.ElementEvent) => void;
127
+ "zr:drag": (params: echarts_core0.ElementEvent) => void;
128
+ "zr:dragstart": (params: echarts_core0.ElementEvent) => void;
129
+ "zr:dragend": (params: echarts_core0.ElementEvent) => void;
130
+ "zr:dragenter": (params: echarts_core0.ElementEvent) => void;
131
+ "zr:dragleave": (params: echarts_core0.ElementEvent) => void;
132
+ "zr:dragover": (params: echarts_core0.ElementEvent) => void;
133
+ "zr:drop": (params: echarts_core0.ElementEvent) => void;
134
+ "zr:click": (params: echarts_core0.ElementEvent) => void;
135
+ "zr:dblclick": (params: echarts_core0.ElementEvent) => void;
136
+ "zr:mouseout": (params: echarts_core0.ElementEvent) => void;
137
+ "zr:mouseover": (params: echarts_core0.ElementEvent) => void;
138
+ "zr:mouseup": (params: echarts_core0.ElementEvent) => void;
139
+ "zr:mousedown": (params: echarts_core0.ElementEvent) => void;
140
+ "zr:mousemove": (params: echarts_core0.ElementEvent) => void;
141
+ "zr:contextmenu": (params: echarts_core0.ElementEvent) => void;
142
+ "zr:globalout": (params: echarts_core0.ElementEvent) => void;
143
+ }, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
144
+ loading: BooleanConstructor;
145
+ loadingOptions: PropType<LoadingOptions>;
146
+ autoresize: PropType<AutoResize>;
147
+ option: PropType<Option>;
148
+ theme: {
149
+ type: PropType<Theme>;
150
+ };
151
+ initOptions: PropType<InitOptions>;
152
+ updateOptions: PropType<UpdateOptions>;
153
+ group: StringConstructor;
154
+ manualUpdate: BooleanConstructor;
155
+ }>> & Readonly<{
156
+ onClick?: ((params: echarts_core0.ECElementEvent) => any) | undefined;
157
+ onDblclick?: ((params: echarts_core0.ECElementEvent) => any) | undefined;
158
+ onMouseout?: ((params: echarts_core0.ECElementEvent) => any) | undefined;
159
+ onMouseover?: ((params: echarts_core0.ECElementEvent) => any) | undefined;
160
+ onMouseup?: ((params: echarts_core0.ECElementEvent) => any) | undefined;
161
+ onMousedown?: ((params: echarts_core0.ECElementEvent) => any) | undefined;
162
+ onMousemove?: ((params: echarts_core0.ECElementEvent) => any) | undefined;
163
+ onContextmenu?: ((params: echarts_core0.ECElementEvent) => any) | undefined;
164
+ onGlobalout?: ((params: echarts_core0.ECElementEvent) => any) | undefined;
165
+ onHighlight?: ((params: unknown) => any) | undefined;
166
+ onDownplay?: ((params: unknown) => any) | undefined;
167
+ onSelectchanged?: ((params: unknown) => any) | undefined;
168
+ onLegendselectchanged?: ((params: unknown) => any) | undefined;
169
+ onLegendselected?: ((params: unknown) => any) | undefined;
170
+ onLegendunselected?: ((params: unknown) => any) | undefined;
171
+ onLegendselectall?: ((params: unknown) => any) | undefined;
172
+ onLegendinverseselect?: ((params: unknown) => any) | undefined;
173
+ onLegendscroll?: ((params: unknown) => any) | undefined;
174
+ onDatazoom?: ((params: unknown) => any) | undefined;
175
+ onDatarangeselected?: ((params: unknown) => any) | undefined;
176
+ onGraphroam?: ((params: unknown) => any) | undefined;
177
+ onGeoroam?: ((params: unknown) => any) | undefined;
178
+ onTreeroam?: ((params: unknown) => any) | undefined;
179
+ onTimelinechanged?: ((params: unknown) => any) | undefined;
180
+ onTimelineplaychanged?: ((params: unknown) => any) | undefined;
181
+ onRestore?: ((params: unknown) => any) | undefined;
182
+ onDataviewchanged?: ((params: unknown) => any) | undefined;
183
+ onMagictypechanged?: ((params: unknown) => any) | undefined;
184
+ onGeoselectchanged?: ((params: unknown) => any) | undefined;
185
+ onGeoselected?: ((params: unknown) => any) | undefined;
186
+ onGeounselected?: ((params: unknown) => any) | undefined;
187
+ onAxisareaselected?: ((params: unknown) => any) | undefined;
188
+ onBrush?: ((params: unknown) => any) | undefined;
189
+ onBrushEnd?: ((params: unknown) => any) | undefined;
190
+ onBrushselected?: ((params: unknown) => any) | undefined;
191
+ onGlobalcursortaken?: ((params: unknown) => any) | undefined;
192
+ "onZr:mousewheel"?: ((params: echarts_core0.ElementEvent) => any) | undefined;
193
+ "onZr:drag"?: ((params: echarts_core0.ElementEvent) => any) | undefined;
194
+ "onZr:dragstart"?: ((params: echarts_core0.ElementEvent) => any) | undefined;
195
+ "onZr:dragend"?: ((params: echarts_core0.ElementEvent) => any) | undefined;
196
+ "onZr:dragenter"?: ((params: echarts_core0.ElementEvent) => any) | undefined;
197
+ "onZr:dragleave"?: ((params: echarts_core0.ElementEvent) => any) | undefined;
198
+ "onZr:dragover"?: ((params: echarts_core0.ElementEvent) => any) | undefined;
199
+ "onZr:drop"?: ((params: echarts_core0.ElementEvent) => any) | undefined;
200
+ "onZr:click"?: ((params: echarts_core0.ElementEvent) => any) | undefined;
201
+ "onZr:dblclick"?: ((params: echarts_core0.ElementEvent) => any) | undefined;
202
+ "onZr:mouseout"?: ((params: echarts_core0.ElementEvent) => any) | undefined;
203
+ "onZr:mouseover"?: ((params: echarts_core0.ElementEvent) => any) | undefined;
204
+ "onZr:mouseup"?: ((params: echarts_core0.ElementEvent) => any) | undefined;
205
+ "onZr:mousedown"?: ((params: echarts_core0.ElementEvent) => any) | undefined;
206
+ "onZr:mousemove"?: ((params: echarts_core0.ElementEvent) => any) | undefined;
207
+ "onZr:contextmenu"?: ((params: echarts_core0.ElementEvent) => any) | undefined;
208
+ "onZr:globalout"?: ((params: echarts_core0.ElementEvent) => any) | undefined;
209
+ onRendered?: ((params: {
210
+ elapsedTime: number;
211
+ }) => any) | undefined;
212
+ onFinished?: (() => any) | undefined;
213
+ }>, {
214
+ manualUpdate: boolean;
215
+ loading: boolean;
216
+ }, SlotsTypes, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
217
+ //#endregion
218
+ export { LOADING_OPTIONS_KEY as a, _default as i, THEME_KEY as n, ElementEventName as o, UPDATE_OPTIONS_KEY as r, INIT_OPTIONS_KEY as t };
219
+ //# sourceMappingURL=ECharts-DCe3N-Zd.d.ts.map