1
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.

Shane
  • 11,961
  • 17
  • 71
  • 89
Saneef
  • 147
  • 3
  • 1
    Might this be more likely to be find an answer at http://stackoverflow.com/? – onestop Oct 26 '10 at 06:26
  • I agree, this has nothing to do with statistical analysis as stated. – Andy W Oct 26 '10 at 13:29
  • 3
    IMO, it does have to do with visualization (which is on-topic), so I'm open to allowing it. That being said, I'm sure that you will have a hard time getting an answer either here or SO for this question: your best bet is the protovis mailing list. – Shane Oct 26 '10 at 13:50
  • 2
    @Saneef It would be helpful if you could provide a data sample so this is reproducible. Either make geoPopList available, or else use a smaller data same that can be posted here. – Shane Oct 26 '10 at 13:51
  • 1
    @AndyW Thanks for a flag, but I agree that it is on topic. –  Oct 26 '10 at 14:52
  • Is there a reason why the code you link to on the example page doesn't work? From my reading of the pv.Geo.scale source it appears that it supports setting the domain like pv.linear.scale does... What happens when you try that approach and attempt to zoom with the mousewheel? Please update your question with a simple reproducible example like Shane asked for as well; if you can do that I'd be happy to take a look. – Beau Oct 27 '10 at 19:26
  • I don't see this as even being on topic. Sure, it's for a visualization app, but the question has to do with a mechanical detail of a particular programming environment. It is unlikely to lead to any answer or comments of any relevance to data visualization. – whuber Nov 01 '10 at 02:36
  • @whuber: So, would you now like to vote to close? – russellpierce Feb 12 '13 at 23:05

0 Answers0