Sha256: cd8a557c7cf8fcf82bc40691a24fa2560f2835cb4a4832d90dff5d78982da160
Contents?: true
Size: 953 Bytes
Versions: 1
Compression:
Stored size: 953 Bytes
Contents
<html> <head> <title>Bullet Layout</title> <script type="text/javascript" src="../../protovis-d3.3.js"></script> </head> <body> <script type="text/javascript+protovis"> var vis = new pv.Panel() .width(400) .height(30) .margin(20) .left(100); var bullet = vis.add(pv.Layout.Bullet) .orient("left") .ranges([2.1e6, 2.85e6, 4e6]) .measures([2.3e6, 3.01e6]) .markers([1.15e6, 3.0e6]); bullet.range.add(pv.Bar); bullet.measure.add(pv.Bar); bullet.marker.add(pv.Dot); bullet.tick.add(pv.Rule) .anchor("bottom").add(pv.Label) .text(function(d) (d / 1e6).toFixed(1)); bullet.anchor("left").add(pv.Label) .font("bold 12px sans-serif") .textAlign("right") .textBaseline("bottom") .text("Revenue"); bullet.anchor("left").add(pv.Label) .textStyle("#666") .textAlign("right") .textBaseline("top") .text("US$, in millions"); vis.render(); </script> </body> </html>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rubyvis-0.1.1 | vendor/tests/layout/bullet.html |