Let's assume that your select element is:

<select id='grouping'>

What you need to do is add a listener to pend for changes on this element. If your function that draws the SVG chart is called draw, then the only thing you need to do is add this line at the end of your script:"#grouping").on("change", draw);

Is this helping at all?

Related Query