Client side filtering using crossfilter Due to limitation of crossfilter with array (or data that has no natrual ordering), this will not work as expected:
- dimension:
function (d) {return [d.x, d.y, d.z]} - group:
function (d) {return [d.x / 10 , d.y / 10, d.z / 10]}
Therefore, we preform grouping already in the dimension itself, and join the array to a string. Strings have a natural ordering and thus can be used as dimension value.
- dimension:
function (d) -> "d.x/10|d.y/10|d.z/10" - group:
function (d) {return d;}
- Source:
Methods
(inner) getData(dataview) → {Promise}
Get data for every filter, and trigger a 'newData' event
Returns a Promise that resolves to the dataview when all data and metadata has been updated
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
dataview |
Dataview
|
Returns:
- Type:
-
Promise
(inner) initDataFilter(dataview, filter)
Initialize the data filter, and construct the getData callback function on the filter.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
dataview |
Dataview
|
|
filter |
Filter
|
(inner) releaseDataFilter(dataview, filter)
The opposite or initDataFilter, it should remove the filter and deallocate other configuration related to the filter.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
dataview |
Dataview
|
|
filter |
Filter
|
(inner) scan(dataset)
Autoconfigure a dataset:
- pick 10 random elements
- create facets for their properties
- add facets' values over the sample to the facet.description
- set range or categories
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
dataset |
Dataset
|
(inner) setCategories(dataset, facet)
setCategories finds finds all values on an ordinal (categorial) axis Updates the categorialTransform of the facet
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
dataset |
Dataset
|
|
facet |
Facet
|
(inner) setMinMax(dataset, facet)
setMinMax sets the range of a continuous or time facet
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
dataset |
Dataset
|
|
facet |
Facet
|
(inner) setPercentiles(dataset, facet)
Calculate 100 percentiles (ie. 1,2,3,4 etc.), and initialize the facet.continuousTransform
to an approximate percentile mapping.
Use the recommended method from NIST
See also the discussion on Wikipedia
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
dataset |
Dataset
|
|
facet |
Facet
|
(inner) updateDataFilter(filter)
Change the filter parameters for an initialized filter
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
filter |
Filter
|