g3-toolkit API Reference
    Preparing search index...

    Interface CategoricalScale<T>

    interface CategoricalScale<T> {
        domain?: string[];
        kind: "categorical";
        overrides?: Record<string, T>;
        palette?: PaletteName | T[];
        unmapped?: T;
    }

    Type Parameters

    • T
    Index

    Properties

    domain?: string[]

    Explicit value order (review 4.4): values listed here take palette slots by POSITION, independent of the order the data is encountered, so the same spec yields the same output across different projections of the same universe (encounter-order assignment made colors reshuffle per view). Values not in the domain continue encounter-order assignment after it.

    kind: "categorical"
    overrides?: Record<string, T>

    Per-value pinned outputs; win over palette assignment.

    palette?: PaletteName | T[]

    Named palette or custom output array, consumed in value order.

    unmapped?: T

    Output for values with no palette slot and no override.