Skip to content

Instantly share code, notes, and snippets.

@russelllim22
Created September 4, 2021 21:27
Show Gist options
  • Save russelllim22/e591a4b3d445036c3e4340fd268a4f12 to your computer and use it in GitHub Desktop.
Save russelllim22/e591a4b3d445036c3e4340fd268a4f12 to your computer and use it in GitHub Desktop.
svg.append("g") // the axis will be contained in an SVG group element
.attr("id","yAxis")
.call(d3.axisLeft(yScale))
svg.append("g")
.attr("transform", "translate(0,400)") // translate x-axis to bottom of chart
.attr("id","xAxis")
.call(d3.axisBottom(xScale))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment