Sha256: 0276bb22cd902bf9c4857fa7e1f9c36c008593241d2857fb56260e4557feb68d

Contents?: true

Size: 657 Bytes

Versions: 1

Compression:

Stored size: 657 Bytes

Contents

<html>
  <head>
    <title>Segmented Cardinal Area</title>
    <script type="text/javascript" src="../../protovis-d3.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, 1).map(Math.sin))
    .bottom(0)
    .left(function() this.index / 6 * 500)
    .height(function(d) (d + 1) / 2 * 200 + 50)
    .interpolate("cardinal")
    .fillStyle(function(d) "hsl(" + (d + 1) * 180 + ",50,50)");

vis.render();

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubyvis-0.1.1 vendor/tests/mark/area-segmented-cardinal.html