views:

7

answers:

0
var w = 810,
    h = 400,
    mapMargin = 30;

geo = pv.Geo.scale().range(w, h);

var vis = new pv.Panel()
    .width(w)
    .height(h)
    .top(50)
    .bottom(30)
    .def("i", -1);


var dot = vis.add(pv.Dot)
    .data(geoPopList)
    .left(function(d) {return geo(d.center).x})
    .top(function(d) {return geo(d.center).y})
    .radius(function(d) {return areaToRadius(d.speakers)})
    .fillStyle(function(d){return col(d.speakers)})
    .strokeStyle("#ffffff");

vis.render();

I'm using above code to make Dot Chart in Protovis. How at add zoom and pan to this? I saw an example at http://vis.stanford.edu/protovis/ex/transform.html. But problem with my code is how to transform on geo scale.