Initial Range selection in DC.js chart

后端 未结 1 1442
独厮守ぢ
独厮守ぢ 2020-11-29 10:30

I would like to make an initial range selection in some dc.js charts (bar and line).
So I add this for example:

.filter([7,10])

And the

相关标签:
1条回答
  • 2020-11-29 11:16

    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))
    
    0 讨论(0)
提交回复
热议问题