javascript - dcjs.leaflet from addons The popup in Choropleth doesn't work -
in dc.leaflet version 0.2.3 choropleth chart popup doesn't work or doesn't rendered. wrong or happens else? happy fix need help.
.renderpopup(true) .popup(function(d,feature) { return feature.properties.name+" : "+d.value; });
anyway, appreciated
https://github.com/dc-js/dc.leaflet.js/issues/22
thanks in advance
the popup in addons did not work me. however, can apply same logic standard dc_leaflet.markerchart function , achieve popups.
here example usage worked:
var marker = dc_leaflet.markerchart("#demo1 .map", groupname) //map formatting .dimension(restaurantnames) .group(restaurantsgroup) .width(700) //was 600 .height(500) .center([43.733372, -79.354782]) //was 42.69,25.42 .zoom(11) //was 7s .cluster(true) //was true .valueaccessor(function(kv) { return kv.value.count; }) .locationaccessor(function(kv) { return [kv.value.latitude,kv.value.longitude] ; }) .popup(function(kv,marker) { return kv.value.name + " - " + kv.value.stars + " * - " + kv.value.price_range + "$"; });
Comments
Post a Comment