Skip to content

Commit 20dc962

Browse files
committed
Fix - Tooltip font size config option not applied
1 parent 6954548 commit 20dc962

21 files changed

+30
-4
lines changed

src/App.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@ import TestingArena from "./TestingArena.vue";
44
import ArenaVueUiXy from "../TestingArena/ArenaVueUiXy.vue";
55
import ArenaVueUiDonut from "../TestingArena/ArenaVueUiDonut.vue";
66
import ArenaVueUiTreemap from "../TestingArena/ArenaVueUiTreemap.vue";
7+
import ArenaVueUiWaffle from "../TestingArena/ArenaVueUiWaffle.vue";
78
89
const showOldArena = ref(false);
910
1011
const components = ref([
1112
"VueUiXy",
1213
"VueUiDonut",
13-
"VueUiTreemap"
14+
"VueUiTreemap",
15+
"VueUiWaffle"
1416
]);
1517
16-
const selectedComponent = ref(components.value[2]);
18+
const selectedComponent = ref(components.value[3]);
1719
1820
</script>
1921

@@ -29,4 +31,5 @@ const selectedComponent = ref(components.value[2]);
2931
<ArenaVueUiXy v-if="selectedComponent === 'VueUiXy'"/>
3032
<ArenaVueUiDonut v-if="selectedComponent === 'VueUiDonut'"/>
3133
<ArenaVueUiTreemap v-if="selectedComponent === 'VueUiTreemap'" />
34+
<ArenaVueUiWaffle v-if="selectedComponent === 'VueUiWaffle'" />
3235
</template>

src/atoms/Tooltip.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ const props = defineProps({
2727
isCustom: {
2828
type: Boolean,
2929
default: false,
30+
},
31+
fontSize: {
32+
type: [Number, String],
33+
default: 14
3034
}
3135
});
3236
@@ -50,7 +54,7 @@ const position = computed(() => {
5054
data-cy="tooltip"
5155
:class="{'vue-data-ui-custom-tooltip' : isCustom, 'vue-data-ui-tooltip': !isCustom}"
5256
v-if="show"
53-
:style="`top:${position.top}px;left:${position.left}px;${isCustom ? '' : `background:${backgroundColor};color:${color};max-width:${maxWidth}`}`"
57+
:style="`top:${position.top}px;left:${position.left}px;${isCustom ? '' : `background:${backgroundColor};color:${color};max-width:${maxWidth};font-size:${props.fontSize}px`}`"
5458
>
5559
<slot name="tooltip-before"/>
5660
<slot/>

src/components/vue-ui-age-pyramid.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,7 @@ defineExpose({
655655
:show="agePyramidConfig.style.tooltip.show && isTooltip"
656656
:backgroundColor="agePyramidConfig.style.tooltip.backgroundColor"
657657
:color="agePyramidConfig.style.tooltip.color"
658+
:fontSize="agePyramidConfig.style.tooltip.fontSize"
658659
:parent="agePyramid"
659660
:content="tooltipContent"
660661
:isCustom="agePyramidConfig.style.tooltip.customFormat && typeof agePyramidConfig.style.tooltip.customFormat === 'function'"

src/components/vue-ui-candlestick.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,7 @@ defineExpose({
719719
:show="candlestickConfig.style.tooltip.show && isTooltip"
720720
:backgroundColor="candlestickConfig.style.tooltip.backgroundColor"
721721
:color="candlestickConfig.style.tooltip.color"
722+
:fontSize="candlestickConfig.style.tooltip.fontSize"
722723
:parent="candlestickChart"
723724
:content="tooltipContent"
724725
:isCustom="candlestickConfig.style.tooltip.customFormat && typeof candlestickConfig.style.tooltip.customFormat === 'function'"

src/components/vue-ui-donut.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,7 @@ defineExpose({
852852
:show="donutConfig.style.chart.tooltip.show && isTooltip"
853853
:backgroundColor="donutConfig.style.chart.tooltip.backgroundColor"
854854
:color="donutConfig.style.chart.tooltip.color"
855+
:fontSize="donutConfig.style.chart.tooltip.fontSize"
855856
:parent="donutChart"
856857
:content="tooltipContent"
857858
:isCustom="isFunction(donutConfig.style.chart.tooltip.customFormat)"

src/components/vue-ui-galaxy.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,7 @@ defineExpose({
527527
:show="galaxyConfig.style.chart.tooltip.show && isTooltip"
528528
:backgroundColor="galaxyConfig.style.chart.tooltip.backgroundColor"
529529
:color="galaxyConfig.style.chart.tooltip.color"
530+
:fontSize="galaxyConfig.style.chart.tooltip.fontSize"
530531
:parent="galaxyChart"
531532
:content="tooltipContent"
532533
:isCustom="isFunction(galaxyConfig.style.chart.tooltip.customFormat)"

src/components/vue-ui-heatmap.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,7 @@ defineExpose({
580580
:show="heatmapConfig.style.tooltip.show && isTooltip"
581581
:backgroundColor="heatmapConfig.style.tooltip.backgroundColor"
582582
:color="heatmapConfig.style.tooltip.color"
583+
:fontSize="heatmapConfig.style.tooltip.fontSize"
583584
:parent="heatmapChart"
584585
:content="tooltipContent"
585586
:isCustom="heatmapConfig.style.tooltip.customFormat && typeof heatmapConfig.style.tooltip.customFormat === 'function'"

src/components/vue-ui-molecule.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,7 @@ defineExpose({
605605
:show="moleculeConfig.style.chart.tooltip.show && isTooltip"
606606
:backgroundColor="moleculeConfig.style.chart.tooltip.backgroundColor"
607607
:color="moleculeConfig.style.chart.tooltip.color"
608+
:fontSize="moleculeConfig.style.chart.tooltip.fontSize"
608609
:parent="moleculeChart"
609610
:content="tooltipContent"
610611
:isCustom="moleculeConfig.style.chart.tooltip.customFormat && typeof moleculeConfig.style.chart.tooltip.customFormat === 'function'"

src/components/vue-ui-nested-donuts.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,7 @@ defineExpose({
806806
:show="donutConfig.style.chart.tooltip.show && isTooltip"
807807
:backgroundColor="donutConfig.style.chart.tooltip.backgroundColor"
808808
:color="donutConfig.style.chart.tooltip.color"
809+
:fontSize="donutConfig.style.chart.tooltip.fontSize"
809810
:parent="nestedDonutsChart"
810811
:content="tooltipContent"
811812
:isCustom="isFunction(donutConfig.style.chart.tooltip.customFormat)"

src/components/vue-ui-onion.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,7 @@ defineExpose({
595595
:show="onionConfig.style.chart.tooltip.show && isTooltip"
596596
:backgroundColor="onionConfig.style.chart.tooltip.backgroundColor"
597597
:color="onionConfig.style.chart.tooltip.color"
598+
:fontSize="onionConfig.style.chart.tooltip.fontSize"
598599
:parent="onionChart"
599600
:content="tooltipContent"
600601
:isCustom="isFunction(onionConfig.style.chart.tooltip.customFormat)"

0 commit comments

Comments
 (0)