I'm having problems associating a class to a d3 element. I can set style attributes through the d3 style function like this:
d3.select(regionBackground).style('fill','darkgrey');
However, I'm not able to set style attributes when using the following approaches:
d3.select(regionBackground).attr('class', 'highlightRegionBackground');
d3.select(regionBackground).classed('highlightRegionBackground', true);
Any idea what I might be doing wrong here or how to debug?
No, this is not usually needed, for an inline SVG. The SVG accesses the same CSS as the containing HTML.