SHARE
TWEET

Untitled

a guest May 26th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var data = [4, 8, 15, 16, 23, 42];
  2. var x = d3.scaleLinear()
  3.     .domain([0, d3.max(data)])
  4.     .range([0, 420]);
  5. d3.select(".chart")
  6.     .selectAll("div")
  7.     .data(data)
  8.     .enter().append("div")
  9.     .style("width", function(d) { return x(d) + "px"; })
  10.     .text(function(d) { return d; });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top