Crossfilter: Bypass filters on other dimensions -


i use multiple dimensions in crossfilter (e.g. dimensions date, category, status). works expected, want have id-dimension fast retrieving single data object.

problem is:

if filter iddimension.filter(myid), , @ same time other filters (which filter out object id=myid) applied, crossfilter won't find given data object. (afterwards reset iddimension.filter(null)).

is there way bypass other filters single crossfilter query? or there should method save , restore current filters.

doing filter on unique value dimension in order retrieve single record inefficient in crossfilter. remove records except single record groups, add them when remove filter. means group aggregation addition , subtraction functions run twice on each of these records, no reason @ all.

it depends on exact need is, think better option keep array of records outside of crossfilter sorted on id property , use crossfilter.bisect find record, or create map of records keyed on unique id (use es6 map if browser supports it, or use alternative implementation d3.map) , use map.prototype.get() record. in other words, don't use crossfilter


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -