Skip to content

Commit b792174

Browse files
committed
Fix - VueUiGalaxy - Fixed gradient not showing on Safari
1 parent 02bb49b commit b792174

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

src/components/vue-ui-galaxy.vue

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,13 @@ defineExpose({
433433

434434
<svg :xmlns="XMLNS" v-if="isDataset" :class="{ 'vue-data-ui-fullscreen--on': isFullscreen, 'vue-data-ui-fulscreen--off': !isFullscreen }" data-cy="galaxy-svg" :viewBox="`0 0 ${svg.width} ${svg.height}`" :style="`max-width:100%; overflow: visible; background:${galaxyConfig.style.chart.backgroundColor};color:${galaxyConfig.style.chart.color}`">
435435

436+
<!-- GRADIENT -->
437+
<defs>
438+
<filter :id="`blur_${uid}`" x="-50%" y="-50%" width="200%" height="200%">
439+
<feGaussianBlur in="SourceGraphic" :stdDeviation="100 / galaxyConfig.style.chart.layout.arcs.gradient.intensity" />
440+
</filter>
441+
</defs>
442+
436443
<!-- PATHS -->
437444
<g v-for="datapoint in galaxySet">
438445
<path
@@ -452,17 +459,16 @@ defineExpose({
452459
stroke-linecap="round"
453460
:class="`${selectedSerie && selectedSerie !== datapoint.id && galaxyConfig.useBlurOnHover ? 'vue-ui-galaxy-blur' : ''}`"
454461
/>
455-
<path
456-
v-if="datapoint.value && galaxyConfig.style.chart.layout.arcs.gradient.show"
457-
:d="datapoint.path"
458-
fill="none"
459-
:stroke="galaxyConfig.style.chart.layout.arcs.gradient.color"
460-
:stroke-width="(galaxyConfig.style.chart.layout.arcs.strokeWidth / 2) * (selectedSerie === datapoint.id && galaxyConfig.style.chart.layout.arcs.hoverEffect.show ? galaxyConfig.style.chart.layout.arcs.hoverEffect.multiplicator : 1)"
461-
stroke-linecap="round"
462-
:class="`vue-ui-galaxy-gradient ${selectedSerie && selectedSerie !== datapoint.id && galaxyConfig.useBlurOnHover ? 'vue-ui-galaxy-blur' : ''}`"
463-
:style="`filter: blur(5px) opacity(${galaxyConfig.style.chart.layout.arcs.gradient.intensity}%);transform: translate(0,0)`"
464-
class="inner-gradient"
465-
/>
462+
<g :filter="`url(#blur_${uid})`" v-if="datapoint.value && galaxyConfig.style.chart.layout.arcs.gradient.show">
463+
<path
464+
:d="datapoint.path"
465+
fill="none"
466+
:stroke="galaxyConfig.style.chart.layout.arcs.gradient.color"
467+
:stroke-width="(galaxyConfig.style.chart.layout.arcs.strokeWidth / 2) * (selectedSerie === datapoint.id && galaxyConfig.style.chart.layout.arcs.hoverEffect.show ? galaxyConfig.style.chart.layout.arcs.hoverEffect.multiplicator : 1)"
468+
stroke-linecap="round"
469+
:class="`vue-ui-galaxy-gradient ${selectedSerie && selectedSerie !== datapoint.id && galaxyConfig.useBlurOnHover ? 'vue-ui-galaxy-blur' : ''}`"
470+
/>
471+
</g>
466472
</g>
467473

468474
<!-- TRAPS -->

0 commit comments

Comments
 (0)