dmachat / angular-datamaps

Angular directive for d3 Datamaps
MIT License
60 stars 30 forks source link

How to use angular-datamaps to dynamically modify the map color? #10

Closed tianyi999 closed 9 years ago

tianyi999 commented 9 years ago

Hi,

I am using angular-datamaps for my angularjs project. I am able to create USA map based on your instruction. But there is no instruction of how to change the color of the map. I know if not using angularjs version, updateChoropleth() is used to update the color of map. Please let me know how to use updateChoropleth() in angular-datamaps?

Thanks! mei

Peege151 commented 9 years ago

This would be good to know as well.

dmachat commented 9 years ago

See https://github.com/dmachat/angular-datamaps#animated-update-choropleth for info on doing this with the latest release. Updating the fillKey properties of your geography data will trigger a call to updateChoropleth. Changes to the fills array or other options will produce a full redraw.