How do you use d3.select
to get a node by its text content?
This stackoverflow answer made me think that I could use d3.selection.text()
as a getter, and thus filter the results of a selectAll
by the text content of the returned nodes.
But mimicking the pattern shown in that stackoverflow answer is not working for me. Instead, I’m getting the error
TypeError: Cannot read properties of null (reading 'textContent')