chart = {
const svg = d3
.create("svg")
.attr("viewBox", [0, 0, width, height])
.attr("width", width)
.attr("height", height);
svg
.datum(waveformPeaks)
.append("path")
.attr('transform', () => `translate(0, ${height / 2})`)
.attr("d", area)
.attr("fill", "none")
.attr('stroke', 'black')
.attr("stroke-linejoin", "round")
.attr("stroke-linecap", "round")
.attr('stroke-width', '0.1mm');
return svg.node();
}