Sha256: 0029bdfd6238d0d374b2f5af72b86d06e17ca91f10576142b4ca3e433a0cd41e

Contents?: true

Size: 696 Bytes

Versions: 8

Compression:

Stored size: 696 Bytes

Contents

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

    var data = pv.range(5).map(function(x) {return x;}),
    w = 400,
    h = 400,
    r = w / 2,
    t = 30,
    a = pv.Scale.linear(0, pv.sum(data)).range(0, 2 * Math.PI);

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

anchors=["outer","inner","start","center","end"]
    
vis.add(pv.Wedge)
    .data(data)
    .outerRadius(r)
    .angle(a)
    .anchor(function() { return anchors[this.index]}).add(pv.Label)
    .text(function(d) {return anchors[this.index];})

vis.render();

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

Version data entries

8 entries across 8 versions & 1 rubygems

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