ndtv-d3 icon indicating copy to clipboard operation
ndtv-d3 copied to clipboard

make enter/exit animation colors optional and adjustable

Open skyebend opened this issue 8 years ago • 3 comments

need to be able to disable the green/red color animations (when the edge colors already mean something) and perhaps set what the colors should be. Former probably as a config option, and the later as a css property. Or perhaps having css set stroke-default will work.

skyebend avatar Mar 17 '16 21:03 skyebend

Yeah - I think we need to define .node-enter, .node-exit, .edge-enter and .edge-exit classes, and then apply/remove those classes on enter/exit. If you want to negate the behavior, you just need to override the class definition from being .node-enter { fill: green; } to .node-enter { fill: default; }

On 03/17/2016 02:20 PM, Skye Bender-deMoll wrote:

need to be able to disable the green/red color animations (when the edge colors already mean something) and perhaps set what the colors should be. Former probably as a config option, and the later as a css property. Or perhaps having css set stroke-default will work.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/michalgm/ndtv-d3/issues/38

michalgm avatar Mar 17 '16 21:03 michalgm

Ok - I mean 'inherit', not 'default', but this doesn't seem to work as I thought it did. I don't like the idea of adding config options for everything under the sun - I feel like there must be a way to do this using css. I'll think about it some more.

On 03/17/2016 02:20 PM, Skye Bender-deMoll wrote:

need to be able to disable the green/red color animations (when the edge colors already mean something) and perhaps set what the colors should be. Former probably as a config option, and the later as a css property. Or perhaps having css set stroke-default will work.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/michalgm/ndtv-d3/issues/38

michalgm avatar Mar 17 '16 22:03 michalgm

OTOH, rendering colored transitions is something I'd like to add as an option for the video renders as well. In which case it might make sense to add this as a general plot argument (instead of a config option) where ani.enter.color and ani.exit.color can be set to a color value or NULL to disable. Then perhaps this behavior could be overridden by the css if necessary. For my uses cases, a lot of users won't touch the css, so would be a pain if you had to do that to disable it.

skyebend avatar Mar 18 '16 00:03 skyebend