I'm trying to convert a working D3 chart to work with
r2d3 in shiny/rmarkdown.
I think the issue is that the chart is setup with the following HTML container:
<svg width="1000" height="500"> <g class="chart"> <g class="bar"></g> </g> </svg>
With the js script using code like
d3.select(".bar") to build build the chart.
So is there a way to tell
r2d3 to use this container for the chart? Or would I have to append the
<g> elements to the standard svg container created by
r2d3 in the js script?