@@ -120,9 +120,9 @@ const computedDataset = computed(() => {
120120 const x = drawingArea .value .left + (gap / 2 + (i * unitWidth));
121121 const trapX = drawingArea .value .left + (i * unitWidth);
122122 const intensity = typeof dp .intensity === ' undefined' ? 100 : Math .round (dp .intensity * 100 );
123- const color = dp .value >= 0 ? ` ${ FINAL_CONFIG .value .style .bars .colors .positive }${ opacity[intensity]} ` : ` ${ FINAL_CONFIG .value .style .bars .colors .negative }${ opacity[intensity]} ` ;
124- const stroke = dp .value >= 0 ? FINAL_CONFIG .value .style .bars .colors .positive : FINAL_CONFIG .value .style .bars .colors .negative ;
125- const gradient = dp .value >= 0 ? ` url(#gradient_positive_${ i} _${ uid .value } )` : ` url(#gradient_negative_${ i} _${ uid .value } )` ;
123+ const color = dp .color ? dp . color : dp . value >= 0 ? ` ${ FINAL_CONFIG .value .style .bars .colors .positive }${ opacity[intensity]} ` : ` ${ FINAL_CONFIG .value .style .bars .colors .negative }${ opacity[intensity]} ` ;
124+ const stroke = dp .color ? dp . color : dp . value >= 0 ? FINAL_CONFIG .value .style .bars .colors .positive : FINAL_CONFIG .value .style .bars .colors .negative ;
125+ const gradient = dp .color ? ` url(#gradient_datapoint_ ${ i } _ ${ uid . value } ) ` : dp . value >= 0 ? ` url(#gradient_positive_${ i} _${ uid .value } )` : ` url(#gradient_negative_${ i} _${ uid .value } )` ;
126126 const textAnchor = x + width / 2 ;
127127 return {
128128 ... dp,
@@ -179,6 +179,11 @@ const animation = computed(() => {
179179 <stop offset =" 0%" :stop-color =" `${shiftHue(FINAL_CONFIG.style.bars.colors.negative, 0.05)}${opacity[negGrad.intensity]}`" />
180180 <stop offset =" 100%" :stop-color =" `${FINAL_CONFIG.style.bars.colors.negative}${opacity[negGrad.intensity]}`" />
181181 </radialGradient >
182+
183+ <radialGradient v-for =" (dp, i) in computedDataset" :id =" `gradient_datapoint_${i}_${uid}`" cy =" 50%" cx =" 50%" r =" 50%" fx =" 50%" fy =" 50%" >
184+ <stop offset =" 0%" :stop-color =" `${shiftHue(dp.color, 0.05)}${opacity[dp.intensity]}`" />
185+ <stop offset =" 100%" :stop-color =" `${dp.color}${opacity[dp.intensity]}`" />
186+ </radialGradient >
182187 </defs >
183188
184189 <g v-if =" !FINAL_CONFIG.style.bars.shape || FINAL_CONFIG.style.bars.shape === 'square'" >
0 commit comments