Closed RosaRomeroGomez closed 3 years ago
heres a link to a now deleted file containing a binning algorithm specifically designed to work with facets in case it is useful here
Update: Looking at this is not really necessary as this functionality has already been built into code that is currently in main. Look at comment about this below.
This issue is challenging as it involves a number of changes:
Additional considerations:
filterToBgraph
) requires us to add a new case every time we add a new query field. ie.
case QUERY_FIELDS_MAP.BIO_NODE_NAME.field: {
return bgraph.filter(node => clause.values.indexOf(node.name) !== -1);
}
Is it worthwhile to create a mechanism by which adding a field in QUERY_FIELDS_MAP
is recognized by the filterToBgraph
function? How would this work when you have some pills in the Bio view vs the Epi view?
Notes: bgraph queries are currently run when @Getter getFilters;
changes, in order to leverage this mechanism Facets should also connect to the vuex query
store.
@adamocarolli @YohannParis I just reviewed the code again and I apologize for the confusion but there are some resources already built out for facets which can be taken advantage of. The binning algorithm has actually been relocated to the util BinUtil.ts
. There are 3 general components related to facets as well, FacetBars.vue
, FacetHistogram.vue
, FacetTerms.vue
.
Some background, they were built as part of earlier efforts to integrate facets to do histograms but they were never fully integrated into the app for one reason or another.
Here my first pass at how this task can be broken down.
https://excalidraw.com/#json=5837133143080960,Jn10XRG9uEpH28JZqnGmOw