You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a rowChart and using rowsCap to show rest(i.e. other than top five) of the filters as "Others".
But when I click on the "Others" row the "filtered" listener is fired twice instead of once.
I understand that it adds "Others" to filters, but from a users point of view I don't expect the listener to be fired twice.
chart.on("filtered", function(chart, filter) { console.log(filter); // twice first the array and secondly the "Others" }
The text was updated successfully, but these errors were encountered:
Good question. The reason is that in the cap mixin, it is separately handling filtering all of the individual keys of the Others, and filtering the Others key itself. So it filters twice.
If you say, "wait, that seems kind of inefficient; doesn't that mean it's recalculating the crossfilter twice?" Well yes, it is, and the same lack of expressivity in the filter primitives is present in a few other places (as well as in custom filter behaviors).
gordonwoodhull
changed the title
Why the 'filtered' eventlistener is fired twice when "rowsCap" i.e. "Others" is clicked in rowChart
'filtered' eventlistener is fired twice when "Others" is clicked in rowChart
Nov 29, 2014
I have a rowChart and using rowsCap to show rest(i.e. other than top five) of the filters as "Others".
But when I click on the "Others" row the "filtered" listener is fired twice instead of once.
I understand that it adds "Others" to filters, but from a users point of view I don't expect the listener to be fired twice.
chart.on("filtered", function(chart, filter) { console.log(filter); // twice first the array and secondly the "Others" }
The text was updated successfully, but these errors were encountered: