Represents a row of data in a DataView. Each row can be thought of as a data point that the mod visualization renders.

interface DataViewRow {
    categorical(axisName: string): DataViewCategoricalValue;
    color(): DataViewColorInfo;
    continuous<T>(axisName: string): DataViewContinuousValue<T>;
    elementId(useStableId?: boolean, omitAxisNames?: string[]): string;
    isMarked(): boolean;
    leafNode(axisName: string): null | DataViewHierarchyNode;
    mark(operation?: MarkingOperation): void;
}

Methods

  • Calculates an element id for this row, suitable for identifying rows between data views. When stable identifiers is not used, only rows in immediately following data view are guaranteed to re-use previous id. If a row is filtered out in a new data view, this row is thus not guaranteed to yield the same id when it re-appears.

    Parameters

    • OptionaluseStableId: boolean

      When true, the id will be a (longer) stable id guaranteed to be the same over time.

    • OptionalomitAxisNames: string[]

      Axis names to omit when creating the identifier. Can be used to group multiple elements split by these axes, for example to create animation effects in one data view.

    Returns string

    A stable element id is only stable in the current session, thus it should not be stored in the document, e.g. as a ModProperty or AnalysisProperty.

    1.1

  • Gets a value indicating whether this row is marked.

    Returns boolean

  • Gets the leaf DataViewHierarchyNode for the specified axis, or null for dual mode axes with continuous axis expression. This method will throw an error for continuous mode axes or if there is no axis by that name.

    Parameters

    • axisName: string

      The name of the axis

    Returns null | DataViewHierarchyNode

    1.1