Skip to content

Instantly share code, notes, and snippets.

@fbreitwieser
Created March 25, 2018 19:27
Show Gist options
  • Save fbreitwieser/dd78384bc164051a728ba9c7231af962 to your computer and use it in GitHub Desktop.
Save fbreitwieser/dd78384bc164051a728ba9c7231af962 to your computer and use it in GitHub Desktop.
test paths
<!DOCTYPE html>
<svg width="960" height="960"></svg>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script>
var svg = d3.select("svg"),
width = +svg.attr("width"),
height = +svg.attr("height");
svg.append("defs").append("path").attr("id","p").attr("d","M 100 200 C 200 100 300 0 400 100 C 500 200 600 300 700 200");
svg.append("use").attr("xlink:href", "#p").attr("fill", "none").attr("stroke","red");
svg.append("text").append("textPath").attr("xlink:href", "#p").text("ASDASDASDASDSADSA");
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment