Sha256: 6d8076a89210a99dd78e756b4901eb2d9b2162ddbfef83aa68635ab773e12122

Contents?: true

Size: 839 Bytes

Versions: 1

Compression:

Stored size: 839 Bytes

Contents

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

var vis = new pv.Panel()
    .width(400)
    .height(400)
    .top(20);

var layout = vis.add(pv.Layout.Tree)
    .nodes(pv.dom(diamond(3, 4, 4)).nodes())
    .depth(30)
    .breadth(25)
    .orient("top");

layout.link.add(pv.Line)
    .strokeStyle("#aaa");

layout.node.add(pv.Dot)
    .shapeSize(100)
    .strokeStyle(function(d) d.active ? "#f00" : "#aaa")
    .fillStyle(function(d) d.active ? "#fdd" : "#ddd")
    .event("mouseover", function(d) (d.active = true, this))
    .event("mouseout", function(d) (d.active = false, this));

vis.render();

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

Version data entries

1 entries across 1 versions & 1 rubygems

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