Sha256: d5e57265908c90757a07914fc96348c91e611b7e4b72cb404f90ae003a22f794
Contents?: true
Size: 808 Bytes
Versions: 8
Compression:
Stored size: 808 Bytes
Contents
<html> <head> <title>Stack</title> <script type="text/javascript" src="protovis-d3.3.js"></script> <script type="text/javascript" src="layers.js"></script> <style type="text/css"> body { margin: 0; } </style> </head> <body> <script type="text/javascript+protovis"> var w = 300, h = 300, n = 20, // number of layers m = 75, // number of samples per layer x = pv.Scale.linear(2, m - 1).range(0, w); var vis = new pv.Panel() .width(w) .height(h); vis.add(pv.Layout.Stack) .layers(waves(n, m)) .order("inside-out") .offset("expand") .x(x.by(pv.index)) .y(pv.identity) .layer.add(pv.Area) .fillStyle(pv.ramp("#ada", "#656").domain(n, 0).by(pv.parent)) .strokeStyle("#797"); vis.render(); </script> </body> </html>
Version data entries
8 entries across 8 versions & 1 rubygems