After creating a new dimension (by date, javascript's date objects).
var byDate = cf.dimension(function (d) { return d.date; });
I filter the dimension to drop all data with date that is before some arbitrary date that I've chosen.
var filteredDim = byDate.filterFunction(function (d) { return d >= startDate; });
This line prints an array of all the objects that passed the filtering. (works properly)
console.log(filteredDim.top(Infinity));
This line prints an array of key-value objects. I expect the keys to be only those that passed the filter, which means dates that occur after the arbitrary chosen date supplied to the filter function. Actually, the array contains keys for all the dates (the unfiltered as well) and their value is the original value as if there was not filtering at all.
console.log(filteredDim.group(d3.time.day).top(Infinity));
I was wondering how can I group a dimension which was filtered and group ONLY the filtered values?
Thanks
UPDATE: Turns out that this behavior is normal by design. Can someone suggest a workaround please?