I love the way this scatterchart highlights circles when you mouse over them: http://novus.github.com/nvd3/examples/scatterWithLegend.html
But there’s a lot of code there (looks like the author has defined his/her own standard libraries) and I can’t figure out exactly how the effect is achieved.
Is it something to do with the .hover class and the stroke-width property?
I’d like to achieve the same effect on my own scatter graph, although I’m using circles rather than paths, so it may not be possible.
In the example, the effect seems to be realised in scatter.js from line 136.
Just highlighting individual circles is much easier though and doesn’t need all the other stuff the example does. All you need to do is add a
mouseoverhandler to the circles and (for example) increasestroke-width. That would look something likeI’m assuming that a CSS class
highlightdefines the style. Alternatively, you can just use (in this example) CSS classcircle:hoverwithout the need for the event handlers.