-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Lines 193-198 are not written using d3.js best practices. Such presentation concerns should be managed in the stylesheet and managed using stylesheet selectors. The radar.js code should only care about which selectors, and the class names should be semantic in meaning.
.on('mouseover', function(d){
d3.select(this).select("text.name").style({opacity:'1.0'});
})
.on('mouseout', function(d){
d3.select(this).select("text.name").style({opacity:'0.1'});
})
would become:
<style>
svg text.name { font-family: Arial, Sans-serif; font-size: 12px; opacity: 0.1 }
svg text.name:hover { font-family: Arial, Sans-serif; font-size: 12px; opacity: 1.0 }
</style>
This also allows consumers like me (see issue #5) to change the style of the presentation without needing to edit any code.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels