Sha256: cc1fb7a914ce2e10a29c9c6ba748882fd0e5ae3ade99a04d1dfe8599af3eb87b

Contents?: true

Size: 621 Bytes

Versions: 1

Compression:

Stored size: 621 Bytes

Contents

<html>
  <head>
    <title>Horizon</title>
    <script type="text/javascript" src="../../protovis-d3.3.js"></script>
  </head>
  <body>
    <script type="text/javascript+protovis">

var w = 300,
    h = 35,
    n = 2,
    data = pv.range(101).map(function(d) Math.sin(d / 2) + Math.sin(d / 7)),
    x = pv.Scale.linear(data, pv.index).range(0, w).by(pv.index),
    y = pv.Scale.linear(data).range(-h, h);

var vis = new pv.Panel()
    .width(w)
    .height(h / n);

vis.add(pv.Layout.Horizon)
    .bands(n)
  .band.add(pv.Area)
    .data(data)
    .left(x)
    .height(y);

vis.render();

    </script>
  </body>
</html>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubyvis-0.1.1 vendor/tests/layout/horizon.html