[Vuejs]-D3 VUEjs adding Attr and or call

0๐Ÿ‘

        d3.select(`._${item.index}`)  
          .style("stroke-width", 2)
          .style("fill", "black");
 <circle
        :r="item.radius"
        :cx="item.x"
        :cy="item.y"
        :fill="item.fill"
        :stroke="item.stroke"
        :stroke-width="item.strokeWidth"
        :class="`_${item.index}`"
      />

It was actually very simple, just added a class attribute and used that to select with d3.select

Leave a comment