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
+41-1Lines changed: 41 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,7 +111,7 @@ Or you can import just what you need in your files:
111
111
</script>
112
112
```
113
113
114
-
Since v.2.0.38, you can also use the "VueDataUi" universal component, just specifying which component you are using:
114
+
Since v.2.0.38, you can also use the "VueDataUi" universal component, just specifying which component you are using. You can of course use the slots provided, if the target component has them.
115
115
116
116
```
117
117
<script setup>
@@ -206,6 +206,46 @@ It is recommended to set the show legend config attribute to false, to hide the
206
206
</VueUiDonut>
207
207
```
208
208
209
+
## Tooltip #tooltip-before & #tooltip-after slots
210
+
211
+
Since v.2.0.57, it is possible to further customize tooltip contents with #tooltip-before and #tooltip-after slots.
212
+
It is that easy to include an image, another chart or any other content into your tooltips.
213
+
These slots do not expose any data, as you can create your own custom data content using the config option tooltip.customFormat.
214
+
215
+
The following charts bear these slots:
216
+
217
+
- VueUiAgePyramid
218
+
- VueUiCandlestick
219
+
- VueUiDonut
220
+
- VueUiHeatmap
221
+
- VueUiMolecule
222
+
- VueUiNestedDonuts
223
+
- VueUiOnion
224
+
- VueUiQuadrant
225
+
- VueUiRadar
226
+
- VueUiRings
227
+
- VueUiScatter
228
+
- VueUiVerticalBar
229
+
- VueUiXy
230
+
- VueUiwaffle
231
+
232
+
```
233
+
<VueUiDonut :config="config" :dataset="dataset">
234
+
<template #tooltip-before">
235
+
<div>
236
+
This content shows first
237
+
</div>
238
+
</template>
239
+
<template #tooltip-after">
240
+
<div>
241
+
This content shows last
242
+
</div>
243
+
</template>
244
+
</VueUiDonut>
245
+
```
246
+
247
+
The #tooltip-before & #tooltip-after slots also works when using the VueDataUi universal component, if the component it wraps supports them.
248
+
209
249
# Config
210
250
211
251
If for some reason you can't access the documentation website and need to get the default config object for a component:
0 commit comments