Sha256: cc7aa70606c8dfadc1f1300856f6523d6191b7775096abc8da4368931f06f882

Contents?: true

Size: 645 Bytes

Versions: 8

Compression:

Stored size: 645 Bytes

Contents

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

var vis = new pv.Panel()
    .width(500)
    .height(200)
    .top(50)
    .bottom(50)
    .left(10)
    .right(10);

vis.add(pv.Area)
    .segmented(true)
    .data(function() pv.range(0, 6, .1).map(Math.sin))
    .bottom(0)
    .left(function() this.index / 59 * 500)
    .height(function(d) (d + 1) / 2 * 200 + 50)
    .fillStyle(function(d) {console.log((d+1)*180);return "hsl(" + (d + 1) * 180 + ",50,50)"});

vis.render();

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rubyvis-0.7.0 spec/fixtures/area-segmented.html
rubyvis-0.6.1 spec/fixtures/area-segmented.html
rubyvis-0.6.0 spec/fixtures/area-segmented.html
rubyvis-0.5.2 spec/fixtures/area-segmented.html
rubyvis-0.5.1 spec/fixtures/area-segmented.html
rubyvis-0.5.0 spec/fixtures/area-segmented.html
rubyvis-0.4.1 spec/fixtures/area-segmented.html
rubyvis-0.4.0 spec/fixtures/area-segmented.html