Accepted answer

This is D3 v4, not v3. In D3 v4, the "magic" of the enter selection, which copies the entering elements into the update selection, was removed.

So, you'll have to merge the selections:

    .merge(options2)//merging here
    .text(function(d) {
      return d;

For a better explanation, have a look at my answer here.

Here is your plunker with that 1 line change only:

Related Query