Changeset - e4ec01c311f1
[Not reviewed]
Dennis Fink - 9 years ago 2016-03-01 19:12:29
dennis.fink@c3l.lu
Added more colors to worldmap
1 file changed with 16 insertions and 6 deletions:
0 comments (0 inline, 0 general)
ennstatus/static/js/worldmap.js
Show inline comments
 
@@ -71,18 +71,28 @@ function draw(topo) {
 

	
 
	var country = g.selectAll(".country").data(topo);
 
	d3.json("/data/worldmap", function(err, data) {
 

	
 

	
 
		var colorscale = d3.scale.threshold().domain(d3.range(1, data.max+1)).range([
 
				"#f2f0f7",
 
				"#dadaeb",
 
				"#bcbddc",
 
				"#9e9ac8",
 
				"#756bb1",
 
				"#54278f"
 
			"#c0c2e6",
 
			"#b2b5e0",
 
			"#a4a7da",
 
			"#969ad5",
 
			"#888ccf",
 
			"#7a7fca",
 
			"#6c71c4",
 
			"#5e63be",
 
			"#5056b9",
 
			"#464caf",
 
			"#4146a1",
 
			"#3b4093",
 
			"#353a85",
 
			"#303477",
 
			"#2a2e69",
 
			"#25285b"
 
		])
 

	
 
		country.enter().insert("path")
 
			.attr("class", "country")
 
			.attr("d", path)
 
			.attr("id", function(d, i) { return d.id; })
0 comments (0 inline, 0 general)