Skip to main content

hierarchy

Node

from dara.components.smart.hierarchy import Node

class Node(BaseModel)

The building block of hierarchical lists. Take an id and label to identify a given node. Hierarchical lists are represented by stacking further Node components as children of a Node.

Attributes

  • children: Optional[]
  • id: str
  • label: str
  • weight: float

Methods

find_node

def find_node(target: str) -> Optional['Node']

Find a node in a hierarchy structure, returns None if not found

Arguments:

  • hierarchy: the hierarchy to search
  • target: the node id to find

HierarchySelector

from dara.components.smart.hierarchy import HierarchySelector

class HierarchySelector(StyledComponentInstance)

A component that displays an interactive hierarchy tree that can be selected from. Built by hierarchically stacking child Node components.

Attributes

  • allow_category_select: bool
  • allow_leaf_select: bool
  • hierarchy: Node
  • open_all: bool
  • value: NonDataVariable

HierarchyViewer

from dara.components.smart.hierarchy import HierarchyViewer

class HierarchyViewer(StyledComponentInstance)

The HierarchyViewer allows a weighted hierarchical data structure to be displayed as a treemap to quickly visualize the composition of the dataset.

Attributes

  • allow_leaf_click: bool
  • allow_parent_click: bool
  • hierarchy: Union[Node, NonDataVariable]
  • on_click_node: Optional[Action]