crossfilter , dc.js Counting unique value in dimension
<p>I am trying to create a bar chart (cross filter and dc js)  to show how many people (unique) participated  in an event</p>

<pre><code>[
{"Year: 2015" , "Name:Person1"},
{"Year: 2015" , "Name:Person2"},
{"Year: 2015" , "Name:Person3"},
{"Year: 2015" , "Name:Person1"},
{"Year: 2015" , "Name:Person1"},
{"Year: 2016" , "Name:Person4"},
{"Year: 2016" , "Name:Person4"},
{"Year: 2016" , "Name:Person1"},
]
</code></pre>

<p>I am plotting Year on X axis and Count on Y axis. Right now with Reduce count on Year I get</p>

<pre><code>Year: 2015 Count:3 -&gt; person 1,2,3
Year: 2016 Count:2  -&gt; person 1,4
</code></pre>

<p>Sample code </p>

<pre><code>yeardimension.group().reduceCount(function(d) { return d.year }) 
</code></pre>

<p>I want to get unique value and expected value </p>

<pre><code>Year: 2015 Count:5
Year: 2016 Count:3
</code></pre>

<p>How can I achieve this in cross filter and dc js? </p>