I have a chart that includes a 'total' sum value series alongside other values.
My goal is to initially hide or place this 'total' column behind the others, and then bring it to the front when the series' legendItem
is hovered over.
Thus far, I have been successful in increasing the zIndex
on the series to bring the 'total' column to the front upon 'mouseover', but I am unable to trigger it to move back behind on 'mouseout', causing the 'total' column to remain in the front.
I also attempted a similar approach using .toFront()
, which did work, but faced the same issue of moving the column back behind on 'mouseout'.
Is there a correct way to move this column to the front or back based on legendItem hover?
https://codesandbox.io/s/cold-night-9p0gk?file=/src/components/BarChart.vue:1272-1325