I have a dc.rowchart that has 5 different "categories". All are selected first. When I press one, then only one is highlighted. When I click on the second ... both the first and the second that I clicked are highlighted.
How can I do this / set up a line such that only one category is highlighted each time I click on the panel?
dc.filter("category1"); dc.filter("category2");
Both of these sequences look like “add” filters than replace.
. , , dc.js addFilterHandler, filters, , :
addFilterHandler
filters
myChart.addFilterHandler(function (filters, filter) { filters.length = 0; // empty the array filters.push(filter); return filters; });
, cap (, ), others. , .
cap
others
, addFilterHandler - https://github.com/dc-js/dc.js/blob/master/web/docs/api-latest.md#dc.baseMixin+addFilterHandler
, , .
myChart.addFilterHander(function (filters, filter) { return [filter]; });
Source: https://habr.com/ru/post/1614992/More articles:Called: javax.persistence.EntityNotFoundException: Bean deleted - failed loading attempt - ebeanUnable to use Android studio on Mac because of gradle. Solved after 6 hours - androidEntityNotFoundException: Bean deleted - lazy loading failed - javaHow to check a png file if it is a decompression bomb - securityWCF Duplex callback method never executes when called from another thread - multithreadingAdding dynamic text and text field - javascriptThe difference between a type alias and a declaration of use is c ++Paypal coupon payment - jqueryHow to check image format in Elixir - elixirCall the function of the child controller in the parent controller - angularjsAll Articles