Skip to main content

Crossfilter Dimension component

Crossfilter Dimension component represents a dimension of the dataset loaded in Crossfilter. Its used to set up filters and aggregation functions on the dimension. Use Aggregation component to configure aggregating functions.

component image

In-ports

selector-filter JSON - An array of values to formulate selector filter for the Crossfilter dataset. The selector filter will match values of this dimension with a specific value provided on this port.

range-filter JSON - Left and right bounds (extent) of the dimension values to formulate range filter for the Crossfilter dataset. The range filter will match the values of this dimension that fall within the boundaries of this extent. The following is an example of range filter value that expresses the condition 0 ≤ x ≤ 100

{ "filterExtent": [0, 100] }

aggregations JSON
Aggregation functions to formulate aggregating filter for the Crossfilter dataset.

q-data <Queryable>
Queryable data port. Designed to work with q-results port of the Crossfilter component.

Out-ports

filter JSON - Outputs the configuration of filters for the current dimension.

results JSON - Resulting data set after all filters are applied grouped by distinct values of this dimension. If any aggregations are configured the results will also include values of the aggregation functions.

q-results <Queryable> - Queryable results. Specialized widgets use this port to request additional post-processing from Crossfilter.

Overview

Crossfilter Dimension is a helper component design to work together with the main Crossfilter component. Its main purpose is to combine filters and aggregation functions for the specified dimension and communicate it back to the main Crossfilter component. You can provide filtering criteria manually or route them from the widgets that support Crossfilter (e.g. List widget). Use Aggregation component to configure aggregating functions.

To get the distinct results for the dimension set the Group By property in the Settings.

ⓘ NOTE

selector-filter and range-filter ports are mutually exclusive. Only one type of filter will be generated on the filters output of the Dimension. The latest event on either of the filter ports takes the priority and reset the previous filter criteria.

To get the output results in JSON format you can connect to results port. Specialized widgets use q-results port to request additional post-processing from Crossfilter. For example List widget requests paginated results.

Settings

Group By

Specifies the field in the dataset that will be used for Group By operation.

ID of an entry

Specifies the field in the dataset that will be used by compatible widgets as an ID for the values of this dimension. This is useful when the dimension in a dataset represented by a code field and also has a matching field with a human readable names. For example, currency can be represented in the following way:

[
{
"name": "US Dollar",
"code": "USD"
}
]

In this case you can use code for the ID of the dimension and use name for Title.

Title of an entry

Specifies the field in the dataset that will be used by compatible widgets as a display name for the values of this dimension.

Is required filter?

If non-empty filter criteria is desired on the filters port, setting this flag to YES will ensure that non-matching filter is emitted when no filter received on the selector-filter or range-filter input ports.

Emit filter on load?

Setting this flag to YES will generate an event on the filters out-port as soon as the component activated and without waiting for an event on selector-filter or range-filter ports.