Skip to content

Instantly share code, notes, and snippets.

@nafu
Last active December 14, 2015 01:39
Show Gist options
  • Save nafu/5008129 to your computer and use it in GitHub Desktop.
Save nafu/5008129 to your computer and use it in GitHub Desktop.
<!DOCTYPE HTML>
<html lang="ja-JP">
<head>
<meta charset="UTF-8">
<script src="http://d3js.org/d3.v3.min.js"></script>
<title>D3line</title>
</head>
<body>
<div id="D3line"></div>
<script type="text/javascript">
var lineGraph = d3.select("#D3line")
.append("svg:svg")
.attr("width", 500)
.attr("height", 200);
var myLine = lineGraph.append("svg:line")
.attr("x1", 40)
.attr("y1", 50)
.attr("x2", 450)
.attr("y2", 150)
.style("stroke", "rgb(6,120,155)");
myLine.style("stroke-width", 24);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment