D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
Agoujil2saad
Full window
Github gist
plying_with_d3
just playing around with d3.js
<!DOCTYPE html> <head> <meta charset="utf-8"> <script src="https://d3js.org/d3.v4.min.js"></script> <style> </style> </head> <body> <svg></svg> <script> var rectWidth = 100; var height = 300; data = [100,250,175,200,120]; // Select var svg = d3.select('svg') .data(data) .enter() .append('rect') .attr('x',(d,i) => i*rectWidth) .attr('y',d => height-d) .attr("width", rectWidth) .attr("height", d=>d) .attr("fill",'blue') .attr("stroke",'#fff') console.log(svg) </script> </body>
https://d3js.org/d3.v4.min.js