Skip to content

Instantly share code, notes, and snippets.

Last active September 25, 2016 21:39
What would you like to do?
conicConformalFrance linked directly example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<meta charset="utf-8">
.states {
fill: #ccc;
stroke: #fff;
<script src=""></script>
<script src=""></script>
<script src=""></script>
var width = 960,
height = 500;
var projection = d3.geoConicConformalFrance();
var path = d3.geoPath()
var svg ="body").append("svg")
.attr("width", width)
.attr("height", height);
var t = d3.transition();
d3.json("france.json", function(error, france) {
var france = topojson.feature(france, france.objects.regions);
.attr("class", "region")
.attr("d", path)
.style("fill", "#aca")
.style("stroke", "#000")
.style("stroke-width", "0.5px")
.on("mouseover", function(d,i) {;
.style("fill", "red");
.on("mouseout", function(d,i) {;
.style("fill", "#aca");
.attr("d", projection.getCompositionBorders());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment