After creating a chart, I want to clone a copy of the chart, with different variable. So far, I have manage to succeed with:
const clone = chart.cloneNode(true)
example notebook: https://beta.observablehq.com/@muyueh/d3-bar-chart
But I was wondering if there is a better way to this.