D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
juliettepardue
Full window
Github gist
VI1
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Visualization Implementation 1</title> <script type="text/javascript" src="d3.v3.js"></script> <style type="text/css"> div.bar { display: inline-block; width: 10px; height: 75px; margin-right: 2px; background-color: teal; } </style> </head> <body style="text-align:center;"> <h1>Juliette Pardue</h1> <script type="text/javascript"> var dataset = [25, 7, 5, 26, 11, 8, 25, 14, 23, 19, 14, 11, 22, 29, 11, 13, 12, 17, 18, 10, 24, 18, 25, 9, 3]; d3.select("body").selectAll("div") .data(dataset) .enter() .append("div") .attr("class", "bar") .style("height", function(d) { var barHeight = d * 5; return barHeight + "px"; }); </script> </br> <img src="https://www.cs.odu.edu/~jpardue/InfoViz/R_vi1.png"/> </body> </html>