That's a good point: since your dimension is now multi-keyed, you'll need to use filterFunction to specify how to apply filters over those multikeys.
This constrains the design further: the dimension which you want to filter must be the first key, and the dimension you are splitting / doing small multiples over must be the second key. (The opposite of what I wrote below.)
This is because the multikeys will be sorted in lexicographical order. E.g. if the days of the week are strings,
[12, Monday]
[12, Saturday]
[12, Sunday]
[12, Thursday]
...
[13, Friday]
[13, Monday]
For your purposes, it shouldn't matter what order the second key is in, but when we do a range filter over the first key we want it to effectively ignore the second key.
filterfunction will look something like (untested)
chart.filterFunction(dimension, filters) {
if(!filters || filters.length === 0)
dimension.filter(null)
else dimension.filterRange([[filters[0][0], '\0'], [filters[0][1], '\0'])
)};
Basically, instead of filtering on the original range filter[0][0] -> filter[0][1] which is in your chart's domain, we'll instead filter over a range of multikeys where the first element of the start and end are those values, and the second element is something chosen to sort lower (lexicographically) than any of the second keys. I chose a string with a null in it to be conservative.
(But again, this is untested; I'm working off my memory of having solved similar problems before. You may need to debug this a little.)
Efficiency note
Crossfilter will actually coerce the arrays to strings and then sort them this way. It's a lot more efficient to do the coercion yourself when creating the keys, i.e.
dimension = cf.dimension(function(r) { return r.x + ',' + r.y; }
instead of
dimension = df.dimension(function(r) { return [r.x, r.y]; })
but it's so much more convenient to do the latter, that I've stopped arguing with this common practice (assumed by scatterPlot and seriesChart and my code above). Otherwise, you have to split it again yourself when reading keys, etc etc.