JSFiddle - React, Tailwind, and code Playground
HTML
<input type="button" value="append" onclick="clickappend()"/>
<div id="graph">
<svg height="100%" width="100%" viewbox="0 0 100 100">
<polyline points="6,0 6,100" style="fill:none;stroke:#232323;stroke-width:0.5" />
<polyline points="11,5 11,100" style="fill:none;stroke:#232323;stroke-width:0.5"/>
</svg>
</div>
JavaScript
function clickappend() {
$('#graph svg').append('<polyline points="20,0 20,100" style="fill:none;stroke:#232323;stroke-width:0.5"/>');
alert('ran');
};