Sha256: c16573f9c404c6131c638f1f03355a69ae8a6c4d1188919f99e2865320917ca3
Contents?: true
Size: 817 Bytes
Versions: 1
Compression:
Stored size: 817 Bytes
Contents
<html> <head> <title>Line Eccentricity</title> <script type="text/javascript" src="../../protovis-d3.3.js"></script> </head> <body> <script type="text/javascript+protovis"> var e = 0, de = 0.01; var vis = new pv.Panel() .width(400) .height(400) .margin(10) .strokeStyle("#ccc"); vis.add(pv.Line) .data([{x:75,y:75},{x:200,y:200},{x:325,y:325}]) .lineWidth(10) .left(function(d) d.x) .top(function(d) d.y) .interpolate(function() this.index & 1 ? "polar-reverse" : "polar") .eccentricity(function() e); vis.anchor("center").add(pv.Label) .text(function() e.toFixed(2)); vis.render(); setInterval(function() { e += de; if (e < 0) { e = 0; de *= -1; } else if (e > 1) { e = 1; de *= -1; } vis.render(); }, 42); </script> </body> </html>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rubyvis-0.1.1 | vendor/tests/mark/line-eccentricity.html |