title: How to display the value (sum) rather than count of markers in a dc.leaflet.js
body: <p>I want to use crossfilter's reduceSum function dc.leaflet.js, and display the sum instead of the number of clustered markers.</p>
  
  <p>The first <a href="https://dc-js.github.io/dc.leaflet.js/" rel="nofollow noreferrer">example for dc.leaflet.js</a> uses reduceCount. Additionally it doesn't use the reduced value; it just displays the number of markers in the cluster.</p>
  
  <p>I want to use the sum of data using reduceSum.</p>
  
  <p>Here is my data as tsv:</p>
  
  <pre><code>type geo say
  wind 38.45330,28.55529 10
  wind 38.45330,28.55529 10
  solar 39.45330,28.55529 10
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;script type="text/javascript" src="../js/d3.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="../js/crossfilter.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="../js/dc.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="../js/leaflet.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="../js/leaflet.markercluster.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="../js/dc.leaflet.js"&gt;&lt;/script&gt;
  
  
  &lt;script type="text/javascript"&gt;
      /*     Markers      */
  
  d3.csv("demo1.csv", function(data) {
    drawMarkerSelect(data);
  });
  
  function drawMarkerSelect(data) {
    var xf = crossfilter(data);
  
      var facilities = xf.dimension(function(d) { return d.geo; });
      var facilitiesGroup = facilities.group().reduceSum(function(d){return d.say});
  
    dc.leafletMarkerChart("#demo1 .map")
        .dimension(facilities)
        .group(facilitiesGroup)
        .width(1100)
          .height(600)
        .center([39,36])
        .zoom(6)
        .cluster(true);  
  
      var types = xf.dimension(function(d) { return d.type; });
      var typesGroup = types.group().reduceSum(function(d){return d.say});    
  
  
    dc.pieChart("#demo1 .pie")
        .dimension(types)
        .group(typesGroup)
        .width(200) 
          .height(200)
          .renderLabel(true)
          .renderTitle(true)
        .ordering(function (p) {
          return -p.value;
        });
  
      dc.renderAll();
  } 
  
  
  
  &lt;/script&gt;
  </code></pre>