Skip to content

Commit 1c936d8

Browse files
committed
VueUiGalaxy added #tooltip-before & #tooltip-after named slots
1 parent dcb9385 commit 1c936d8

File tree

5 files changed

+30
-9
lines changed

5 files changed

+30
-9
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,16 +182,16 @@ The svg slot also works when using the VueDataUi universal component, if the com
182182

183183
All charts expose a #legend slot except for:
184184

185-
- VueUiWheel
186-
- VueUiTiremarks
187185
- VueUiHeatmap
188186
- VueUiRelationCircle
189-
- VueUiThermometer
190-
- VueUiSparkline
191-
- VueUiSparkbar
187+
- VueUiSparkHistogram
192188
- VueUiSparkStackbar
189+
- VueUiSparkbar
193190
- VueUiSparkgauge
194-
- VueUiSparkHistogram
191+
- VueUiSparkline
192+
- VueUiThermometer
193+
- VueUiTiremarks
194+
- VueUiWheel
195195

196196
The legend slot also works when using the VueDataUi universal component, if the component it wraps supports it.
197197
It is recommended to set the show legend config attribute to false, to hide the default legend.
@@ -217,6 +217,7 @@ The following charts bear these slots:
217217
- VueUiAgePyramid
218218
- VueUiCandlestick
219219
- VueUiDonut
220+
- VueUiGalaxy
220221
- VueUiHeatmap
221222
- VueUiMolecule
222223
- VueUiNestedDonuts

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-data-ui",
33
"private": false,
4-
"version": "2.0.57",
4+
"version": "2.0.58",
55
"type": "module",
66
"description": "A user-empowering data visualization Vue components library",
77
"keywords": [

src/App.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3074,7 +3074,14 @@ const kpiConfig = ref(
30743074
<template #info>
30753075
</template>
30763076
<template #dev>
3077-
<GalaxyTest :dataset="galaxyDataset" :config="galaxyConfig" />
3077+
<GalaxyTest :dataset="galaxyDataset" :config="galaxyConfig">
3078+
<template #tooltip-before>
3079+
BEFORE
3080+
</template>
3081+
<template #tooltip-after>
3082+
AFTER
3083+
</template>
3084+
</GalaxyTest>
30783085
</template>
30793086
<template #prod>
30803087
<VueDataUi component="VueUiGalaxy" :dataset="galaxyDataset" :config="galaxyConfig" />

src/components/vue-data-ui.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,12 @@ defineExpose({
473473
@selectDatapoint="({datapoint, index}) => emit('selectDatapoint', { datapoint, index })"
474474
ref="vue_ui_galaxy"
475475
>
476+
<template #tooltip-before>
477+
<slot name="tooltip-before"></slot>
478+
</template>
479+
<template #tooltip-after>
480+
<slot name="tooltip-after"></slot>
481+
</template>
476482
<template #svg="{ svg }">
477483
<slot name="svg" :svg="svg"></slot>
478484
</template>

src/components/vue-ui-galaxy.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,14 @@ defineExpose({
494494
:parent="galaxyChart"
495495
:content="tooltipContent"
496496
:isCustom="isFunction(galaxyConfig.style.chart.tooltip.customFormat)"
497-
/>
497+
>
498+
<template #tooltip-before>
499+
<slot name="tooltip-before"></slot>
500+
</template>
501+
<template #tooltip-after>
502+
<slot name="tooltip-after"></slot>
503+
</template>
504+
</Tooltip>
498505

499506
<!-- DATA TABLE -->
500507
<DataTable

0 commit comments

Comments
 (0)