You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+59-3Lines changed: 59 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -155,7 +155,8 @@ See more examples [here](https://github.com/ecomfe/vue-echarts/tree/main/demo).
155
155
156
156
ECharts' universal interface. Modifying this prop will trigger ECharts' `setOption` method. Read more [here →](https://echarts.apache.org/en/option.html)
157
157
158
-
> 💡 When `update-options` is not specified, `notMerge: false` will be specified by default when the `setOption` method is called if the `option` object is modified directly and the reference remains unchanged; otherwise, if a new reference is bound to `option`, ` notMerge: true` will be specified.
158
+
> [!TIP]
159
+
> When `update-options` is not specified, `notMerge: false` will be specified by default when the `setOption` method is called if the `option` object is modified directly and the reference remains unchanged; otherwise, if a new reference is bound to `option`, ` notMerge: true` will be specified.
159
160
160
161
-`update-options: object`
161
162
@@ -195,8 +196,7 @@ You can bind events with Vue's `v-on` directive.
195
196
</template>
196
197
```
197
198
198
-
> **Note**
199
-
>
199
+
> [!NOTE]
200
200
> Only the `.once` event modifier is supported as other modifiers are tightly coupled with the DOM event system.
Vue-ECharts allows you to define ECharts option's `tooltip.formatter` callbacks via Vue slots instead of defining them in your `option` object. This simplifies custom tooltip rendering using familiar Vue templating.
337
+
338
+
**Slot Naming Convention**
339
+
340
+
- Slot names begin with `tooltip`, followed by hyphen-separated path segments to the target formatter.
341
+
- Each segment corresponds to an `option` property name or an array index (for arrays, use the numeric index).
342
+
- The constructed slot name maps directly to the nested `formatter` it overrides.
-`params`: The first argument passed to the original [`tooltip.formatter`](https://echarts.apache.org/en/option.html#tooltip.formatter) callback.
386
+
387
+
> [!NOTE]
388
+
> Slots take precedence over any `tooltip.formatter` defined in `props.option`. If a matching slot is present, the slot's content will render instead of using `option`'s formatter.
389
+
334
390
### Static Methods
335
391
336
392
Static methods can be accessed from [`echarts` itself](https://echarts.apache.org/en/api.html#echarts).
0 commit comments