const frame = d3.select('body').append('svg') .attr("width", 400) .attr("height", 200); const seq = [1, 2, 3, 4, 5]; frame.selectAll('circle') .data(seq) .enter() .append('circle') .attr('r', d => d * 5) .attr('cx', d => d * 50) .attr('cy', 50); 例えば、データ(上記コードのseq)をユーザが入力して変更できるようにする場合、変更がある度に一度描画したcircleを消して再度データをバインドし、circleを再描画するという操作を付け足す必要がある。 あるいはデータポイントのマーカーをcircleからrectに変更するセレクトボックスを設置する場合、