@@ -18,6 +18,7 @@ import {
1818 makeDonut ,
1919 objectIsEmpty ,
2020 palette ,
21+ setOpacity ,
2122 themePalettes ,
2223 XMLNS
2324} from ' ../lib' ;
@@ -577,36 +578,36 @@ defineExpose({
577578 <!-- DEFS -->
578579 <defs >
579580 <radialGradient :id =" `gradient_top${uid}`" >
580- <stop offset =" 0%" :stop-color =" `${convertColorToHex (FINAL_CONFIG.style.chart.backgroundColor)}00` " />
581- <stop offset =" 100%" :stop-color =" `${ FINAL_CONFIG.style.chart.bar.color}` " />
581+ <stop offset =" 0%" :stop-color =" setOpacity (FINAL_CONFIG.style.chart.backgroundColor, 0) " />
582+ <stop offset =" 100%" :stop-color =" FINAL_CONFIG.style.chart.bar.color" />
582583 </radialGradient >
583584 <radialGradient :id =" `gradient_left${uid}`" >
584- <stop offset =" 0%" :stop-color =" `${convertColorToHex (FINAL_CONFIG.style.chart.backgroundColor)}00` " />
585- <stop offset =" 100%" :stop-color =" `${ FINAL_CONFIG.style.chart.bar.color}33` " />
585+ <stop offset =" 0%" :stop-color =" setOpacity (FINAL_CONFIG.style.chart.backgroundColor, 0) " />
586+ <stop offset =" 100%" :stop-color =" setOpacity( FINAL_CONFIG.style.chart.bar.color, 20) " />
586587 </radialGradient >
587588 <radialGradient :id =" `gradient_right${uid}`" >
588- <stop offset =" 0%" :stop-color =" `${convertColorToHex (FINAL_CONFIG.style.chart.backgroundColor)}00` " />
589- <stop offset =" 100%" :stop-color =" `${ FINAL_CONFIG.style.chart.bar.color}33` " />
589+ <stop offset =" 0%" :stop-color =" setOpacity (FINAL_CONFIG.style.chart.backgroundColor, 0) " />
590+ <stop offset =" 100%" :stop-color =" setOpacity( FINAL_CONFIG.style.chart.bar.color, 20) " />
590591 </radialGradient >
591592 <linearGradient :id =" `gradient_tube_body${uid}`" x1 =" 0%" y1 =" 0%" x2 =" 100%" y2 =" 0%" >
592593 <stop offset =" 0%" :stop-color =" `${FINAL_CONFIG.style.chart.bar.color}`" />
593- <stop offset =" 75%" :stop-color =" `${convertColorToHex (FINAL_CONFIG.style.chart.backgroundColor)}00` " />
594- <stop offset =" 100%" :stop-color =" `${ FINAL_CONFIG.style.chart.bar.color}66` " />
594+ <stop offset =" 75%" :stop-color =" setOpacity (FINAL_CONFIG.style.chart.backgroundColor, 0) " />
595+ <stop offset =" 100%" :stop-color =" setOpacity( FINAL_CONFIG.style.chart.bar.color, 40) " />
595596 </linearGradient >
596597 </defs >
597598
598599 <defs v-if =" hasStack" >
599600 <radialGradient v-for =" bar in stack" :id =" `grad_top_${bar.id}`" >
600- <stop offset =" 0%" :stop-color =" `${ lightenHexColor(bar.color, 0.5)}DD` " />
601- <stop offset =" 100%" :stop-color =" `${ bar.color}` " />
601+ <stop offset =" 0%" :stop-color =" setOpacity( lightenHexColor(bar.color, 0.5), 80) " />
602+ <stop offset =" 100%" :stop-color =" bar.color" />
602603 </radialGradient >
603604 <linearGradient v-for =" bar in stack" :id =" `grad_left_${bar.id}`" >
604- <stop offset =" 0%" :stop-color =" `${ bar.color}DD` " />
605- <stop offset =" 100%" :stop-color =" `${ darkenHexColor(bar.color, 0.5)}FF` " />
605+ <stop offset =" 0%" :stop-color =" setOpacity( bar.color, 80) " />
606+ <stop offset =" 100%" :stop-color =" setOpacity( darkenHexColor(bar.color, 0.5), 100) " />
606607 </linearGradient >
607608 <linearGradient v-for =" bar in stack" :id =" `grad_right_${bar.id}`" >
608- <stop offset =" 2%" :stop-color =" `${ lightenHexColor(bar.color, 0.5)}FF` " />
609- <stop offset =" 100%" :stop-color =" `${ bar.color}DD` " />
609+ <stop offset =" 2%" :stop-color =" setOpacity( lightenHexColor(bar.color, 0.5), 100) " />
610+ <stop offset =" 100%" :stop-color =" setOpacity( bar.color, 80) " />
610611 </linearGradient >
611612 <linearGradient x1 =" 0%" y1 =" 0%" x2 =" 0%" y2 =" 100%" :id =" `vertical_line_${uid}`" >
612613 <stop offset =" 0%" stop-color =" #FFFFFF" />
@@ -694,7 +695,7 @@ defineExpose({
694695 <g v-for =" (arc, j) in bar.fill.donut" >
695696 <path
696697 v-if =" displayArcPercentage(arc, bar.fill.donut, true) > 6"
697- :d =" calcNutArrowPath(arc, {x: arc.cx, y: arc.cy}, 0, 8, false, true, 0.5 )"
698+ :d =" calcNutArrowPath(arc, {x: arc.cx, y: arc.cy}, 0, 8, false, true, 10 )"
698699 :stroke =" arc.color"
699700 class =" vue-ui-donut-arc-path"
700701 stroke-width =" 0.5"
@@ -717,9 +718,9 @@ defineExpose({
717718 <!-- DONUT HOLLOW -->
718719 <defs >
719720 <radialGradient :id =" `hollow_gradient_${uid}`" >
720- <stop offset =" 0%" :stop-color =" `${convertColorToHex (FINAL_CONFIG.style.chart.backgroundColor)}00` " />
721- <stop offset =" 77%" : stop-color =" '#FFFFFF' + '20' " />
722- <stop offset =" 100%" :stop-color =" `${convertColorToHex (FINAL_CONFIG.style.chart.backgroundColor)}00` " />
721+ <stop offset =" 0%" :stop-color =" setOpacity (FINAL_CONFIG.style.chart.backgroundColor, 0) " />
722+ <stop offset =" 77%" stop-color =" #FFFFFF20 " />
723+ <stop offset =" 100%" :stop-color =" setOpacity (FINAL_CONFIG.style.chart.backgroundColor, 0) " />
723724 </radialGradient >
724725 </defs >
725726 <circle class =" vue-ui-donut-arc-path" v-for =" (arc, j) in bar.fill.donut" :cx =" arc.cx" :cy =" arc.cy" :r =" 28" :fill =" `url(#hollow_gradient_${uid})`" />
@@ -792,16 +793,16 @@ defineExpose({
792793 <g v-for =" (bar, i) in stack" :style =" `opacity:${selectedSerie ? selectedSerie === bar.id ? 1 : 0.3 : 1}`" class =" vue-ui-3d-bar-stack" @click =" emits('selectDatapoint', bar)" >
793794 <defs >
794795 <radialGradient :id =" `gradient_tube_top_${bar.id}`" fx =" 10%" cy =" 55%" >
795- <stop offset =" 0%" :stop-color =" `${ lightenHexColor(bar.color, 0.5)}DD` " />
796+ <stop offset =" 0%" :stop-color =" setOpacity( lightenHexColor(bar.color, 0.5), 80) " />
796797
797- <stop offset =" 100%" :stop-color =" `${ darkenHexColor(bar.color, 0.1)}DD` " />
798+ <stop offset =" 100%" :stop-color =" setOpacity( darkenHexColor(bar.color, 0.1), 80) " />
798799 </radialGradient >
799800 <linearGradient :id =" `gradient_tube_body_${bar.id}`" x1 =" 0%" y1 =" 0%" x2 =" 100%" y2 =" 0%" >
800801 <stop offset =" 0%" :stop-color =" `${bar.color}`" />
801- <stop offset =" 10%" :stop-color =" `${ darkenHexColor(bar.color, 0.7)}FF` " />
802- <stop offset =" 25%" :stop-color =" `${ darkenHexColor(bar.color, 0.5)}FF` " />
803- <stop offset =" 75%" :stop-color =" `${ bar.color}DD` " />
804- <stop offset =" 100%" :stop-color =" `${ lightenHexColor(bar.color, 0.7)}FF` " />
802+ <stop offset =" 10%" :stop-color =" setOpacity( darkenHexColor(bar.color, 0.7), 100) " />
803+ <stop offset =" 25%" :stop-color =" setOpacity( darkenHexColor(bar.color, 0.5), 100) " />
804+ <stop offset =" 75%" :stop-color =" setOpacity( bar.color, 80) " />
805+ <stop offset =" 100%" :stop-color =" setOpacity( lightenHexColor(bar.color, 0.7), 100) " />
805806 </linearGradient >
806807 </defs >
807808 <path @mouseenter =" selectSerie(bar)" @click =" selectSerie(bar, true)" @mouseout =" unselectSerie" :d =" bar.fill.tubeBody" stroke =" #FFFFFF" :stroke-width =" 0.5" stroke-linejoin =" round" stroke-linecap =" round" :fill =" `url(#gradient_tube_body_${bar.id})`" />
@@ -835,7 +836,7 @@ defineExpose({
835836 <g v-for =" (arc, j) in bar.fill.donut" >
836837 <path
837838 v-if =" displayArcPercentage(arc, bar.fill.donut, true) > 6"
838- :d =" calcNutArrowPath(arc, {x: arc.cx, y: arc.cy}, 0, 8, false, true, 0.5 )"
839+ :d =" calcNutArrowPath(arc, {x: arc.cx, y: arc.cy}, 0, 8, false, true, 10 )"
839840 :stroke =" arc.color"
840841 class =" vue-ui-donut-arc-path"
841842 stroke-width =" 0.5"
@@ -844,7 +845,7 @@ defineExpose({
844845 fill =" none"
845846 />
846847 </g >
847-
848+
848849 <path
849850 v-for =" (arc, j) in bar.fill.donut"
850851 class =" vue-ui-donut-arc-path"
@@ -858,9 +859,9 @@ defineExpose({
858859 <!-- DONUT HOLLOW -->
859860 <defs >
860861 <radialGradient :id =" `hollow_gradient_${uid}`" >
861- <stop offset =" 0%" :stop-color =" `${convertColorToHex (FINAL_CONFIG.style.chart.backgroundColor)}00` " />
862- <stop offset =" 77%" : stop-color =" '#FFFFFF' + '20' " />
863- <stop offset =" 100%" :stop-color =" `${convertColorToHex (FINAL_CONFIG.style.chart.backgroundColor)}00` " />
862+ <stop offset =" 0%" :stop-color =" setOpacity (FINAL_CONFIG.style.chart.backgroundColor, 0) " />
863+ <stop offset =" 77%" stop-color =" #FFFFFF20 " />
864+ <stop offset =" 100%" :stop-color =" setOpacity (FINAL_CONFIG.style.chart.backgroundColor, 0) " />
864865 </radialGradient >
865866 </defs >
866867 <circle class =" vue-ui-donut-arc-path" v-for =" (arc, j) in bar.fill.donut" :cx =" arc.cx" :cy =" arc.cy" :r =" 28" :fill =" `url(#hollow_gradient_${uid})`" />
0 commit comments