Initial Range selection in DC.js chart

The filter code is a bit tricky in dc.js. If you specify an array of values, it will not interpret the array as a range. (It will either interpret the array as a single value, or if the array contains another array, it will filter on the values inside that array.)

Try specifying a ranged filter object instead:

    .filter(dc.filters.RangedFilter(7, 10))

Leave a Comment