File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 960
960
961
961
<!-- Y LABELS MOUSE TRAPS -->
962
962
<template v-if =" mutableConfig .useIndividualScale && ! mutableConfig .isStacked " >
963
+ <defs >
964
+ <linearGradient
965
+ v-for =" (trap, i) in allScales"
966
+ :id =" `individual_scale_gradient_${uniqueId}_${i}`"
967
+ x1 =" 0%"
968
+ x2 =" 100%"
969
+ y1 =" 0%"
970
+ y2 =" 0%"
971
+ >
972
+ <stop offset =" 0%" :stop-color =" FINAL_CONFIG.chart.backgroundColor" stop-opacity =" 0" />
973
+ <stop offset =" 100%" :stop-color =" trap.color" stop-opacity =" 0.2" />
974
+ </linearGradient >
975
+ </defs >
963
976
<rect
964
- v-for =" trap in allScales"
977
+ v-for =" ( trap, i) in allScales"
965
978
:x =" trap.x - FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth + xPadding"
966
979
:y =" drawingArea.top"
967
980
:width =" FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth"
968
981
:height =" drawingArea.height < 0 ? 10 : drawingArea.height"
969
- :fill =" selectedScale === trap.id ? setOpacity(trap.color, 20) : 'transparent'"
982
+ :fill =" selectedScale === trap.id ? `url(#individual_scale_gradient_${uniqueId}_${i})` : 'transparent'"
970
983
@mouseenter =" selectedScale = trap.id"
971
984
@mouseleave =" selectedScale = null"
972
985
/>
You can’t perform that action at this time.
0 commit comments