We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0 down vote favorite I'm trying to change onclick event in d3-geomap from zoom to another function. How can I do this ?
Thanks
my code is here :
var map = d3.geomap.choropleth() .geofile('json/IRN2.json') .unitId('fips') .projection(function(){return d3.geo.albers().center([51,35]);}) .column('point') .scale(2000) .rotate([-40, 0]) .translate([1.25*width ,-200 ]) .colors(['green','yellow' , 'pink' ,'red']) .domain([0, 20 , 50,100]) //.clicked(function(){console.log("hiiiiiiiiiiiiiiii");}) .legend(true); d3.select('#map') .datum(mydata) .call(map.draw, map);
The text was updated successfully, but these errors were encountered:
You can try something like this after creating the map object:
map.svg.selectAll('.unit').on('click', function() {console.log('test')})
I just tested this in the browser console for this map. It logs 'test' to the console and removes the zoom behavior.
Sorry, something went wrong.
No branches or pull requests
0
down vote
favorite
I'm trying to change onclick event in d3-geomap from zoom to another function. How can I do this ?
Thanks
my code is here :
The text was updated successfully, but these errors were encountered: