markmarkoh / datamaps

Customizable SVG map visualizations for the web in a single Javascript file using D3.js
http://datamaps.github.io
MIT License
3.78k stars 1.01k forks source link

Error in Datamaps.prototype.updateChoropleth #234

Closed rolmovel closed 8 years ago

rolmovel commented 9 years ago

Trying to integrate Datamaps with Zeppelin, using the angular-datamps plugin in order to use Datamaps under the angular framework, when trying to color countries using the fillColor key instead of fillKey key finally goes black instead. After debugging, seems to be a bug in the updateChoropleth method. If you change the original:

color = this.options.fills[ subunitData.fillKey ]; (line 12155 of the master version)

for something like this:

color = val (subunitData.fillKey, subunitData.fillColor);

it seems to be solved. Is there any collateral effect?

Thanks

jensluch commented 9 years ago

Same story(

jensluch commented 9 years ago

Found 1 issue. To fill any color you want you can change 'fills' object in this way: map.updateChoropleth({ UKR:{fillColor: "red"}}) to map.updateChoropleth({ UKR: "red"})

markmarkoh commented 8 years ago

Closed with #240