I would like to build the following radio buttons procedurally.
<input type="radio" name="bees">5<br />
<input type="radio" name="bees">10<br />
<input type="radio" name="bees">20
If I use code such as the following:
function build_colony() {
const bees_list = [5, 10, 20];
d3.select('.colony)
.selectAll('input')
.data(bees_list)
.enter()
.append('input')
.attr('type', 'radio')
.attr('name', 'bees')
.text(d => d);
}
I get a closing </input>
:
<div class="colony">
<input type="radio" name="bees">5</input>
<input type="radio" name="bees">10</input>
<input type="radio" name="bees">20</input>
</div>
How do I mismatch D3's closing tag?