Thursday, 19 September 2013

error with dynamic quantize choropleth with d3

error with dynamic quantize choropleth with d3

i have this code enter link description here
i'm a d3 newbie. could you help me to complete the onchange and the
quantize.domain fuction in a way that i can bind json propeties when
selection form change?
d3.selectAll(".demosearch").on("change", function (dd) {
d3.json("comuni_mn.json", function(json) {
quantize.domain([
d3.min(json.features, function(d) { return
d.properties.[dd.value]; }),
d3.max(json.features, function(d) { return
d.properties.[dd.value]; })
]);
console.log(dd.value);
svg.selectAll("path")
.attr("class", function(d) { return
quantize(d.properties.[dd.value]); });
});
});

No comments:

Post a Comment