HeliosFilter
- Kind
- class
- Source
- src/filters/HeliosFilter.js:227
Description
Builder for reusable graph filter rule sets.
Signature
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Filter id, display name, graph scope, and initial rules. |
Returns
Filter model that can be activated through helios.activateHeliosFilter(...) or FilterBehavior.
HeliosFilterNotes
Rules compile to Helios Network query expressions. Supported rule
types are numeric, categorical, string, and raw query.
Filtering And State
Graph filtering and interaction state. When active, FilterBehavior and SelectionBehavior coordinate this area.
toGraphFilterOptions() → {Object}
Source: src/filters/HeliosFilter.js:427
Convert this model to the graph-filter options consumed by Helios.
Returns
Graph-filter options with node and edge query strings.
TypeObjectConfiguration
General configuration setters and compatibility helpers.
setScope(scope) → {HeliosFilter}
Source: src/filters/HeliosFilter.js:270
Set the graph filter scope.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
scope | 'render'|'render+layout' | Graph filter scope. |
Returns
This filter.
TypeHeliosFiltergetScope() → {'render'|'render+layout'}
Source: src/filters/HeliosFilter.js:280
Return the graph filter scope.
Returns
Current graph filter scope.
Type 'render'|'render+layout'Example
const value = helios.getScope();
getRules(scope = null) → {Array.<Object>}
Source: src/filters/HeliosFilter.js:290
Return copied rules, optionally limited to node or edge rules.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
scope | 'node'|'edge' | optional | Optional rule scope. |
Returns
Copied rule descriptors.
TypeArray.<Object>clear(scope = null) → {HeliosFilter}
Source: src/filters/HeliosFilter.js:379
Remove all rules, or all rules for one node/edge scope.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
scope | 'node'|'edge' | optional | Optional rule scope to clear. |
Returns
This filter.
TypeHeliosFilterUtilities
Additional public helpers that do not belong to a narrower API area.
clone() → {HeliosFilter}
Source: src/filters/HeliosFilter.js:255
Return a deep copy of this filter model.
Returns
Independent filter with copied rule descriptors.
TypeHeliosFilteraddRule(rule) → {Object}
Source: src/filters/HeliosFilter.js:320
Add a filter rule.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
rule | Object | Rule descriptor. |
Returns
Normalized copied rule descriptor.
TypeObjectupdateRule(ruleId, patch = {}) → {Object}
Source: src/filters/HeliosFilter.js:334
Update an existing rule by id.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
ruleId | string | Rule id to update. | ||
patch | Object | optional | Rule fields to replace. |
Returns
Normalized copied rule descriptor.
TypeObjectupsertRule(rule) → {Object}
Source: src/filters/HeliosFilter.js:352
Update a rule by id when it exists, otherwise add it.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
rule | Object | Rule descriptor. |
Returns
Normalized copied rule descriptor.
TypeObjectremoveRule(ruleId) → {boolean}
Source: src/filters/HeliosFilter.js:366
Remove a rule by id.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
ruleId | string | Rule id to remove. |
Returns
True when a rule was removed.
TypebooleancompileScopeQuery(scope) → {string|null}
Source: src/filters/HeliosFilter.js:397
Compile active rules for one node/edge scope into a query string.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
scope | 'node'|'edge' | Rule scope to compile. |
Returns
Query expression, or null when no active criteria apply.
string|nullhasCriteria() → {boolean}
Source: src/filters/HeliosFilter.js:418
Test whether this filter has any active criteria.
Returns
True when at least one rule compiles to a query.
TypebooleanExample
const value = helios.hasCriteria();