Skip to content

Layouts And Filters

The default layout is enough for many graphs, so layout configuration should not appear in every snippet. Use the layout behavior when an application needs to start, stop, switch, or parameterize layout execution explicitly.

Filtering is a view-level operation unless you ask for a filter to also affect layout. That means the original graph can remain available while the rendered view narrows to nodes and edges that match the current rules.

Controlling Layout Execution

This example builds a larger graph, creates a Helios view with default options, then starts and stops the force layout through helios.behavior.layout.

Control The Layout Behavior

      

Filtering By Attributes

This example creates numeric node and edge attributes with chainable writers, then creates render filters from those attributes. The graph object is not rebuilt; the filters behavior updates the rendered view.

Filter By Attribute Values

      

The same filter behavior is the right place for categorical filters, string filters, query-backed filters, and filters that should rebuild the active layout topology.