Tuesday 15 May 2012

d3.js - Update Selection in D3 is empty -


In my code, my update selection is always empty, as my exit is selected, so the transition never runs . Every time I refresh, I repeat the whole DOOM piece as if it had never existed before (i.e. I can delete everything). Nant and behavior does not change.

I am using an important function in the data () to ensure that the situation is likely to be included at a unique value instead of the place.

The whole code is over, but I have removed what I think the relevant section is here (basically, I'm just trying to follow):

 < Code> var key = function (d) {return d.index; } Var filterDistance = function () {var names = list.selectAll ("div"). Data (byDistance.bottom (40), key); // update names.attr ("class", "update"); // add names.enter () .append ("div") .attr ("class", "enter"). Style ("Opacity", "0") Transcision () .duration (500). Style ("opacity", "1") .text (function (d) {return display text (d);}); // Remove names.exit () .transition () .duration (750). Style ("Opacity", "0") .remove (); };    

was able to find the best and the problem. It has been found that in my "work" summary display, I was using $ ('results'). Text ('insert essence here') which is definitely something else that can be stuck in there (for example, like my D3 generated divisions)

No comments:

Post a Comment