Accepted answer

Give an ID to your text in the render function:

    .attr("id", "textLabel")

And select by class in the redraw function:"#textLabel")

If that is the only <text> element in the SVG selection, you could simply do..."text")

... without any ID or class.

A third solution is naming a selection outside both function, which you could change inside them.

Finally, two advices:

First, you said "I am using a combination of jQuery & d3.js". That's almost always a terrible idea. Don't do that.

Second, I'd advise you to mind the names of your variables and objects. You are referring to a SVG selection as body. Normally, we would expect that this.body refers to the <body>. Thus, change it to this.svg, it's clearer for whoever is reading your code.

Related Query

More Query from same tag