vue-data-ui 2.0.58 → 2.0.60
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
|
@@ -209,8 +209,18 @@ It is recommended to set the show legend config attribute to false, to hide the
|
|
|
209
209
|
## Tooltip #tooltip-before & #tooltip-after slots
|
|
210
210
|
|
|
211
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
|
-
|
|
212
|
+
It is that easy to include an image, another chart or any other content into your tooltips. It's an alternative to the config option tooltip.customFormat, in case richer tooltip content is needed.
|
|
213
|
+
|
|
214
|
+
Both slots expose the following object:
|
|
215
|
+
|
|
216
|
+
```
|
|
217
|
+
{
|
|
218
|
+
datapoint,
|
|
219
|
+
seriesIndex,
|
|
220
|
+
series,
|
|
221
|
+
config,
|
|
222
|
+
}
|
|
223
|
+
```
|
|
214
224
|
|
|
215
225
|
The following charts bear these slots:
|
|
216
226
|
|
|
@@ -227,17 +237,30 @@ The following charts bear these slots:
|
|
|
227
237
|
- VueUiRings
|
|
228
238
|
- VueUiScatter
|
|
229
239
|
- VueUiVerticalBar
|
|
230
|
-
- VueUiXy
|
|
240
|
+
- VueUiXy \*
|
|
231
241
|
- VueUiwaffle
|
|
232
242
|
|
|
243
|
+
\* VueUiXy slots specifically expose the following additional attributes:
|
|
244
|
+
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
{
|
|
248
|
+
...,
|
|
249
|
+
bars,
|
|
250
|
+
lines,
|
|
251
|
+
plots
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
```
|
|
255
|
+
|
|
233
256
|
```
|
|
234
257
|
<VueUiDonut :config="config" :dataset="dataset">
|
|
235
|
-
<template #tooltip-before">
|
|
258
|
+
<template #tooltip-before={ datapoint, seriesIndex, dataset, config }">
|
|
236
259
|
<div>
|
|
237
260
|
This content shows first
|
|
238
261
|
</div>
|
|
239
262
|
</template>
|
|
240
|
-
<template #tooltip-after">
|
|
263
|
+
<template #tooltip-after={ datapoint, seriesIndex, dataset, config }">
|
|
241
264
|
<div>
|
|
242
265
|
This content shows last
|
|
243
266
|
</div>
|