View as Markdown

API reference: @salmonui/charts/gauge

GaugeRangeinterface

import type { GaugeRange } from '@salmonui/charts/gauge';
interface GaugeRange {
    readonly id?: string | undefined;
    readonly from: number;
    readonly to: number;
    readonly width?: number | readonly [
        number,
        number
    ] | undefined;
    readonly position?: GaugeTickPosition | undefined;
    readonly color?: string | undefined;
    readonly label?: string | undefined;
    readonly draggable?: boolean | undefined;
    readonly step?: number | undefined;
}
GaugeRange members (9)
NameSignatureDescription
idoptionalreadonly id?: string | undefined;
fromreadonly from: number;
toreadonly to: number;
widthoptionalreadonly width?: number | readonly [ number, number ] | undefined;

Band width in px, or [start, end] for a tapered band. Default 10.

positionoptionalreadonly position?: GaugeTickPosition | undefined;
coloroptionalreadonly color?: string | undefined;

Data color; default the categorical palette slot.

labeloptionalreadonly label?: string | undefined;

Legend and tooltip text; default from–to.

draggableoptionalreadonly draggable?: boolean | undefined;

Both ends become slider thumbs; onRangeChange reports the moved range.

stepoptionalreadonly step?: number | undefined;

Keyboard and drag step of the thumbs (default 1 % of the axis span).