Skip to content

Instantly share code, notes, and snippets.

@mbostock
Created October 27, 2017 15:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbostock/268bb5fb6e1025b60f01a35311ed798b to your computer and use it in GitHub Desktop.
Save mbostock/268bb5fb6e1025b60f01a35311ed798b to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<svg width="960" height="500"></svg>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script>
var x = d3.scaleOrdinal()
.domain(["a", "b", "c", "d", "e", "f", "g", "h", "i"])
.range([100, 195, 290, 385, 480, 575, 670, 765, 860]);
d3.select("svg")
.append("g")
.attr("transform", "translate(0,250)")
.call(d3.axisBottom(x));
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment