I have the next data works with dc.js and geoChoroplethChart,
var data = crossfilter([
{ state: 'one', bar: 'A', num: '1' },
{ state: 'two', bar: 'B', num: '2' },
{ state: 'three', bar: 'A', num: '3' },
{ state: 'one', bar: 'B', num: '3' },
{ state: 'one', bar: 'A', num: '2' },
{ state: 'two', bar: 'B', num: '2' },
]);
var statedim=data.dimension(function(d){return d['state'];})
var my_group=statedim.group();
reducer=reductio();
reducer.value('nbar').exception(function(d){return d['bar']}.exceptionCount(true);
reducer.value('nnum').exception(function(d){return d['num']}.exceptionCount(true);
reducer(my_group);
where state is a region in my country and the color is based on nnum, so I use
.valueAccessor(function (d) {return d.value.nnum.exceptionCount})
but I want it in the title appear state, nnum and nbar.
.title(function(d){
return["state: " +d.key,
"#nnum: "+d.value].join('\n')})
but I do not know how to integrate nbar in title without geoChoroplethChart is black.
I think in use
.valueAccessor(function (d) {return d.value})
.title(function(d){
return["state: " +d.key,
"#nnum: "+d.value.nnum.exceptionCount,
"nbar:" +d.value.nbar.exceptionCount].join('\n')})
It is the solution for the title, but the states fill up black and when I click on another graphic, the map does not react.