D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
martinjc
Full window
Github gist
D3 Barchart, multiple datasets, updating on select (Data: breathalyser test counts per month)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Data & Colour Example</title> <script src="//d3js.org/d3.v4.min.js"></script> <style> html, body, #vis { height: 100%; margin: 0; } </style> </head> <body> <form> <select name="year" id="year"> <option value="2009">2009</option> <option value="2010">2010</option> <option value="2011">2011</option> <option value="2012">2012</option> <option value="2013">2013</option> <option value="2014" selected>2014</option> </select> </form> <div id="vis"></div> <script src="script.js"> </script> </body> </html>
https://d3js.org/d3.v4.min.js