google chrome - d3.js transition is not working with property method -
i learning d3.js. in script below, selection.transition() not seem working when selection.property() chained, though works when selection.property() put in transition().each(). doing wrong? or, specifications of transition()?
<input class="property_transition" type="checkbox">property transition test</input><br> <input class="property_transition" type="checkbox">property transition test</input><br> <input class="property_transition" type="checkbox">property transition test</input><br> <input class="property_transition" type="checkbox">property transition test</input><br> <script src="http://d3js.org/d3.v3.min.js"></script> <script> var elements = d3.selectall(".property_transition"); elements .transition()//.delay(function(d,i) { return i/elements.length *50; }) .property("checked", true); // <== not working. //.each("end", function() { d3.select(this).property("checked",true); }); // <== works!!! </script>
with script, chrome browser gives:
uncaught typeerror: elements.transition(...).property not function
ie11 gives:
object doesn't support property or method 'property'
thanks,
the short answer .property()
isn't can transition in d3, in particular doesn't provide respective function (as error message in chrome suggests).
in general, doesn't make sense transition binary property -- intermediate values?
Comments
Post a Comment