Why dc.js doesnt draw choropleth map?

匆匆过客 提交于 2019-12-13 04:48:48

问题


I tried to make map with dc.js library but it doesnt draw the map.

I used "US Venture Capital Landscape 2011" example.(link)

Here my codes:

 trChart.width(800)
        .height(500) 
        .dimension(ilDim)
        .group(ilGroup)
        .colors(d3.scale.quantize().range(["#E2F2FF", "#C4E4FF", "#9ED2FF", "#81C5FF", "#6BBAFF", "#51AEFF", "#36A2FF", "#1E96FF", "#0089FF", "#0061B5"]))
        .colorDomain([0, 200])
        .colorCalculator(function (d) { return d ? trChart.colors()(d) : \'#ccc\'; }) 
        .overlayGeoJson(map.features, "SEHIR", function (d) {
        return d.properties.title; 
        })
        .title(function (d) {  
        return "Sehir: " + d.key + "\nICD Frekansı: " + (d.value ? d.value : 0) ; 
        });

Here my geojson map link:map.json

Where am I wrong?

I used for map title properties:

  "properties": {
        "name": "ED",
        "title":"Edirne"
      },

来源:https://stackoverflow.com/questions/27669922/why-dc-js-doesnt-draw-choropleth-map

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!