Skip to content
  1. Tutorials
  2. Getting started


Filters can be defined globally to filter nodes and edges out of the visualisation. They use a function selector that returns a boolean indicating whether the node or the edge should be visible (true) or filtered out (false). Filters are automatically applied to new nodes and edges or when their data is updated.

The following example only shows nodes having a property greater than 300 million.

// Create a filter on nodes.
const filter1 = ogma.transformations.addNodeFilter(node => {
  return node.getData('properties.funding_total') > 300000000;

// Removed the node filter.

// Remove all node filters.