susielu / d3-legend

A reusable d3 legend component.
http://d3-legend.susielu.com/
Apache License 2.0
727 stars 104 forks source link

cell.exit().transition not a function #39

Closed AriaFallah closed 8 years ago

AriaFallah commented 8 years ago

I'm using d3 v4 with the new release

cell.exit().transition().style("opacity", 0).remove();

throws the error when I do .call(legend).

TypeError: cell.exit(...).transition is not a function
AriaFallah commented 8 years ago

d3-selection by itself does not have the .transition() function. All you need to do is

import 'd3-transition' // es6
require('d3-transition') 

at the top of your code to "inject" it into the selection API