3 <title>citirani pie</title>
4 <script type="text/javascript" src="vis.stanford.edu/protovis/protovis.js"></script>
5 <script type="text/javascript" src="data.cgi"></script>
6 <style type="text/css">
7 body { max-width: 7in; }
12 <a href="http://vis.stanford.edu/protovis/api/">Protovis</a>
14 <script type="text/javascript+protovis">
16 //var data = [ 282, 189, 174, 163, 152, 140, 138, 130, 117, 116, 116, 94, 76, 44, 38 ];
21 var vis = new pv.Panel()
27 return Math.sqrt(d[0]) * 10;
30 var pie = vis.add(pv.Wedge)
34 .outerRadius(function(d) radius(d))
35 .angle(function() 2 * Math.PI / data.length)
41 .left( function(d) radius(d) * Math.cos(pie.midAngle()) + width / 2)
42 .bottom(function(d) -radius(d) * Math.sin(pie.midAngle()) + height / 2)
43 .textAlign("center").textBaseline("middle")
44 .text(function(d) d[1] )
50 .left( function() 50 * Math.cos(pie.midAngle()) + width / 2)
51 .bottom(function() -50 * Math.sin(pie.midAngle()) + height / 2)
52 .textAlign("center").textBaseline("middle")
53 .text(function(d) d[0] )