I'm building a pie chart at the moment, and it's mostly done.
Anyway, I'm trying to implement some hover effects on each pie slice, but I've come across a problem I'm unable to solve. When you hover over an element the text increases in size, and also uses a filter to add a black background. The issue with this is that the text is sometimes being hidden behind other elements, as if those elements are on top of it. My best solution to fix this was adding visibility and making it !important.
.pieChart svg>g text.hover {
font-size: 1.3em;
fill: #fff;
filter: url(#pieTextFilter);
visibility: visible !important;
}
This, however, doesn't solve my problem.
Here is a jsfiddle that represents the problem (hover you mouse of slice 4): http://jsfiddle.net/tinygram/22o1epyp/3/
If you're familiar with D3, it might be important to note that this happens only after I update the graph. If you look at the bottom of my jsfiddle, you'll see that I'm starting the graph and then running it again with some updated data. I have noticed that this adds a new and at the end of the svg in the dom. I honestly don't know if this is important, but I thought I should mention it.