g3-toolkit API Reference
    Preparing search index...

    Interface LabelCollisionOptions

    interface LabelCollisionOptions {
        maxLength?: number;
        mode: "hide" | "shorten";
        padding?: number;
    }
    Index

    Properties

    maxLength?: number

    Maximum character count of a shortened label, ellipsis included. Default DEFAULT_LABEL_MAX_LENGTH.

    mode: "hide" | "shorten"

    "hide": losers are hidden. "shorten": losers are truncated when the truncated box fits, hidden otherwise.

    padding?: number

    Extra clearance (same units as the boxes) required between two placed labels. Default 0: boxes that touch do not collide.