github markmarkoh/datamaps v0.4.4

latest releases: v0.5.9, v0.5.8, v0.5.7...
8 years ago

New in 0.4.4

updateChoropleth now accepts a second parameter (an object). Currently the only key looked for is reset, which will reset the map to it's default state. All fill colors will be set to the defaultFill, and any corresponding data associated with the geography will be removed.

Example usages:

The following will reset the entire map to the defaultFill and update CA to be filled green.

map.updateChoropleth({CA: 'green'}, {reset: true})

The following will reset the entire map to defaultFill

map.updateChoropleth(null, {reset: true})

The following will reset the entire map to defaultFill, but update the corresponding data of NY.

map.updateChoropleth({NY: {numberOfVoters: 55452}}, {reset: true})

Don't miss a new datamaps release

NewReleases is sending notifications on new releases.