I am making a d3 choropleth that assigns initial fill
property values according to a colorization algorithm to the tune of:
svg.selectAll(".foo")
.style("fill", function(d){
return colorization(getRandomArbitrary(5,25)); //returns hex value
})
This works. Unfortunately, it seems to render my CSS rule irrelevant. The rule works without making the call to .style()
via d3:
.foo:hover{
fill: white;
}
I'm not sure if this is something that d3.js is doing, or a result of some sort of interplay between SVG styles and CSS styles.
I am looking for a solution that accomplishes the algorithmic colorization and continues to permit the :hover fill effect.