问题
I'm wondering what the appropriate way is to deal with custom elements generated using on('renderlet', function(){...}) when you need them to transition smoothly? Any help would be great
回答1:
It's now possible, as of dc.js 2.0.0 beta 11, to add elements in the 'pretransition' event, and at the same time add transitions on these elements.
The transitions will run in parallel with the transitions on built-in elements.
https://github.com/dc-js/dc.js/issues/806
chart.on('pretransition', function(chart) {
chart.select(...).append(...)
// create stuff
.transition().duration(chart.transitionDuration())
// change stuff
来源:https://stackoverflow.com/questions/29674385/how-to-handle-transitions-of-custom-elements-generated-by-an-event