Group: http://groups.google.com/group/protovis/topics
- Re-Render partially Choropleth Map [2 Updates]
Nori <arb...@gmail.com> May 02 08:29AM -0700
Hi Protovis-ers,
I am trying to visualize some data for municipalities in the same way
as the example in protovis http://mbostock.github.com/protovis/ex/choropleth.html
I am instead using radio buttons to choose different indicators that
need to be visualized. This in practice should result only in changing
colors of each municipality (just like they do when the year slider is
played in the example).
But it turns out that this is pretty slow if you call vis.render() to
re-render the complete map and colors if the shapes of the
municipalities are not with straight lines but rather complex. In
other words my us_lowers.js file is 4 times as big and it is executed
4 times as slow when new data is visualized after user has picked a
particular radio button!
Is anyone aware of a way to not render the whole graph together with
shapes (in other words not to re-draw borders of municipalities) but
simply update the color of each shape based on the new data that are
read after an onclick event on a radio button?
thanks a lot
Mike Bostock <mbos...@gmail.com> May 02 10:45AM -0700
I would recommend switching to D3, which lets you do incremental
updates (including updating the color of existing path elements). Here
are a few examples of D3 choropleths:
http://mbostock.github.com/d3/talk/20111018/choropleth.html
http://mbostock.github.com/d3/ex/choropleth.html
Mike
You received this message because you are subscribed to the Google Group protovis.
--
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.
You received this message because you are subscribed to the Google Groups "protovis" group.
To post to this group, send email to prot...@googlegroups.com.
To unsubscribe from this group, send email to protovis+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protovis?hl=en.