D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
uicoded
Full window
Github gist
bar chart using html
Bar chart using simple html
<!DOCTYPE html> <head> <meta charset="utf-8"> <script src="https://d3js.org/d3.v4.min.js"></script> <style> .bar{ display: inline-block; width: 20px; height: 75px; /* Gets overriden by D3-assigned height below */ margin-right: 2px; background-color: teal; } </style> </head> <body> <script> var dataset = [ 5, 10, 15, 20, 25]; d3.select('body').selectAll('div') .data(dataset) .enter() .append('div') .attr('class', 'bar') .style('height', function (d) { return d * 5 + 'px'; }); </script> </body>
https://d3js.org/d3.v4.min.js