Sha256: 692697b385bb6d904d7b14ab2f0e8af3294f966f300d8612c4d0771ec7cdef35

Contents?: true

Size: 615 Bytes

Versions: 1

Compression:

Stored size: 615 Bytes

Contents

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

var w = 400,
    h = 400;

var vis = new pv.Panel()
    .width(w)
    .height(h)
    .margin(12)
    .strokeStyle("#ccc")
    .fillStyle("#fff");

vis.add(pv.Dot)
    .data([{x:200, y:200}])
    .left(function(d) d.x)
    .top(function(d) d.y)
    .shapeRadius(10)
    .fillStyle(function(d) d.fix ? "#ff7f0e" : "#aec7e8")
    .cursor("move")
    .event("mousedown", pv.Behavior.drag());

vis.render();

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubyvis-0.1.1 vendor/tests/behavior/drag.html