Interface DataViewHierarchyNode

Represents a node in a DataViewHierarchy.

interface DataViewHierarchyNode {
    children?: DataViewHierarchyNode[];
    key: null | string;
    leafIndex?: number;
    level: number;
    parent?: DataViewHierarchyNode;
    formattedPath(separator?: string): string;
    formattedValue(): string;
    leafCount(): number;
    leaves(): DataViewHierarchyNode[];
    mark(operation?: MarkingOperation): void;
    markedRowCount(): number;
    rowCount(): number;
    rows(): DataViewRow[];
    value<T>(): null | T;
}

Properties

Gets the children of this node, or undefined if this node is a leaf node.

key: null | string

Gets the key for this hierarchy node. The key is guaranteed to be unique for the node among its siblings.

In many cases this will be the same as DataViewHierarchyNode.formattedValue or DataViewHierarchyNode.value. However there are cases when those values can contain duplicates. For instance when working with cube data, or when using formatters and display values.

They key is suitable to be used for identifying objects when implementing rendering transitions.

The key can be null when the corresponding DataViewHierarchyNode.value is null.

leafIndex?: number

Gets the index of the leaf node among all leaf nodes in the hierarchy. This is undefined for non leaf nodes.

level: number

Gets the level in the hierarchy where this node occurs. The root node of the hierarchy tree has level -1.

Gets the parent of the hierarchy node, or undefined for root level nodes.

Methods

  • Gets the full path, top down to this node, of the formatted values. The virtual root node is omitted.

    Parameters

    • Optionalseparator: string

      The separator. The default separator is " » ".

    Returns string

  • Gets a formatted string that can be used to display this value. The formatting settings in Spotfire are used to create this string.

    Returns string

  • Computes the number of leaf nodes in the sub tree of the hierarchy spanned from this node.

    Returns number

  • Marks all DataViewRows corresponding to the sub tree of the hierarchy spanned from this node. See DataView.mark for more details.

    Parameters

    Returns void

  • Computes the number of marked DataViewRows in the sub tree of the hierarchy spanned from this node.

    Returns number

  • Computes the number of DataViewRows corresponding to the sub tree of the hierarchy spanned from this node.

    Returns number