xxxxxxxxxx
<html>
<head><script type="text/javascript" src="https://cdn.jsdelivr.net/gh/gist/1595803/d3mod.js"></script></head>
<body>
<script type="text/javascript">
d3.select("body")
.append("svg:svg")
.property("__chart__",function() {
return {
X:d3.scale.linear()
.domain([50,60])
.range([0,this.parentNode.offsetWidth]),
Y:d3.scale.linear()
.domain([1,100])
.range([this.parentNode.offsetHeight,0])
}
})
.selectAll(".series")
.data([{x:51,y:23},{x:55,y:55},{x:52,y:83}])
.enter()
.append("svg:circle")
.attr("cx",function(d) { return this.__chart__.X(d.x)})
.attr("cy",function(d) { return this.__chart__.Y(d.y)})
.attr("r",10)
</script>
</body>
</html>
Updated missing url https://raw.github.com/gist/1595803/d3mod.js to https://cdn.jsdelivr.net/gh/gist/1595803/d3mod.js
https://raw.github.com/gist/1595803/d3mod.js